The name associated with the inline map image used to record user clicks. What actually is passed are two variables, img.x and img.y.
For the CGI Applications this is an essential variable, see the examples for sample usage.
Shape given in image coordinates.
An arbitrary polygon shape to be used for query purposes. Multiple instances simply add parts to the shape so it is possible to construct a shape with holes. Used with modes NQUERY and NQUERYMAP.
The names of the layers to be turned on. Layer names must be seperated by spaces.
Version 4.4 and above: passing ‘LAYERS=all’ will automatically turn on all layers.
The spatial extent of the map to be created.
Can be set to shape as an alternative option. In this case mapextent is set to the extent of a selected shape. Used with queries.
Shape in map coordinates.
An arbitrary polygon shape to be used for query purposes. Multiple instances simply add parts to the shape so it is possible to construct a shape with holes. Used with modes NQUERY and NQUERYMAP.
A point, in the same coordinate system as the shapefiles, to be used in conjuction with a buffer or a scale to construct a map extent.
Can be set to shape as an alternative option. In this case mapextent is set to the extent of a selected shape. Used with queries.
Mode of operation. The following options are supported (note that all of the query modes also support map-only modes, e.g. ITEMQUERYMAP, which for brevity are not all listed):
A legend icon is returned. The ICON parameter must also be used to specify the layername and a class index. Class index value is optional and defaults to 0. For example:
mapserv.exe?map=/ms4w/apps/gmap/htdocs/gmap75.map&MODE=legendicon&ICON=popplace,0
The name associated with the inline reference map image used to record user clicks. What actually is passed are two variables, ref.x and ref.y.
For the CGI Applications this is an essential variable when reference maps are used, see the examples for sample usage.
Zoom scaling to apply to the creation of the new map. Values greater than 0 resulting in zooming in, 0 is a pan, and values less than zero are for zooming out. A value of 2 means “zoom in twice”.
ZOOM can be used as a shortcut for the combination ZOOMDIR/ZOOMSIZE. The zoom is limited by the MINZOOM/MAXZOOM settings compiled into the MapServer (-25/25) by default.
Absolute magnitude of a zoom. Used with ZOOMDIR.
ZOOMDIR is limited to MAXZOOM compiled into the MapServer (25 by default).
Begining with version 3.3 it is possible to change virtually any map file value from a form or a URL. The syntax for this is fairly straight forward, and depends on what version of MapServer you are using. One potentially very powerful use of this ability to change mapfile parameters through a URL involves changing class expressions on-the-fly. Try it out.
Previous versions of the MapServer CGI program allowed certain parameters to be changed via a URL using a cumbersome syntax such as map_layer_0_class_0_color=255+0+0 which changes the color in one classObj. So, in the past you have to change parameters one-at-a-time. Now you can pass chunks of mapfiles (with security restrictions) to the CGI interface. The map_object notation is still necessary to identify which object you want to modify but you can change multiple properties at one time. Note that you can use either a ‘_’ or a ‘.’ to seperate identifiers.
Example 1, changing a scalebar object:
...&map.scalebar=UNITS+MILES+COLOR+121+121+121+SIZE+300+2&...
Example 2, changing a presentation style:
...&map.layer[lakes].class[0].style[0]=SYMBOL+crosshatch+COLOR+151+51+151+SIZE+15&...
Example 3, creating a new feature
...&map_layer[3]=FEATURE+POINTS+500000+1000000+END+TEXT+'A+test+point'+END&...
Example 4, set multiple web object parameters
...&map_web=imagepath+/ms4w/tmp/ms_tmp/+imageurl+/ms_tmp/
Example 5, set the map size
...&map_size=800+400
The variable identifies an object uniquely (by name or index in the case of layerObj’s and classObj’s). The value is a snippet of a mapfile. You cannot create new objects other than inline features at this point.
For MapServer version < 5, any value can be expressed using the hierarchy used in a map file. A map contains a layer, which contains a class, which contains a label, which has a color. This hierarchy is expressed as a sequence of MapServer keywords seperated by underscores. For example to change the color of a layer called “lakes” with only one class defined you would use a form variable named “map_lakes_class_color” and could assign it a color like “0 0 255”. Layers can be referenced by index (i.e. map_layer_0...) or by name as shown above. Layer classes are referenced by index value (i.e. map_layer_0_class_2). If there is only 1 class for a layer then the index should be ommited. These variables must always begin with the sequence “map_”. Values assigned must conform to the syntax of a map file.
It is also possible to define inline features using this mechanism. This is the only case where you can add on to the map file. You can edit/change layer parameters but you cannot create a new layer. With inline features you have to first create a feature and then build upon it, however, the layer the feature belongs to must exist. Here’s a snippet from a GET request that adds a feature to a webuser layer:
. . . &map_webuser_feature=new&map_webuser_feature_points=12345.6789+12345.6789&map_webuser_feature_text=My+House!& . . .
The “map_webuser_feature=new” creates a new feature for the webuser layer. All subsequent calls to the feature object for that layer will modify the new feature. You can repeat the process to create additional features. This is really intended for very small (point, rectangle) amounts of data.
note: Active development and maintenance of the ROSA Applet has stopped
The ROSA Applet parameters were added to the CGI MapServer in version 3.6. This Java Applet provides a more intuitive user interface to MapServer. The MapTools site provides detailed information on the ROSA Applet.
The parameters can also be used by other interfaces/tools, if set to the right values. Please note that the two parameters have to be handed over to te CGI application in the order identified below.