nitaliano / react-native-mapbox-gl

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

How to get layer type #1536

Closed SimonRobert0 closed 5 years ago

SimonRobert0 commented 5 years ago

Hello everyone,

Is it possible to get the type property that I set on the Mapbox dashboard when I click on my layer > select data (top right of the new panel and new to style). I use this package on a React Native application.

I need to get this data because in my case, the field type is set to pass data on the type of way.

Does anyone know how to get the field ? On navigate or before ?

See the picture of data This screenshot is the data that I want to get and is tacking from the Mapbox dashboard

Thank you for your help

(This issue is a duplicate of this StackOverflow post)

kristfal commented 5 years ago

I’ve never used the mapbox data editor, so cant help you there, sorry. AFAIK this library only expose properties for each individual feature rather than on a layer level. If you know the underlying composition of the property or a workable native code example, I may be able to help.