The Google Maps API
- Requires an API Key, bound to a particular directory on your domain.
function new_marker() {
if ( typeof current != 'undefined' ) {
map.removeOverlay( current );
}
var center = map.getBounds().getCenter();
current = new google.maps.Marker(center, {'title':
'Move to place...', 'draggable': true, 'bouncy': true});
google.maps.Event.addListener(current, "dragend", function() {
click(current.getPoint());
});
map.addOverlay( current );
$('lat').value = current.getPoint().lat();
$('lng').value = current.getPoint().lng();
}