How to get the IPhone to include location information in web request?
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.
精彩评论