<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all kaMap frontiers!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><STRONG>Background</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2>I am trying to place data from a database onto my
map by calling an AJAX page every 10s, where the javascript is placed in a
string, which is evaluated in my callback function. Each element loaded must
have its own tooltip containing several parameters; and a pop-up menu. Therefore
I need a mouseover and click event handler for the element.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><STRONG>The challenge</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2>I checked out the newest kaMap source
from CVS and copied the XMLOverlay folder to my code directory. I also wrote a
mouseover event handler in kaXmlOverlay.js based on the onClick event handler
written by PG. Here is my implementation for the onClick event on my php
AJAX-called page.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>--------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>$szLayers .= "var my_point =
dynXmlOverlay.addNewPoint(objectId, longitude, latitude);";<BR>$szLayers .= "var
my_icon = new kaXmlIcon();";<BR>$szLayers .= "my_icon.icon_w =
28;";<BR>$szLayers .= "my_icon.icon_h = 28;";<BR>$szLayers .= "my_icon.icon_src
= './data/images/site.gif';";<BR>$szLayers .=
"my_point.addGraphic(my_icon);";<BR>$szLayers .=
"my_point.enableOnclick;";</FONT></DIV>
<DIV><FONT face=Arial size=2>$szLayers .= "kaXmlOverlay.handler_onclick =
function ( my_point ) {alert('ghdhd')};";<BR>//toolTip.setText( mouseover
);toolTip.moveGeo(latitude,longitude);</FONT></DIV>
<DIV><FONT face=Arial
size=2>---------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>As seen from code I am currently just trying to
throw an alert when one of the loaded images are clicked. It doesn't work,
however. ;-(</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Also the added objects "flicker" even though I only
call the AJAX function, which load them, every 10s. ;-(</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any help to exonerate this situation would be
hugely appreciated!!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Schalk Snyman</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>