POI category icons playground

Pick a circle, square, diamond or pin, and its colour, per POI category, on the map's own POIs and on searched places alike

View on GitHub
SDK 1.0.0

Every category’s icon changes at once on the POIs the map style draws and on the places a search found, from one list of images.

  • POIsModule takes icon.categoryIcons and redraws the style’s own POI layer with it, leaving every unlisted category its map icon.
  • PlacesModule takes the same list, matched by map category, so RESTAURANT also reaches a searched ITALIAN_RESTAURANT.
  • Each icon is an SVG string that places a category’s glyph file inside a shape outline, so any glyph goes with any shape.
  • One offsetY per entry stands a pin’s tip on its place under both modules, since each draws the icons centred.

Related examples