mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.05k stars 2.21k forks source link

Maki Marker-15 icon not showing properly (Streets style) #9732

Closed atyshka closed 4 years ago

atyshka commented 4 years ago

1.10.0:

Latest Chrome:

Steps to Trigger Behavior

Attempting to create a custom marker layer, I want to use the Maki icon for a marker rather than having to create a custom icon.

Link to Demonstration

https://jsfiddle.net/d4jcpr6u/

Expected Behavior

When using the streets style, adding in a marker-15 icon to the map should show the corresponding teardrop-shaped pin from Maki.

Actual Behavior

The marker simply renders as a plain dot, rather than the Maki icon. This issue does not occur when using other styles such as light.

Is this an intended override for the streets style or is this a bug? Either way, how can I get the intended behavior?

ryanhamley commented 4 years ago

Hi @atyshka the default marker changed in more recent versions of Mapbox styles. You'll notice that light-v10 uses the dot marker instead of the teardrop pin. It's possible to change the default marker to the pin using Mapbox Studio. Mapbox provides a set of Maki icons that includes the pin as marker-15 and marker-11. You'll need to create a custom Streets (or Light or whatever) style in Studio and upload these icons. This guide should help you do that. Thanks for using Mapbox!