[gnome-maps] osmEditDialog: Add edit/add of notes.



commit 52690eac2895d886430b1a7efc74e2a635a28973
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Jun 22 12:17:59 2017 +1200

    osmEditDialog: Add edit/add of notes.
    
    Notes are used to help mappers to better understand why certain tags where
    chosen. It is not shown in the placeBubble as this would confuse map users.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784072

 src/osmEditDialog.js |    6 ++++++
 src/overpass.js      |    2 ++
 src/place.js         |   14 +++++++++++++-
 3 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/src/osmEditDialog.js b/src/osmEditDialog.js
index b4ae247..15f8a6e 100644
--- a/src/osmEditDialog.js
+++ b/src/osmEditDialog.js
@@ -211,6 +211,12 @@ const OSM_FIELDS = [
         type: EditFieldType.COMBO,
         options: [['yes', _("Yes")],
                   ['no', _("No")]]
+    },
+    {
+        name: _("Note"),
+        tag: 'note',
+        type: EditFieldType.TEXT,
+        hint: _("Information used to inform other mappers about non-obvious information about an element, 
the author's intent when creating it, or hints for further improvement.")
     }];
 
 const OSMEditAddress = new Lang.Class({
diff --git a/src/overpass.js b/src/overpass.js
index 705e1e9..39f4f6e 100644
--- a/src/overpass.js
+++ b/src/overpass.js
@@ -112,6 +112,8 @@ const Overpass = new Lang.Class({
             place.religion = element.tags.religion
         if (element.tags.toilets)
             place.toilets = element.tags.toilets;
+        if (element.tags.note)
+            place.note = element.tags.note;
     },
 
     _getQueryUrl: function(place) {
diff --git a/src/place.js b/src/place.js
index a8938f7..64a7450 100644
--- a/src/place.js
+++ b/src/place.js
@@ -58,6 +58,9 @@ const Place = new Lang.Class({
         this._toilets = params.toilets;
         delete params.toilets;
 
+        this._note = params.note;
+        delete params.note;
+
         /* Determines if the place should be added to the place store */
         if (typeof(params.store) === 'undefined') {
             this._store = true;
@@ -188,6 +191,14 @@ const Place = new Lang.Class({
         return Translations.translateYesNo(this._toilets);
     },
 
+    set note(v) {
+        this._note = v;
+    },
+
+    get note() {
+        return this._note;
+    },
+
     set wheelchair(v) {
         this._wheelchair = v;
     },
@@ -273,7 +284,8 @@ const Place = new Lang.Class({
                  openingHours: this.openingHours,
                  internetAccess: this.internetAccess,
                  religion: this.religion,
-                 toilets: this.toilets };
+                 toilets: this.toilets,
+                 note: this.note };
     },
 
     match: function(searchString) {


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