android - Why is the Google Maps InfoWindowClick method executing twice on one click? -


i using xamarin , coding google maps application. have code executes when user clicks on map infowindow. here code:

void handleinfowindowclick (object sender, googlemap.infowindowclickeventargs e) {     toast.maketext (this, "handleinfowindowclick", toastlength.short).show (); } 

i set handler following code:

_map.markerclick += handlemarkerclick; 

whenever click on infowindow, method executes twice , toast displayed twice well.

why this? how can fix code such handleinfowindowclick method executes once on click?

thanks in advance

you talking handleinfowindowclick, here have shown event binding of markerclick.

you can try this:

_map.infowindowclick -= handleinfowindowclick; // first detach handler if attached _map.infowindowclick += handleinfowindowclick; 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -