View Full Version : Google Maps showing tooltips ?

02-14-2007, 12:33 AM
I have this snippet of code

function createMarker(point,html,style,title)
// FF 1.5 fix
html = '<div align=\"left\" style=\"white-space:nowrap;\">' + html + '</div>';
icon.image = 'modules/$module_name/icons/' + style + '.png';
var marker = new GMarker(point, icon,{title:title});
GEvent.addListener(marker, \"click\", function() {marker.openInfoWindowHtml(html);});
return marker;

echo "var point = new GPoint($userlong, $userlat);";
echo "var marker = createMarker(point, '$markertext', '$iconstyle' , 'test tooltip');";
echo "map.addOverlay(marker);";

and i think it should work but it doesnt :(

without the {title:title} section in the following line:
var marker = new GMarker(point, icon,{title:title});

it works ok but no tooltip, with that added in the cursor changes to the arrow instead of the hand and no tooltip

any pointers welcomed !
caveat i am no java programmer at all, i can find my way around php ok