Closed jradasaurus closed 4 years ago
@jradasaurus the following methods both call querySourceFeatures
behind the scenes:
-[MGLShapeSource featuresMatchingPredicate:]
-[MGLVectorTileSource featuresInSourceLayersWithIdentifiers:]
Note that these methods are not on MGLMapView
but on the source.
Hello,
It appears iOS SDK does not have a querySourceFeatures method. Checking both the documentation and the source code there does not appear to be a way to query for all features (only the related visible feature methods are available).
The Android SDK has it: https://docs.mapbox.com/android/maps/overview/query/#query-source-features
The JS SDK has it: https://docs.mapbox.com/mapbox-gl-js/api/#map#querysourcefeatures
And the relevant changes were merged into GL Native Core in 2017: https://github.com/mapbox/mapbox-gl-native/pull/8263
Is there a reason it's not available in the iOS SDK? It seems it was supposed to be part of iOS 3.5.0 release (a few years ago). Any information on this much appreciated- maybe I missed the API documentation!
My use case: I want to show a popup that lists all of the features contained at a specific point (or small bbox)- and do that for all layers/features, not just the few that are visibly rendered (ie I want to capture lower level layers from my data source which are custom marine tiles).