<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 
  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  <!ENTITY % cartoweb SYSTEM "../../cartoweb.ent" >
  %cartoweb;
  ]>
<sect1 id="dev.soapcalls.getmapinfo">
  <title>Call to getMapInfo</title>
  <para>This method returns server configuration, which includes layers, 
    initial states and other plugin-specific configuration. Variables returned 
    by this method are set in server configuration files described in <xref 
    linkend="cartoweb.user" />.</para>
  <sect2 id="dev.soapcalls.getmapinfo.global">
    <title>Global Server Configuration</title>
    <para>This includes layers configuration and initial states.</para>
    <para>
      <programlisting><![CDATA[
<complexType name="LayerState">
  <all>
    <element name="id" type="xsd:string"/>
    <element name="hidden" type="xsd:boolean"/>
    <element name="frozen" type="xsd:boolean"/>
    <element name="selected" type="xsd:boolean"/>
    <element name="unfolded" type="xsd:boolean"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>id - layer state ID</para>
        </listitem>
        <listitem>
          <para>hidden - if true, layer isn't displayed in tree and attribute 
            selected cannot be modified</para>
        </listitem>
        <listitem>
          <para>frozen - if true, layer is displayed in tree but attribute 
            selected cannot be modified </para>
        </listitem>
        <listitem>
          <para>selected - if true, layer is displayed as selected in 
            tree</para>
        </listitem>
        <listitem>
          <para>unfolded - if true, layer tree is displayed unfolded (layer 
            groups)</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfLayerState">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType"
                 wsdl:arrayType="types:LayerState[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of layer states</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="InitialLocation">
  <all>
    <element name="bbox" type="types:Bbox"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>bbox - initial bounding box (see <xref 
            linkend="dev.soapcalls.structures.shapes" /> for a description of 
            type Bbox)</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="InitialMapState">
  <all>
    <element name="id" type="xsd:string"/>
    <element name="location" type="types:InitialLocation"/>
    <element name="layers" type="types:ArrayOfLayerState"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>id - initial state ID</para>
        </listitem>
        <listitem>
          <para>location - initial location</para>
        </listitem>
        <listitem>
          <para>layers - list of layer states</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfInitialMapState">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType"
                 wsdl:arrayType="types:InitialMapState[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of initial states</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="MapInfo">
  <all>
    <element name="timestamp" type="xsd:integer"/>
    <element name="mapLabel" type="xsd:string"/>
    <element name="keymapGeoDimension" type="types:GeoDimension"/>
    <element name="initialMapStates"
             type="types:ArrayOfInitialMapState"/>
    ...elements specific to plugins...
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>timestamp - timestamp of last update. This timestamp is 
            transferred each time method getMap is called, so client knows when 
            configuration was modified (see also <xref 
            linkend="dev.soapcalls.getmap.global.request" />) </para>
        </listitem>
        <listitem>
          <para>mapLabel - name of map as defined in mapfile</para>
        </listitem>
        <listitem>
          <para>keymapGeoDimension - pixel and geographical dimension 
            information for key map</para>
        </listitem>
        <listitem>
          <para>initialMapStates - list of initial states</para>
        </listitem>
      </itemizedlist>
    </para>
  </sect2>
  <sect2 id="dev.soapcalls.getmapinfo.layers">
    <title>Layers</title>
    <para>This includes configuration specific to Layers plugin, ie. list
      of all available layers and their properties.</para>
    <para>  
      <programlisting><![CDATA[
<complexType name="ArrayOfLayerId">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="xsd:string[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of layer IDs</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ChildrenSwitch">
  <all>
    <element name="id" type="xsd:string"/>
    <element name="layers" type="types:ArrayOfLayerId" minOccurs="0"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>id - switch ID</para>
        </listitem>
        <listitem>
          <para>layers - list of layers</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfChildrenSwitch">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType=ChildrenSwitch[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of children switches</para>
        </listitem>
      </itemizedlist>
        <programlisting><![CDATA[
<complexType name="Layer">
  <all>
    <element name="className" type="xsd:string"/>
    <element name="id" type="xsd:string"/>
    <element name="label" type="xsd:string"/>
    <element name="children"
             type="types:ArrayOfChildrenSwitch" minOccurs="0"/>
    <element name="minScale" type="xsd:double"/>
    <element name="maxScale" type="xsd:double"/>
    <element name="icon" type="xsd:string"/>
    <element name="link" type="xsd:string"/>
    <element name="aggregate" type="xsd:boolean" minOccurs="0"/>
    <element name="rendering" type="xsd:string" minOccurs="0"/>
    <element name="metadata" type="types:ArrayOfString" minOccurs="0"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>className - layer class name: "LayerGroup", "Layer" or 
            "LayerClass"</para>
        </listitem>
        <listitem>
          <para>id - layer ID</para>
        </listitem>
        <listitem>
          <para>label - label to be displayed. This label is not yet translated 
            using internationalization</para>
        </listitem>
        <listitem>
          <para>children - list of children</para>
        </listitem>
        <listitem>
          <para>minScale - minimum scale at which layer will be displayed</para>
        </listitem>
        <listitem>
          <para>maxScale - maximum scale at which layer will be displayed</para>
        </listitem>
        <listitem>
          <para>icon - filename of the static icon for the layer. Dynamic 
            legends are described in <xref linkend="user.layers.legend" /> 
            </para>
        </listitem>
        <listitem>
          <para>link - if set, layer name is clickable</para>
        </listitem>
        <listitem>
          <para>msLayer - MapServer layer id</para>
        </listitem>
        <listitem>
          <para>aggregate - if true, children are not displayed and cannot be 
            selected individually</para>
        </listitem>
        <listitem>
          <para>rendering - how layer will be displayed: "tree", "block", 
            "radio" or "dropdown". See <xref linkend="user.layers" /> for more 
            details on this option </para>
        </listitem>
        <listitem>
          <para>metadata - list of meta data defined in server configuration 
            file. Format of each string in list is "variable_name=value"</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfLayer">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="types:Layer[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of layers</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="SwitchInit">
  <all>
    <element name="id" type="xsd:string"/>
    <element name="label" type="xsd:string"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>id - switch ID</para>
        </listitem>
        <listitem>
          <para>label - switch label</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfSwitchInit">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="types:SwitchInit[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of switches</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="LayersInit">
  <all>
    <element name="notAvailableIcon" type="xsd:string"/>
    <element name="notAvailablePlusIcon" type="xsd:string"/>
    <element name="notAvailableMinusIcon" type="xsd:string"/>
    <element name="layers" type="types:ArrayOfLayer"/>
    <element name="switches" type="types:ArrayOfSwitchInit" minOccurs="0"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>notAvailableIcon - filename of icon for not available layer 
            (current scale is above or below this layer maximum/minimum 
            scale)</para>
        </listitem>
        <listitem>
          <para>notAvailablePlusIcon - filename of icon for not available layer 
            (current scale is above this layer maximum scale)</para>
        </listitem>
        <listitem>
          <para>notAvailableMinusIcon - filename of icon for not available 
            layer (current scale is below this layer minimum scale)</para>
        </listitem>
        <listitem>
          <para>layers - list of layers</para>
        </listitem>
        <listitem>
          <para>switches - list of switches</para>
        </listitem>
      </itemizedlist>
    </para>
  </sect2>
  <sect2 id="dev.soapcalls.getmapinfo.location">
    <title>Location</title>
    <para>This includes configuration specific to Location plugin, ie. fixed 
      scales, scales limits and shortcuts.</para>
    <para>
      <programlisting><![CDATA[
<complexType name="LocationScale">
  <all>
    <element name="label" type="xsd:string"/>
    <element name="value" type="xsd:double"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>label - scale caption</para>
        </listitem>
        <listitem>
          <para>value - scale value to be set when scale is selected</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfLocationScale">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType"
                 wsdl:arrayType="types:LocationScale[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of scales</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="LocationShortcut">
  <all>
    <element name="label" type="xsd:string"/>
    <element name="bbox" type="types:Bbox"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>label - shortcut caption</para>
        </listitem>
        <listitem>
          <para>bbox - bounding box to recenter on when shortcut is 
            selected</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfLocationShortcut">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType"
                 wsdl:arrayType="types:LocationShortcut[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of shortcuts</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="LocationInit">
  <all>
    <element name="className" type="xsd:string"/>
    <element name="scales" type="types:ArrayOfLocationScale"/>
    <element name="minScale" type="xsd:double"/>
    <element name="maxScale" type="xsd:double"/>
    <element name="shortcuts" type="types:ArrayOfLocationShortcut"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>className - "LocationInit" or extended class name if project 
            implements an extension</para>
        </listitem>
        <listitem>
          <para>scales - list of fixed scales</para>
        </listitem>
        <listitem>
          <para>minScale - global minimum scale</para>
        </listitem>
        <listitem>
          <para>maxScale - global maximum scale</para>
        </listitem>
        <listitem>
          <para>shortcuts - list of bounding box shortcuts</para>
        </listitem>
      </itemizedlist>
    </para>
  </sect2>
  <sect2 id="dev.soapcalls.getmapinfo.layer_reorder">
    <title>Layer Reorder</title>
    <para>This includes configuration specific to LayerReorder plugin.</para>
    <para>
      <programlisting><![CDATA[
<complexType name="LayerReorderInit">
  <all>
    <element name="layers" type="types:ArrayOfLayerInit"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>
            array - layers are ordered from top to bottom of
            the displayed stack, see below to LayerInit structure overview.
          </para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="LayerInit">
  <all>
    <element name="layerId" type="xsd:string"/>
    <element name="layerLabel" type="xsd:string"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>layerId - Layer Id</para>
        </listitem>
        <listitem>
          <para>
            layerLabel - label to be displayed. This label is not yet 
            translated using internationalization
          </para>
        </listitem>
      </itemizedlist>
    </para>
  </sect2>
</sect1>
