【问题标题】:Why Google maps current location different from desktop browser and laptop browser为什么谷歌地图当前位置不同于桌面浏览器和笔记本电脑浏览器
【发布时间】:2016-05-25 00:15:38
【问题描述】:

为什么Google maps 当前位置blue marker 在桌面浏览器中显示错误位置,但在笔记本电脑中显示正确位置。 这是我的代码:

var geocoder = new google.maps.Geocoder(); latitude = position.coords.latitude; longitude = position.coords.longitude; debugger; var coords = new google.maps.LatLng(latitude, longitude); var mapOptions = { zoom: 10, center: coords, scaleControl: false, draggable: true, scrollwheel: true, disableDefaultUI: true, navigationControl: false, mapTypeControl: false }; map = new google.maps.Map( document.getElementById("dvMap"), mapOptions ); var marker = new google.maps.Marker({ position: coords, map: map, title: "Your current location!" });

【问题讨论】:

    标签: javascript google-maps google-maps-api-3


    【解决方案1】:

    当您使用移动设备或台式电脑时,当前位置的不同位置基于谷歌地图获取yu位置的方式..使用移动设备时,位置是通过gps或移动电话单元获取的..使用台式机时,位置是获取的如果 ip 与您 wan/lan 相关,则通过映射位置 .. 这种行为是正常的..

    【讨论】:

      猜你喜欢
      • 2013-09-28
      • 2015-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多