Hi, I upgraded to 0.3 and this code appears to be what is being invoked.<br><br>Thanks, S.D.<br><br><b><i>Paul Spencer <pspencer@dmsolutions.ca></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> The problem is likely with e.clientX/Y. I've started using:<br><br> e = (e)?e:((event)?event:null);<br> var x = e.pageX || (e.clientX +<br> (document.documentElement.scrollLeft || <br>document.body.scrollLeft));<br> var y = e.pageY || (e.clientY +<br> (document.documentElement.scrollTop || <br>document.body.scrollTop));<br> var a = this.adjustPixPosition( x,y );<br> var p = this.kaMap.pixToGeo( a[0], a[1] );<br><br>and haven't run into any problems<br><br>Cheers<br><br>Paul<br><br>On 25-Aug-06, at 2:34 PM, Samuel Doyle wrote:<br><br>> It's mapped to the adjustPixPosition in kaTool.<br>><br>> S.D.<br>><br>> Christopher Schmidt
<crschmidt@crschmidt.net> wrote: On Fri, Aug <br>> 25, 2006 at 10:42:24AM -0700, Samuel Doyle wrote:<br>> > Has anyone else encountered this? Is this something I need to <br>> manually compensate for?<br>> ><br>> > Samuel Doyle wrote: Hi,<br>> ><br>> > I keep running into this problem and it behaves different on both <br>> Firefox and IE.<br>> ><br>> > I want to add an icon to the map based on where the user has <br>> clicked. I use the following procedure which I am hoping is correct <br>> since I have noticed it used before.<br>> ><br>> > incidentViewer.prototype.ondblclick = function(e)<br>> > {<br>> > e = (e)?e:((event)?event:null);<br>> ><br>> > var aPixPos = this.adjustPixPosition( e.clientX, e.clientY );<br>> > var geoCoo = this.kaMap.pixToGeo( aPixPos[0], aPixPos[1] );<br>> > this.gX = geoCoo[0];<br>> > this.gY = geoCoo[1];<br>> > // send to
server here<br>> > ...<br>> ><br>> > myKaMap.addObjectGeo( opener.iconFeatures, this.gY, this.gX, <br>> incident.img );<br>> ><br>> > }<br>> ><br>> > The offset of the icon always ends up incorrect from what it <br>> should be. Is this the correct procedure?<br>><br>> Whether this is correct or not would depend on what the code in<br>> "this.adjustPixPosition" does.<br>><br>> Regards,<br>> -- <br>> Christopher Schmidt<br>> Web Developer<br>><br>> _______________________________________________<br>> ka-Map-users mailing list<br>> ka-Map-users@lists.maptools.org<br>> http://lists.maptools.org/mailman/listinfo/ka-map-users<br><br>+-----------------------------------------------------------------+<br>|Paul Spencer pspencer@dmsolutions.ca |<br>+-----------------------------------------------------------------+<br>|Applications & Software Development
|<br>|DM Solutions Group Inc http://www.dmsolutions.ca/|<br>+-----------------------------------------------------------------+<br><br><br><br><br></crschmidt@crschmidt.net></blockquote><br>