a wild guess... try putting it in the function that is triggered from KAMAP_MAP_INITIALIZED, IE can trigger the onload event before it's actually ready. <br>or something with scope?<br><br><div><span class="gmail_quote">
On 3/2/06, <b class="gmail_sendername">Base Bloc</b> <<a href="mailto:chris@basebloc.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">chris@basebloc.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">
<div>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi guys,</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I have been using myKaMap.addObjectGeo to lay down markers
on my map with mouseover tool tips, I have had the working and have tested it
on all browsers and was working perfectly until today.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Now myKaMap.addObjectGeo works in Firefox but produces an
invalid JavaScript argument in IE6, I thought maybe I had made a syntax error
in the new code I had added relating to tool-tips and browser specific DOM
events, so I went about debugging without success but tracking the error down
to the addObjectGeo function. So I then set up a new totally unmodified Ka-map using
the gmap data and added the following simple code at the end of the myOnLoad
function in startUp.js as followed, and to my surprise the error persisted.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">function myOnLoad() {</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> initDHTMLAPI();</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> window.onresize=drawPage;</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaMap
= new kaMap( 'viewport' );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> var map = getQueryParam('map');</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> var extents = getQueryParam('extents');</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> var cps = getQueryParam('cps');</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> //var myKaScalebar = new kaScalebar(
myKaMap, 'scalebar' );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> var myKaLegend = new kaLegend( myKaMap,
'legend', false );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> var myKaKeymap = new kaKeymap( myKaMap,
'keymap' );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaMap.registerForEvent( KAMAP_INITIALIZED,
null, myInitialized );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaMap.registerForEvent(
KAMAP_MAP_INITIALIZED, null, myMapInitialized );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaMap.registerForEvent(
KAMAP_SCALE_CHANGED, null, myScaleChanged );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaMap.registerForEvent( KAMAP_QUERY,
null, myQuery );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaNavigator = new kaNavigator( myKaMap
);</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaNavigator.activate();</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaQuery = new kaQuery( myKaMap,
KAMAP_RECT_QUERY );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myScalebar = new ScaleBar(1);</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myScalebar.divisions = 3;</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myScalebar.subdivisions = 2;</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myScalebar.minLength = 150;</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myScalebar.maxLength = 250;</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myScalebar.place('scalebar');</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> drawPage();</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaMap.initialize( map, extents, cps );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myCanvas
= myKaMap.createDrawingCanvas( 5000 );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> var marker =
document.createElement( 'img' );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> marker.src = 'images/kamap.gif';</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> myKaMap.addObjectGeo( myCanvas,
-710141, 1303865, marker );</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">}</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Now I'm sure this is the same code I was using before,
so is there a problem here or because I have been in front of the computer for
eight straight hours am I missing something very obvious right in front of my
face (more likely scenario)? </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks for your input.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Chris</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">~~~~~~~~~~~~~~~~~~~~~~~~~~~</span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">Christopher Brown</span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">Head of Internet Development</span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">Base Bloc Cambodia</span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">#33, 123, Phnom Penh, Cambodia.
</span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">P.O. Box</span></font><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">
2086</span></font><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;"></span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;"><a href="http://www.basebloc.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.basebloc.com
</a></span></font></p>
<p><font color="navy" face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial; color: navy;">Tel (+885) 12 315 302</span></font></p>
<p><font face="Times New Roman" size="2"> </font></p>
</div>
</div><br>_______________________________________________<br>ka-Map-users mailing list<br><a href="mailto:ka-Map-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-Map-users@lists.maptools.org
</a><br><a href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.maptools.org/mailman/listinfo/ka-map-users</a><br><br><br></blockquote>
</div><br>