1. 25
  1.  

  2. 2

    For some reason I can’t get it to render Copenhagen at all, no matter which spelling I try to use. It works with other European cities though.

    1. 1

      Also weirdly can’t do Greek cities, but can do all the other European cities I tried.

      1. 3

        I was trying Athens in Greece and I am getting only the Athens in the United States.

        It seems that it uses this search engine for OpenStreetMap data, https://nominatim.openstreetmap.org/. The query for Athens in the search engine, https://nominatim.openstreetmap.org/search?format=json&q=Athens, seems to return as the first result the Greek city, but somehow the results are filtered? I am not sure.

        1. 2

          This is a good pointer, if I look up cities that work (Rome, Amsterdam, Stockholms kommun (the county)), they have a city outline in the search results, whereas the ones that don’t work (Copenhagen, Athens, Stockholm (the city)) have no outline in Nominatim.

          1. 1

            The code filters the results to only those with osm_type of relation. It looks like it should be updated to work with things that have an osm_type of node as well, but how big a change to the code would be required to do that is unclear to me.

            What annoys me about modern Javascript projects is that it’s way harder to modify them live in the website and just see what happens. It should be possible for me to open the console on the linked web page and replace that function with one that allows node as well then just see what happens when I type in ‘Athens’. But to test out a change I’d probably have to clone this repository, compile the code, start a web server… how is this different from a non-web application exactly?

      2. 2

        Hah, very cool! I did this on the country level a while ago, albeit much slower and more manual.

        1. 1

          I wish this could render Greater London and the City of London at once. Understand why they are classed as different but you usually want to see them both on the map together