I'm building a map using the google v3 api because it is way faster. Essentially, it's a map of an area with about 30 cities with polygons over the regions. When a user hovers over a city, I want the fillColor to get lighter, and then return to it's normal state on mouseout. when a user click, it redirects them to another page.
The click event works just fine. But, looking through the v3 API documentation, it seems as if Google has implemented click, doubleclick, mousemove, mousedown and mouseup as event triggers, but no hover, or mouseover, or mouseout.
Really? Geez. I'd think over and out would be higher priority than down and up.
Anyway, has anybody else come across this? Am I wrong? Or is there a workaround?
Thank you in advance for your help, Stephanie
The following works:
google.maps.event.addListener(polygon,"mouseover",function(){ this.setOptions({fillColor: "#00FF00"}); }); google.maps.event.addListener(polygon,"mouseout",function(){ this.setOptions({fillColor: "#FF0000"}); });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With