[gnome-maps] Fix issue of unknown accuracy becoming street-level
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Fix issue of unknown accuracy becoming street-level
- Date: Sat, 6 Apr 2013 02:21:33 +0000 (UTC)
commit e26056fbcefdb10a00a94892ee3a999331c64907
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sat Apr 6 05:04:18 2013 +0300
Fix issue of unknown accuracy becoming street-level
src/utils.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/utils.js b/src/utils.js
index 19e321d..6ed2276 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -82,7 +82,9 @@ function initActions(actionMap, simpleActionEntries) {
// accuracy: double value in meters
function getZoomLevelForAccuracy(accuracy) {
- if (accuracy <= Geocode.LOCATION_ACCURACY_STREET)
+ if (accuracy == Geocode.LOCATION_ACCURACY_UNKNOWN)
+ return 13; // Accuracy is usually city-level when unknown
+ else if (accuracy <= Geocode.LOCATION_ACCURACY_STREET)
return 16;
else if (accuracy <= Geocode.LOCATION_ACCURACY_CITY)
return 13;
@@ -90,8 +92,6 @@ function getZoomLevelForAccuracy(accuracy) {
return 10;
else if (accuracy <= Geocode.LOCATION_ACCURACY_COUNTRY)
return 6;
- else if (accuracy == Geocode.LOCATION_ACCURACY_UNKNOWN)
- return 13; // Accuracy is usually city-level when unknown
else
return 3;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]