@maplayr/react-native
    Preparing search index...

    Function Shape

    • Displays a route on the map as a colored line. Multiple shapes can reference the same route to create visual effects like outlined paths.

      Parameters

      Returns null

      const route = useRoute(mapLoadResult, {
      origin: startLocation,
      destination: endLocation
      });

      <MapView map={mapLoadResult.map}>
      {route && (
      <>
      <Shape route={route} strokeWidth={10} strokeColor="#E8FCFF" />
      <Shape route={route} strokeWidth={5} strokeColor="#007AFF" />
      </>
      )}
      </MapView>