Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
139
rated 0 times [  145] [ 6]  / answers: 1 / hits: 34643  / 15 Years ago, tue, november 17, 2009, 12:00:00

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


More From » ajax

 Answers
61

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});
});

[#98291] Friday, November 13, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
trayvon

Total Points: 35
Total Questions: 117
Total Answers: 88

Location: Guernsey
Member since Tue, Jul 6, 2021
3 Years ago
;