-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How to get a list of sources? #7529
Comments
Ah I see this now from #2625
However, in this case I actually want to modify the state_label data source so I can use 2 letter abbreviations rather than the shortened name. Will I need to get the style update the data there and add it using setStyle or is there an easier way to achieve this? |
I can see the layers by logging the composite source, but have no idea how to add the metadata I want to the state_label. And I'm not understanding the difference between 'source' and 'sourceLayer' on the state label layer.
|
|
Difference btw |
You can call Please note that this issue tracker is for reporting bugs and requesting features. For general how-to questions, you can contact our support team or check out sites like Stack Overflow. |
This is not complete true, as this will return only sources defined in style and leaves out sources added later via map.addSource() |
mapbox-gl-js version: 0.48
How do I get a list of sources for my map?
Noob question here. How do I get a list of sources for my map? It looks like there is a github issue for mapbox native, but I don't see a corresponding one for mapbox gl js mapbox/mapbox-gl-native#7285
map.getSource('state_label');
gives me undefined.
The text was updated successfully, but these errors were encountered: