[ka-Map-users] coordinates
Guillaume Bisaillon
guillaume.bisaillon at polymtl.ca
Tue Aug 2 08:40:43 EDT 2005
Hi,
use this line to get geoCoo:
var geoCoo = this.kaMap.pixToGeo(aPixPos[0],aPixPos[1]);
where aPixPos is:
var aPixPos = this.adjustPixPosition( e.clientX, e.clientY );
Lorenzo Becchi a écrit :
>Hi,
>I'm trying to trace mouse coordinates with kaMap CVS.
>I have no problems with local coordinates but big ones when I try to
>use: kaMap_pixToGeo and other functions that use xOrigin and yOrigin.
>it seems initialization doesn't set this parameters.
>
>test is here:
>http://149.139.8.29/~rischio/ka-map-cvs/ka-map/htdocs/
>
>on double click function (kaNavigator_ondblclick) I've put this code to
>show absolute coordinates below the scalebar.
>---------------------------------------------------------
> var geoCoo = kaMap_pixToGeo(dx,dy);
> var gpX = geoCoo[0];
> var gpY = geoCoo[1];
>
>// Show x coordinates
> var span = getRawObject('x-position');
> span.innerHTML = gpX;
>
>// Show y coordinates
> var span = getRawObject('y-position');
> span.innerHTML = gpY;
>---------------------------------------------------------
>any suggestions?
>thanks
>Lorenzo
>_______________________________________________
>ka-Map-users mailing list
>ka-Map-users at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/ka-map-users
>
>
>
More information about the ka-Map-users
mailing list