Fixed
Status Update
Comments
gs...@gmail.com <gs...@gmail.com> #2
[Comment deleted]
gs...@gmail.com <gs...@gmail.com> #3
Just discovered that when you drag the marker off the map and it vanishes you can drag
the map in the direction that the marker vanished and the marker will appear somewhere
else on the map (presumably to a place you dragged it to where it became stuck)
the map in the direction that the marker vanished and the marker will appear somewhere
else on the map (presumably to a place you dragged it to where it became stuck)
lu...@google.com <lu...@google.com> #4
This is the intended behaviour. If you want the map to follow/pan to a marker when you
drag it, you can add events to handle that.
drag it, you can add events to handle that.
da...@google.com <da...@google.com>
tr...@gmail.com <tr...@gmail.com> #6
how can stop dragging(marker or map) when out of the map
(ie.: map.getBounds().getSouthWest().lat()<-85 ||map.getBounds().getNorthEast().lat()>85 )
(ie.: map.getBounds().getSouthWest().lat()<-85 ||map.getBounds().getNorthEast().lat()>85 )
Description
it only an inch or so this doesn't happen) the marker vanishes and doesn't
come back when you move the mouse back over the map. I'm not even sure the
marker is supposed to go off the map though. Didn't it use to be bound by
the map container?
Here's a test page:
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<script type="text/javascript" src="
sensor=false"></script>
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(37.313477473067, -
121.880502070713);
var myOptions = {
zoom: 11,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var draggablemarker = new google.maps.Marker({map:map, position:latlng,
draggable:true});
}
</script>
</head>
<body onload="initialize()" style="margin:0px;">
<div id="map_canvas" style="width:50%; height:50%">
</body>
</html>