Geometry searches along a route

Searching along a route using buffer polygons to search along its line

View on GitHub
SDK 1.0.0-rc.7

One Barcelona to Amsterdam route, searched three times against corridors of different widths around it: truck services far out, rest areas close in, chargers on the road itself.

  • discoverPlaces takes a geometries array of polygons, so corridor width is part of the query. A Turf buffer of the route line goes straight in.
  • Separate PlacesModule.create instances keep the three result sets apart, the chargers on the road itself under a markerType of their own.
  • PlacesModule.show consumes each response unchanged, so widening a corridor is a one-number edit.

Related examples