Switch from GPLv2 to GPLv2+
[fw/altos] / altosdroid / src / org / altusmetrum / AltosDroid / AltosMapOffline.java
index ab142b175c43f4ba4a4e6d2cb23d46778bac835c..76771adcfce6246ae3b57078be6ff2338f4f5a7e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,7 +21,7 @@ package org.altusmetrum.AltosDroid;
 import java.util.*;
 import java.io.*;
 
-import org.altusmetrum.altoslib_10.*;
+import org.altusmetrum.altoslib_11.*;
 
 import android.app.Activity;
 import android.graphics.*;
@@ -85,6 +86,8 @@ public class AltosMapOffline extends View implements ScaleGestureDetector.OnScal
        AltosMap                map;
        AltosDroid              altos_droid;
 
+       static int scale = 2;
+
        AltosLatLon     here;
        AltosLatLon     there;
        AltosLatLon     pad;
@@ -181,14 +184,14 @@ public class AltosMapOffline extends View implements ScaleGestureDetector.OnScal
                        }
                }
 
-               public MapTile(AltosMapCache cache, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) {
-                       super(cache, upper_left, center, zoom, maptype, px_size, 2);
+               public MapTile(AltosMapCache cache, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size, int scale) {
+                       super(cache, upper_left, center, zoom, maptype, px_size, scale);
                }
 
        }
 
-       public AltosMapTile new_tile(AltosMapCache cache, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) {
-               return new MapTile(cache, upper_left, center, zoom, maptype, px_size);
+       public AltosMapTile new_tile(AltosMapCache cache, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size, int scale) {
+               return new MapTile(cache, upper_left, center, zoom, maptype, px_size, scale);
        }
 
        public AltosMapPath new_path() {
@@ -492,7 +495,7 @@ public class AltosMapOffline extends View implements ScaleGestureDetector.OnScal
 
        public void onCreateView(AltosDroid altos_droid) {
                this.altos_droid = altos_droid;
-               map = new AltosMap(this);
+               map = new AltosMap(this, scale);
                AltosPreferences.register_map_type_listener(this);
                map.set_maptype(AltosPreferences.map_type());