wlanslovenija / PiplMesh

A social info portal for wireless networks.
http://dev.wlan-si.net/wiki/PiplMesh
Other
40 stars 19 forks source link

Use HTML5 geolocation API #172

Open mitar opened 12 years ago

mitar commented 12 years ago

In case we do not know user's location (#171), we could try HTML5 geolocation API and send this information from the browser. Augment our API (#171) with support for HTML5 API.

mitar commented 12 years ago

I have prepared placeholder in our API for using HTML5 geolocation. The idea is that we first try to get location from finding the node the user is connected to. If this is not possible, we try to get geolocation from user session and find closest node. If geolocation is not available, we redirect to /outside/ URL where HTML5 geolocation should be tried. This is the content of this ticket. Implement /outside/ URL to get location from user's browser and send it to the view which should store it into the session, redirecting to home.

Additionally, if user is accessing our portal from outside, HTML5 geolocation API could be regularly consulted to see if user has moved to new location, and if so, geolocation stored in session should be updated accordingly.