Open riastrad opened 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.
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.
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.
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.