[mapserver-users] query creation issues
Mark Mirrlees
mmirrlees at hotmail.com
Wed Mar 20 08:45:27 PDT 2013
Hello everyone, I'm trying to create a query so I can query the roads/expressways from the map. I'm pretty sure I have created the headers and footers correctly but not sure...regardless i'm not entirely too sure where to stick the particular code in my .map file (shown below). I have bolded the code that I'm trying to incorporate into the .map file but not sure why it's not working. Thanks Mark # Map file created from QGIS project file C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
NAME "QGIS-MAP"
# Map image size
SIZE 500 500
UNITS meters
EXTENT -2400000 -900000 3100000 4000000
FONTSET "/wwwroot/fonts/fontset.txt"
SYMBOLSET "/wwwroot/symbols/symbols.sty"
PROJECTION
"proj=lcc"
"ellps=GRS80"
"lat_0=49"
"lon_0=-95"
"lat_1=49"
"lat_2=77"
"datum=NAD83"
"units=m"
"no_defs"
END
# Background color for the map canvas -- change as desired
IMAGECOLOR 0 100 250
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 "/ms4w/tmp/ms_tmp/"
# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL "/ms_tmp/"
# WMS server settings
METADATA
'ows_title' 'QGIS-MAP'
'ows_onlineresource' 'localhost.com/cgi-bin/mapserv.exe?map=C:/wwwroot/M_Mirrlees_Assign3/global.map'
'ows_srs' 'EPSG:4326'
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 'C:/wwwroot/M_Mirrlees_Assign3/global.html'
END
SCALEBAR
STATUS EMBED
UNITS KILOMETERS
INTERVALS 3
TRANSPARENT TRUE
OUTLINECOLOR 0 0 0
END # End for scalebar
QUERYMAP
STATUS ON # sets the map to be queryable
STYLE HILITE # the selected object is highligthed
END # End for QueryMap
WEB
TEMPLATE global.html
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
HEADER "/maps/M_Mirrlees_assign3/header.html"
FOOTER "maps/M_Mirrlees_assign3/footer.html"
EMPTY "/maps/M_Mirrlees_Assign3/blank.html"
END #End for WEB
LAYER
NAME 'mjrroads'
TYPE LINE
DUMP false
EXTENT -143.210462 39.001401 -50.461045 85.911094
DATA '../data/mjrroads.shp'
METADATA
'ows_title' 'mjrroads'
END
STATUS default
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASSITEM 'TYPE'
CLASS
NAME "default"
EXPRESSION ""
STYLE
WIDTH 0.91
COLOR 201 157 32
END
END
CLASS
NAME "TYPE = Expressway"
EXPRESSION "Expressway"
STYLE
WIDTH 2.0
COLOR 255 0 0
END
END
CLASS
NAME "TYPE = Primary Highway"
EXPRESSION "Primary Highway"
MAXSCALEDENOM 2500000
STYLE
WIDTH 1.0
COLOR 0 0 0
END
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130320/9791316e/attachment.htm>
More information about the MapServer-users
mailing list