Map extent in MapScript

Stephen Lime steve.lime at dnr.state.mn.us
Fri Dec 15 13:52:52 PST 2000


Here's the symbol (can be in mapfile or symbol file)

 SYMBOL
    NAME 'circle'
    TYPE ELLIPSE
    FILLED
    POINTS 1 1 END
  END 

and here's a class definition (note the use of overlaysymbols)

  LAYER
    NAME majrdln3_interstate
    GROUP roads
    MAXSCALE 600000
    SYMBOLSCALE 200000
    STATUS OFF
    DATA shapefiles/majrdln3_interstate
    TYPE LINE
    CLASS      
      COLOR 121 0 0
      SYMBOL 'circle'
      SIZE 5
      MINSIZE 3
      MAXSIZE 7
      OVERLAYCOLOR 181 51 51
      OVERLAYSYMBOL 'circle'
      OVERLAYSIZE 3
      OVERLAYMINSIZE 1 
      OVERLAYMAXSIZE 5
    END
  END # interstates

This is from the LandView interface (maps.dnr.state.mn.us/landview/).

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Thorsten Fischer <thfischer at mapmedia.de> 12/15/00 03:34PM >>>
Hi everyone!

> > The last line is crucial, because leaving it out or leaving it in does not
> > change the resulting image at all. Any ideas?
> You have to use the setextent() method to set the map extents:
> 
>   $map->setextent($mybounds->minx, $mybounds->miny,
>                   $mybounds->maxx, $mybounds->maxy);

Maybe I should shout a 'RTFM!' at myself. I was staring on my printouts for
about half an hour because I could not believe that such a method did not
exist. Now I found it. After you pointed it out. I am getting old.

But here is another one I could not figure out. I tried to use the 'STYLED'
symbol type, which is documented but does not seem to exist anymore, neither
does it appear in the source code. I would like to use lines with a width of
more than one pixel, and really love to create things like a highway with two
solid side lines and a dashed center line.



-- 

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