[ka-Map-users] Attaching a tooltip to a point

Edouard Lafargue elafargue at gmail.com
Tue Feb 20 06:15:37 EST 2007

  I have been doing some more work on my mapping interface, and tried
to use kaTooltips to display information related to points that I
place on the map: my approach is the following:

 var my_point = this.overlay.addNewPoint(wpName, lon, lat);
 my_point.div.tooltip = new kaToolTip(this.map);
 my_point.div.onclick = function() { this.tooltip.moveGeo(this.lon,this.lat);}

  So far this works fairly well, except that the moveGeo method
behaves in a fairly 'creative' way, with the tooltip always showing
somewhere around the point, but never very close. Also, the click
event is also caught by the tooltip, so it disappears right away!

   Anyway, I'm interested in your feedback on the approach, and hints
on a better use of moveGeo and click handling! I'm not sure this is
the right way of doing things...


More information about the ka-Map-users mailing list