[styles] Hide icons for unnamed gardens forests parks #3386
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#3386
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "hide-icons-for-unnamed-gardens-forests-parks"
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?
Currently we show icons for
landuse=forest
,leisure=park
,landuse=garden
areas. But this areas are often pretty small which means we will show a lot of icons on a screen. In my area this is quite big problem especially forlanduse=garden
which is used often as general "maintaned greenery" area and it looks very bad with a lot of icons displayed. But even for small "forest" areas I don't see much value in displaying this icon (you can clearly see this is some "green stuff" and if you want to know more you can select it).Recently this problem was a bit mitigated by not showing icons for "residential gardens" (organicmaps/organicmaps#1746) but in my experience
garden:type=residential
is often not set.I propose to only show icons for "named" green areas. Very often this are parks, some bigger gardens and forests. Something of bigger significance that can justify icon. This was already suggested here and I completely agree with it.
Here are some before/after examples:
before:
after:
However, we still show areas with a "name" tag. Examples:


garden with name
park with name
Thanks, generally, the map looks cleaner.
As I mentioned in the referenced issue, what about motivating users to edit/add missing data by showing clickable icons?
What about hiding icons if the area of the feature is below a certain threshold?
Thanks @biodranik :)
I replied in organicmaps/organicmaps#1746 to keep the discussion in one place
@vng PTAL
Well, this is a trade-off change and looks like it's the best currently available option.
Some areas become cleaner, but some areas also will be a bit empty.
The ideal fix is to have some dynamic icons filtering mechanics depending on POIs density. Some day in future.
It would be sad if large remote forest icons will disappear after this change. Maybe it's scope can be narrowed to city gardens only?
It would be better to test it and compare it in some beta version first, without merging to the master.
Should I rebase it on
beta
branch then?Should contributing PRs go to
master
orbeta
? I didn't found such information in CONTRIBUTING.md file.I think this issue can be solved by introducing textures for area objects. Right?
At the moment, round icons for natural things do not follow the consistency rule that we try to follow: icons with circles are related to some businesses.
What if (as an experiment) we try to remove circles for these icons? Maybe also for forests and parks? Will the map become cleaner?
Regarding branches, you can make PR to the beta branch. I've actualized it with the current master.
I would love to have some textures on OM.
osm.org have them and in some cases it makes it very clear what area represents (like "forest", "scrub", "cementary", etc), some are more arbitrary (like the
landuse=garden
,landuse=allotments
) where I would not guess what it represent without learning it.mapy.cz uses textures much less often but still for some areas they use them to make it much clearer what you see ("cementary", "wetland", "swamp")
But IMO in this case (
landuse=forest
,leisure=park
,landuse=garden
areas) not having textures is not a big issue. I just think for this types of areas, when they don't have a name, it's good enough to render them as "some shade of green" area. Most people don't care about concrete type of such greenery and they don't need and icon for it.But I see you care about distinguishing this kind of areas with an icon or a texture. IMO texture is 100 times better that icon for such areas.
I think if will be much cleaner. IMO even if we remove icons completely for this areas it would be an improvement.
ok, I'll rebase commits from this PR to beta branch
Using textures instead of icons sounds like a great idea as some areas can't be differentiated (like some greenery). However, I'd suggest to choose only subtle indications for areas to keep the map "clean". And only where really necessary.
Agreed, I quite like that OM uses so few textures, it makes it look very clean. If textures are used, they should be very subtle
I agree with @Misalf-git and @endim8.

I'm not a big fan of heavy texture map like on osm.org. I mentioned stuff like "cementery", "wetlands", because for me this are good examples when subtle texture improve the map visibility and makes it "cleaner".
Examples:
landuse=cementery
natural=wetland
But when it comes to areas of different types of greenery I prefer just solid colors. When I see light green I can guess it's most probably grass-like area (
landuse=grass
,natural=grassland
,landuse=meadow
, etc), anything with darker green is probably something with trees, bushes or some maintained greenery (landuse=forest
,natural=wood
,leisure=garden
,leisure=park
,natural=scrub
,natural=shrubbery
,landuse=village_green
, etc). I'm not interested in details.I think @biodranik have different opinion on that:
For me if such remote forest icon would disappear then it would still be an improvement. This icon for me doesn't provide any value.
However, if we would get rid of icons for such green areas I think it's worth to think if we can improve the UX of selecting an area.
Right now you can easily tap on map any icon and any building. But for other areas you need to touch and hold for some time to select and area. This IMO is super undiscoverable UX. Why we can't easily select any areas? The fact that you can easily tap the screen to select any building (and for example see that it's actually a "garage") seems a bit arbitrary. Having possibility to easily tap on green area to check that it's a forest would be great for those that want that information (but as I said I think not many people want it anyway)
We tried the "single tap selects everything" strategy, and got many complaints from users who accidentally selected something, and Place Info Page appeared. There is also an existing feature on a single tap on an empty/remote area, that toggles the fullscreen mode. There should be some better way, let's brainstorm it.
Ah, this damn users with their fat fingers! 😡 😉
More seriously though, for me this PR is actually quite a good solution. You can click green areas that have name easily and I don't care about these areas that don't. I would also like to change the icon to not have round background to make the map a bit "cleaner".
But to summarize other suggested options and cons that some people raised (it's all subjective so some cons can be actually pros to some 😉):
name
tag. Basically this PR.Cons: icons won't be shown for things like large remote forest
Cons: map will not look that "clean"
cons: there are some small named areas that are worth to show
Cons: better that nothing, but IMO map will be still not "clean" enough.
I'm also using mapy.cz app the most (after OM of course) and did some analysis of how they render OSM green areas for comparison/inspiration:
leisure=garden
areas so you can click it, they don't show icons for unnamed gardens, just render green area. It's basically the same behaviour that this PR introduce.leisure=park
,landuse=recreation_ground
Render area and icon for areas with aname
tag, no icons for areas withoutname
tag.BTW, OM doesn't render an icon for named
landuse=recreation_ground
but display clickable label.leisure=garden
andlanduse=grass
at all. I'm Not sure why. I guess they don't want to render too many small areas like that in a city. This is something I dislike a lot. Map doesn't look that detailed because of that.landuse=forest
they don't render icon at all, for named forest they display the name but you can't click itLooks like they mostly came up with similar solution like this PR, except they decide to sometimes not render green areas at all in a city and they don't show clickable icons for forests.
There are many good points mentioned in the conversation.
Regarding this PR, @mpawelski can you please try to remove circles for icons and compare screenshots? In theory, the map should become way cleaner.
Let me summarize:
I removed background from forest, park, garden icons. However, I was afraid the contrast of "dark green icon" on "light green area" might be not enough to distinguish for some people (currently the icons with background have small outline/border around the circle - white with 60% opacity) so I also tested version with similar outline around the shape of an icon without background.
Here are the icons I used:
landuse=garden
leisure=park
landuse=forest
Screenshots
(I recommend to zoom out a bit in browser to view it 😉 )
lots of small gardens
another small gardens, on zoom 18, this areas were even smaller then the icon
here we can see small forest areas
garden with a name
"node garden" - garden mapped with a single node, not as area
some named park
some named
landuse=forest
andleisure=nature_reserve
My observations
Reply to @biodranik
We have different opinion on that. But that's ok. You clearly want to have some indication that there are trees on area. IMO adding subtle texture would be the best solution for it.
I don't think forest icons are that usable because, IMO, from user perspective they can be positioned at seemingly random places where there are not immediately visible and are actually quite hard to find.
This is especially annoying for bigger areas where I have zoom level where such icon is rendered, but the area is quite big so the icon is not displayed "at the edge" of area where I'm probably standing so to find this icon I need to pan the screen and actively search for this icon. And when I zoom out to see the whole shape of this big area the icon is disappearing because we don't show such icons on smaller zoom level. In practice the best solution to verify that this is a forest is to touch and hold to select the area.
That's why I think if we really want to make it clear that area is forest the textures is the only way. As an intermediate step we can also consider changing the color of forests to something else to make it more distinguish from parks and garden. The icon itself is not that useful.
So currently OMaps doesn't have any possibility to render textures similar to osm.org?
Actually, I gave a second though on this idea. My previous objection to threshold was that there are small named areas that should be displayed. But we can decide to always render icons for named areas and provide a threshold logic for those that doesn't have a name.
You mean adding garden in OM? Can we do that?
For me this whole PR and discussions is about areas.
leisure=garden
can be a node according to wiki but I see mapping it as an area is vastly more popular (taginfo).I think we can simply decide to always render an icon for "node garden".
BTW, osm.org doesn't render anything for "node gardens", OM does :)
Yep, but maybe we can consider again threshold option for one last time?
Summary. What I propose.
Use icon without "circle backgrounds" for garden, park and forest
(optionally) for consistency use "backgroundless" icon but with slight outline for named areas.
Cons: this is very small styling change not worth the added complexity in styling rules and having additional icon files.
Always render icons for named forest, garden and parks areas but for unnamed ones we should not render icon for really small areas (figure out some threshold)
What you think @biodranik?
First, thank you for the detailed investigation and comparison, that's a lot of work! I really appreciate your approach to solving issues :)
Second, I mostly agree with your observations:
What do you think about these priorities/tasks?
thanks a lot for the kind words :)
For icons without "holes" (like forest, park) it was actually easy to add this outline to SVG: just add a "stroke" with proper width to the "path" element and set "paint-order" to "stroke fill marker".
However, for icon with hole inside (like garden) I didn't like the outline inside the "flower" circle so in the end I removed it manually ("Convert strokes to path" in Inkscape, and did some manual modifications to get rid of outline inside).
So, I'm not sure how hard it would be to add such outlines programmatically, but I agree this would be great if we do it :)
BTW, I had to convert strokes to path even for forest and park icon in the end because "./tools/unix/generate_symbols.sh" didn't generate proper "symbols.png" file from them. Just FYI.
Yep, I also read about this plan somewhere. That's why I was a bit hesitant about providing additional icons with outline because I guess the point is actually to minimize the amount of icons we have to one "basic" icon and programmatically add "circle background" or "outline" when necessary.
But I guess adding this "core SVG support" is a bit long term plan, and in the meantime we can live with many icons variants.
I could experiment with some smaller icons. But I'm actually more leaning toward this threshold approach and setting this threshold to pretty low to get rid of this icons abundance in places where there are many really small green areas like in example 1 and 2. At least for bigger areas this icons are not that much distracting after removing background from them.
I agree, textures seems to solve most of our problems (get rid of "icons abundance" while making it clear what the area actually represents). We would just need to make sure this textures are informative, yet subtle to make the map feel "clear". But this is a normal "styling nitpicking" ;)
I was hoping threshold approach could be achieved just by changing some .mappcss files. I see styles like that in the project:
and was hoping to use this "bbox_area" feature. Won't it work?
Yep, it won't be consistent but at least there will still be some indication there there is some "green stuff" (icon for node, green area for small areas). Node gardens are not that popular anyway (10k vs 940k). I agree having textures would be the best.
1,2,3 - Sure, I will check the night mode and experiment with outline icons for outlined text.
Will post the result here when I'll have time to work on it!
4 - Sounds good. But I will leave this to someone else. I guess I'm not that versed in C++ and the OM codebase yet to even approach it.
I was also thinking about testing "threshold" or "smaller icons" approach but I think I will now focus on 1,2,3 tasks because this will be an improvement anyway and I want to see it in OM sooner than later :)
What kind of error did you get? That should be fixed. What is your version of Qt in the system?
Right.
You may try it. But it is not the best approach. The filter should not filter based on one feature's area, but filter based on the number of nearby icons. And that's a more complex task.
Regarding textures, you can help by providing a pattern matrix with 0 (transparent pixel) and 1 (non-transparent one) for some popular patterns. Something like that: https://www.pixilart.com/draw/texture-694e374ce4
I'm using WSL on windows. this is what
qmake --version
command tells me:No error. Just different looking icon in "symbols.png".
Ok, I did some more test and concluded that SVG strokes are indeed recognized and rendered in "symbols.png", but the
paint-order="stroke fill markers"
is not recognized (so it looks as if the default "fill stroke marker" order was taken).But this might be limitation of QT. It says that it support "SVG 1.2 Tiny." and I don't see any "paint-order" mentioned there so it just might be not supported.
Examples
For this svg (original file from the project with manually removed background "by hand" by removing




<circle>
element):I get this ".\data\resources-xxxhdpi_clear\symbols.png" file after running
./tools/unix/generate_symbols.sh
:When I modify svg and add
stroke="#fff" stroke-opacity=".6" stroke-width="2" paint-order="stroke fill markers"
to it to get this svg:after running
./tools/unix/generate_symbols.sh
i get this ".\data\resources-xxxhdpi_clear\symbols.png" file:It looks that the stroke is also rendered "inside" the shape just like in this svg (like previous but without
paint-order="stroke fill markers"
:):For which the same "symbols.png" is generated:

Yep, this would be filtering icons by "POIs density" mentioned by vng. But maybe filtering just by this "bbox_area" will be good enough. I'll try to do some experiment with it.
Please try to use a compatible SVG format. It may be worth mentioning it in our documentation somewhere.
ok, I did some work on it but first I want to ask about some strange behavior of changing label's color for some nature icons. It looks that on zoom up to 16 the label is green in day and night theme . After zoom 17+ it changes to dark label in day theme and white label in night theme.
Is it intentional? Should label just have the same color on all zooms? Here's how the video to show what I mean:
https://user-images.githubusercontent.com/2056282/194949677-a1df4d9b-e559-4178-9f4f-53b48d36ae5c.mp4
Looks like a bug in styles to me. First we define that it should be green, later in different file it's (probably accidentally) overriden for zoom 17+.
I'm asking because currently I prepared icons for night theme with white outline but I'm thinking if it would be better to fix this label styling to always have green color with dark outline in night theme and change the outline to also be black (so icon will be green with dark outline, just like the text). What do you guys think?
Anyway here are screens with what I have so far (with white outline in dark mode):
Screens
Changing labels' color looks like a bug. You can confirm it by checking git history using git blame locally or here, on Github.
It's hard to tell anything from git history. this
node|z17-[leisure],
line is from refactoring commit by @Zverik that introduced this file. Probably the bug was introduced by accident in this big refactor 6 years ago.I will try to fix it. The easiest fix would probably be just replacing this
node|z17-[leisure]
with all theleisure=value
tag we support (we can take it from "mapcss-mapping.csv" right?), except the nature ones where it breaks the styling (leisure=park
,anduse=forest
andleisure=garden
) . @biodranik do you think it's acceptable fix?It would mean that if we add new
leisure
tag support then we need to add styling rule for it. But I think it's acceptable, you need to test how new POI is rendered anyway.The other approach would probably require big refactoring of styles. Analyzing what other styles without value (like [
leisure]
, [sport
], etc) can override previous style with a value (like [leisure=garden]
) and moving this styles first. Sound like a lot of work, not sure if it's worth it.@vng can you please suggest something?
79 commits ahead? Something is wrong here, please, make correct rebase above master.
While we're deciding how to fix this labels styling I would like to get some feedback about styling and help with crashing android app.
I changed white outline in dark mode to dark outline and fixed changing outline in label for
leisure=park
andleisure=garden
to test how it will look.Examples
How do you like it? For me it looks quite good. The dark outlines are more subtle than in day theme (I didn't changed them since last time, you can see the day theme examples in my previous post) because of lower contrast.
But I don't want to make just the outline for dark theme bigger, because I want to keep day and night icons mostly the same, just with different color values. Though, I would also consider making garden outline a big bigger in day and night theme if you think it's not enough.
I fixed the mentioned
node|z17-[leisure]
line with the approach I described before (replaced it with[leisure=value]
selectors of all the tags that we support, minus the conflicting nature ones, and minus the one handled in this Icons.mapcss file). If we want to be sure that these selectors forleisure=value
are unnecessary then we would probably have to check it manually POI by POI.However I have different problem. The application is crashing when I change the theme in android emulator. I changed just the styling files and added some icons so I have no idea how it affects android code. Maybe someone can help?
It crashes when I go back from settings menu to map after changing theme:

logs:
It's throwing error in MapButtonsController.java, look like pretty new code. However I don't get this crash on latest master, just in my branch (that's based on latest master). This is really confusing for me because my changes are basically in styling only.
@vng yep, sorry, I messed up a bit, should be good now. Now it's based on master and PR is to master (the previous @biodranik comment about merging it to beta was when this PR was about removing unnamed garden icons, but the code changed to just replacing icons to the one without circle background, so maybe it can be merged to master now?)
ok, now, it's ready to review if you want to take a look...
Would be great if someone could test this branch if they also have crashes in android when changing theme.
I received review request for translation, but I haven't found where this PR change string?
It looks like that PR touched all translations initially, but removed this change later. Sorry for the noise.
Will check later. Have some ideas how to fix this leisure
@mpawelski Updated your branch. Please, check that it's exactly what you wanted to achieve.
@vng Great, your styles changes are better, you even fix my copy-paste error ("park-outline-outline-m.svg" 😅).
I checked the styles on desktop app and it works how I want. :) For me we can merge it.
Though i didn't check if my previously mentioned issues with crashing android app when changing theme is still occurring.