-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add separate apis for geometry and rendered feature queries #2106
Comments
+1 for separate methods. For raw feature querying, it would be helpful if we could just expose the raw tile geoJSONs as they get decoded from the buffer. Any subsequent filtering (like radial search in This way, we can draw a clear delineation between the underlying data (best handled by data tools) and their visual representation (the realm of gl-js). |
@peterqliu Any naming ideas for names for the two APIs? |
I agree with making
|
it depends how we want to expose the tile data-- as an array of separate tile geojsons, or a single featureCollection with all data currently loaded and cached? Combining them provides the best user experience (won't have to bust out |
The callback would be called with an array of geojson FeatureCollections. One for each tile. Each FeatureCollection would have a Does the general idea look good? |
This is a very interesting feature. How do you expect If the tile could be downloaded on-demand, and provide the source data upon a query, then this feature opens up a whole lot of great use-cases. |
Is the main different between these apis how we are collecting the data or what data we are collecting? If I'm not mistaken the current featuresAt changed how we are selecting features. This move was from selecting by where features are before styling to selecting by where features are after styling. Is that correct? With that question out there, is the goal of the second api to select the same data as |
@kristfal we don't, yet.
@mcwhittemore both, if I'm understanding you. |
@mcwhittemore We haven't released any major Under this proposal, we would likely remove the
|
@jfirebaugh & @peterqliu thanks for clearing things up for me. If I don't have any use cases (that I can think of) that require querying for raw tile data in Studio or |
`getSourceTileData` calls the callback with an array of GeoJSON FeatureCollections (one for each tile). fixes #2106
I didn't add the It doesn't return anything for raster tiles. Should it? How does this fit in with the GeoJSON returned by vector sources? |
`getSourceTileData` calls the callback with an array of GeoJSON FeatureCollections (one for each tile). fixes #2106
`getSourceTileData` calls the callback with an array of GeoJSON FeatureCollections (one for each tile). fixes #2106
`getSourceTileData` calls the callback with an array of GeoJSON FeatureCollections (one for each tile). fixes #2106
`getSourceTileData` calls the callback with an array of GeoJSON FeatureCollections (one for each tile). fixes #2106
`getSourceTileData` calls the callback with an array of GeoJSON FeatureCollections (one for each tile). fixes #2106
`getSourceTileData` calls the callback with an array of GeoJSON FeatureCollections (one for each tile). fixes #2106
The current
featuresAt
matches features based on their geometries instead of their rendered representations. #2052 changes that. With that pr, queries match features in symbol layers if they match the actual symbols that are rendered. They match lines if the query matches the buffered line that is rendered.@peterqliu pointed out that it's still useful to have a way to get the geometries from vector tiles.
We could either add a parameter to
featuresAt
to switch between the two query types or we could make two separate methods: one for interacting with features on the map and one for getting raw features from vector tiles.I'm leaning towards two separate methods because:
source-layer
andfilter
as part of the query? This would let you query data not used by the style.This question is blocking #2052
What do you think? @peterqliu @jfirebaugh @lucaswoj @mourner
The text was updated successfully, but these errors were encountered: