[Mapserver-users] Mapscript / CGI - Scale / zoomscale

Lowell Filak lfilak at medinaco.org
Thu Jan 22 13:50:49 EST 2004


I believe that mapserver automatically adjusts the extent to make a
square out of it - this may explain your second problem.
For more information regarding that you may want to check the archives
for a recent discussion regarding "WMS BBOX vs. Actual Bounds".
For your first problem - are you also setting the map size in Mapscript
along with the extent?

Lowell

The following message was sent by "robert fritz" <robert-fritz at web.de>
on Thu, 22 Jan 2004 18:13:22 +0100.

> Hello,
>  
> So far I have used CGI to address Mapserver through. I calculate the
new extend of the map for a chosen scale in JavaScript and pass this
value as "mapext" to mapserver. I also pass the picture size etc.
> A map with the precise calculated scale was returned (the Mapserver
return value [scale] was identical to the chosen scale).
>  
> I am now trying to use Mapscript but don't get the expected output. If
I use a new extent calculated in JavaScript as follows
> ...
>
$map->setExtent($msmapextent[0],$msmapextent[1],$msmapextent[2],$msmapextent[3]);
> ...
>  
> the scale of the output map is not as expected (e.g. calculated
1:1000, output: 1:1024; 1:2000 - 1:2048, ...).
>  
> This is similar to a second strange problem I encountered. When I
define an area and pass its coordinates to Mapserver via CGI the output
section of the map is a slightly different from the section of the map
that is returned when I use the same coordinates in Mapscript ($map
->setExtent(...)). 
>  
> I have no idea if I am making some mistake here or have failed to
grasp some concept. I know that I could use the zoomscale() function to
fix the first problem but this would not fully solve my second problem.
> Any useful advice?
> 
>
______________________________________________________________________________
> Nachrichten, Musik und Spiele schnell und einfach per Quickstart im 
> WEB.DE Screensaver - Gratis downloaden:
http://screensaver.web.de/?mc=021110
> 
> _______________________________________________
> 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