1

i want to show my shapefile on the web my template file is:

<html>
<head><title>Simple Mapserver Template HTML Document</title></head>
<body>
<img src="[img]" border=0 width=300 height=400>
</body>
</html>   

my map code is:

MAP
NAME "parcels_map"
STATUS ON
SIZE 400 300
EXTENT 489885 5450946 490904 5451637
UNITS METERS
SHAPEPATH "shpfile"
IMAGECOLOR 255 255 255

WEB
TEMPLATE "template.html"
IMAGEPATH "C:\\wamp64\\www\\parcel\\output\\"
IMAGEURL "/output/"
END


LAYER
NAME "parcel_boundaries"
DATA parcels
STATUS DEFAULT
TYPE LINE
CLASS
NAME "parcels_color"
COLOR 255 215 0
END
END

# end of map file
END

i send a request to mapserv.exe in CGI mode and then my output is a broken PNG in my browser while a png file create in my output folder. what should i do to solve my problem please help me.I'm a beginner to mapserver and totally have disappointed

  • 1
    if you open the "broken" png in a text editor what do you see? – Ian Turton Nov 13 '17 at 14:40
  • when i click on the image and open it in new tab in my browser an error accur :The requested URL /output/parcels_map151064593568.png was not found on this server....Apache/2.4.23 (Win64) PHP/5.6.25 Server at localhost Port 80 – ali Nov 14 '17 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.