Changing markers on mouseover and mouseout

2,824 views
Skip to first unread message

Charlie

unread,
Nov 1, 2010, 5:28:46 PM11/1/10
to Google Maps JavaScript API v3
I used Mike's example at http://econym.org.uk/gmap/example_hoverchange75.htm
to help create the page at http://bullittcountyhistory.org/bchistory/wr/wrmap.html
with V2. Now I'm in the process of upgrading to V3 and have not found
a way to create the marker changes with mouseover and mouseout. Is
this possible in V3?

Thanks,
Charlie

geoco...@gmail.com

unread,
Nov 1, 2010, 7:42:46 PM11/1/10
to Google Maps JavaScript API v3
On Nov 1, 2:28 pm, Charlie <gens...@gmail.com> wrote:
> I used Mike's example athttp://econym.org.uk/gmap/example_hoverchange75.htm
> to help create the page athttp://bullittcountyhistory.org/bchistory/wr/wrmap.html
> with V2. Now I'm in the process of upgrading to V3 and have not found
> a way to create the marker changes with mouseover and mouseout. Is
> this possible in V3?

Have you tried the documentation?
There is a setIcon method of the marker:
http://code.google.com/apis/maps/documentation/javascript/reference.html#Marker

It seems to do that:
http://www.geocodezip.com/v3_MW_example_hoverchange.html

-- Larry

>
> Thanks,
> Charlie

Charlie

unread,
Nov 1, 2010, 8:56:36 PM11/1/10
to Google Maps JavaScript API v3
That almost does it. However, I need for the icon to change color as
well when the cursor is over the place name in the right side box. It
works that way under v2. Thanks for any help you can offer.

On Nov 1, 7:42 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:

> Have you tried the documentation?
> There is a setIcon method of the marker:http://code.google.com/apis/maps/documentation/javascript/reference.h...

geoco...@gmail.com

unread,
Nov 1, 2010, 9:31:15 PM11/1/10
to Google Maps JavaScript API v3
On Nov 1, 5:56 pm, Charlie <gens...@gmail.com> wrote:
> That almost does it. However, I need for the icon to change color as
> well when the cursor is over the place name in the right side box. It
> works that way under v2. Thanks for any help you can offer.

Have you tried implementing that? I would expect that given my
example and Mike's v2 example, you should have all the pieces you
need.

-- Larry

>
> On Nov 1, 7:42 pm, "geocode...@gmail.com" <geocode...@gmail.com>
> wrote:
>
>
>
> > Have you tried the documentation?
> > There is a setIcon method of the marker:http://code.google.com/apis/maps/documentation/javascript/reference.h...
>
> > It seems to do that:http://www.geocodezip.com/v3_MW_example_hoverchange.html
>
> >   -- Larry- Hide quoted text -
>
> - Show quoted text -

Charlie

unread,
Nov 2, 2010, 11:41:13 AM11/2/10
to Google Maps JavaScript API v3
Thanks Larry. Your v3 example of Mike's code helped me figure it out.
See http://bullittcountyhistory.org/bchistory/wr/wrmap.html for the
result.

Charlie

geoco...@gmail.com

unread,
Nov 2, 2010, 11:48:15 AM11/2/10
to Google Maps JavaScript API v3
Glad you figured it out, I fixed the example also, just didn't have
time right then.

-- Larry

>
> Charlie
Reply all
Reply to author
Forward
0 new messages