<?xml version="1.0"?>
<mapbook version="2.0">
	<configuration>
		<!--
			<param name="links_bar_html"><![CDATA[Perfect timing for some damn CDATA "all" of 'its' here <&>]]></param>
			<param name="layer_controls.unfade.on">false</param>
		-->
		<param name="zoomto['Jump To:']"><![CDATA[
		{
			'Dakota County' : [521238.614537864,4924218.86673578,473921.947801381,4974430.36885032],
			'Parcel Data' : [497205.409367,4923984.423582,477595.805945,4941970.52988],
			'Full State of MN' : [189783.560000,4816309.330000,761653.524114,5472346.500000]
		}
		]]></param>
	      <param name="max_extent">189783.560000,4816309.330000,761653.524114,5472346.500000</param>
	      <param name="initial_extent">497205.409367,4923984.423582,477595.805945,4941970.52988</param>

	      <param name="layer_controls.legend.on">false</param>

	      <param name="mapserver_url">/mapserver/cgi-bin/mapserv</param>
	      <param name="mapfile_root">/opt/geomoose/geomoose/moose2-trunk/maps</param>

	      <param name="projection">EPSG:26915</param>

	</configuration>
	<!--
		The mapping services define the source of the mapping data.
	-->

	<map-source name="highlight" type="mapserver">
		<file></file>
		<layer name="all"/>
	</map-source>


	<map-source name="editor" type="mapserver">
		<file>./test_points/test_points.map</file>
		<layer name="points"/>
	</map-source>

	<map-source name="editor2" type="mapserver">
		<file>./test_polygons/test_polygons.map</file>
		<layer name="polygons"/>
	</map-source>

	<map-source name="basemap" type="mapserver">
		<file>./all_tests/all_tests.map</file>
		<layer name="points"/>
		<layer name="polygons"/>
	</map-source>


<!--
	<map-source name="borders" type="mapserver" reference="on">
		<file>./boundaries/county_city.map</file>
		<layer name="all"/>
	</map-source>
-->

	<map-source name="feedlots" type="mapserver">
		  <file>./countydata/feedlots.map</file>
		  <layer name="all"/>
	</map-source>
  
	<map-source name="metro" type="wms">
		<url>http://www.datafinder.org:80/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Water_Resources</url>
		<layer name="stream_net_l"/>
		<param name="TRANSPARENT" value="TRUE"/>
		<param name="FORMAT" value="image/png"/>
	</map-source>

	<map-source name="water" type="mapserver">
		<file>./wfs/hydro_wfs.map</file>
		<layer name="all"/>
	</map-source>

	<map-source name="dnr" type="wms">
		<url>http://deli.dnr.state.mn.us/cgi-bin/wms?</url>
		<layer name="L390002400906"/>
		<param name="map" value="DELI_WMS_MAPFILE"/>
		<param name="FORMAT" value="image/png"/>
		<param name="TRANSPARENT" value="TRUE"/>
	</map-source>

	<map-source name="pipelines" type="mapserver" queryable="true">
		<file>./countydata/pipelines.map</file>
<!--		<url>/cgi-bin/mapserv?</url>
		<param name="map" value="/var/www/geomoose/moose-trunk/maps_countydemo/countydata/pipelines.map"/>
		<layer name="pipelines"/>
		<param name="TRANSPARENT" value="TRUE"/>
		<param name="FORMAT" value="image/png"/>-->
		<layer name="pipe_lines"/>
	
		<layer name="pipe_lines2"/>
	</map-source>

	<map-source name="fire" type="wms" queryable="true">
		<!--<file>./countydata/pipelines.map</file>-->
		<url>/cgi-bin/mapserv?</url>
		<param name="map" value="/var/www/geomoose/moose-trunk/maps_countydemo/countydata/firestations.map"/>
		<layer name="firestations"/>
		<param name="TRANSPARENT" value="TRUE"/>
		<param name="FORMAT" value="image/png"/>
	</map-source>



	<map-source name="parcels" type="mapserver">
		<file>./demo/landrecords/parcels.map</file>
		<layer name="all"/>
	</map-source>


	<map-source name="lmic" type="wms" tiled="false">
		<url>http://geoint.lmic.state.mn.us/cgi-bin/wms</url>
		<layer name="fsa"/>
	</map-source>

	<!-- WMS Layers call the server and get images -->
	<map-source name="lmic_wmsz" type="wms" tiled="true">
		<url>http://geoint.lmic.state.mn.us/cgi-bin/wmsz</url>
		<layer name="drg24"/>
		<param name="format" value="image/png"/>
	</map-source>

	<service name="print">
		<url>php/print.php</url>
		<input type="print_info" name="layers"/>
	</service>

	<service name="identify" title="Identify" display="false">
		<url>php/identify.php</url>
		<step type="spatial" name="shape" line="false" polygon="false" jump-start="true" default="point">
			<input type="visiblelayers" name="layers"/>
		</step>
	</service>

	<service name="select" title="Select">
		<url>php/select.php</url>

		<!-- Send a selection shape + the visible layers list to the service -->
		<step type="spatial" name="shape" line="false" polygon="true" point="false" default="polygon" edit-polygon="true">

			<header><![CDATA[
			<br/>
			Use the mouse to click the vertecies of your selection area.<br/><br/>
			]]></header>

			<input type="visiblelayers" name="layers"/>

			<!-- 
				Option values should be the mapbook path to the layer.
				This only supports 'mapserver'-type layers.
			-->
			<input type="hidden" name="select_layer" value="parcels/all"/>

			<input type="user" name="shape_buffer" title="Buffer Selection Shape (ft):">0</input>

			<input type="select" name="query_layer" title="Using Features In:">

				<option value="parcels/all">Parcels</option>
				<option value="pipelines/pipe_lines">Pipelines</option>
			</input>
			<input type="user" name="selection_buffer" title="Buffer Selected Features (ft):">0</input>

			<footnote><![CDATA[
			]]></footnote>
		</step>
	</service>

	<service name="add_point" title="Add Point to Test Layer">
<!--		<url>php/editor.php</url>-->
		<url>php/echo.php</url>
		<step type='spatial' name='feature:wkb_geometry' line='false' polygon='false' point='true' default='point'>
			<input type="hidden" name="op" value="create"/>
			<input type="hidden" name="table" value="test_points"/>
		</step>
		<step type="input">
			<input type="user" name="feature:attribute1" title="Attribute 1:"/>
			<input type="user" name="feature:attribute2" title="Attribute 2:"/>
		</step>
	</service>

	<service name="modify_point" title="Modify a Point">
		<url>php/editor.php</url>
		<step type='spatial' name='feature:wkb_geometry' line='false' polygon='false' point='true' default='point' wkt='POINT(448164.98092 5133831.32028)'>
			<input type="hidden" name="op" value="update"/>
			<input type="hidden" name="table" value="test_points"/>
			<input type="hidden" name="feature:id"/>
			<input type="user" name="feature:attribute1" title="Attribute 1:"/>
			<input type="user" name="feature:attribute2" title="Attribute 2:"/>
		</step>
	</service>


	<service name="delete_point" title="Delete a Point">
		<url>php/editor.php</url>
		<step type='input'>
			<input type="hidden" name="op" value="delete"/>
			<input type="hidden" name="table" value="test_points"/>
			<input type="hidden" name="feature:id"/>
		</step>
	</service>

	<service name="add_polygon">
		<url>php/editor.php</url>
		<step type='spatial' name='feature:wkb_geometry' line='false' polygon='true' point='false' default='polygon'>
			<input type="hidden" name="op" value="create"/>
			<input type="hidden" name="table" value="test_polygons"/>
			<input type="user" name="feature:title" title="Title:"/>
			<input type="user" name="feature:owner" title="Owner:"/>
		</step>
	</service>

	<service name="modify_polygon">
		<url>php/editor.php</url>
		<step type='spatial' name='feature:wkb_geometry' line='false' polygon='true' point='false' default='point' edit-polygon='true'>
			<input type="hidden" name="op" value="update"/>
			<input type="hidden" name="table" value="test_polygons"/>
			<input type="hidden" name="feature:polygon_id"/>
			<input type="user" name="feature:title" title="Title:"/>
			<input type="user" name="feature:owner" title="Owner:"/>
		</step>
	</service>

	<service name="delete_polygon">
		<url>php/editor.php</url>
		<step type='input'>
			<input type="hidden" name="op" value="delete"/>
			<input type="hidden" name="table" value="test_polygons"/>
			<input type="hidden" name="feature:polygon_id"/>
		</step>
	</service>

	<service name="popups" display="false">
		<url>php/popups.php</url>
		<step type="spatial" name="shape" line="false" polygon="false" jump-start="true" default="point">
			<header><![CDATA[
			Click on the map to show a popup about the features.
			]]></header>
			<input type="hidden" name="layer"/>
		</step>
	</service>


	<service name="search_points">
		<url>php/itemquery.php</url>
		<step type="input">
			<input type="user" name="qstring" title="Attribute 1:"/>
			<input type='hidden' name='layer' value='/test/editor/points'/>
		</step>
	</service>

	<service name="search_parcels">
		<url>php/itemquery.php</url>
		<step type="input">
			<input type="select" name="qitem" title="Search By:">
				<option value="OWNER_NAME">Owner</option>
				<option value="PID">Parcel ID</option>
			</input>
			<input type="user" name="qstring" title=""/>
			<input type="hidden" name="layer" value="parcels/all"/>
			<input type="hidden" name="zoom_to_first" value="false"/>
			<input type="hidden" name="highlight" value="true"/>
		</step>
	</service>

	<!-- 
		The catalog defines how the layers will be displayed in the catalog tab.
	-->
	<layer-controls>
		<layer-control name="popups" service-name="popups" layer-input="layer" on="false" tip="Show Popups for %LAYER%"/> 
	</layer-controls>
	<catalog>

		<group title="grouping test" expand="true">
			<layer title="Points" src="basemap/points"/>
			<layer title="Polygons" src="basemap/polygons"/>
		
		</group>
		<group title="Editing Layers" expand="true">
			<layer title="Points" src="editor/points" popups="true"/>
			<layer title="Polygons" src="editor2/polygons"/>
		</group>
		<group title="County Layers">
			<layer title="County and City" src="borders/all"/>
			<layer title="Feedlots" src="feedlots/all"/>
		</group>

		<layer title="Metro Water" src="metro/stream_net_l"/>
		<layer title="Watersheds" src="water/all"/>
		<layer title="DNR WMS" src="dnr/L390002400906"/>
		<layer title="Pipelines" src="pipelines/all"/>
		<layer title="Fire Stations" src="fire/firestations"/>
		<layer title="Parcels" src="parcels/all" status="on" popups="true" minscale="0" maxscale="150000"/>
		<layer title="Pipelines &amp; Parcels" src="parcels/all:pipelines/pipe_lines:pipelines/pipe_lines2" legend="true"/>


		<group title="Backgrounds" expand="true" multiple="true">
			<layer title="USGS Quads" src="lmic_png/drg24"/>
			<layer title="LMIC FSA 2003 Aerials" src="lmic/fsa" status="off"/>
		</group>
	</catalog>

	<!--
		The toolbar defines which services are referneces in the toolbar
	-->
	<toolbar>
		<tool name="previous" title="Previous Extent" type="internal" action="previous" selectable="false"/>
		<tool name="next" title="Next Extent" type="internal" action="next" selectable="false"/>
		<tool name="fullextent" title="Zoom to Full Extent" type="internal" action="fullextent" selectable="false"/>
		<tool name="pan" title="Pan" type="internal" action="pan"/>
		<tool name="zoomin" title="Zoom In" type="internal" action="zoomin" selected="true"/>
		<tool name="zoomout" title="Zoom Out" type="internal" action="zoomout"/>
		<tool name="identify" title="Identify" type="service" service="identify"/>
		<tool name="select" title="Select" type="service" service="select"/>
		<tool name="measure" title="Measure" type="internal" action="measure"/>
		<tool name="measurearea" title="Measure Area" type="internal" action="measurearea"/>
		<tool name="add_point" title="Add a point" type="service" service="add_point"/>
		<tool name="add_polygon" title="Add Polygon" type="service" service="add_polygon"/>
		<tool name="search_parcels" title="Search Parcels" type="service" service="search_parcels" selectable="false"/>
		<tool name="print" title="Print" type="service" service="print" selectable="false"/>
	</toolbar>
</mapbook>
