Google Map ~ marker on drag end event

var goodPoint = null;


goodPoint = new GMarker(point, { draggable: true });

GEvent.addListener(goodPoint, "dragend", function() {
alert(goodPoint.getPoint().lat());
alert(goodPoint.getPoint().lng());
});

map.addOverlay(goodPoint);


reference
http://code.google.com/intl/zh-TW/apis/maps/documentation/javascript/v2/overlays.html

沒有留言: