mvysny / photocloud-frame-slideshow

Android Digital Photo Frame
https://www.android-photo-frame.eu
14 stars 1 forks source link

Provide better way to pick the weather location #97

Closed mvysny closed 5 years ago

mvysny commented 5 years ago

Quoting one customer:

I live in Wheeling, IL. US and it does show Wheeling but it shows Wheeling,US but there is more then one Wheeling in US so I'm not sure if this one is correct. I try zip code but it shows wrong city.

I'll need to provide a list of cities matching whatever the user inputted, then allow the user to pick the proper city.

mvysny commented 5 years ago

According to OpenWeatherMap API https://openweathermap.org/forecast5 the list of cities can be downloaded at http://bulk.openweathermap.org/sample/, the city.list.json.gz. It's a whopping 28mb json compressed to 4mb, containing ~209000 cities. I don't think I can fetch that into memory; probably I need to dump the list into some database, then match the city names from that. I could really use a full-text index, at least a simple one: https://gitlab.com/mvysny/umn/issues/7

mvysny commented 5 years ago

I'll use https://gitlab.com/mvysny/owm-city-finder ; fixed in 1.13.4