Aug 17, 2009, 3:03 PM
Gmap Click listener
I'am trying to add a listener to the Gmap extension, so my users can add a marker on a
map with a click.
With standard javascript and google map api i would added this code to the Gmap2
Thanks for your help...
map with a click.
With standard javascript and google map api i would added this code to the Gmap2
GEvent.addListener(map, 'click', function(overlay, point) {
if (point) {
map.removeOverlay();
pin = new GMarker(point);
map.addOverlay(pin);
document.form.gps_lat.value = point.y;
document.form.gps_lng.value = point.x;
}
});
But i can't figure out where to add this to the Gmap ExtensionThanks for your help...