I'm trying to guess why disabledragging makes the marker clicked twice. Is
this a bug?

2009/12/13 - <[email protected]>

> Subjects says all, here's my code (I'm trying to pass new marker latlng
> values to the server via the hidden field):
>
>
> *************************************************************************************
>   {
> ...
> ...
> ...
> ...
> ...
>
>  GEvent.addListener(draggablemarker, "click",
>                 function() {
>                   //  AddToOptionList(ddlmarkers2, ddlmarkers2.length,
> this.id);
>
>                      draggablemarker.disableDragging();
>
>                     alert('CLICK EVENT');
>                     loadedMarkers.push(draggablemarker);
>
>
>                     saveMarkerToHdnTempPlaces(this);
>
>
>                     draggablemarker.openInfoWindow("New position has been
> set");
>                 }
>                );
>
>     }
>
>
>     function saveMarkerToHdnTempPlaces(marker){
>
>         var hdnTempPlaces =
> document.getElementById("<%=hdnTempPlaces.ClientID %>");
>
>         hdnTempPlaces.value =hdnTempPlaces.value +
> marker.getLatLng().lat();
>         hdnTempPlaces.value =hdnTempPlaces.value  + "+";
>         hdnTempPlaces.value =hdnTempPlaces.value  +
> marker.getLatLng().lng();
>         hdnTempPlaces.value =hdnTempPlaces.value + "+";
>     }
>
>
> *************************************************************************************
>
> when i click on the marker, click event listener works twice.
> when i exclude disabledragging, it works well.
>
> so what's wrong?
>

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
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-api?hl=en.


Reply via email to