[gnome-maps/gnome-40] photonParser: Use country code when available



commit 26db4f6df61b9eec4e187e649ed73412c5df5c0b
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Apr 20 23:08:04 2021 +0200

    photonParser: Use country code when available
    
    Use the country code from the search result
    when available.

 src/photonParser.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/photonParser.js b/src/photonParser.js
index 17aff883..5ae7a9a5 100644
--- a/src/photonParser.js
+++ b/src/photonParser.js
@@ -41,7 +41,8 @@ function parsePlace(latitude, longitude, properties) {
 
     let street = properties.street;
     let housenumber = properties.housenumber;
-    let countryCode = Utils.getCountryCodeForCoordinates(latitude, longitude);
+    let countryCode = properties.countrycode ??
+                      Utils.getCountryCodeForCoordinates(latitude, longitude);
     let streetAddress;
 
     if (housenumber && street) {


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