[mapserver-users] query problems

Mark Mirrlees mmirrlees at hotmail.com
Tue Mar 19 15:09:35 PDT 2013


Hey all, One last issue (well for know anyway)... I want to create a basic query so when I open the query I am able to select the major roads and expressways from the mjrroads layer that was created! I have already created the header and footers but not sure where to stick the particular code in the global.map file that contains the headers and footers... Here is my code.# 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  I must apologize for all the questions, as i'm still fairly new at this but everyone who has taken the time to help me is quite appreciated as this is making a lot of sense now. Thanks,Mark 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130319/4e7a0a31/attachment-0001.html>


More information about the mapserver-users mailing list