Class: OverpassRelation

OverpassRelation()

A relation

Constructor

new OverpassRelation()

Properties:
Name Type Description
id string ID of this object, starting with 'r'.
osm_id number Numeric id.
type string Type: 'relation'.
tags object OpenStreetMap tags.
meta object OpenStreetMap meta information.
geometry GeoJSON of the object
data object Data as loaded from Overpass API.
properties bit_array Which information about this object is known?
memberOf Array.<object> List of relations where this object is member of.
Properties
Name Type Description
id string ID of the relation where this object is member of.
role string Role of this object in the relation.
sequence number This object is the nth member in the relation.
connectedPrev null | string null (unknown), 'no' (connected), 'forward' (connected at the front end of this way), 'backward' (connected at the back end of this way)
connectedNext null | string null (unknown), 'no' (connected), 'forward' (connected at the back end of this way), 'backward' (connected at the front end of this way)
members.dir null | string null (unknown), 'forward', 'backward'
bounds BoundingBox Bounding box of this object.
center Point Centroid of the bounding box.
members Array.<object> Nodes of the way.
Properties
Name Type Description
id string ID of the member.
ref number Numeric ID of the member.
type string 'node'.
role string Role of the member.
connectedPrev null | string null (unknown), 'no' (connected), 'forward' (connected at the front end of this way), 'backward' (connected at the back end of this way)
connectedNext null | string null (unknown), 'no' (connected), 'forward' (connected at the back end of this way), 'backward' (connected at the fornt end of this way)
dir null | string null (unknown), 'forward', 'backward', 'loop'
Source:

Methods

leafletFeature(optionsopt) → {L.layer}

return a leaflet feature for this object.
Parameters:
Name Type Attributes Description
options object <optional>
options Options will be passed to the leaflet function
Properties
Name Type Attributes Default Description
shiftWorld Array.<number> <optional>
[0, 0] Shift western (negative) longitudes by shiftWorld[0], eastern (positive) longitudes by shiftWorld[1] (e.g. by 360, 0 to show objects around lon=180)
Source:
Returns:
Type
L.layer

memberIds() → {Array.<string>}

Return list of member ids.
Source:
Returns:
Type
Array.<string>