Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapbox Marker API no longer exists #43

Open
thejasonxie opened this issue Jan 3, 2024 · 1 comment
Open

Mapbox Marker API no longer exists #43

thejasonxie opened this issue Jan 3, 2024 · 1 comment

Comments

@thejasonxie
Copy link

See the line of code here for icon marker:

tokml/index.js

Line 203 in 91c3fa5

return 'https://api.tiles.mapbox.com/v3/marker/' + 'pin-' + size.charAt(0) +

https://api.tiles.mapbox.com/v3/marker/ no longer exists i think. Not sure if mapbox has another API for markers.

@thejasonxie
Copy link
Author

If anyone is experiencing this issue, my work around was just to set my geosjon simplestyle to have a white large marker which generates a url with that broken api that I replace with a pin from google map.

kml = kml
      .toString()
      .replace(
        'https://api.tiles.mapbox.com/v3/marker/pin-l+fff.png',
        'http://maps.google.com/mapfiles/kml/paddle/wht-circle.png',
      );

// then use xml-formatter

for other icons, refer to http://kml4earth.appspot.com/icons.html

This works for my use case because I only need this one white marker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant