Html5 navigator.geolocation

html5中的GPS定位功能主要用的是getCurrentPosition, 该方法封装在 navigator.geolocation 属性里,是 navigator.geolocation 对象的方法。 getCurrentPosition()函数简介 getCurrentPosition(successCallback,errorCallback,positionOptions) successCallback This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. The Navigator.geolocation read-only property returns a Geolocation object that gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. The geolocation property returns a Geolocation object that can be used to locate the user's position.

Aplicaciones HTML5: Posicionamiento con geolocalización

The position object will return the coords.latitude, coords.longitude, and coords.accuracy.

Geolocalización con JavaScript - Blog [Xitrus - Pedro Gutiérrez]

That