Search for a resource

Following a click on the «search» button, the master application displays a pop-up window that calls a search page on the Geoconcept Web server. This page makes a first request to select a certain number of candidates fulfilling the criteria indicated in the database of service providers. It can, notably, search for resources in a square around the point of research, while integrating business criteria. It is worth noting that it can use stored procedures if required.

Availability

This section is under development.

The pop-up

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

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

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

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

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: the data to geocode in xml. The format is that of a SearchAround SOAP query.

If the projection is not configured in gc:Options, the projection used will be the one configured in the popup.ws.defaultSrs server parameter.

Nevertheless, one can add the following information, used only for the display, in the parameters describing the target, or a resource being searched for:

  • Name: name of the resource
  • Html: an HTML code to display under the resource name
  • sheetHtml: an html code to display on the infobox describing the resource (appears on the map when you click on the resource)
  • ImageUrl: url of the resource’s image

Example of a query

<gc:SearchAroundRequest xmlns:gc="http://geoconcept.com/gc/schemas">
          <gc:Options>
          </gc:Options>
          <gc:Target>
             <gc:X>602725</gc:X>
             <gc:Y>2425604</gc:Y>
             <gc:Id>1</gc:Id>
          </gc:Target>
          <gc:Resource>
             <gc:X>599266</gc:X>
             <gc:Y>2425096</gc:Y>
             <gc:Id>2</gc:Id>
<gc:Name>car1</gc:Name>
<gc:Address>12 rue de tolbaic</gc:Address>

<gc:Html><![CDATA[<b>ici</b>]]></gc:Html>
          </gc:Resource>
          <gc:Resource>
             <gc:X>599366</gc:X>
             <gc:Y>2425196</gc:Y>
             <gc:Id>2</gc:Id>
<gc:Name>nom1</gc:Name>
<gc:Html><![CDATA[<b>decription html</b>]]></gc:Html>
          </gc:Resource>
</gc:SearchAroundRequest>
Pop-up display
gcweb-reference-img/lbs-integration/lbs-ws-popups-2.png

Retrieving the result

The choice of a user is returned via a POST query containing the following parameters:

  • userData: the user data passed previously
  • resourceId: ID of the chosen resource
  • resourceName: name of the chosen resource
  • distance: distance, in meters, to the chosen resource
  • time: access time in seconds