Class: Pois

cercalia.service.Pois


new cercalia.service.Pois(opt_options)

src/cercalia/service/pois.js, line 18

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

Opciones Geocoding

Name Type Description
bounds cercalia.Bounds | undefined

Bounds to search categories inside

buffer number | undefined
categories Array.<string> | undefined

List of categories to obtain. The 'pois' option must be null.

gridsize string | undefined
height number | undefined

Height in pixels.

pois Array.<string> | undefined

POIs IDs list to obtain. If this option is included, the categories property will be ignored. Does not apply any other constructor options.

searchByScale boolean | undefined

Specify if you need to group POIs depending on parameters: bounds, width and height.

width number | undefined

Width, in pixels.

wkt string | undefined

Get all the POIs from selected categories, that intersects a polygon, in WKT format

Extends

Methods

abortLast()

src/cercalia/service/pois.js, line 358

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

clearResponse()

src/cercalia/service/pois.js, line 174

Clear response.

doPoisRequest(callbackFn)

src/cercalia/service/pois.js, line 258

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

Name Type Description
callbackFn function

Funcion callback to parse server data's response.

getBounds(){cercalia.Bounds|null}

src/cercalia/service/pois.js, line 155

Returns the WKT of the spatial query

Returns:
Coordinate

getClass(){string} inherited

src/cercalia/object.js, line 41
Returns:
Get Class name of object

getGridsize(){number|null}

src/cercalia/service/pois.js, line 241
Returns:
gridsize Gridsize in pixels.

getHeigth(){number|null}

src/cercalia/service/pois.js, line 224
Returns:
height Height in pixels

getId(){string} inherited

src/cercalia/object.js, line 33
Returns:
Unique Id.

getQueryCategories(){Array.<string>}

src/cercalia/service/pois.js, line 117

Returns the POIs categories to search

Returns:
categories list string

getQueryPois(){Array.<string>}

src/cercalia/service/pois.js, line 98

Returns the POIs list

Returns:
Returns a POI IDs array

getResponse(){cercaliax.PoisResult|null}

src/cercalia/service/pois.js, line 183

Returns the response with the 'geocode' function request

Returns:
response

getWidth(){number|null}

src/cercalia/service/pois.js, line 208
Returns:
width

getWkt(){string|null}

src/cercalia/service/pois.js, line 135

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

Returns:
Geometria WKT (string)

isSearchbyScale(){boolean}

src/cercalia/service/pois.js, line 199
Returns:
boolean Return if shows if POIs by scale search is used. true or false.

setBounds(bounds)

src/cercalia/service/pois.js, line 165

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
bounds cercalia.Bounds

Bounds

setGridsize(gridsize)

src/cercalia/service/pois.js, line 249
Name Type Description
gridsize number

Gridsize in pixels.

setHeight(height)

src/cercalia/service/pois.js, line 233

Set height

Name Type Description
height number

Height in pixels

setQueryCategories(categories)

src/cercalia/service/pois.js, line 107

Set the POIs list to search.

Name Type Description
categories Array.<string>

POIs ID list, in an array

setQueryPois(categories)

src/cercalia/service/pois.js, line 126

Set the POIs categories to search.

Name Type Description
categories Array.<string>

categories list string

setSearchbyScale(searchByScale)

src/cercalia/service/pois.js, line 191
Name Type Description
searchByScale boolean

Enable search by scale. true or false.

setWidth(width)

src/cercalia/service/pois.js, line 216
Name Type Description
width number

Width in pixels.

setWkt(wkt)

src/cercalia/service/pois.js, line 145

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 string

WKT geometry