<?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 images and other files.
-->

<mapbook>

	<group title="Basic Tools">
		<service name="zoomIn" title="Zoom In" type="internal" default="true" locked="true" command="loadZoomIn()" key="i" icon="images/zoom_in.png"/>
		<service name="zoomOut" title="Zoom Out" type="internal" default="true" locked="true" command="loadZoomOut()" key="o" icon="images/zoom_out.png"/>
		<service name="zoomPan" title="Pan" type="internal" default="true" locked="true" command="loadZoomPan()" key="p" icon="images/arrow_out.png"/>
		<service name="dataInspector" title="Data Inspector" type="internal" default="true" locked="true" command="loadDataInspector()" icon="images/inspect.png"/>
		<service name="refreshLayers" title="Reload Layers" type="internal" default="true" locked="true" command="updateAllLayers()" icon="images/reload.png" selectable="false"/>
		<!--<service name="cycleLayers" title="Cycle Layers" type="internal" default="true" locked="true" commnad="cycleLayers()" selectable="false"/>-->

		<service name="printTool" title="Print" type="internal" default="true" locked="true" command="new Print(getLayersByIndexOrder(layerObjs),mapCenterPoint,mapScale).goPrint();" selectable="false" icon="images/printer.png"/>

		<service name="printTool1117" title="Print 11x17" type="internal" default="true" locked="true" command="new Print(getLayersByIndexOrder(layerObjs),mapCenterPoint,mapScale, new Point(17,11)).goPrint();" selectable="false"  icon="images/printer.png"/>
		<service name="showSettings" title="User Settings" type="internal" default="true" locked="true" command="showStateDialog()" selectable="false" icon="images/settings.png"/>
		<service name="layerProperties" title="Layer Properties" type="internal" default="true" locked="true" command="openLayersDialog()" selectable="false" icon="images/settings.png"/>
		
		<service name="previousZoom" title="Previous Zoom" type="internal" default="true" locked="false" command="if(lastView()) { updateAllLayers(); }" selectable="false" key="CTRL+SHIFT+B"/>
	</group>


	<group title="Catalog">
		<!-- The default="true" works in maps (which are layers) and views (extents).
		  -  If default is set to true for a <map/> then it will display that map by default.
		  -  If default is set to true for a <view/> then those extents will be used as the default extents.
		-->
		<map title="County Map">
			<!-- Generally, you want to keep the maps on the same line, as spaces will considered part of the filename
			  -  Tabs and Newlines are not considered part of the file name, so they could be used to give some more 
			  -  separation if desired.
			  -  This needs to have the LOCAL PATH to the map files.  Exactly as they 'd be passed to mapserver,
			  -  because that's exactly WHAT HAPPENS!!!
			-->
			<file>/usr/local/GIS/moose3/maps/county/county.map</file>
		</map>

		<!-- Sometime you don't want a layer to display at full opacity, hence the opacity setting!
		 -  Opacity settins are between 0 and 100, 100 being full opacity and 0 being invisible.
		 -  This "fades" the ENTIRE layer, not just the filled polygons, it will also fade the outlines.
		-->
		<map title="Municipalities" opacity="50" default="true">
			<file>/usr/local/GIS/moose3/maps/municipals/municipals.map</file>
		</map>

		<map title="Highway Map" default="true">
			<file>/usr/local/GIS/moose3/maps/highways/highway.map</file>
		</map>
		<!-- This layer is not loaded by default. -->
		<!-- I understand this is not the best example for a few reasons:
			1. It doesn't include linking from a popup or using the "script" ability
			2. It uses polygons, which are common, but the weakest handled part of Moose, lines and points function much better
		 -   But, if you turn this layer on you can see and example of the popups when you Zoom in far enough.
		 -   All the code is in the Mapfile and the (header,record,footer).xml files in the same directory as the mapfile.
		-->

		<map title="State Parks">
			<file>/usr/local/GIS/moose3/maps/parks/parks.map</file>
		</map>

		<!-- This is a WMS Layer that connects to the LMIC Aerial Photos
		  -	Courtesey of Brian Fischer at Houston Engineering! Thanks!
		  -->
		<map title="2003 LMIC Aerials" zindex="-1" icon="airplane.gif" default="true">
			<file>/usr/local/GIS/moose3/maps/2003aerials/2003aerials.map</file>
		</map>


		<!--
		  -  The scale bar is always nice, right?  
		-->
		<map title="Scale Bar" default="true">
			<file>/usr/local/GIS/moose3/maps/internal/scalebar.map</file>
		</map>

		<!--
		  -  This Map file is REQUIRED for use with the "Jump To" functions
		-->
		<map title="Selected Point" status="invisible">
			<file>/usr/local/GIS/moose3/maps/internal/point.map</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="Full State View" default="true">189783.560000,4816309.330000,761653.524114,5472346.500000</view>
	</group>	

	<group title="Selection Tools">
		<service title="Create Rectangle Area" status="invisible" type="internal" command="loadSelectionRect()"/>

		<service title="Create Circle Area" status="invisible" type="internal" command="loadSelectionCircle()"/>
		<service title="Create Circle By Radius" status="invisible" type="internal" command="loadSelectionCircleRadius()"/>
		<service title="Create Circle Prompt Radius" status="invisible" type="internal" command="loadSelectionCircleRadiusPrompt()"/>

		<service title="Create Buffered Line" status="invisible" type="internal" command="loadSelectionLine()"/>
		<service title="Create Polygon Area" status="invisible" type="internal" command="loadSelectionPolygon()" default="true"/>

		<service title="Create Point" status="invisible" type="internal" command="loadSelectionPoint()" default="true"/>
	</group>

	<group title="Internal Use Only">
		<map title="BufferTools" status="invisible">
			<file>/usr/local/GIS/moose3/maps/internal/polygon.map</file>
		</map>
	</group>
</mapbook>
