Viewport Places Plugin

Keep parking, chargers and supermarkets in view as the map moves, each set appearing from its own zoom level

View on GitHub
Viewport places plugin 0.5.10Public previewSDK 1.0.0-rc.7

Parking, charging stations and supermarkets appear for whatever the viewport covers and follow the camera as it pans and zooms.

  • new ViewportPlaces(map) watches camera moves, searches and renders, so no move handler of yours is in the loop.
  • addPOICategories declares one layer per call, and a later call draws on top of the ones before it.
  • add takes a search query and the places styling together, so a branded layer costs the same one call.

Related examples