Geolocation 地理位置
js:
navigator.geolocation.getCurrentPosition(
(
(pos)->
alert("当前地理位置的纬度: " + pos.coords.latitude)
alert("当前地理位置的经度: " + pos.coords.longitude)
alert("当前地理经度的精度: " + pos.coords.accuracy)
)
)
navigator.geolocation.watchPosition(
(
(pos)->
alert("当前地理位置的变化纬度: " + pos.coords.latitude)
alert("当前地理位置的变化经度: " + pos.coords.longitude)
alert("当前地理经度的变化精度: " + pos.coords.accuracy)
navigator.geolocation.clearWatch(watchID)
)
)