[gnome-maps/wip/mlundblad/handle-osm-urls: 9/11] placeStore: Add function to get by raw OSM ID



commit c6e1c12c18b7fb85f172aa9cb2bacd1a2fb4b1ca
Author: Marcus Lundblad <ml update uu se>
Date:   Mon Jul 1 12:35:14 2019 +0200

    placeStore: Add function to get by raw OSM ID
    
    Adds a function to get a place from the store
    based on raw OSM type and ID.

 src/placeStore.js | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index 3757509..e8ac625 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -309,6 +309,10 @@ class PlaceStore extends Gtk.ListStore {
             return this._typeTable[place.uniqueID] !== undefined;
     }
 
+    existsWithOsmTypeAndId(osmType, osmId) {
+        return this._typeTable[osmType + '-' + osmId];
+    }
+
     _removeIf(evalFunc, stop) {
         this.foreach((model, path, iter) => {
             if (evalFunc(model, iter)) {


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