Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2014-08-25 20:36:32 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:25:34 +0300
commitf89d0b7a8c9987964fca64684b3a561f8f53332a (patch)
treeafbc0de0acde6ea143e7c77f8009376caeafc248 /map/geourl_process.cpp
parent50ef7bd1db2410e7374a3238dd100ed635afe081 (diff)
Fixed “daddr” key parsing in google maps url.
Diffstat (limited to 'map/geourl_process.cpp')
-rw-r--r--map/geourl_process.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/map/geourl_process.cpp b/map/geourl_process.cpp
index 9548452ed7..999a4f99f4 100644
--- a/map/geourl_process.cpp
+++ b/map/geourl_process.cpp
@@ -53,6 +53,7 @@ namespace url_scheme
return false;
}
+ int const LL_PRIORITY = 5;
/// Priority for accepting coordinates if we have many choices.
/// -1 - not initialized
@@ -64,12 +65,14 @@ namespace url_scheme
return 0;
else if (token == "q")
return 1;
- else if (token == "point")
+ else if (token == "daddr")
return 2;
- else if (token == "ll")
+ else if (token == "point")
return 3;
- else if (token == "lat" || token == "lon")
+ else if (token == "ll")
return 4;
+ else if (token == "lat" || token == "lon")
+ return LL_PRIORITY;
return -1;
}
@@ -134,7 +137,7 @@ namespace url_scheme
if (priority == -1 || priority < m_latPriority || priority < m_lonPriority)
return;
- if (priority != 4)
+ if (priority != LL_PRIORITY)
{
regexp::ForEachMatched(value, m_regexp, AssignCoordinates(*this, priority));
}