mapbox / mapbox.js

Mapbox JavaScript API, a Leaflet Plugin
mapbox.com/mapbox.js/
Other
1.92k stars 386 forks source link

Remove or modify the use of the Marker API #1315

Open riastrad opened 4 years ago

riastrad commented 4 years ago

By default, L.mapbox.style.marker points to a deprecated Mapbox API (v4/marker):

https://github.com/mapbox/mapbox.js/blob/3ac9871841ada8076edc6386f63f0a6dbb853802/src/marker.js#L23-L26

This integration needs to either be updated to retrieve some other default marker or be removed entirely.

riastrad commented 4 years ago

It's probably possible to avoid endpoint I/O entirely and use @mapbox/makiwich to generate these endpoints on the fly client-side. I think this would be preferable to removing the marker API from Mapbox.js.

riastrad commented 4 years ago

Investigating today - it looks like incorporating @mapbox/makiwich as a dependency would break some of our browser backward compatibility because of it's use of template literals.

Another solution might be to migrate the current use of the /marker/ endpoint to a similar request to the modern Static Images.

riastrad commented 4 years ago

This one is looking to be a little hairier than anticipated, so I'm de-scoping it from the current push for a new minor release.