Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Remove or modify the use of the Marker API #1315

Open
riastrad opened this issue Jan 21, 2020 · 3 comments
Open

Remove or modify the use of the Marker API #1315

riastrad opened this issue Jan 21, 2020 · 3 comments

Comments

@riastrad
Copy link

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

mapbox.js/src/marker.js

Lines 23 to 26 in 3ac9871

iconUrl: format_url('/v4/marker/' +
'pin-' + size.charAt(0) + symbol + '+' + color +
// detect and use retina markers, which are x2 resolution
(L.Browser.retina ? '@2x' : '') + '.png', options && options.accessToken),

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

@riastrad riastrad added this to the v4.0.0 milestone Jan 21, 2020
@riastrad
Copy link
Author

riastrad commented Jan 29, 2020

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
Copy link
Author

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
Copy link
Author

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.

@riastrad riastrad removed this from the v3.3.0 milestone Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant