Quick Search Web Service

WebMap includes the Quick Search Web Service to allow queries using a Quick Search configuration within WebMap

Quick Search definitions are known as Searches and are setup using the WebMap Admin Interface. This allows the administrator to define the:

  • Database Connection

  • Table Name

  • Column to be used for the search

  • Results column which will be returned, along with the X and Y coordinates

Things to remember:

  • Only Quick Search queries run against a database can be used by the Quick Search Web Service. Searches which use the OS Data Hub or other services cannot be used.

  • Only one results column can be defined per search.

  • More than one search can be configured. Each search is identified by the searchId. This can be found in the WebMap Admin Interface or by looking in the Searches table of the webMapLayersConfig.db.

  • Though you need to configure Zoom resolution and search icon options, they will not used by the web service.

To run Quick Search queries without viewing a map, use the HTTP POST requests directly against the Quick Search web service.

This is installed with WebMap in the root folder, usually C:\inetpub\wwwroot\SISWebMap9\QuickSearch.asmx

Making Requests to QuickSearch.asmx

This section explains the process of making requests in Postman.

GetMoreResults

is a search that returns the available layers and their queries.

Request

Path

http://localhost/WebMap9SR3/QuickSearch.asmx/GetMoreResults

Request Type

POST

Header KEY

content-type

Header VALUE

application/json

Body

{searchId: 8, filter: "ST16 3LQ", startIndex: 1, endIndex: 20}

searchId: 8 – number which identifies the Quick Search definition.

Filter: “ST16 3LQ” – the search string to be used. In this example the search string is a postcode, but this will depend on the search column defined. Remember to enclose the string in quotes; the type of query is dependent on the Quick Search configuration.

startIndex: 1, endIndex: 20 – defines the extent of the results you want to return