Repository navigation
Replies: 1 comment 2 replies
|
This isn't related to MapLibre Compose at all; the data comes from your map provider. What's the source you're using? You can check their documentation to see if they have any stable identifier for POIs. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What are you trying to achieve?
I need an ID to link a certain POI in the app database, make relationships (ex: user fav places), add opening hours etc
This would also simplify integration with other services like Overpass API
I have this small app:

If I click on the "🧺 Pandora" POI 3-4 times, then logs will appear in my console with data from
cameraState.projection?.queryRenderedFeatures:I try to figure out what fields I can use as an POI id
I have this json element:
{"name_en":"Pandora","subclass":"jewelry","class":"shop","name:latin":"Pandora","name_de":"Pandora","rank":92,"name":"Pandora","name_int":"Pandora"}And the coordinates always change for the same POI depending on slight differences in where I click:
Position(longitude=-122.408
52599293345, latitude=37.788087478703204)Position(longitude=-122.408
49564719989, latitude=37.788087478703204)Position(longitude=-122.408
55633866252, latitude=37.788103466263436)Position(longitude=-122.408
27311153281, latitude=37.78817541129503)I can't use the POI name it's not unique
I can't use the POI coordinates, they are taken from the map engine, not from layer data itself
How people deal with this problem ?
Affected Platform(s)
Library Version
latest
What have you tried?
Use cameraState.projection?.queryRenderedFeatures and detected location coordinates
Additional context
No response
All reactions