[gnome-maps/wip/mlundblad/wikidata: 1/3] place: Add property for wikidata




commit 037c68f405fb3a119aa88abaaa29ee5fef56746a
Author: Marcus Lundblad <ml dfupdate se>
Date:   Tue Oct 4 22:29:54 2022 +0200

    place: Add property for wikidata

 src/place.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/place.js b/src/place.js
index f16eee5d..2484e02c 100644
--- a/src/place.js
+++ b/src/place.js
@@ -58,6 +58,7 @@ export class Place extends GeocodeGlib.Place {
         delete params.email;
         delete params.phone;
         delete params.wiki;
+        delete params.wikidata;
         delete params.openingHours;
         delete params.internetAccess;
         delete params.religion;
@@ -150,6 +151,8 @@ export class Place extends GeocodeGlib.Place {
             this.phone = tags.phone;
         if (wiki)
             this.wiki = wiki;
+        if (tags.wikidata)
+            this.wikidata = wikidata;
         if (tags.wheelchair)
             this.wheelchair = tags.wheelchair;
         if (openingHours)
@@ -226,6 +229,14 @@ export class Place extends GeocodeGlib.Place {
         return this._wiki;
     }
 
+    set wikidata(v) {
+        this._wikidata = v;
+    }
+
+    get wikidata() {
+        return this._wikidata;
+    }
+
     set openingHours(v) {
         this._openingHours = v;
     }
@@ -377,6 +388,7 @@ export class Place extends GeocodeGlib.Place {
                  email: this.email,
                  phone: this.phone,
                  wiki: this.wiki,
+                 wikidata: this.wikidata,
                  wheelchair: this.wheelchair,
                  openingHours: this.openingHours,
                  internetAccess: this.internetAccess,


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