<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--

    Legato is a configurable, lightweight web mapping client that can be
    easily embedded into web pages and portals, CMS and individual web
    applications. Legato is implemented in JavaScript and based on the
    popular open source library OpenLayers.

    Copyright (C) 2010  disy Informationssysteme GmbH, http://www.disy.net

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->

<lb:beans
  xmlns:lb="http://www.disy.net/legato/beans"
  xmlns:ol="http://www.openlayers.org"
  xmlns:olc="http://www.openlayers.org/control"
  xmlns:lf="http://www.disy.net/legato/format"
  xmlns:lc="http://www.disy.net/legato/control"
  xmlns:l="http://www.disy.net/legato">

  <!--Map properties-->
  <ol:Map lb:name="map" id="map"><!--Defining a map name and linking it to the ID of the spaceholder on the html page-->
    <!--Embedding control elements-->
    <controls>
      <olc:Navigation title="foo" />               <!--Move and zoom in/out-->
      <olc:ScaleLine />                            <!--Scale line-->
      <olc:MousePosition />                        <!--Display of the mouse position as coordinate-->
      <lb:Reference target="NavigationHistory" />  <!--Reference to the navigation history-->
      <lb:Reference target="Panel" />              <!--Creating a panel for further buttons that are listed below-->
    </controls>

    <!--Specifying the map projection-->
    <projection>
      <ol:Projection projCode="EPSG:4326" />
    </projection>
    <!--Specifying the units, e.g. "km" for kilometre-->
    <units>km</units>
    <fractionalZoom>true</fractionalZoom>
    <!--Maximum map section defined by two coordinate pairs-->
    <maxExtent>
      <ol:Bounds left="-16" bottom="36" right="37" top="63.5" />
    </maxExtent>
  </ol:Map>

  <!--Defining the panel-->

  <lc:NavigationHistory />       <!--Creating a navigation history for moving to the previous or next entry-->
  <olc:Navigation title="Click and hold mouse button to move the map" />            <!--Provide pan and zoom functionality-->
  <olc:Panel div="panel">
    <defaultControl>
      <lb:Reference target="Navigation" />    <!--Previously activated control element-->
    </defaultControl>
    <controls>
      <lb:Reference target="Navigation" />
      <olc:ZoomBox displayClass="olControlZoomInBox" out="false" title="Zoom in" /> <!-- Zoom in button-->
      <olc:ZoomBox displayClass="olControlZoomOutBox" out="true" title="Zoom out"  /> <!--Zoom out button-->
      <olc:ZoomToMaxExtent title="Zoom to maxExtent" /> <!--Button for zooming to smallest scale-->
      <lc:NavigationHistoryPrevious title="Vorigen Kartenbereich anzeigen">
        <history>
          <lb:Reference target="NavigationHistory" />
        </history>
      </lc:NavigationHistoryPrevious>
      <lc:NavigationHistoryNext title="Nächsten Kartenbereich anzeigen">
        <history>
          <lb:Reference target="NavigationHistory" />
        </history>
      </lc:NavigationHistoryNext>
    </controls>
  </olc:Panel>

  <!--Path to WMC-->
  <lf:SuperWMCLoader url="viewContext.xml"
      createDefaultBaseLayer="true"
    resizeToWindow="true">
    <map>
      <lb:Reference target="map" />
    </map>
    <!--General map settings-->
    <defaultOptions>
      <baseLayer>false</baseLayer>
      <singleTile>true</singleTile>
      <transparent>true</transparent>
    </defaultOptions>
  </lf:SuperWMCLoader>

</lb:beans>