Zone definition

Integration principle

The integration depends on Web screens of the pop-up type called from the main application. At certain moments, windows issued from the GeoConcept LBS Platform server present geographic data to the user. The choice of the user is returned via a POST form to the master application.

XML data echange is given priority for data exchanges consisting of more than 100 characters.

The pop-up

The URL for the pop-up is: http://<serveur>/callcenter/Ext/zonedefine.do

The pop-up is called by the test page present at the address:

http://<serveur>/callcenter/Ext/zonedefinetest.do

The layer displayed in the map is configured in the popup.geographics.map.layer server parameter.

If the name of the entities to select is in a unicode field, set the popup.geographics.entityNameUnicode server parameter to true (otherwise it will be false).

Parameters

  • urlPost: the URL receiving the Gocoding results
  • userData: any data item, it will be submitted, without modification, to the form assigned to receive the geocoding results. This data allows the master application to set up a context which can be useful for the return.
  • xmlData: data for the xml structure zone, with «DefineZoneRequest» as root… this xml element may contain the following information:
  • CurrentZone: list of geographically referenced elements, defined by the type, subtype and code attributes.
  • Entity: geographic element defined by Id
  • DisplayElements: list of elements to display (there could be several lists))

Note: you could send the geographic coordinates in MAP projection (the projection utilised is that configured in the popup.ws.defaultSrs server parameter) or as WGS84 coordinates (EPSG:4326 code).

Example of a query

<gc:DefineZoneRequest xmlns:gc="http://geoconcept.com/gc/schemas">
  <!-- The Map must have a tab  type.subtype where type/subtype is selectable. code is a field of  type/subtype -->
  <gc:CurrentZone type="Administrative unit" subtype="Order8" code="Government code">
    <!-- select Bagneux -->
    <gc:Entity id="92007"/>
    <!-- select Cachan -->
    <gc:Entity id="94016"/>
    <!-- select Châtillon -->
    <gc:Entity id="92020"/>
  </gc:CurrentZone>
  <gc:DisplayElements img="http://en.geoconcept.com/sites/all/themes/geoconcept/images/flags/fr.png" projection="EPSG:4326">
    <gc:Symbol x="2.31035" y="48.80165" />
    <gc:Symbol x="2.31035" y="48.89165" />
  </gc:DisplayElements>
  <!-- An image must be called Pin_user_gcblue  -->
  <gc:DisplayElements img="Pin_user_gcblue">
    <gc:Symbol x="601725" y="2424604" />
  </gc:DisplayElements>
</gc:DefineZoneRequest >

Pop-up display

The page displays a map with the selection tools. By default, the selection tool is the tool for adjusting the selection.

The entities passed to parameter are coloured.

The symbols passed in the list are displayed with an image, the name of which is indicated.

  • pan tool: enables movement in the map
  • draw a zone tool: this tool draws a polygon, point by point
  • the entities that are integrally or partially included in the design are then selected, and the drawing is deleted.
  • adjust the selection tool: click on an entity to select/deselect it, depending on its current status.

a button allows you to terminate the entry operation.

Example of an interface
gcweb-reference-img/lbs-integration/lbs-ws-popups_definition_zone.png

Retrieving the result

The user’s choice is returned by a POST query containing the following parameters:

<gc:DefineZoneResult xmlns:gc="http://geoconcept.com/gc/schemas">
  <gc:Zone type="Administrative unit" subtype="Order8" code="Government code">
     <gc:Entity id="92007"/>
     <gc:Entity id="94016"/>
     <gc:Entity id="92020"/>
  </gc:Zone>
</gc:DefineZoneResult>