【发布时间】: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