Hi,
I was looking for some code to first check if a marker and infowindow
is on the map and then close them, like this:
if (typeof(marker_pos.infowindow2) === "undefined"){
//object doesn't exist
}
else{
//the object does exist
marker_pos.infowindow2.close();
marker_pos.setMap(null);
}
But I discovered that it doesn't work well. The rest of the script
with the other markers and infowindows doesn't open when I click on
them. It feels like the typeof part doesn't work and the script stops?
Could it be done in some other way? Thanks!
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.