[gnome-maps/wip/mlundblad/show-native-names: 1/3] place: Add property for native name




commit 5f6a5e2fc32bb31913b178d675f0cfaa9b525c2c
Author: Marcus Lundblad <ml update uu se>
Date:   Wed Feb 10 21:46:36 2021 +0100

    place: Add property for native name

 src/place.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/place.js b/src/place.js
index b0e50e9e..299b6ef5 100644
--- a/src/place.js
+++ b/src/place.js
@@ -97,6 +97,9 @@ class Place extends Geocode.Place {
         this._wheelchair = params.wheelchair;
         delete params.wheelchair;
 
+        this._nativeName = params.nativeName;
+        delete params.nativeName;
+
         if (params.place) {
             params = { osm_id: params.place.osm_id,
                        osm_type: params.place.osm_type,
@@ -232,6 +235,14 @@ class Place extends Geocode.Place {
         this._prefilled = prefilled;
     }
 
+    get nativeName() {
+        return this._nativeName;
+    }
+
+    set nativeName(nativeName) {
+        this._nativeName = nativeName;
+    }
+
     toJSON() {
         let bounding_box = null;
 
@@ -251,6 +262,7 @@ class Place extends Geocode.Place {
                  osm_type: this.osm_type,
                  place_type: this.place_type,
                  name: this.name,
+                 nativeName: this.nativeName,
                  bounding_box: bounding_box,
                  this_type: this.this_type,
                  location: location,


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