hi, i am trying to limit the marker to add only two markers to a map on
click event
i wrote an event listener and added the following code to it:
GEvent.addListener(map, 'click', function (overlay, latlng) {
if (placeMarker.length < 2) {
pendingLatLng = latlng;
setTimeout("settleClick()", 225)
}
else {
message("You can only select 2 points.");
}
});
a sample click event which looks like the line below does work. what am i
doing wrong ?:
google.maps.event.addListener(map, 'click', function (event)
{placeMarker(event.latLng); })
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-js-api-v3/-/bG9Ea3VUekZWYW9K.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.