<?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;
  ]>
<sect2 id="dev.soapcalls.getmap.location">
  <title>Location</title>
  <para> The Location plugin handles position and moves on the map. Its request 
    process includes different position methods, such as recentering on a 
    specific object or moves relative to previous position. It returns the new 
    bounding box and scale.</para>
  <sect3 id="dev.soapcalls.getmap.location.request">
    <title>Location Request</title>
    <para>
      <programlisting><![CDATA[
<simpleType name="LocationType">
  <restriction base="xsd:string">
    <enumeration value="bboxLocationRequest"/>
    <enumeration value="panLocationRequest"/>
    <enumeration value="zoomPointLocationRequest"/>
    <enumeration value="recenterLocationRequest"/>
  </restriction>
</simpleType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>bboxLocationRequest - recenters on a bounding box</para>
        </listitem>
        <listitem>
          <para>panLocationRequest - moves horizontaly/verticaly 
            (panning)</para>
        </listitem>
        <listitem>
          <para>zoomPointLocationRequest - recenters on a point, includes 
            relative zoom and fixed scale</para>
        </listitem>
        <listitem>
          <para>recenterLocationRequest - recenters on mapfile IDs</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="LocationConstraint">
  <all>
    <element name="maxBbox" type="types:Bbox"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>maxBbox - maximum bounding box. If given parameters lead to a 
            larger bounding box, it will be cropped (see <xref 
            linkend="dev.soapcalls.structures.shapes" /> for a description of 
            type Bbox)</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="LocationRequest">
  <all>
    <element name="className" type="xsd:string"/>
    <element name="locationType"  type="types:LocationType"/>
    <element name="bboxLocationRequest"
             type="types:BboxLocationRequest" minOccurs="0"/>
    <element name="panLocationRequest"
             type="types:PanLocationRequest" minOccurs="0"/>
    <element name="zoomPointLocationRequest"
             type="types:ZoomPointLocationRequest" minOccurs="0"/>
    <element name="recenterLocationRequest"
             type="types:RecenterLocationRequest" minOccurs="0"/>
    <element name="locationConstraint"
             type="types:LocationConstraint" minOccurs="0"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>className - "LocationRequest" or extended class name if project 
            implements an extension</para>
        </listitem>
        <listitem>
          <para>locationType - type of location</para>
        </listitem>
        <listitem>
          <para>bboxLocationRequest - bounding box request parameters (see 
            <xref linkend="dev.soapcalls.getmap.location.request.bbox" />) 
            </para>
        </listitem>
        <listitem>
          <para>panLocationRequest - panning request parameters (see <xref 
            linkend="dev.soapcalls.getmap.location.request.pan" />)</para>
        </listitem>
        <listitem>
          <para>zoomPointLocationRequest - zoom, recenter on point parameters 
            (see <xref linkend="dev.soapcalls.getmap.location.request.zoom" 
            />)</para>
        </listitem>
        <listitem>
          <para>recenterLocationRequest - recenter on IDs parameters (see <xref 
            linkend="dev.soapcalls.getmap.location.request.recenter" />)</para>
        </listitem>
        <listitem>
          <para>locationConstraint - constraint to be respected when location 
            request is executed</para>
        </listitem>
      </itemizedlist>
    </para>
    <sect4 id="dev.soapcalls.getmap.location.request.bbox">
      <title>BBox Request</title>
      <para>
        <programlisting><![CDATA[
<complexType name="BboxLocationRequest">
  <all>
    <element name="bbox" type="types:Bbox"/>
  </all>
</complexType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>bbox - bounding box to be recentered on (see <xref 
              linkend="dev.soapcalls.structures.shapes" /> for a description of 
              type Bbox)</para>
          </listitem>
        </itemizedlist>
      </para>
    </sect4>
    <sect4 id="dev.soapcalls.getmap.location.request.pan">
      <title>Pan Request</title>
      <para>
        <programlisting><![CDATA[
<simpleType name="PanDirectionType">
  <restriction base="xsd:string">
    <enumeration value="VERTICAL_PAN_NORTH"/>
    <enumeration value="VERTICAL_PAN_NONE"/>
    <enumeration value="VERTICAL_PAN_SOUTH"/>
    <enumeration value="HORIZONTAL_PAN_WEST"/>
    <enumeration value="HORIZONTAL_PAN_NONE"/>
    <enumeration value="HORIZONTAL_PAN_EAST"/>
  </restriction>
</simpleType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>VERTICAL_PAN_NORTH - panning north</para>
          </listitem>
          <listitem>
            <para>VERTICAL_PAN_NONE - no vertical panning</para>
          </listitem>
          <listitem>
            <para>VERTICAL_PAN_SOUTH - panning south</para>
          </listitem>
          <listitem>
            <para>HORIZONTAL_PAN_WEST - panning west</para>
          </listitem>
          <listitem>
            <para>HORIZONTAL_PAN_NONE - no horizontal panning</para>
          </listitem>
          <listitem>
            <para>HORIZONTAL_PAN_EAST - panning east</para>
          </listitem>
        </itemizedlist>
        <programlisting><![CDATA[
<complexType name="PanDirection">
  <all>
    <element name="verticalPan" type="types:PanDirectionType"/>
    <element name="horizontalPan" type="types:PanDirectionType"/>
  </all>
</complexType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>verticalPan - type of vertical panning</para>
          </listitem>
          <listitem>
            <para>horizontalPan - type of horizontal panning</para>
          </listitem>
        </itemizedlist>
        <programlisting><![CDATA[
<complexType name="PanLocationRequest">
  <all>
    <element name="bbox" type="types:Bbox"/>
    <element name="panDirection" type="types:PanDirection"/>
  </all>
</complexType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>bbox - current bounding box (see <xref 
              linkend="dev.soapcalls.structures.shapes" /> for a description of 
              type Bbox)</para>
          </listitem>
          <listitem>
            <para>panDirection - panning directions</para>
          </listitem>
        </itemizedlist>
      </para>
    </sect4>
    <sect4 id="dev.soapcalls.getmap.location.request.zoom">
      <title>Zoom-Point Request</title>
      <para>
        <programlisting><![CDATA[
<simpleType name="ZoomType">
  <restriction base="xsd:string">
    <enumeration value="ZOOM_DIRECTION_IN"/>
    <enumeration value="ZOOM_DIRECTION_NONE"/>
    <enumeration value="ZOOM_DIRECTION_OUT"/>
    <enumeration value="ZOOM_FACTOR"/>
    <enumeration value="ZOOM_SCALE"/>
  </restriction>
</simpleType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>ZOOM_DIRECTION_IN - zoom in (default is x2)</para>
          </listitem>
          <listitem>
            <para>ZOOM_DIRECTION_NONE - no zoom, recenter on point only</para>
          </listitem>
          <listitem>
            <para>ZOOM_DIRECTION_OUT - zoom out (default is x0.5)</para>
          </listitem>
          <listitem>
            <para>ZOOM_FACTOR - zoom using a custom factor</para>
          </listitem>
          <listitem>
            <para>ZOOM_SCALE - zoom to a fixed scale</para>
          </listitem>
        </itemizedlist>
        <programlisting><![CDATA[
<complexType name="ZoomPointLocationRequest">
  <all>
    <element name="bbox" type="types:Bbox"/>
    <element name="point" type="types:Point"/>
    <element name="zoomType" type="types:ZoomType"/>
    <element name="zoomFactor" type="xsd:float" minOccurs="0"/>
    <element name="scale" type="xsd:integer" minOccurs="0"/>
  </all>
</complexType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>bbox - bounding box (unused when zoom type = 
              ZOOM_SCALE)</para>
          </listitem>
          <listitem>
            <para>point - point to recenter on</para>
          </listitem>
          <listitem>
            <para>zoomType - type of zoom</para>
          </listitem>
          <listitem>
            <para>zoomFactor - zoom factor (unused when zoom type != 
              ZOOM_FACTOR)</para>
          </listitem>
          <listitem>
            <para>scale - fixed scale (unused when zoom type != 
              ZOOM_SCALE)</para>
          </listitem>
        </itemizedlist>
      </para>
    </sect4>
    <sect4 id="dev.soapcalls.getmap.location.request.recenter">
      <title>Recenter Request</title>
      <para>
        <programlisting><![CDATA[
<complexType name="IdSelection">
  <all>
    <element name="layerId" type="xsd:string"/>
    <element name="idAttribute" type="xsd:string"/>
    <element name="idType" type="xsd:string"/>
    <element name="selectedIds" type="types:ArrayOfString"/>
  </all>
</complexType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>layerId - ID of layer on which query will be executed</para>
          </listitem>
          <listitem>
            <para>idAttribute - name of ID attribute</para>
          </listitem>
          <listitem>
            <para>idType - type of ID attribute ("string" or "int")</para>
          </listitem>
          <listitem>
            <para>selectedIds - list of IDs</para>
          </listitem>
        </itemizedlist>
        <programlisting><![CDATA[
<complexType name="ArrayOfIdSelection">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType"
                 wsdl:arrayType="types:IdSelection[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>array - list of ID selections</para>
          </listitem>
        </itemizedlist>
        <programlisting><![CDATA[
<complexType name="RecenterLocationRequest">
  <all>
    <element name="idSelections" type="types:ArrayOfIdSelection"/>
  </all>
</complexType>]]></programlisting>
        <itemizedlist>
          <listitem>
            <para>idSelections - list of ID selections</para>
          </listitem>
        </itemizedlist>
      </para>
    </sect4>
  </sect3>
  <sect3 id="dev.soapcalls.getmap.location.result">
    <title>Location Result</title>
    <para>
      <programlisting><![CDATA[
<complexType name="LocationResult">
  <all>
    <element name="className" type="xsd:string"/>
    <element name="bbox" type="types:Bbox"/>
    <element name="scale" type="xsd:double"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>className - "LocationResult" or extended class name if project 
            implements an extension</para>
        </listitem>
        <listitem>
          <para>bbox - new bounding box (see <xref 
            linkend="dev.soapcalls.structures.shapes" /> for a description of 
            type Bbox)</para>
        </listitem>
        <listitem>
          <para>scale - new scale</para>
        </listitem>
      </itemizedlist>
    </para>
  </sect3>
</sect2>