Path component.

A Path indicates a route on the map.

const space1 = mapData.getByType('space')[0];
const space2 = mapData.getByType('space')[1];
const directions = mapView.getDirections(space1, space2);

return directions ? <Path coordinate={directions.coordinates} options={{ color: 'blue' }} /> : null;
  • Parameters

    • props: TupleToObjectWithPropNames<
          [coordinates: Coordinate[], options?: { id?: string } & TAddPathOptions],
          StreamAgentParameterNames,
      > & { onDrawComplete?: () => void } & RefAttributes<undefined | Path>

    Returns ReactNode

Properties

$$typeof: symbol
displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.

propTypes?: any

Ignored by React.

Only kept in types for backwards compatibility. Will be removed in a future major release.