[ka-Map-users] Problems with addObjectGeo again.

Samuel Doyle sdoyle_2 at yahoo.com
Fri Aug 25 13:42:24 EDT 2006

Has anyone else encountered this? Is this something I need to manually compensate for?

Samuel Doyle <sdoyle_2 at yahoo.com> wrote: Hi,

I keep running into this problem and it behaves different on both Firefox and IE.

I want to add an icon to the map based on where the user has clicked. I use the following procedure which I am hoping is correct since I have noticed it used before.

incidentViewer.prototype.ondblclick = function(e)
    e = (e)?e:((event)?event:null);
    var aPixPos = this.adjustPixPosition( e.clientX, e.clientY );
    var geoCoo = this.kaMap.pixToGeo( aPixPos[0], aPixPos[1] );
    this.gX = geoCoo[0];
    this.gY = geoCoo[1];
    // send to server here
   myKaMap.addObjectGeo( opener.iconFeatures, this.gY, this.gX, incident.img );

The offset of the icon always ends up incorrect from what it should be. Is this the correct procedure?

Thanks,  S.D.
ka-Map-users mailing list
ka-Map-users at lists.maptools.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060825/08f9e640/attachment.html

More information about the ka-Map-users mailing list