enzet / map-machine

Python renderer for OpenStreetMap with custom icons intended to display as many map features as possible
MIT License
503 stars 31 forks source link

Indicate hidden icons with a dot #121

Open BudgieInWA opened 2 years ago

BudgieInWA commented 2 years ago

When an icon cannot fit on the map and is skipped, a small dot should be drawn in its place in the appropriate colour. All of these dots should be drawn underneath actual icons.

It supports Map Machines goals of showing as much information as possible, even when you don't want a messy map with -overlap=0. Very often, an area on the map is drawn empty in a misleading way because a nearby icon is just a little bit too close. A dot right where feature is, shows you that there is something there that you can zoom in to see.

enzet commented 2 years ago

Hello, @BudgieInWA! Sorry for the late reply.

This is great issue, thank you. I was thinking about it.

OSM Carto uses this feature for some icons and zoom levels. However, Carto uses different colors for different POI types, while Map Machine uses colour tag values when it's available and special color only for shop POIs.

What do you think about this issue? Is it OK to use just black dots in other cases?

BudgieInWA commented 2 years ago

A black dot would be a great default!

Maybe dots use category colours and icons use predicted colour? (If shops want a category colour, others probably do too.) If all dots are category colours, then maybe it is clear enough?

Maybe dots use shape? Or outline colour?

enzet commented 2 years ago

I've added this feature without any change in colors. You can try it with --show-overlapped option.

enzet commented 2 years ago

Well, here are some fixes. Small dots now don't interfere with other icons.

BudgieInWA commented 2 years ago

Great! The simple implementation that you have up is such a big improvement! Here is the progress gif that motivated this issue: test-before-aligned-after-afterafter

One improvement that would be to draw the dots on a layer below all of the icons, but above the rest of the map, so that dots don't sit on top of actual icons.

enzet commented 2 years ago

Wow! Thank you! This is very inspiring.

One improvement that would be to draw the dots on a layer below all of the icons, but above the rest of the map, so that dots don't sit on top of actual icons.

Yeah, I saw this issue and it's not that easy to fix. Have to do some refactoring first.