[Mapserver-users] map positioning -- help needed

Eric Bridger eric at gomoos.org
Fri Nov 7 04:38:22 EST 2003


On Fri, 2003-11-07 at 14:03, Murat Isik wrote:
> Thank you.
> I think I have minimized my problem to this whole coordinate thing. What I noticed is that my code does not catch "extent" as it works. I have to feed it with the beginning coordinates myself. I have changed the code a little bit too. Now it can move the map to left, but only the original map, not the zoom map. I think my problem is that I cannot "catch" the coordinates/extents of the last map drawn. It has something to do with this line:
> 
> $extent_to_set = explode(" ",$HTTP_POST_VARS["extent"]);
> 
> When I run the second europa example from mapserver site the same line works and prints the picture. In my case, it produces this error:
> 
> Fatal error: MapServer Error in msCalculateScale(): 
> 
> referring to the line with the "explode".  

This happens because the line below, from your code, is commented out. 
You don't set the current extent in your form so
$HTTP_POST_VARS["extent"] will be null.
 
//$extent_to_html = $map->extent->minx." ".$map->extent->miny." "
//              .$map->extent->maxx." ".$map->extent->maxy;
 




More information about the mapserver-users mailing list