开发者

How to find the geolocation of an android user from webpage

开发者 https://www.devze.com 2022-12-29 04:58 出处:网络
I am developing a webpage which requires the userlocation for loading some data. The web page is mainly intended for android users. I need to find the geo location of the user when the user opens开发者

I am developing a webpage which requires the userlocation for loading some data. The web page is mainly intended for android users. I need to find the geo location of the user when the user opens开发者_如何转开发 that page? How can I do that?


If aviable, the JavaScript geolocation object will provide you with that data.

For the concrete implementation, have a look at this question: Which Devices Support Javascript Geolocation via navigator.geolocation?


HTML5 has a geolocation facility. Android 2.x devices should support it.

For Android 1.x devices, try the Google Gears equivalent.

0

精彩评论

暂无评论...
验证码 换一张
取 消