Search code examples
javascriptmapboxmapbox-gl-jsmapbox-gl

Mapbox GL JS, change POIs size


I'd like to know if there is a way to change POIs size (schools, restaurants, ...) enter image description here.

I'm using Mapbox GL v2.8.2

On the documentation I only found about layers, but I'm not sure the "native" POIs are related to layers. Thanks


Solution

  • The POIs come from the Streets style. You can create a custom style in Mapbox Studio to edit the size of the POIs.

    • Go to studio.mapbox.com
    • Click Styles > New style
    • Select Streets then click Customize Streets
    • Under components, select Point of interest labels and adjust the Icon scale
    • Click Publish
    • Locate your new style in the list then click the 3 dots
    • Copy the Style URL
    • Set the style property of your map in Mapbox GL JS to your url