document.getElementById('sginBtn').addEventListener( "tap", onPlusReady, false );
function onPlusReady() {
plus.geolocation.getCurrentPosition( function ( p ) {
mui.toast('签到成功! \n经度'+p.coords.latitude+"\n纬度"+p.coords.longitude+"\n海拔"+p.coords.altitude);
}, function ( e ) {
mui.toast( "获取地理位置失败: " + e.message );
} );
}
Bodod
- 发布:2015-06-15 11:06
- 更新:2015-06-16 03:26
- 阅读:4000
获取地理位置 No location providers available
分类:HTML5+