How to get details about all the style layers fetched by the style url? #3563
-
In Mapbox GL for web, you can use functions like map.current.getStyles() and map.current.getLayer() to fetch details about all the layers. How can we achieve similar functionality in @rnmapbox/maps? Additionally, the function queryRenderedFeaturesInRect in RNMapbox returns a FeatureCollection instead of the complete feature, making it difficult to identify the feature without an ID. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@hiteshmodi0624 iOS api does support - https://docs.mapbox.com/ios/maps/api/11.5.0-rc.1/documentation/mapboxmaps/stylemanager/alllayeridentifiers and https://docs.mapbox.com/ios/maps/api/11.5.0-rc.1/documentation/mapboxmaps/stylemanager/layerproperties(for:), but it's not wrapped by the library. And on android via: PR or sponsoring the implementation of this feature is welcome! |
Beta Was this translation helpful? Give feedback.
@hiteshmodi0624 iOS api does support - https://docs.mapbox.com/ios/maps/api/11.5.0-rc.1/documentation/mapboxmaps/stylemanager/alllayeridentifiers and https://docs.mapbox.com/ios/maps/api/11.5.0-rc.1/documentation/mapboxmaps/stylemanager/layerproperties(for:), but it's not wrapped by the library.
And on android via:
https://docs.mapbox.com/android/maps/api/11.5.0-rc.1/mapbox-maps-android/com.mapbox.maps/-style/style-layers.html, https://docs.mapbox.com/android/maps/api/11.5.0-rc.1/mapbox-maps-android/com.mapbox.maps/-style/get-style-layer-properties.html
PR or sponsoring the implementation of this feature is welcome!