nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 699 forks source link

Unable to set a worldview (to change displayed borders) #1684

Open dancherb opened 4 years ago

dancherb commented 4 years ago

Hello - I'm struggling from the documentation to see how to set a worldview for the map. I'm using a Mapbox map from a style URL, derived from one of the basic style templates.

Ideally, I'd like to change the country boundaries and labels based on whether a user is in India or the US. As a fallback, I'd be happy to set a fixed worldview (in this case IN) - e.g. from Mapbox Studio for the style itself.

This article suggests a "setFilter" method is available, though I'm not sure if/how this is exposed via the package: https://blog.mapbox.com/dynamically-change-disputed-national-borders-14c820cae923

Thanks!