[Mapserver-users] Mapplet - show x/y coordinates on moving

Tom.Kralidis at CCRS.NRCan.gc.ca Tom.Kralidis at CCRS.NRCan.gc.ca
Mon May 5 13:43:24 EDT 2003


> -----Original Message-----
> From: Eduardo Patto Kanegae [mailto:eduardo at 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 at 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 at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 



More information about the mapserver-users mailing list