[placepage] Show all types (filtering only POIs) #8481
No reviewers
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
3 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#8481
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Retrying to add all types to Place Page. Now it should be better than organicmaps/organicmaps#8238, as it will only show types matched by existing checker
IsPoiChecker
. This should filter out useless stuff and internal things like psurface-*.32fa582316/indexer/ftypes_matcher.cpp (L461-L482)
@ -97,0 +109,4 @@
// Ignore types that are not POI
// Ignore general types that have no subtype
// But always show the first/main type
if (!isFirst && (!isPoi(type) || ftype::GetLevel(type) == 1))
Do multiple area features also work well? I wonder how they pass IsPoiChecker filter, or is it a not only POI filter?
@ -97,0 +109,4 @@
// Ignore types that are not POI
// Ignore general types that have no subtype
// But always show the first/main type
if (!isFirst && (!isPoi(type) || ftype::GetLevel(type) == 1))
Yes, they work fine
https://www.openstreetmap.org/way/1090710626#map=18/41.47902/2.09795
Thanks! A few comments
Would it work?
Will it work properly by leaving "amenity" where it's the only one type of a feature, and where types are "amenity" + "something" or "something" + "amenity" ?
Yes, it works
The first/main type is always shown, and amenity is ignored if it's not the first/main type so:
"amenity" shows "Amenity"
"amenity"+"something" shows "Amenity • Something"
"something"+"amenity" shows "Something"
Should be 1 /* level */ here.
IDK the motivation here, but consider using existing
IsPoiChecker
orIsAddressObjectChecker
nit: Put
!IsFirst
before other cond.I want this checker to only match "
amenity
" while not matching subtypes like "amenity-bar
" or "amenity-restaurant
"... I've been trying different things and I've found that using level=2 I can get this behavior. If I change it to level=1 then this checker matches both "amenity
" and all subtypes like "amenity-bar
" or "amenity-restaurant
"...The motivation is to filter out general "
amenity
" types while not removing subtypes like "amenity-bar
" or "amenity-restaurant
"...Ah, I see, good point.
Better
(!isPoint(type) || ftype::GetLevel(type) == 1)
and remove confusing IsGeneralAmenityChecker class.Okay! Makes sense! Thanks!
Are all types appended to "filtered" GetAllLocalizedTypes ? Does it look good?
What's the goal?
I think it's useful when debugging some things to be able to see all the internal types. It's not for users to use, it's mainly for developers. When this debug command is activated, all types are appended at the end of the description in the place page. See organicmaps/organicmaps#8481 (comment)
If you guys think it's not useful, I can drop the commit. No problem.
We are using the desktop version for debugging and development, it shows all raw tags. Also, repeating the same but not translated tags doesn't look convenient to read/debug.
Do you use the desktop version?
¡Gracias!
Its a useful feature, sometimes its very helpful to debug on a device.
Also power users were asking for it several times.
At the moment, all useful types should be printed. In general, debugging on a device is an interesting idea, it can be implemented with
#ifdef DEBUG
to avoid unnecessary overhead in production.Users were asking for it because they miss/expect to see standard osm tags. It's not the case.
What are your use-cases for debugging on the device?
E.g. road attribs like surface, hwtags - power users will be able to understand why routing avoids or prefers certain ways.
It'd be possible to check many things on the go without desktop access.
ifdef
is not needed - PP is not opened many times a second, there won't be overhead. Actually restricting it to debug version only will kill 90% of convenience and benefits of this feature.Road surface should be visible to all users without any debug commands.