I'm trying to create a function that adds event listeners to a
neighborhood (polygon). It works when I apply it to a single
neighborhood polygon. I'd like to set it up as a function so that I
can apply it to multiple polygons. So far, I am getting an error back
from firebug saying "missing : after property id" Here is the code I
have so far....
//this line is within the initialize() function "neighborhood" is a
polygon
neighborhood.setMap(map);
setListeners(neighborhood);
//this function is outside of the initialize() function
function setListeners({
google.maps.event.addListener(this, 'mouseover', function() {
this.setOptions({
fillOpacity: 0.325,
strokeOpacity: 0.7,
strokeWeight: 3
});
});
google.maps.event.addListener(this, 'mouseout', function() {
this.setOptions({
fillOpacity: 0.2,
strokeOpacity: 0.5,
strokeWeight: 2
});
});
}); //end setListeners
THANKS FOR READING! ANY HELP WOULD BE GREATLY APPRECIATED.
--
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.