javascript - Get GPS location from the web browser -


i developing mobile based web-site, there have integrated google maps, need fill 'from' field of google maps dynamically.

is possible gps location web browser , fill in 'from' field of google map dynamically?

if use geolocation api, simple using following code.

navigator.geolocation.getcurrentposition(function(location) {   console.log(location.coords.latitude);   console.log(location.coords.longitude);   console.log(location.coords.accuracy); }); 

you may able use google's client location api.

this issue has been discussed in is possible detect mobile browser's gps location? , get position data mobile browser. can find more information there.


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -