mapbox / maki

A POI Icon Set
http://labs.mapbox.com/maki-icons/
Creative Commons Zero v1.0 Universal
1.5k stars 213 forks source link

hyphenated icons do not load #496

Closed LondonJammo closed 3 years ago

LondonJammo commented 3 years ago

I can load any icons with a single word as its name, however no icons with hyphens seem to load at all. I am using the following list of icons, however it may be out of date?

https://raw.githubusercontent.com/mapbox/maki/master/layouts/all.json https://labs.mapbox.com/maki-icons/

These examples work:

https://api.mapbox.com/v4/marker/pin-m-triangle+f0f.png?access_token=<mytokenhere>
https://api.mapbox.com/v4/marker/pin-m-star+f0f.png?access_token=<mytokenhere>
https://api.mapbox.com/v4/marker/pin-m-heliport+f0f.png?access_token=<mytokenhere>
https://api.mapbox.com/v4/marker/pin-m-circle+f0f.png?access_token=<mytokenhere>

L.MakiMarkers.icon({icon: "triangle", color: "#f0f", size: "m"})
L.MakiMarkers.icon({icon: "star", color: "#f0f", size: "m"})

These are a couple that do not work, however all hyphenated ones I cannot seem to load correctly:

https://api.mapbox.com/v4/marker/pin-m-castle-JP+f0f.png?access_token=<mytokenhere>
https://api.mapbox.com/v4/marker/pin-m-blood-bank+f0f.png?access_token=<mytokenhere>

L.MakiMarkers.icon({icon: "castle-JP", color: "#f0f", size: "m"})
L.MakiMarkers.icon({icon: "blood-bank", color: "#f0f", size: "m"})

The error I get is "Invalid Icon" from the API:

{"message":"Marker \"pin-m-blood-bank+f0f\" is invalid."}

Thanks

tristen commented 3 years ago

👋 thanks for flagging this @LondonJammo! Sounds like https://github.com/mapbox/makiwich which those endpoints depend on need updating to the latest version of Maki.

tristen commented 3 years ago

... and that v4 endpoint happens to be legacy (see https://docs.mapbox.com/api/legacy/maps/#retrieve-a-standalone-marker) closing as not actionable.