read poi types from custom maps #4345
Open
+40
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
cpp pull request
Before: Poi from custom American plugin maps are not clickable by short touch. Only for long touch.
Because their poi.type == nil.
unknownLokations = true if long touch.
Synced this code, loading and parsing on loading app all obf files for their poi categories and types:
https://github.com/osmandapp/Osmand/blob/3fb9e17e23ca33b6f3755357c6487deab38c85fd/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java#L691
After: Poi are clickable by short touch.
Screen.Recording.2025-02-03.at.13.38.46.mov
test point: 40.02942 -105.31002
need The US maps Plugin - https://osmand.net/uploads/plugins/us.maps/2/
TODO:
Android don't parse all obf files every app load. It read/writes parsed result to database. Need to implement.
https://github.com/osmandapp/OsmAnd/blob/master/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java#L54
https://github.com/osmandapp/Osmand/blob/1873992309cd40ba8f866437113632624b81069c/OsmAnd/src/net/osmand/plus/poi/PoiFilterDbHelper.java#L364