Description
Problem: capitals, cities, towns and villages should became visible on different zoom levels.
Find the best approach to filter cities by it's importance for best UI experience.
On frontend filtering will be done via MVT filtering options https://www.mapbox.com/mapbox-gl-js/style-spec/#other-filter
Mapbox will automatically hide collided items, so we don't need clustering algorithm.
The proposal: add one or more fields to determine city importance for current period of time
We could add additional field in the
api_city
table namedscale_rank
and set it depending on theinstance of
of wikidata item.
If we bind scale rank to zoom we could do it like this
scale rank zoom cities 1 >= 1 capitals or former capitals 2 >= 2 regional/state capitals 3 >= 3 two major cities of the country (not including [1]) 5 >= 5 four major cities of the country (not including [1, 3]) 7 >= 7 six largest cities (not including [1, 3, 5]) ... ... ... In this case for zoom level 7 we will have
1 + (?)+ 2 + 4 + 6 = 13
cities (or more) per country.It would be easy to apply filters like this on the frontend
The problem that will remain, scale rank of city can be changed during it's existence
Some countries are small and 3 major cities can be really close to each other to show them on the high level zooms
Originally posted by @MiklerGM in #70 (comment)