iPhone 通过以下调用支持移动 Safari 中的地理定位:
The iPhone supports geolocation in mobile Safari via the following call:
navigator.geolocation.getCurrentPosition(
function(pos){
var lat = pos.coords.latitude;
var long = pos.coords.longitude;
},
function(){
/* Handler if location could not be found */
}
);
我想建立一个良好的设备列表,这些设备具有以下之一:
I'd like to build a good list of devices that have one of the following:
我只熟悉我自己的设备,所以这是我目前的清单:
I'm only familiar with my own device, so this is my list so far:
?
Blackberry、Android 手机等的支持程度如何?
What is the level of support in Blackberry, Android phones, etc?
虽然我认为标准化(顺便提一下)是一个很好的实践W3C Geolocation API,值得注意的是浏览器中还有一些其他选项,如果您需要针对较旧的平台.
Although I think it's a great practice to standardize on the (draft, by the way) W3C Geolocation API, it's worth noting that there are a few other options in the browser, which can be particularly helpful if you need to target an older platform.
navigator.geolocation 语法非常相似.navigator.geolocation with very similar syntax.这篇关于哪些设备支持通过 navigator.geolocation 进行 Javascript 地理定位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 Angular 2/Typescript 中使用 IScrollUse IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
Anime.js 在 Ionic 3 项目中不起作用anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 项目中不起作用)
Ionic 3 - 使用异步数据更新 ObservableIonic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用异步数据更新 Observable)
Angular 2:在本地 .json 文件中找不到文件Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指令?)
将 ViewChild 用于动态元素 - Angular 2 &离子2Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(将 ViewChild 用于动态元素 - Angular 2 amp;离子2)