[gnome-maps/wip/mlundblad/use-country-code-from-photon: 2/2] overpass: Use addr:country when set




commit 63720cac2dd78b59c072e11e6d1d66f92596b4bc
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Apr 20 23:10:48 2021 +0200

    overpass: Use addr:country when set
    
    Use addr:country when constructing input
    for the PhotonParser (using the countrycode
    parameter).

 src/overpass.js | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/overpass.js b/src/overpass.js
index ea300f80..ee69bf80 100644
--- a/src/overpass.js
+++ b/src/overpass.js
@@ -160,6 +160,8 @@ var Overpass = GObject.registerClass({
             properties.postcode = tags['addr:postcode'];
         if (tags['addr:city'])
             properties.city = tags['addr:city'];
+        if (tags['addr:country'])
+            properties.countrycode = tags['addr:country'];
 
         if (tags.place)
             this._setOsmKeyAndValue(properties, tags, 'place');


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