Constructor
new OverpassNode()
Properties:
Name |
Type |
Description |
id |
string
|
ID of this object, starting with 'n'. |
osm_id |
number
|
Numeric id. |
type |
string
|
Type: 'node' |
tags |
object
|
OpenStreetMap tags. |
meta |
object
|
OpenStreetMap meta information. |
geometry |
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 ways and relations where this object is member of.
Properties
Name |
Type |
Description |
id |
string
|
ID of the way or 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 way resp. relation. |
|
bounds |
BoundingBox
|
Bounding box of this object. |
center |
Point
|
Centroid of the bounding box. |
- Source:
Extends
Methods
GeoJSON() → {object}
GeoJSON representation of this object
- Overrides:
- Source:
Returns:
-
Type
-
object
exportGeoJSON(object, function)
Export object as GeoJSON. Missing geometry will be loaded.
Parameters:
Name |
Type |
Description |
object |
|
options Options |
function |
|
callback Function which will be called with (err, result) |
- Inherited From:
- Source:
exportOSMJSON(object, object, function)
Export object (and members) as OpenStreetMap JSON
Parameters:
Name |
Type |
Description |
object |
|
options Options |
object |
|
elements All exported elements, include member objects. Pass an empty object. If a member element would be exported multiple times it will appear only once. For the final export, to be compatible to Overpass API, you should convert the object to an array via Object.values(). |
function |
|
callback Function which will be called with (err, result) |
- Overrides:
- Source:
exportOSMXML(object, DOMNode, function)
Export object (and members) as OpenStreetMap XML
Parameters:
Name |
Type |
Description |
object |
|
options Options |
DOMNode |
|
parentNode a DOM Node where the object will be appended as child. Depending on object type and options, member objects will also be appended on the same level. |
function |
|
callback Function which will be called with (err, dom node) |
- Overrides:
- Source:
intersects(bbox) → {number}
Check whether this object intersects (or is within) the specified bounding box. Returns 0 if it does not match; 1 if the exact geometry is not known, but the object's bounding box matches; 2 exact match.
Parameters:
Name |
Type |
Description |
bbox |
boundingbox:BoundingBox
|
Bounding box |
- Overrides:
- Source:
Returns:
-
Type
-
number
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 |
nodeFeature |
string
|
<optional>
|
'CircleMarker'
|
Which type of object should be returned: 'Marker' (L.marker), 'Circle' (L.circle) or 'CircleMarker' (L.circleMarker). |
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) |
|
- Overrides:
- Source:
Returns:
-
Type
-
L.layer
title() → {string}
Title of of this object (default: name, operator or ref or the id of the object)
- Inherited From:
- Source:
Returns:
-
Type
-
string