nextcloud / weather

⛅️ Weather app for Nextcloud
GNU Affero General Public License v3.0
47 stars 27 forks source link

Add option to use browser geolocation feature to locate city #85

Open e-alfred opened 4 years ago

e-alfred commented 4 years ago

It would be great to have the ability to use the geolocation feature of the browser to find the current city somebody is located in. This would ease searching and adding cities and make it more convenient for users who travel a lot for example. It is also something that could improve https://github.com/nextcloud/weather/pull/83.

almereyda commented 3 years ago

This is also available in the official weather_status app bundled with nextcloud/server. This happens completely client side:

https://github.com/nextcloud/server/blob/777fe3bf18f2a6c6887d623eb889cc7895823ebe/apps/weather_status/src/App.vue#L274-L281

https://github.com/nextcloud/server/blob/777fe3bf18f2a6c6887d623eb889cc7895823ebe/apps/weather_status/src/App.vue#L313-L320

Eventually one could even share some basic methods with them, despite them using another API provider.

https://github.com/nextcloud/server/blob/e10cad4a718422b8b9d19546cc61cb39e4c0ee26/apps/weather_status/lib/Service/WeatherStatusService.php#L383