[mapserver-users] Loading shapefiles

Pushkar Pradhan pushkar at ERC.MsState.Edu
Tue Jun 4 13:30:24 EDT 2002


You left out a lot of objects from the map file,
you must have the WEB object, REFERENCE object, LEGEND, SCALEBAR objects
at least to have a nice map, for e.g.:
WEB
  HEADER view1_header.html
  TEMPLATE view1.html
  FOOTER view1_footer.html
  MINSCALE 1000
  MAXSCALE 1550000
  #IMAGEPATH "set in demo_init.html"
  #IMAGEURL "set in demo_init.html"
  IMAGEPATH "/rstc/user1/erc/pushkar/gis/tmp/"
  IMAGEURL "/tmp/"
  LOG "view1.log"
END

QUERYMAP
  SIZE 200 200
  STATUS ON
  STYLE HILITE
  COLOR 255 0 0
END

#
# Start of reference map
#
REFERENCE
  IMAGE graphics/reference.png
  EXTENT 482572 1031082 639981 1151888
  SIZE 300 232
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END

#
# Start of legend
#
LEGEND
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 255 0 0
  END
  STATUS ON
END

#
# Start of scalebar
#
SCALEBAR
  IMAGECOLOR 0 0 0
  LABEL
    COLOR 0 0 0
    SIZE tiny
  END
  STYLE 1
  SIZE 50 2
  COLOR 0 0 0
  UNITS MILES
  INTERVALS 1
  TRANSPARENT TRUE
  STATUS TRUE
END

> I have successfully loaded Mapserver on my PC and am able to use the
> shapefiles that came with it. I would like to load one of my own and have
> created a new map file, but the image is blank. I used Arcview to get the
> extents but a blank image appears. I have included the map file, am I
> missing something?
>
> NAME EX1
> EXTENT 321709 1259143 360825 1300316
> #EXTENT 388107.634400379 5203120.88405952 500896.339019834 5310243.30613897
> SIZE 300 300
> SHAPEPATH "c:\mark\wwwroot\mapserver\data"
> LAYER
>   NAME "ldc"
>   DATA ldc
>   STATUS DEFAULT
>   TYPE POINT
>   CLASS
>     COLOR 250 175 25
>   END # end of class object
> END # end of layer object
>
>
> END # end of map file
>

-Pushkar S. Pradhan




More information about the mapserver-users mailing list