<?xml version="1.0"  encoding="iso-8859-1"?>
<geoprisma version="0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="config.xsd">

  <layouts>
    <layout>
      <name>default</name>
      <file>samples.xslt</file>
      <drawmode>extjs</drawmode>
    </layout>
  </layouts>

  <services>

    <tms>
      <name>S_TMS</name>
      <source>http://osm-t1.mapgears.com/mapcache/tms/</source>
    </tms>

    <wms>
      <name>S_WMS</name>
      <srs>*</srs>
      <format>*</format>
      <source>http://dev8.mapgears.com/cgi-bin/mapserv-6.0.1?map=/opt/worlddata/templatepopupdemo/map/countries.map</source>
    </wms>

  </services>

  <datastores>

    <datastore>
      <name>DS_OSM_TMS</name>
      <service>S_TMS</service>
      <params>
        <layers>osm@g</layers>
      </params>
    </datastore>

    <datastore>
      <name>DS_Countries_Population_WMS</name>
      <service>S_WMS</service>
      <layers>countries_population</layers>
    </datastore>

  </datastores>

  <widgets>

    <mappanel>
      <name>DefaultMap</name>
      <options>
        <maxExtentString>-20037508.34,-20037508.34,20037508.34,20037508.34</maxExtentString>
        <units>m</units>
        <projectionString>EPSG:900913</projectionString>
        <displayProjectionString>EPSG:4326</displayProjectionString>
        <maxResolution>156543.0339</maxResolution>
        <allOverlays>false</allOverlays>
        <centerString>-11139992,6167143</centerString>
        <zoom>3</zoom>
      </options>
    </mappanel>

    <layer>
      <name>W_Layer_OSM_TMS</name>
      <options>
        <servicetype>tms</servicetype>
        <type>png</type>
      </options>
    </layer>

    <layer>
      <name>W_Layer_Countries_Population_WMS</name>
      <options>
        <servicetype>wms</servicetype>
        <isBaseLayer>false</isBaseLayer>
        <projectionString>EPSG:900913</projectionString>
        <transparent>true</transparent>
        <visibility>true</visibility>
        <group>Countries</group>
      </options>
    </layer>

    <zoomslider>
      <name>W_ZoomSlider</name>
      <options />
    </zoomslider>

    <geoextux_layertreebuilder>
      <name>W_LayerTreeBuilder</name>
      <options />
    </geoextux_layertreebuilder>

    <geoexttoolbar>
      <name>GeoExtToolbar</name>
      <options>
      <widgets>
          <widget>W_TemplatePopupWMS</widget>
      </widgets>
      </options>
    </geoexttoolbar>

    <templatepopup>
      <name>W_TemplatePopupWMS</name>
      <options>
        <title>TemplatePopup - WMS</title>
        <serviceType>wms</serviceType>
        <serviceName>S_WMS</serviceName>
      </options>
    </templatepopup>

  </widgets>

  <resources>

    <resource>
      <name>R_OSM</name>
      <title>TMS - OpenStreetMap</title>
      <datastores>
        <datastore>DS_OSM_TMS</datastore>
      </datastores>
      <widgets>
        <widget>W_Layer_OSM_TMS</widget>
      </widgets>
    </resource>

    <resource>
      <name>R_Countries_Population</name>
      <title>Countries Population</title>
      <datastores>
        <datastore>DS_Countries_Population_WMS</datastore>
      </datastores>
      <widgets>
        <widget>W_Layer_Countries_Population_WMS</widget>
        <widget>W_TemplatePopupWMS</widget>
      </widgets>
      <options>
        <templatepopup>
          <![CDATA[
          <h2 style="padding:3px 0 3px 3px;">{name}</h2>
          <img src="{flag_url}" style="max-width: 120px; padding: 5px" />
          <table border="0" cellspacing="5" cellpadding="5" style="border-spacing: 5px">
            <tr><td>Population</td><td>{population}</td></tr>
            <tr><td>Date</td><td>{date}</td></tr>
            <tr><td>Source</td><td><a href="{wiki_url}" target="_blank">Wikipedia</a></td></tr>
          </table>
          ]]>
        </templatepopup>
      </options>
    </resource>

  </resources>
</geoprisma>