Class: Request

Request(overpass, options)

An unspecified request

Constructor

new Request(overpass, options)

Parameters:
Name Type Description
overpass OverpassFrontend
options object
Source:

Methods

abort()

abort this request
Source:

compileQuery(context) → {Request#SubRequest}

compile the query
Parameters:
Name Type Description
context OverpassFrontend#Context Current context
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
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
Source:

minMaxEffort() → {Request#minMaxEffortResult}

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

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
Source:

willInclude(context) → {boolean}

shall this Request be included in the current call?
Parameters:
Name Type Description
context OverpassFrontend#Context Current context
Source:
Returns:
- yes|no
Type
boolean

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
Source:

minMaxEffortResult

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

Events

abort

Request got aborted
Source:

finish

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

subrequest-compiile

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

subrequest-finished

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