summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@update.uu.se>2019-07-01 12:35:14 +0200
committerMarcus Lundblad <ml@update.uu.se>2019-07-08 22:04:17 +0200
commitdc27b0a79d4ba97714d0a2d7dbfe37989581459a (patch)
tree434bdec8c08ac2245f3a907a7c9f9c9e22758404
parent04e5e1c122ab166f2a2a5e6a55176ccfccb8e04c (diff)
downloadgnome-maps-dc27b0a79d4ba97714d0a2d7dbfe37989581459a.tar.gz
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.
-rw-r--r--src/placeStore.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/placeStore.js b/src/placeStore.js
index 3757509e..7d05dc2b 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -309,6 +309,14 @@ class PlaceStore extends Gtk.ListStore {
return this._typeTable[place.uniqueID] !== undefined;
}
+ existsWithOsmTypeAndId(osmType, osmId) {
+ let id = osmType + '-' + osmId;
+ if (this._typeTable[id])
+ return this._typeTable[id];
+ else
+ return null;
+ }
+
_removeIf(evalFunc, stop) {
this.foreach((model, path, iter) => {
if (evalFunc(model, iter)) {