[gnome-maps/wip/mlundblad/additional-place-icons: 2/5] place: Add osmKey and osmValue parameters
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/additional-place-icons: 2/5] place: Add osmKey and osmValue parameters
- Date: Sat, 10 Apr 2021 07:36:54 +0000 (UTC)
commit f45a64b5dfb54d08b9470de892575e85eabe337e
Author: Marcus Lundblad <ml update uu se>
Date: Tue Apr 6 21:51:33 2021 +0200
place: Add osmKey and osmValue parameters
Add parameters for most significant OSM
type, corresponding to the osm_key/osm_value
parameters from the Photon geocoder response.
src/place.js | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/place.js b/src/place.js
index 299b6ef5..05f8dd09 100644
--- a/src/place.js
+++ b/src/place.js
@@ -100,6 +100,12 @@ class Place extends Geocode.Place {
this._nativeName = params.nativeName;
delete params.nativeName;
+ this._osmKey = params.osmKey;
+ delete params.osmKey;
+
+ this._osmValue = params.osmValue;
+ delete params.osmValue;
+
if (params.place) {
params = { osm_id: params.place.osm_id,
osm_type: params.place.osm_type,
@@ -260,6 +266,8 @@ class Place extends Geocode.Place {
return { id: this.osm_id,
osm_type: this.osm_type,
+ osmKey: this._osmKey,
+ osmValue: this._osmValue,
place_type: this.place_type,
name: this.name,
nativeName: this.nativeName,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]