javascript - HTML5 automatic positioning always fails. What is the reason? Please give me some advice. Thank you.
伊谢尔伦
伊谢尔伦 2017-05-16 13:26:30
0
5
714

Question 1: When automatically positioning on the mobile phone, it always displays 'Location acquisition failed, go and select one manually', as shown below, it always goes to errorCallback, how can I go to the success function of showPosition? Please give me some guidance, please, please

Question 2: How can I get a positioning prompt after opening the mobile browser, as shown below? How does the picture below appear? Is there any expert who can give me some advice? Thank you very much

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(5)
滿天的星座

Chrome browser requires https to have permission to access the address. Ordinary http will fail to obtain it. The same is true for iOS. Alibaba Cloud and Tencent Cloud have free https certificates, which are free for one year. You can apply for them

習慣沉默

The positioning of h5 is very unstable. You can run normally when it succeeds. When it fails, you can adjust the Baidu interface and get it again.

曾经蜡笔没有小新

After several days of searching, I finally found a satisfactory answer. At the same time, thank you for your support;
html5 automatic positioning is unstable, so we use Tencent front-end positioning components to optimize html5 positioning;
For details, see: http:/ /lbs.qq.com/tool/compon...

左手右手慢动作

h5’s positioning uses Google’s positioning function, so, you know, it’s good to succeed once in a while.

Peter_Zhu

I use h5 positioning, and then convert the coordinates to Baidu map display. There is no problem. Only Google Maps can obtain the location using https protocol. Apple phones will experience positioning failure. The solution is to set the server to https protocol. Problem 2. As long as you have the software set up on your phone and the browser asks for location notifications, it will naturally pop up

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template