I have been developing a web page using maps with markers for various
places of interest. It works pretty well except for one thing. The
tool tip on my markers seems determined to put one word per line. For
example I get
INFORMATION
Tombs
of
the
Kings
As the top line is larger than any other, I would expect it to at
least put 'of the' on one line.
I know it's probably something dumb that I've done (or not done) but I
can't find any help at all about tool tips. I "stole" this from an
example, so maybe it's in here and I just don't know it
//SHOW TOOLTIP FUNCTION - ADVANCED
function showTooltip(marker) {
tooltip.innerHTML = marker.tooltip;
var point=map.getCurrentMapType().getProjection().fromLatLngToPixel
(map.fromDivPixelToLatLng(new GPoint(0,0),true),map.getZoom());
var offset=map.getCurrentMapType().getProjection().fromLatLngToPixel
(marker.getPoint(),map.getZoom());
var anchor=marker.getIcon().iconAnchor;
var width=marker.getIcon().iconSize.width;
var height=tooltip.clientHeight;
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(offset.x -
point.x - anchor.x + width, offset.y - point.y -anchor.y -height));
pos.apply(tooltip);
tooltip.style.visibility="visible";
}
Any help would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---