[Mapserver-users] Mapplet - show x/y coordinates on moving
Tom.Kralidis@ccrs.nrcan.gc.ca
Tom.Kralidis@ccrs.nrcan.gc.ca
Mon, 5 May 2003 13:43:24 -0400
> -----Original Message-----
> From: Eduardo Patto Kanegae [mailto:eduardo@linkgeo.com.br]
> Sent: Monday, May 05, 2003 1:31 PM
> To: Mapserver List
> Subject: [Mapserver-users] Mapplet - show x/y coordinates on moving
>
>
> I've that Mapplet has a 'verbose' param that makes the applet
> return the current x/y mouse position in image
> coordinates.
>
You can check out:
http://www.kralidis.ca/gis/mapserv/mapplet/howto.htm
> Does anybody has a function to transformate it to geographic
> coordinates?
>
Something like this works in JavaScript, although it has problems
recognizing hemispheres.
xval = Number([minx] + (x * (Math.abs([minx]) - Math.abs(([maxx]))) /
[mapwidth]));
yval = Number([maxy] - (y * (Math.abs([maxy]) - Math.abs(([miny]))) /
[mapheight]));
I think there is a more robust formula in the MapServer code.
..Tom
=================================
Tom Kralidis
Systems Scientist
Canada Centre for Remote Sensing
Tel: +01-613-947-1828
http://www.cgdi.ca/
=================================
> tks
>
> mapplet_mouse_moved
>
> Eduardo Patto Kanegae
> Consultor GeoTI / GeoIT Consultant
> eduardo@linkgeo.com.br
> http://www.linkgeo.com.br
> LinkGEO - Geoprocessamento & Webmapping / LinkGEO -
> Geoprocessing & Webmapping
>
> ***************************************
> ***Fim da Mensagem / End of Message ***
> ***************************************
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users@lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users