2

This question already has an answer here:

I am trying to generate a map from a shapefie. Through some initial searching, I wrote the code below but I am getting just a white page.

Below is my code:

 MAP
# To enter comments into a mapfile add a # symbol at the beginning of the line

NAME parcels1_map
STATUS ON
SIZE 800 800
EXTENT 489885 5450946 490904 5451637
UNITS METERS
SHAPEPATH "shapefiles"
IMAGECOLOR 255 255 255

WEB
TEMPLATE "template.html"
IMAGEPATH "C:/ms4w/Apache/htdocs/siya/output/"
IMAGEURL "siya/output/"
END

LAYER
NAME "parcel1_boundaries"
DATA states
STATUS DEFAULT
TYPE POLYGON
CLASS
NAME "parcels1_color"
COLOR 255 215 0
END
END
 # end of map file
END 

marked as duplicate by PolyGeo, whuber Aug 26 '14 at 13:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Add DEBUG 5 to your mapfile (after MAP), then try again. Do you get any errors reported? – nmtoken Aug 26 '14 at 12:28
  • i did not get any errors....iam able to get the image but its just blank – nickle Aug 26 '14 at 12:31
  • @PolyGeo I looked at the accepted answer given in the duplicate question Are you sure the question is a duplicate? – nmtoken Aug 26 '14 at 16:09
  • Your minimal mapfile can show a map but there is much that can go wrong. To start with, what is the projection and extents of "states"? You can check those with ogrinfo tool. – user30184 Aug 26 '14 at 17:54
  • I produce map for the same shapefile using js its working fine.But with the above code its not working.and also i downloaded sample shape files from net and tryed that one also but no luck – nickle Aug 27 '14 at 4:51