You make an interesting point: Everywhere in the world probably there are cities/towns(villages with the same names, and sometimes it is not as easy as in the US, if they are in different states. In Germany for instance, we, too, have federal states, and you can try and identifiy them by adding it to the name of the town, but this is not reliable. I can give you two examples: we have two major cities named Frankfurt. Frankfurt/Main everybody knows because of the important international airport, but there is also a Frankfurt/Oder on the Polish border.
Second: there are at least two towns with the name Halle. One is located in East Germany and a major town located on the river Saale. The other one is a 25.000 or so people small town in the North West. And there also is one with the same name in Belgium, to complete the list, but that one is easy to distinguish. If you enter halle, de in temps-lite, you always get the weather in Halle/Saale and never the weather in Halle/Westphalia. I played around a bit and entered the geocoords from OpenWeather. Temps-lite seems to accept them in the form: &lat=51.5&lon=12 (that's the Halle/Saale ones). You can get them from Openweather if you get more than one search result for the name of a location. You can copy the link with the coords, paste them into temps-lite and prune the beginning of the URL until before &lat, and it seems to work well. Tried it on several towns with identical names.
Maybe this would be helpful to know for users who happen to live in such places and should maybe mentioned in the description of temps-lite. What would you think?
Added with this commit. The "City" textbox now allows coordinates. If the API identifies the city it will be displayed, otherwise the coordinates will be displayed.
You make an interesting point: Everywhere in the world probably there are cities/towns(villages with the same names, and sometimes it is not as easy as in the US, if they are in different states. In Germany for instance, we, too, have federal states, and you can try and identifiy them by adding it to the name of the town, but this is not reliable. I can give you two examples: we have two major cities named Frankfurt. Frankfurt/Main everybody knows because of the important international airport, but there is also a Frankfurt/Oder on the Polish border. Second: there are at least two towns with the name Halle. One is located in East Germany and a major town located on the river Saale. The other one is a 25.000 or so people small town in the North West. And there also is one with the same name in Belgium, to complete the list, but that one is easy to distinguish. If you enter halle, de in temps-lite, you always get the weather in Halle/Saale and never the weather in Halle/Westphalia. I played around a bit and entered the geocoords from OpenWeather. Temps-lite seems to accept them in the form: &lat=51.5&lon=12 (that's the Halle/Saale ones). You can get them from Openweather if you get more than one search result for the name of a location. You can copy the link with the coords, paste them into temps-lite and prune the beginning of the URL until before &lat, and it seems to work well. Tried it on several towns with identical names. Maybe this would be helpful to know for users who happen to live in such places and should maybe mentioned in the description of temps-lite. What would you think?
Originally posted by @papioara in https://github.com/GirkovArpa/temps-lite/issues/10#issuecomment-779242191