[mapserver-users] error showing map in template
avin mohanza
avin_ngky at yahoo.com
Tue Jul 16 04:28:00 PDT 2013
this is the map file
MAP
NAME ARNSBERG
# Map image size
SIZE 600 400
UNITS meters
EXTENT 7.474607 50.595419 8.763348 51.966222
#FONTSET './fonts/fonts.txt'
#SYMBOLSET './symbols/symbols.txt'
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
# Background color for the map canvas -- change as desired
IMAGECOLOR 255 255 255
IMAGEQUALITY 95
IMAGETYPE agg
OUTPUTFORMAT
NAME agg
DRIVER AGG/PNG
IMAGEMODE RGB
END
# Legend
LEGEND
IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
END
# Web interface definition. Only the template parameter
# is required to display a map. See MapServer documentation
WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/var/www/arnsbergMS/'
# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'
# WMS server settings
METADATA
'ows_title' 'QGIS-MAP'
'ows_onlineresource'
'http://localhost/cgi-bin/mapserv?map=/var/www/arnsbergMS/arnsberg.map'
'ows_srs' 'EPSG:4326'
'wms_enable_request' "*"
'ows_enable_request' "*"
'wfs_enable_request' "*"
END
#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See
MapServer documentation
#TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
TEMPLATE '/var/www/arnsbergMS/tring.html'
END
LAYER
NAME 'arnsbergMS3'
TYPE POLYGON
DUMP false
EXTENT 7.474607 50.595419 8.763348 51.966222
#DATA
'/var/www/arnsbergMS/arnsberg-regbez-latest.osm?type=polygon&tag=name&style=/usr/share/qgis/python/plugins/osm/styles/medium_scale.style'
DATA '/var/www/arnsbergMS/arnsbergMS3.shp'
METADATA
'ows_title' 'arnsbergMS3'
'wms_enable_request' "*"
'ows_enable_request' "*"
'wfs_enable_request' "*"
END
STATUS ON
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'arnsbergMS3'
STYLE
WIDTH 0.91
OUTLINECOLOR 0 0 0
COLOR 224 176 81
END
END
END
LAYER
NAME 'arnsbergMS2'
TYPE LINE
DUMP false
EXTENT 7.474607 50.595419 8.763348 51.966222
#DATA
'/var/www/arnsbergMS/arnsberg-regbez-latest.osm?type=line&tag=name&style=/usr/share/qgis/python/plugins/osm/styles/medium_scale.style'
DATA '/var/www/arnsbergMS/arnsbergMS2.shp'
METADATA
'ows_title' 'arnsbergMS2'
'wms_enable_request' "*"
'ows_enable_request' "*"
'wfs_enable_request' "*"
END
STATUS ON
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'arnsbergMS2'
STYLE
WIDTH 0.91
COLOR 171 48 161
END
END
END
END
if you need also my template
this is my template, tring.html
!-- MapServer Template -->
<html>
<head>
<title>MapServer Workshop</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="/tutorial/ms35.css" />
</head>
<body bgcolor="#FFFFFF" text="#000000">
Example 2.1: Zoom and Pan Controls
<form name="mapserv" method="GET" action="/cgi-bin/mapserv">
<input type="hidden" name="map"
value="/var/www/arnsbergMS/arnsberg.map">
<input type="hidden" name="imgext" value="7.474607 50.595419 8.763348
51.966222">
<input type="hidden" name="imgxy" value="300 200">
<div align="center">Map Mode:<br>
<select name="mode">
<option value="browse">Browse</option>
<option value="map">Map</option>
</select>
</div>
<div align="center">
<input type="submit" name="submit" value="Refresh">
</div>
<div align="center">Map Control: <br>
<select name="zoom">
<option value="4" [zoom_4_select]>Zoom In 4x</option>
<option value="3" [zoom_3_select]>Zoom In 3x</option>
<option value="2" [zoom_2_select]>Zoom In 2x</option>
<option value="1" [zoom_1_select]>Recenter</option>
<option value="-2" [zoom_-2_select]>Zoom Out 2x</option>
<option value="-3" [zoom_-3_select]>Zoom Out 3x</option>
<option value="-4" [zoom_-4_select]>Zoom Out 4x</option>
</select>
</div>
<input type="image" name="img" src="/var/www/arnsbergMS/arnsberg.png"
width="400"
height="300" border="0">
</form>
</body>
</html>
thank you so much....
Lime, Steve D (MNIT) wrote
> Tough to tell without a little bit of the mapfile content. Most likely
> this is from:
>
> 1) missing quotes around a string
> 2) misspelling of a keyword
> 3) a missing END keyword
>
> Steve
>
> -----Original Message-----
> From:
> mapserver-users-bounces at .osgeo
> [mailto:
> mapserver-users-bounces at .osgeo
> ] On Behalf Of avin mohanza
> Sent: Monday, July 15, 2013 4:06 AM
> To:
> mapserver-users at .osgeo
> Subject: [mapserver-users] error showing map in template
>
> loadWeb(): Unknown identifier. Parsing error near
> (/var/www/arnsbergMS/templatest.html):(line 1)
>
> what cause this error?
>
> i appreciate every help..
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/error-showing-map-in-template-tp5066390.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at .osgeo
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at .osgeo
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/error-showing-map-in-template-tp5066390p5066739.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list