Class: Pois

cercalia.service.Pois

new cercalia.service.Pois(options)

POIs service constructor.

Use this class for getting POIs specifying the IDs, or getting a POI list from an area (WKT or map bounds (cercalia.Bounds)) and the POI category

Name Type Description
options cercaliax.service.PoisOptions

Opciones Geocoding

Methods

Abort the last AJAX request if it hasn't been resolved.

doPoisRequest(callbackFn)

Execute the server request and the callback function to be processed with the response

Name Type Description
callbackFn function

Funcion callback

Returns the WKT of the spatial query

Returns:
Coordinate

getClass(){string}

Returns the object type.

getGridsize(){number}

Returns:
gridsize

getHeigth(){number}

Returns:
height

getQueryCategories(){Array.<string>}

Returns the POIs categories to search

Returns:
categories list string

getQueryPois(){Array.<string>}

Returns the POIs list

Returns:
Returns a POI IDs array

getResponse(){Object}

Returns the response with the 'geocode' function request

Returns:
response

getWidth(){number}

Returns:
width

getWkt(){Array.<string>}

Returns the map area corresponding to the spatial query. The format is WKT

Returns:
Geometria WKT (string)

isSearchbyScale(){boolean}

Returns:
boolean that shows if POIs by scale search is used

Set the polygon for the spatial query. String WKT format. If spatial query use map bounds, the WKT will be ignored and must be reset next time

Name Type Description
wkt cercalia.LonLat

WKT string

setGridsize(gridsize)

Name Type Description
gridsize number

setHeight(height)

Name Type Description
height number

setQueryCategories(pois)

Set the POIs list to search.

Name Type Description
pois Array.<string>

POIs ID list, in an array

setQueryPois(categories)

Set the POIs categories to search.

Name Type Description
categories Array.<string>

categories list string

setSearchbyScale(searchByScale)

Name Type Description
searchByScale boolean
Name Type Description
width number

Set the polygon for the spatial query. String WKT format If spatial query use a WKT, the map bounds will be ignored and must be reset next time

Name Type Description
wkt Array.<string>

WKT geometry