At 1 o'clock in the morning on September 14, Apple’s iOS 10 has been officially pushed out. It is believed that the early adopters have been updated to the latest system. However, if the web site does not support the https protocol in a timely manner, when many users visit many websites under iOS 10, they will find that they cannot perform normal and accurate positioning, resulting in that the peripheral site recommendation service of some websites cannot be used normally.
Tencent map open platform technology experts through the analysis found that in iOS10 Apple has changed the webkit location permissions, all positioning request page must be https protocol. In the http protocol, the html5 native positioning interface returns an error and cannot be located properly. Through the browser debugging console we can see the details of the HTTP access error:
Access to Tencent's H5 positioning component, no sense to support iOS10
The Tencent map open platform has supported the H5 positioning of https at an early stage. Whether it is already supporting the https protocol or the web page that still uses the http protocol, as long as you have access to it, the positioning support for iOS 10 is non-intrusive and can be perfectly positioned.
And you only need to complete the following two steps:
Method One: Pure JS Call
The first step: the introduction of js file
The second step: create a positioning object, you can initiate positioning
Var geolocation = new qq.maps.Geolocation("DZYBZ-73WWI-FG6GZ-5JRFR-PNVIE-4OFUL", "myapp");
geolocation.getLocation(sucCallback, errCallback);
Method 2: Embedded iframe to complete positioning Â
The first step: the introduction of positioning iframe
Step 2: Listen to events and complete positioning
window.addEventListener('message', function(event) {
// Receive location information
Var loc = event.data;
Console.log('location', loc);
}, false);
Simply, two steps. Â
The large-scale websites such as the US Mission Take-away have been perfectly integrated into the H5 positioning components developed by the Tencent Map Open Platform and smoothly passed the iOS10 upgrade to ensure that customers and businesses are not affected:
Tencent map open platform H5 positioning components:
1 The only solution in the industry specifically targeting the H5 environment
2 In-depth optimization under Wechat and QQ browsers, significantly improving positioning success rate
3 Multi-environment optimized adaptation, perfect support for native positioning, WeChat positioning SDK, QQ positioning SDK, IP positioning, etc.
4 Following the web standards, first support iOS10 Â
For details, please refer to the official website address.
Solar Panels Outdoor Power Supply
Shengtian New Energy (Shenzhen)Â Co., Ltd. , https://www.stenergysolar.com