谷歌地图使用
浏览器获取经纬度:
<script> navigator.geolocation.getCurrentPosition(function(pos,error){ if(!navigator.geolocation) throw "geolocation not support"; latitude=pos.coords.latitude; longitude=pos.coords.longitude; var accuracy=pos.coords.accuracy; console.log("当前位置:经度:"+latitude+" 纬度:"+longitude+" 精度:"+accuracy); }); </script>