Class: OverpassWay

OverpassWay()

A way

Constructor

new OverpassWay()

Properties:
Name Type Description
id string ID of this object, starting with 'w'.
osm_id number Numeric id.
type string Type: 'way'.
tags object OpenStreetMap tags.
meta object OpenStreetMap meta information.
geometry Array.<Point> 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 way is member of.
role string Role of this object in the relation.
sequence number This object is the nth member in the relation.
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'.
Source:

Methods

leafletFeature(optionsopt) → {L.layer}

return a leaflet feature for this object. If the ways is closed, a L.polygon will be returned, otherwise a L.polyline.
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