[gnome-maps] osmUtils: Also update altitude when saving object



commit 9bbf6f6b211e004836a7f8c1304c6645b54f9d96
Author: Marcus Lundblad <ml update uu se>
Date:   Sat Mar 30 11:47:37 2019 +0100

    osmUtils: Also update altitude when saving object
    
    Also update the "altitude" property on the local geocode
    location object from the "ele" tag of the OSM object.
    
    Fixes #170

 src/osmUtils.js | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/osmUtils.js b/src/osmUtils.js
index 91c6b69..e3c06ea 100644
--- a/src/osmUtils.js
+++ b/src/osmUtils.js
@@ -63,5 +63,10 @@ function updatePlaceFromOSMObject(place, object) {
     place.openingHours = object.get_tag('opening_hours');
     place.wheelchair = object.get_tag('wheelchair');
 
+    let altitude = object.get_tag('ele');
+
+    if (altitude > 0)
+        place.location.altitude = altitude;
+
     Application.placeStore.updatePlace(place);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]