Class deCarta.Mobile.POISearch
The POISearch class is a static object which provides a single #execute method for searching for a point of interest using the deCarta DDS Web Services.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Static class for performing POI search
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
deCarta.Mobile.POISearch.execute(Search, callback, callback)
Executes a POI search with the requested criteria
|
Method Detail
<static>
{int}
deCarta.Mobile.POISearch.execute(Search, callback, callback)
Executes a POI search with the requested criteria
- Parameters:
- {deCarta.Mobile.SearchCriteria} Search
- criteria to be used for the
search. This can be either an instance of a deCarta.Mobile.SearchCriteria,
or an inline object with the same structure, as follows:
SearchCriteriaObject: { queryString: null, //[Not yet defined] maximumResponses: int, //Max number of responses that will be returned database: string, //Database that will be queried for this search sortDirection: string, //Sort order for results ["Ascending", "descending"] sortCriteria: string, //Property results will be sorted by ["Distance", "Score"] rankCriteria: string, //Property by which results will be ranked [Distance, Score] allowAggregates: bool, //Allow Aggregates retrieveAll: bool, //retreive all values properties: { //Object describing search properties, contains ONE OF: CATEGORY: string, //If present, this will perform a category search on this value KEYWORD: string, //If present, this will perform a Keyword search on this value POIName: string //If present, this will perform a freeform POI Search on this value } position: deCarta.Mobile.Position, //Position where the search is centered radius: deCarta.Mobile.Radius, //Radius of the search routeId: int, //if routeId is set, the search will be performed along the route. corridorType: //[Not yet defined] map: deCarta.Mobile.Map //Optionally pass Map instead of position+radius - {function} callback
- Function that will be called when the POI search response is received from the DDS Web Service.
- {function} callback
- A user defined function that will receive
the respose to the query from the DDS Web Service.
Function signature:
function poiSearchResponseCallback(resultArray)
The callback function is passed a single object, which is an array of objects, with each object in the array having the following structure:resultArrayItem: { //A single item from the array Distance: { //A Distance object, composed of a unit of measure and a value uom: string, //Unit of measure for the distance. Valid values are: 'KM' (Kilometers), 'M' (Meters), 'MI' (Miles), 'FT' (Feet). value: int, //Value of the distance } POI: { //Actual POI info object (of type deCarta.Mobile.POIDetails) ID: string, //POI ID in the index POIName, string, //Name of the POI phoneNumber, string, //Phone number for the POI, if available Address: deCarta.Mobile.StructuredAddress, //StructuredAddress object Point: { pos: string, //Latitude and longitude as a space separated string (ex: "lat lon") } POIAttributeList { //List of attributes for the POI POIInfoList: { POIInfo: [] } } } }
- Returns:
- {int} requestId which can be used to canceling long running requests