[Mapserver-users] <PARAM NAME="PIXEL_SIZE" VALUE="???">

Daniel Morissette morissette at dmsolutions.ca
Thu Jan 9 21:12:27 EST 2003


> Steve McCrone wrote:
> 
> For an example of a site using this, see:
>   http://www.sis.ec.gc.ca/msapps/ec_species/htdocs/ec_species_e.phtml
> 
...
> 
> I had a look at the example above and it does appear to calculate the
> correct pixel size that is used in the distance. However, I cannot
> find (in the code) where it does this, so I am wondering if Daniel
> could shed some light on this one.
> 

This example uses MapScript, but you wrote in another thread that you
would like to stick to the mapserv CGI.

We have never done it, but it should be possible to use JavaScript to
calculate the pixed size and set it in the applet based on the [width]
and [minx] and [maxx] CGI template parameters. 
i.e. pixel_size = ([maxx] - [minx])/[width]


> One thing with this sample - the user must not only select another
> tool and click on the map in order for the distance to "zero". Just by
> re-selecting the measure tool or clicking on another one does not
> "zero" the cumulative distance.
> 

I believe this is fixed in more recent versions of ROSA.

Daniel
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-users mailing list