Hi,

Before asking the question, here is what I would like to do:

I want to put tooltips on the GPolygons, where the mouse moves over to
the polygon for the first time. I tried to benefit from Mike's
tutorials: http://econym.org.uk/gmap/tooltips4.htm

Here is what I get when I positioned the tooltip in the middle of the
polygon:

http://www.cs.bilkent.edu.tr/~alptug/toolTipMiddle.html

When I tried to use the mousemove event of GMap2 in order to get the
last mouse position to put the tooltip to where the mouse is instead
of middle of the polygon, the tooltip is placed at the boundaries of
the polygons instead of inside them. To see the example please click

http://www.cs.bilkent.edu.tr/~alptug/mousePositionProblem.html

I also included log outputs to see the order of different events and I
noticed map's ousemove event is not fired when the mouse is inside a
polygon. That's why the tooltips in the second example are drawn on
the boundaries of the polygons.

Is there a way to get the mouse location with inside the GPolygon? I
would appreciate any help.

By the way I can also benefit from other examples to show tooltips.
For instance, I take a look at Bill Chadwick's 
http://www.bdcc.co.uk/Gmaps/BDCCPolygon.js
code. It is not working properly right now if I am not mistaken, it
displays the wrong tooltip for the polygons. (This is due the fact
that, the correct DOM element for a polygon is not determined as far
as I can claim, but I may be wrong) Anyway, I played around with that
and provided the following example:

http://www.cs.bilkent.edu.tr/~alptug/domTitleTooltip.html

The tooltips are shown by finding corresponding DOM elements for
polygons and setting their titles. This seems to be working fine with
the example. However, I am generating polygons for my application on
the fly, where there can be around 150-200 of them. With this method,
I am unable to show tooltips for some of the polygons (I have no idea
about the cause). So I am trying to find some other ways. The first
approach might work for me if I can only get the mouse point from
mouseover event of GPolygon or mousemove event of GMap2 with inside a
polygon?

I know this has been a long question, thanks for reading. Hope someone
can make some recommendations. Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to