[gnome-maps/wip/mlundblad/use-country-code-from-photon: 1/2] photonParser: Use country code when available
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/use-country-code-from-photon: 1/2] photonParser: Use country code when available
- Date: Mon, 26 Apr 2021 21:06:24 +0000 (UTC)
commit 09cafc62e5c7865c7ee532789b59c802aec822de
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 3fcdbf88..7a9267dc 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]