mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
478 stars 134 forks source link

Method to get source features #2456

Open bartek977 opened 3 months ago

bartek977 commented 3 months ago

New Feature

It would be helpful to have a function that returns source features, regardless tiled data

Why

I need to get the source feature, but when I use querySourceFeatures I get duplicate elements (the source contains only one feature, but I get 6). I know that the method can return duplicates as it is in the documentation, but I couldn't find a way to obtain the original feature. The feature has id and some properties, but I can't filter the result as all returned elements have the same ids and properties. The only difference between them are coordinates. Now I'm using geojsons sources so my workaround is reading the feature directly from file, but I'm curious if there is a possibility to get the feature from the map. Also, I'm planning to try the vector tiles and I'm wondering how I can handle it then.