Skip to content
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

Is there a connection between the feature in the map source and the features returned by the Search API #815

Open
asok opened this issue Dec 17, 2024 · 0 comments

Comments

@asok
Copy link

asok commented Dec 17, 2024

The suggest endpoint returns mapbox id attribute of a feature that can be later used to fetch more data via retrieve endpoint.

Is it possible to get that mapbox id from the rendered features in the map? When I register a tap listener and call queryRenderedFeatures I'm getting such data (no mapbox id there):

{id: 224626671, type: Feature, properties: {name: Ortega Park, name_script: Latin, maki: park, filterrank: 3, class: park_like, category_zh-Hans: 公园, iso_3166_2: US-CA, type: Park, iso_3166_1: US, category_en: Park, sizerank: 14}, geometry: {type: Point, coordinates: [-122.02557027339935, 37.3421550755933]}}

How can I display a full set of data after clicking on a POI on the map?
My initial assumption was that I can query the rendered feature, obtain an ID and use that ID for retrieving more info on the feature (like opening hours etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant