[ka-Map-users] pixToGeo question

Brent Pedersen bpederse at gmail.com
Sat Sep 10 17:24:01 EDT 2005


hi, i don't understand what's going on in my test script. i expect case 1 
and case 2 to show up in the same location: they dont.

map = new kaMap('viewport');

oCanvas = map.createDrawingCanvas(5);
var o1 = document.createElement('img');
var o2 = document.createElement('img');
o1.src = 'images/up.jpg' ;
o2.src = 'images/up.jpg' ;


// case 1: convert pixel (0,0 to geo and addObjectGeo):
var xg = map.pixToGeo(0,0,true);
map.addObjectGeo( oCanvas, xg[0], xg[1], o1 );

// case 2: just addObject Pix
var xp = [0,0];
map.addObjectPix( oCanvas, xp[0], xp[1], o2 );


i have tried pixToGeo with and without the 3rd arg. 

what am i missing? i'm using the default omap example mapfile and the CVS 
version of kamap. 

maybe i just need a primer on how these relate??

thanks for any suggestions,
-brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20050910/dcf359bc/attachment.html


More information about the ka-Map-users mailing list