It's a rather clever implementation. A lot of the code seems to exist for handling different types of POIs (accomodations, transportation, etc.) but the gist is that they have two markers: the base marker and a modified version, displayed on mouseover, of the base marker that has a "tang" on the right side to which the "flag" is attached.
Instead of placing the tooltip over the marker, it's placed adjacent to the marker, thus avoiding the mouseover/mouseout problem the OP has. Beginning at line 750, they're adding a SPAN to the appropriate place in the DOM[1] which has its style attributes set to apply the background image and position it next to the marker. (The SPAN is removed on mouseout at line 883, though I don't understand why they're doing it in a loop -- there should only be one element with id="poiLabel" anyway.) The downside of this, and the OP's, approach applies to markers near the right side of the map. If the tooltip text extends past the map edge, it's just cut off. I suppose you could add additional logic, and additional images, to detect whether the tooltip text will fit on the right side and move it to the left side if necessary. [1] When creating the markers, an ID is specified so they can locate it easily on mouseover (i.e., they know the ID of the POI so they can get the marker's DOM ID). On Sep 17, 1:49 am, Rossko <[email protected]> wrote: > > I'm attempting to use custom tooltips which partially overlap their > > associated markers. The problem I have is that the tooltips do not > > show properly when you mouse over the main 'head' of the marker, > > presumably because the tooltip itself is also present in the same > > location. > > Yes, it's a nasty little problem. Does it actually go away if you > move the tooltip clear of the marker image, or is there something else > going on? > > > A good example of the effect I'm trying to achieve can be seen > > here:http://www.visitsweden.com/sweden/Accommodation/Accommodation-guide/ > > It's very nice! The effect is coded around lines 700 on 'broken.js' > if you can make it out, I'm struggling --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
