]> git.street.me.uk Git - andy/viking.git/blobdiff - src/vikwebtoolcenter.c
Tidy up: simpler and better use of trackpoint free methods in TRW Layer.
[andy/viking.git] / src / vikwebtoolcenter.c
index cabc2ea5582354cbbe5d78c16d4a153d39050ef8..7ba2ad772b12cf51f520f40cc7e4a3ab3ba5ff07 100644 (file)
@@ -207,7 +207,11 @@ static guint8 webtool_center_mpp_to_zoom ( VikWebtool *self, gdouble mpp ) {
       return i;
     }
   }
-  return 255;
+  // Handle mpp smaller than 1
+  // return a useful value such that '17 - this number' gives a natural number.
+  // Ideally should return '-1' or '0.5' but that's tricky with an unsigned int type!
+  // (i.e. should rework to support zoom levels of 18 or 19)
+  return 0;
 }
 
 static gchar *webtool_center_get_url ( VikWebtool *self, VikWindow *vwindow )