Google マップの奇妙な動作が発生しています (添付の画像を参照)。誰もそれを経験したことがありますか?
以下のコード
<script>
<!--
var map_geolocation;
function savePosition_geolocation(point)
{
var input = document.getElementById("id_geolocation");
input.value = point.lat().toFixed(6) + "," + point.lng().toFixed(6);
map_geolocation.panTo(point);
}
function load_geolocation() {
var point = new google.maps.LatLng(50.728632, 9.111587);
var options = {
zoom: 13,
center: point,
mapTypeId: google.maps.MapTypeId.ROADMAP
// mapTypeControl: true,
// navigationControl: true
};
map_geolocation = new google.maps.Map(document.getElementById("map_geolocation"), options);
var marker = new google.maps.Marker({
map: map_geolocation,
position: new google.maps.LatLng(50.728632, 9.111587),
draggable: true
});
google.maps.event.addListener(marker, 'dragend', function(mouseEvent) {
savePosition_geolocation(mouseEvent.latLng);
});
google.maps.event.addListener(map_geolocation, 'click', function(mouseEvent){
marker.setPosition(mouseEvent.latLng);
savePosition_geolocation(mouseEvent.latLng);
});
}
$(function() {
load_geolocation();
});
//-->
</script>
<input type="hidden" name="geolocation" value="50.728632,9.111587" id="id_geolocation" /><div id="map_geolocation" style="width: 400px; height: 300px"></div>