Class: RequestBBox

RequestBBox(overpass, options)

A BBox request

Constructor

new RequestBBox(overpass, options)

Parameters:
Name Type Description
overpass OverpassFrontend
options object
Source:

Extends

Methods

_compileQuery(context) → {Request#SubRequest|false}

compile the query
Parameters:
Name Type Description
context OverpassFrontend#Context Current context
Source:
Returns:
- the compiled query or false if the bbox does not match
Type
Request#SubRequest | false

abort()

abort this request
Overrides:
Source:

compileQuery(context) → {Request#SubRequest}

compile the query
Parameters:
Name Type Description
context OverpassFrontend#Context Current context
Overrides:
Source:
Returns:
- the compiled query
Type
Request#SubRequest

finish(err)

request is finished
Parameters:
Name Type Description
err Error | null null if no error occured
Overrides:
Source:

finishSubRequest(subRequest)

the current subrequest is finished -> update caches, check whether request is finished
Parameters:
Name Type Description
subRequest Request#SubRequest the current sub request
Overrides:
Source:

minMaxEffort() → {Request#minMaxEffortResult}

how much effort can a call to this request use
Overrides:
Source:
Returns:
- minimum and maximum effort
Type
Request#minMaxEffortResult

needLoad() → {boolean}

check if we need to call Overpass API. Maybe whole area is cached anyway?
Source:
Returns:
- true, if we need to call Overpass API
Type
boolean

preprocess()

check if there are any map features which can be returned right now
Source:

receiveObject(ob, subRequest, partIndex)

receive an object from OverpassFronted -> enter to cache, return to caller
Parameters:
Name Type Description
ob OverpassObject Object which has been received
subRequest Request#SubRequest sub request which is being handled right now
partIndex int Which part of the subRequest is being received
Overrides:
Source:

willInclude(context) → {boolean|Array.<int>}

shall this Request be included in the current call?
Parameters:
Name Type Description
context OverpassFrontend#Context Current context
Overrides:
Source:
Returns:
- yes|no - or [ minEffort, maxEffort ]
Type
boolean | Array.<int>

Type Definitions

SubRequest

A compiled query
Type:
  • Object
Properties:
Name Type Description
query string The compiled code
parts Array.<object> An entry for each part (separated by the 'out count' separator)
parts[].properties int The properties which each returned map feature has set (TAGS, BBOX, ...)
effort int Supposed "effort" of this query
count int Count of discovered items
request Request The request this compiled query belongs to
Overrides:
Source:

minMaxEffortResult

Type:
  • Object
Properties:
Name Type Description
Remaining number minimal effort of this request
Remaining number | null maximum effort (or null if unknown)
Overrides:
Source:

Events

abort

Request got aborted
Overrides:
Source:

finish

Request is finished
Parameters:
Type Description
Error | null null if no error occured
Overrides:
Source:

subrequest-compiile

SubRequest got compiled
Parameters:
Name Type Description
subRequest Request#SubRequest the sub request
Overrides:
Source:

subrequest-finished

SubRequest got finished
Parameters:
Name Type Description
subRequest Request#SubRequest the sub request
Overrides:
Source: