Map extent in MapScript
Thorsten Fischer
thfischer at mapmedia.de
Thu Dec 14 04:23:03 PST 2000
Ladies and gentlemen,
I am trying to set a new map extent using an existing map file. The map file,
named 'dyn.map', is empty excpet for the following declarations:
NAME MMPLZ
STATUS ON
SIZE 600 600
SYMBOLSET "symbols/newsym.sym"
EXTENT 3806570.250000 5829377.000000 3809110.499999 5835739.500000
UNITS METERS
IMAGECOLOR 255 255 255
No layers at all. There is also a small WEB section. My MapScript in PHP
looks like:
1: $shpfname = "shape";
2: $shpf = ms_newShapefileObj ($shpfname, -1);
3: $myshape = $shpf -> getShape ($idx);
4: $mybounds = $myshape -> bounds;
5: $map = ms_newMapObj ("dyn.map");
6: $map -> set ("height", 300);
7: $map -> set ("width", 300);
8: $map -> extent = $mybounds;
The last line is crucial, because leaving it out or leaving it in does not
change the resulting image at all. Any ideas?
Thorsten Fischer thfischer at mapmedia.de
---------------------------------------------------------
MapMedia - Kartographie und raumbezogene Informationssysteme
Am Borsigturm 42
13507 Berlin
Deutschland
http://www.mapmedia.de tel: +49 (0)30 43032102
---------------------------------------------------------
More information about the MapServer-users
mailing list