Back to all examples

Along route search

This example on GitHub

Find the beaches and viewpoints within a one-minute detour of a coastal drive

A coastal drive is drawn, then the beaches and viewpoints within a one-minute detour of it appear as pins, each category with its own icon.

  • calculateRoute and RoutingModule.showRoutes draw the drive the search then runs along.
  • discoverPlaces takes that route as its search area instead of a position, so the detour limit is part of the query, and filters.poiCategories says what to look for as ids rather than free text.
  • PlacesModule.show takes the search response as it stands. It is already GeoJSON, so there are no layers or icons to wire.

Related examples