-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
.getStyle
is broken for Standard style
#13160
Comments
Adding a +1. This is a well-documented report. I agree that this new Standard Style introduces some breaking changes/inconsistencies. The workaround above was helpful and I'm good to go moving forward, but I expect this to cause more people some headaches. |
Hi everyone 👋 Thanks for reaching out and sorry for any confusion. I understand the frustration when things don't work as expected. With the new Mapbox Standard style, we're introducing a different approach to handling map styles. When you use this style in your application, we take care of updating the basemap with the latest features automatically, so your users always see the most up-to-date version without any extra effort from your side. For the Mapbox Standard style or any "fragment" style (those with I’ll update the related documentation to clarify this. We don't plan to add an API for accessing import internals directly. However, I'd love to understand more about your use case. @korywka, could you please share why you need to get the import's |
Hi. |
According to MapBox JS API docs,
getStyle
method returns Style JSON:There is not any mention or hint about
Standard
style, for which this method returns different:This makes harder to retrieve current style
name
orurl
property.Some developers even think that
Standard
style doesn't havename
at all: korywka/mapbox-controls#55.Current fix looks like this:
My proposal:
Standard
style.getStyle()
documentationlet it be
string
forurl
likemapbox://styles/mapbox/satellite-streets-v12
ormapbox://styles/mapbox/standard
andObject
for plain JSON style.Or suggest please another way to identify loaded style among others.
The text was updated successfully, but these errors were encountered: