[gnome-maps/wip/mlundblad/reduce-dup-place-init: 7/7] osmUtils: Use place update method
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/reduce-dup-place-init: 7/7] osmUtils: Use place update method
- Date: Tue, 28 Sep 2021 20:22:34 +0000 (UTC)
commit 4291fbb9f38d43ba4cad213e7f52ff8f8e443b7f
Author: Marcus Lundblad <ml update uu se>
Date: Sat Sep 25 21:22:40 2021 +0200
osmUtils: Use place update method
Use method to update place instance
with OSM tags.
src/osmUtils.js | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/src/osmUtils.js b/src/osmUtils.js
index b6a2e452..866d063f 100644
--- a/src/osmUtils.js
+++ b/src/osmUtils.js
@@ -62,22 +62,7 @@ function updatePlaceFromOSMObject(place, object) {
place.name = name;
place.nativeName = name;
}
- place.population = object.get_tag('population');
- place.website = object.get_tag('website');
- place.email = object.get_tag('email');
- place.phone = object.get_tag('phone');
- place.wiki = object.get_tag('wikipedia');
- place.openingHours = object.get_tag('opening_hours');
- place.wheelchair = object.get_tag('wheelchair');
- place.toilets = object.get_tag('toilets');
- place.internetAccess = object.get_tag('internet_access');
- place.religion = object.get_tag('religion');
- place.takeaway = object.get_tag('takeaway');
-
- let altitude = object.get_tag('ele');
-
- if (altitude)
- place.location.altitude = altitude;
+ place.updateFromTags(object.get_tags());
Application.placeStore.updatePlace(place);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]