Home >Backend Development >PHP Tutorial >How to obtain the user's current detailed geographical location

How to obtain the user's current detailed geographical location

WBOY
WBOYOriginal
2016-10-23 00:12:501672browse

Recently there is a need to obtain the businesses nearby the user. How to obtain the user’s location? It’s a more accurate method with smaller error. Please give me some guidance

Reply content:

Recently there is a need to obtain the businesses nearby the user. How to obtain the user’s location? It’s a more accurate method with smaller error. Please give me some guidance

You can use a third-party map API to obtain the user's current latitude and longitude: Amap API | Amap web positioning

Third party API

Are you a mobile phone App or Web (look at the PHP you use for tags, it should be Web), App has GPS, Web has some third-party Api tune.

Look at the search effect of Baidu Map API within the specified circular area http://developer.baidu.com/ma...

If this is the need, you should call the API provided by the browser. Generally, browsers will still provide these APIs. Please refer to here http://www.zhangxinxu.com/wor... If not, it is recommended. Let users manually locate

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn