diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/osmEditDialog.js | 6 | ||||
-rw-r--r-- | src/overpass.js | 2 | ||||
-rw-r--r-- | src/placeBubble.js | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/osmEditDialog.js b/src/osmEditDialog.js index be908b6c..86cc10f5 100644 --- a/src/osmEditDialog.js +++ b/src/osmEditDialog.js @@ -141,6 +141,12 @@ const OSM_FIELDS = [ type: EditFieldType.INTEGER }, { + name: _("Altitude"), + tag: 'ele', + type: EditFieldType.INTEGER, + hint: _("Elevation (height above sea level) of a point in metres.") + }, + { name: _("Wheelchair access"), tag: 'wheelchair', type: EditFieldType.COMBO, diff --git a/src/overpass.js b/src/overpass.js index eb593fb7..b276ccff 100644 --- a/src/overpass.js +++ b/src/overpass.js @@ -106,6 +106,8 @@ const Overpass = new Lang.Class({ place.openingHours = element.tags.opening_hours; if (element.tags.internet_access) place.internetAccess = element.tags.internet_access; + if (element.tags.ele && place.location) + place.location.altitude = parseFloat(element.tags.ele); }, _getQueryUrl: function(place) { diff --git a/src/placeBubble.js b/src/placeBubble.js index d332ad34..618938ec 100644 --- a/src/placeBubble.js +++ b/src/placeBubble.js @@ -128,6 +128,12 @@ const PlaceBubble = new Lang.Class({ info: place.population }); } + if (place.location.altitude > 0) { + let alt = place.location.altitude; + expandedContent.push({ label: _("Altitude:"), + info: Utils.prettyDistance(alt, true) }); + } + if (place.openingHours) { expandedContent.push({ label: _("Opening hours:"), info: place.openingHoursTranslated }); |