AtlasCT.com
User Manual v5.0

Search

Inheritance: EventListener > Search

The Search class is used to execute a global search: addresses, local search.

Valid examples for search queries include: "Resturants near Paris", "Schools near Derekh Ben Gurion 24, Ramat Gan", "Via Ludovisi 00187, Rome" etc.

Summary
Inheritance: EventListener > Search
The Search constructor.
Convert an address to geographical location.
An integer that contains the search result code.
A string that contains the search result id.
A Placemark object that contains the search response placemark.
An array that contains a list of placemarks that matching the requested search.
An Address object that contains the geocode response address.
An array that contains a list of addresses that matching the requested address/coordinate.
The bounds of the requested search.
The minimum zoom level of the requested search.
The maximum zoom level of the requested search.
The category id of the requested search.
This event dispatches after a geocode response has arrived from the server.

Constructors

Search

Search()

The Search constructor.

Methods

find

find(SearchRequest searchRequest
SettingsRequest settingsRequest)

Convert a query search to geographical location/s. this action initialize the search properties:

This action goes to the AtlasNET Server, therefor, you should use the addListener method in order to receive the Search.EVENT_SEARCH_RESULT event.

Parameters

searchRequestRepresent the search request parameters for a global search.
settingsRequestRepresent the settings of the request (optional).

Properties

resultCode

int resultCode

An integer that contains the search result code.

Search Status codes and meanings

The list below describes the available search status codes for "localsearch" result id:

  • 1 - local search found
  • 2 - List of local search possibilities found.

The list below describes the available search status codes for "geocode" result id:

  • -5 - Country not found
  • -4 - State not found
  • -3 - City not found
  • -2 - Street not found
  • -1 - House number not found
  • 0 - General Error
  • 1 - Exact address found
  • 2 - List of address possibilities found.

resultId

string resultId

A string that contains the search result id.

Search result id's and meanings

The list below describes the available search result id's:

  • "localsearch" - return a local search results.
  • "geocode" - return a geocode results.

searchResult

Placemark searchResult

A Placemark object that contains the search response.  This property is initialized only when the resultCode value is equal to 1 or 2.  If the resultCode value equal to 1, then this property will contain the geocode response address.  If the resultCode value equal to 2, then this property will contain the first address of the geoResultList list. 

searchResultList

Array[] Placemark searchResultList

An array that contains a list of placemarks that matching the requested search.  This property is initialized only when the resultCode value is equal to 2. 

geoResult

Address geoResult

An Address object that contains the geocode response address.  This property is initialized only when the resultCode value is equal to 1 or 2.  If the resultCode value equal to 1, then this property will contain the geocode response address.  If the resultCode value equal to 2, then this property will contain the first address of the geoResultList list. 

geoResultList

Array[] Address geoResultList

An array that contains a list of addresses that matching the requested address/coordinate.  This property is initialized only when the resultCode value is equal to 2. 

searchBounds

Bounds searchBounds

The bounding box (Top Left, Bottom Right) position of the displayed map.

searchMinZoomLevel

int searchMinZoomLevel

Returns the minimum zoom level available for the map.

searchMaxZoomLevel

int searchMaxZoomLevel

Returns the maximum zoom level available for the map.

searchCategory

int searchCategory

The category id for the requested search.

Constants

Search Events

Search. EVENT_SEARCH_RESULT

This event dispatches after a search response has arrived from the server.

The EventListener class helps you to register event handlers defined by this API.
Some of the classes that inherit from this class are: Map, OverviewMap, LayersManager
Geocode()
The Geocode constructor.
find(Address address)
Convert an address to geographical location.
coordinateToAddress(Coordinate coordinate)
Convert a geographical location to an address.
An integer that contains the search result code.
An Address object that contains the geocode response address.
An array that contains a list of addresses that matching the requested address/coordinate.
This event dispatches after a geocode response has arrived from the server.
The Address class represent a specific address information, with its coordinates.
This is the base class of the provided coordinates classes.