Thanks for the suggestion Anurag but I have actually managed to sort
it out in the time between submitting my (first) post for moderation
and it getting published here.

What I did was change the mouseover event to this:

GEvent.addListener(polyline, "mouseover", function(){
this.cursor='hand';
});

Doesn't seem to need a "mouseout" event and it now works perfectly.  I
said it was simple didn't I?

Here is a link to the fixed version:  
http://www.gp-it.co.uk/map/test_working.htm

Does anyone have a list of the other cursor types?

Peter



On 6 Nov, 23:18, Anurag <[email protected]> wrote:
> Hi There,
>
> Could you please try using the mouseOutTolerance property
> (GPolylineOptions)
>
> http://code.google.com/apis/maps/documentation/reference.html#GPolyli...
>
> Regards,
> Anuragwww.H1N1SwineFluIndia.org
>
> On Nov 6, 11:30 pm, Peej <[email protected]> wrote:
>
>
>
> > I am new to Google maps API and have managed to work out most of what
> > I want but what should be a simple problem isn't working for me and I
> > would appreciate some help to tell me where I am going wrong.
>
> > I want to make the cursor change to a pointing finger when over a
> > polyline and then change back when moved away.  I thought this would
> > be simple and used this code:
>
> > GEvent.addListener(polyline, "mouseover", function(){
> >         map.getDragObject().setDraggableCursor("pointer");
>
> > });
>
> > GEvent.addListener(polyline, "mouseout", function()
> > {       map.getDragObject().setDraggableCursor("url(http://
> > maps.google.com/intl/en_us/mapfiles/openhand.cur),default");
>
> > });
>
> > However what happens is that the first time I move it over the line
> > the cursor changes as expected but has to be moved a long way away
> > from the line before it will change back.  Any subsequent cursor moves
> > will change the cursor into a pointer again long before it reaches the
> > line
>
> > Here is a link to a demonstration map that illustrates 
> > thiswww.gp-it.co.uk/map/test.htm
>
> > I have tried it with IE8 and Chrome.
>
> > Peter Harris

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en.


Reply via email to