Moxi Media Inc.
<MAP> Tree View | Discussion Forum
IMF Developer's Guide » Map Configuration » <MAP>  

The <MAP> element defines the projection of the map and the map limits. The map projection is specified using the srs attribute, which must be one of the ones defined in the <SRS-LIST> element.

Note that the map configuration file elements must appear in sequence, and the <MAP> element must immediately follow the <SRS-LIST> element in the map configuration XML file.

Also note that the sub-elements of the <MAP> element must appear in the sequence shown below. Multiple <PROPERTY> elements may be used, but they must appear after all the extent elements. For best results, validate your XML against the schema for this file format.

Frequency Parent Elements (this element is valid within):
PRS1 <MAP-CONFIG>
   

Attributes Description
srs The spatial reference system code that defines the projection of the map. The SRS used must be one of the ones defined in the <SRS-LIST> element, example "EPSG:4326". Layers from services with spatial reference systems defined that are different from the map's projection will be projected to the map's projection, but the map will draw faster if all layers are available in the same projection as this. Required.
background-color The background color for the map display. This solid color will be drawn under the images received from the map services. Colors are specified in red, green, blue values between 0 and 255, separated by commas with no white space, example "255,0,0" is red. Optional, the background will be white "255,255,255" if this attribute is not specified in your map configuration file.
center-coordinate-srs The spatial reference system used for the display of the map center coordinate on the map. The SRS used must be one of the ones defined in the <SRS-LIST> element, example "EPSG:4326". Optional, no center coordinate text will be displayed if this attribute is not used.
copyright The text to put in the copyright area, under the scalebar. If you actually want the message to read "Copyright © ...", follow the example at the bottom of this page. Optional, no copyright text is displayed if this attribute is not used.
north-arrow An indicator of whether the north arrow should be shown on the map. Valid values are "true" or "false". Optional, defaults to "false".
scalebar-units The units for the scalebar on the map. Valid values are "feet", "miles", "feet-or-miles", "meters", "kilometers" or "meters-or-kilometers". Optional, no scalebar is displayed if this attribute is not used.
forward An indicator of whether the map should be forwarded by the IMF server instead of being read directly from the WMS services and stacked in the browser. This is useful where secure servers are involved. Valid values are "true" or "false". Optional, defaults to "false".
   

Frequency Child Elements
RS1 <INITIAL-EXTENT>
OS1 <FULL-EXTENT>
OS+ <PROPERTY>
OS+ <MAP-SCRIPT>
   

Frequency Description (in this context)
PRS1 The <MAP> element must appear exactly once in the <MAP-CONFIG> element in the sequence specified.
RS1 The <INITIAL-EXTENT> element must appear exactly once in the <MAP> element in the sequence shown.
OS1 The child element is optional and may appear once in the sequence shown.
OS+ The child element is optional and may appear one or more times within a <MAP> element in the sequence shown.
   

Example:

<MAP srs="EPSG:42102"
     copyright="Copyright &#169; Moxi Media Inc."
     north-arrow="true"
     scalebar-units="meters-or-kilometers"
     center-coordinate-srs="EPSG:4269">
     <INITIAL-EXTENT minx="143183" miny="281901" maxx="1918551" maxy="1773046" /> 
</MAP>

Valid HTML 4.01!