osm-americana / openstreetmap-americana

A quintessentially American map style
https://americanamap.org
Creative Commons Zero v1.0 Universal
183 stars 59 forks source link

Rome and Vatican City #800

Open wipfli opened 1 year ago

wipfli commented 1 year ago

The map currently shows Vatican City but not Rome up to something like zoom z10:

image

https://zelonewolf.github.io/openstreetmap-americana/#map=7.2/41.988/12.491&language=

Personally I would expect to see Rome first and then Vatican City.

QRank https://github.com/brawer/wikidata-qrank also says that Rome is more important than Vatican City:

QRank Q220 (Rome) is 7670781
QRank Q237 (Vatican City) is 6822664
1ec5 commented 1 year ago

This is essentially a duplicate of #533, except that the country label layers don’t have text-radial-offset set. The only general solution that GL JS currently supports would be to consolidate all the place labels into a single layer. But in this case, we could special-case any feature with iso_a2 equal to VA to be hidden until a higher zoom level.

wipfli commented 1 year ago

Interesting, yes solving in the client only probably does not work unless you take all labels into a single layer. That is not so good because not all label properties are data-driven...

But would it maybe work if planetiler would compute collisions when generating the tiles and remove labels if they have a lower rank even if they are in separate layer? https://github.com/onthegomap/planetiler/discussions/492

1ec5 commented 1 year ago

But would it maybe work if planetiler would compute collisions when generating the tiles and remove labels if they have a lower rank even if they are in separate layer? https://github.com/onthegomap/planetiler/discussions/492

It could be made to work, but that seems like a bit of a sledgehammer for this particular problem. I think a more versatile approach, requiring fewer assumptions about the client, would be for OpenMapTiles to tag each country with its tile_area. OpenMapTiles already does this for bodies of water as of openmaptiles/openmaptiles#1457, but if computing the area of a country based on its boundary relation would be too difficult, perhaps it could copy the area from Wikidata.

I think either approach would be more desirable for #533. The Vatican City/Rome case is so certifiably rare that I would have no qualms about a less data-driven approach for that case based on iso_a2.