开发者

How to get the IPhone to include location information in web request?

开发者 https://www.devze.com 2022-12-25 10:28 出处:网络
We have a we开发者_运维技巧b site that sends emails with http links on that email. As the recipient clicks on the link, they are directed to our web site. How can we get the IPhone to include the lati

We have a we开发者_运维技巧b site that sends emails with http links on that email. As the recipient clicks on the link, they are directed to our web site. How can we get the IPhone to include the latitude and longitude of the device?


The iPhone will not include the location information automatically, since that is a gross invasion of privacy. Use navigator.geolocation.getCurrentPosition on your website.

Note that the user will be asked if they want the iPhone to disclose their location.

You may want to use a GeoIP database rather than their exact position, it's less intrusive for the user.

0

精彩评论

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