bilde2910 / Hauk

Open-source realtime location sharing
Apache License 2.0
583 stars 58 forks source link

Reverse geolocation support for the frontent #177

Open pvagner opened 3 years ago

pvagner commented 3 years ago

Would it be possible to add ability to reverse geocode the current tracked location when updating it on the map and display it as a text and geo URI that can be easily copied or shared into another app e.g. osmand?

To give a bit of context to my use case we are group of visually disabled friends where some of us are blind others have different degree of low vision problems. We were using Google maps location sharing in the past as it also prints out the location address where available. Now people tend to stop sharing their location with google and I'd like to support that initiative. However I'd like to find out a replacement solution.

Looking at leaflet there appear to be some geocoder plugins. Most promising appears to be Leaflet Control Geocoder. Some ideas to think about.

I will spend a few days trying to add this on my own however I am not sure I have enough skills and can learn them as I need them. I'll be glad to receive hints or encouraging comments if you like the idea or if you can support it in some way.

licaon-kter commented 3 years ago

You can get the location by clicking the little human icon and press "Navigate to". But given your requirements it might not be easy enough.

pvagner commented 3 years ago

I've now started looking at the code and I have discovered there are two controls added to the leaflet. They both are titled View my location. First one requests location from the browser, the second one shows the users popup. So this is now starting to look more usefull to me. I have not explored group shares so far, so I'll comment about what I have understood about single location sharing. The user marker on a map consists of:

Each time update data is received from the server the marker gets updated. I can perfectly read speed and last activity time. Would it be acceptable to add an address label here and populate it with reverse geocoder result? When I click on the speed or last time text, I can see View on map and navigate to controls being added. Navigate to is what I was looking for. The issue with these two is that these are not focusable with the keyboard and don't react to keypresses such as enter or space to activate. I think I might be able to tweak these at least.

Still I'm happy to receive hints about reverse geocoding. Does it make sense what I'm trying to describe?