<?xml version="1.0"?>
<!--
  - This is the Moose Project's demonstration XML File.
  - Below you can see different examples of the objects/option available.
 -->

<!--
Copyright (c) 2005-2006, City of Saint Paul.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies of this Software or works derived from this Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-->

<!-- The title attribute will be displayed in the title bar and in the window title.
  -  stylesheet is a reference to the CSS file that you want to use to render the interface.
  -  root is the document root for the shared/images/toolbar and other files.
-->

<mapbook>
	<group title="Basic Tools" invisible="true">
		<service title="Previous Zoom" type="internal" default="true" locked="true" command="NavHistory.previous()" icon="shared/images/toolbar/arrow_left.jpg" highlight="shared/images/toolbar/arrow_left_selected.jpg" selectable="false"/>
		<service title="Next Zoom" type="internal" default="true" locked="true" command="NavHistory.next()" icon="shared/images/toolbar/arrow_right.jpg" highlight="shared/images/toolbar/arrow_right_selected.jpg" selectable="false"/>
		<service name="zoomIn" selected="true" title="Zoom In" type="internal" default="true" locked="true" command="Events.triggerEvent('zoom',.5)" key="i" icon="shared/images/toolbar/zoom_in.jpg" highlight="shared/images/toolbar/zoom_in_selected.jpg"/>
                <service name="zoomOut" title="Zoom Out" type="internal" default="true" locked="true" command="Events.triggerEvent('zoom',2)" key="o" icon="shared/images/toolbar/zoom_out.jpg" highlight="shared/images/toolbar/zoom_out_selected.jpg"/>
                <service name="zoomPan" title="Pan" type="internal" default="true" locked="true" command="Events.triggerEvent('zoom',1)" key="p" icon="shared/images/toolbar/pan.jpg" highlight="shared/images/toolbar/pan_selected.jpg"/>
                <service name="refreshLayers" title="Reload Layers" type="internal" default="true" locked="true" command="Events.triggerEvent('refreshlayers')" icon="shared/images/toolbar/refresh.jpg" selectable="false"/>
		<service title="Full Extent" type="internal" invisible="true" default="true" locked="true" 
			command="zoomToInitialView()" icon="shared/images/toolbar/zoom_full.jpg" highlight="shared/images/toolbar/zoom_full_selected.jpg" selectable="false"/>

		<service title="Identify" default="true" cursor="url(cursors/identify2.cur), auto" icon="shared/images/toolbar/identify.jpg" highlight="shared/images/toolbar/identify_selected.jpg" locked="true" shape="point">
			<url>/cgi-bin/mapserv.exe</url>
			<input type="file" name="map" value="./identify.map"/>
			<input type="point" name="mapxy" delim=" "/>
			<input type="extent" name="imgext" delim=" "/>
			<input type="layertitles" name="layers" delim=" "/>
			<input type="imagesize" name="imgsize" delim=" "/>
			<input type="hidden" name="mode" value="nquery"/>
		</service>
		
		<service title="Select Feature" default="true" locked="true" cursor="url(cursors/select.cur), auto" shape="box" type="inspect-search" icon="shared/images/toolbar/draw_polygon.jpg" highlight="shared/images/toolbar/draw_polygon_selected.jpg">
			    <url>php/select.php</url>
			    <input type="multipoint" name="coords"/>
			    <input type="hidden" name="shape" value="poly"/>
			    <input type="hidden" name="map" value="./select.map"/>
			    <input type="hidden" name="select" value="../../maps_countydemo/select.map"/>    
			        <!--
			         LAYER_NAME:COLUMN_NAME to specify which query column to return 
			        -->
			        <input type="select" name="layer" title="Layer to Select:">
										<option value="Parcels:PIN">Parcels</option>
										<option value="FireStations:Dak_GIS__1">Fire Stations</option>
		          </input>
			        <input type="hidden" name="output" value="html"/>
			</service>
			
			<service title="Select by Buffer" default="true" locked="true" cursor="url(cursors/pencil2.cur), auto" return="xml" display="div" shape="box">
				<url>php/buffer_select.php</url>
				<input type="length" name="buffer" title="Buffer:"/>
				<input type="multipoint" name="coords"/>
				<input type="hidden" name="shape" value="poly"/>

				<input type="hidden" name="map" value="./select.map"/>
				<input type="hidden" name="select" value="../../maps_countydemo/select.map"/>
				<input type="select" name="select_layer" title="Select Features to Buffer:">
				  <option value="Parcels:PIN">Parcels</option>
				  <option value="Pipelines:Id">Pipelines</option>
				  <option value="Feedlots:Name">Feedlots</option>
				</input>
				<input type="select" name="query_layer" title="Select Features from Buffer:">
				  <option value="Parcels:PIN">Parcels</option>
				  <option value="Pipelines:Id">Pipelines</option>
				  <option value="Feedlots:Name">Feedlots</option>
				</input>
				<input type="hidden" name="output" value="html"/>
			</service>

			<service title="Clear Selection" type="internal" invisible="true" default="true" selectable="false" locked="true"
			command="Map.clearLayer('Highlight');" icon="shared/images/toolbar/clear.jpg" highlight="shared/images/toolbar/clear_selected.jpg"/>

		<service title="Measure Length" type="internal" locked="true" default="true" icon="shared/images/toolbar/distance_measure.jpg" highlight="shared/images/toolbar/distance_measure_selected.jpg" command="Events.triggerEvent('measure','length')"/>

		<service title="Measure Area" type="internal" locked="true" default="true" icon="shared/images/toolbar/area_measure.jpg" highlight="shared/images/toolbar/area_measure_selected.jpg" command="Events.triggerEvent('measure','area')"/>
		
		<service title="Print to PDF" default="true" type="xmlpost" icon="shared/images/toolbar/print.jpg" highlight="shared/images/toolbar/print_selected.jpg">
			<url>php/print.php</url>
			<input type="hidden" name="/canvas/param[0]/@name" value="title"/>
			<input type="user" name="/canvas/param[0]/@value" title="Map Title:" value="Map Title"/>
			<input type="layerslist" name="/canvas/layers" processed="false"/>
			<input type="extent" name="/canvas/input/@mapext" delim=" "/>
			<input type="hidden" value="971" name="/canvas/input/@width"/>
			<input type="hidden" value="636" name="/canvas/input/@height"/>
			<input type="select" name="/canvas/input/@pagesize" title="Page Size:">
				<option value="11 8.5">Letter Landscape</option>
				<option value="8.5 11">Letter Portrait</option>
				<option value="17 11">Tabloid Landscape</option>
				<option value="11 17">Tabloid Portrait</option>
			</input>
			<input type="select" name="/canvas/input/@quality" title="Print Quality:">
				<option value="1">Standard</option>
				<option value="2">Better</option>
				<option value="3">Best</option>
			</input>
			<input type="select" name="/canvas/input/@legend" title="Print Legend?">
				<option value="yes">Yes</option>
				<option value="no">No</option>
			</input>
			<input type="select" name="/canvas/input/@scalebar" title="Print Scalebar?">
				<option value="yes">Yes</option>
				<option value="no">No</option>
			</input>
			<input type="select" name="/canvas/input/@north" title="Print North Arrow?">
				<option value="yes">Yes</option>
				<option value="no">No</option>
			</input>
			<input type="user" name="/canvas/input/message" title="Map Message:"/>

			<input type="hidden" name="/canvas/input/@outputmode" value="template"/>
			<input type="selection" name="/canvas/input/parcels" layer="Highlight" delim=","/>
		</service>
		
		<service title="Search for Parcels by PIN" selectable="false" default="false" locked="true" div="pinsearch">
			<url>/cgi-bin/mapserv.exe</url>
			<input type="hidden" name="map" value="./itemquery.map"/>
			<input type="hidden" name="mode" value="nquery"/>
			<input type="hidden" name="layer" value="Parcels"/>
			<input type="user" name="id" title="Zoom to Parcel#:"/>
		</service>
		
		<service title="Search for Parcels by Owner Name" selectable="false" default="false" locked="true" div="ownersearch">
			<url>/cgi-bin/mapserv.exe</url>
			<input type="hidden" name="map" value="./itemquery.map"/>
			<input type="hidden" name="mode" value="nquery"/>
			<input type="hidden" name="layer" value="ParcelsOwnerSearch"/>
			<input type="user" name="id" title="Zoom to Parcel#:"/>
		</service>

	</group>
	

  <!--  The scale bar is always nice, right? -->
  <map title="Scale Bar" default="true" invisible="true">
    <file>./scalebar.map</file>
  </map>
  
  <map title="Highlight" invisible="true" default="true">
  	<file>relative://./shared/images/blank.gif?mapext=%EXTENTS%</file>
</map>

	<group title="County Layers" expand="true">
	  <map title="County and City" default="true" reference="true">
	    <file>./boundaries/county_city.map</file>
	  </map>

	  <map title="Feedlots" default="false">
		  <file>./countydata/feedlots.map</file>
	  </map>
  	</group>

  <map title="Fire Stations" default="true" popups="true" data="true">
	   <file>./countydata/firestations.map</file>
  </map>
  
 <map title="Metro Water (WMS Example)" default="false" zindex="-1">
    <file>http://www.datafinder.org:80/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Water_Resources?LAYERS=stream_net_l&amp;amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application/vnd.ogc.se_inimage&amp;FORMAT=image/png&amp;SRS=EPSG:26915&amp;BBOX=%MINX%,%MINY%,%MAXX%,%MAXY%&amp;WIDTH=%WIDTH%&amp;HEIGHT=%HEIGHT%&amp;TRANSPARENT=TRUE</file>
 </map>
  
  <map title="Watersheds (WFS example)" default="false">
	    <file>./wfs/hydro_wfs.map</file>
  </map>
  
   <map title="Pipelines" default="false">
		    <file>./countydata/pipelines.map</file>
  </map>
  
  <map title="Parcels" default="true">
          <file>./landrecords/parcels.map</file>
  </map>
  
  <map title="2003 FSA Orthos" default="false">
    <file>http://geoint.lmic.state.mn.us/cgi-bin/wms?LAYERS=fsa&amp;amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application/vnd.ogc.se_inimage&amp;FORMAT=image/jpeg&amp;SRS=EPSG:26915&amp;BBOX=%MINX%,%MINY%,%MAXX%,%MAXY%&amp;WIDTH=%WIDTH%&amp;HEIGHT=%HEIGHT%</file>
  </map>


<!-- Here's the 1:24,000 USGS topo quads -->
    <map title="USGS 7.5&apos; Quads" default="false">
      <file>http://geoint.lmic.state.mn.us/cgi-bin/wmsz?LAYERS=drg24&amp;amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application/vnd.ogc.se_inimage&amp;FORMAT=image/png&amp;SRS=EPSG:26915&amp;BBOX=%MINX%,%MINY%,%MAXX%,%MAXY%&amp;WIDTH=%WIDTH%&amp;HEIGHT=%HEIGHT%</file>
    </map>

    <!-- This view is set to be default.
       - Views are stored as four coordinates, MinX,MinY,MaxX,MaxY and need to be comma-separated values.
       - The value of this element is parsed in JavaScript and used to run the changeExtents() function.
    -->
    <view title="Dakota County" default="true" invisible="true">521238.614537864,4924218.86673578,473921.947801381,4974430.36885032</view>
    <view title="Parcel Data" default="True" invisible="True">497205.409367,4923984.423582,477595.805945,4941970.529883</view>
</mapbook>
