Google マップのマーカーに問題があります。マップの中央に表示されず、常にマップの左上に表示されます。
これが私のコードです。返信ありがとうございます。
関数 initialize() { getCurrentLocation();
google.maps.visualRefresh = true;
currentLocationGPS = new google.maps.LatLng(latPos,longPos);
var myOptions = {
zoom: 8,
center: currentLocationGPS,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var marker = new google.maps.Marker({
position: currentLocationGPS,
map: map,
draggable:true
});
google.maps.event.addListener(
marker,
'drag',
function() {
latPos = marker.position.lat();
latLong = marker.position.lng();
}
);
}