X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosMap.java;h=e3c4a6a79ec54db6223c62fd4690899a74855d14;hp=1841277f8bd61889390f0d5802dff09a7584b603;hb=51bdee662fdfad1937c576daadd2e5eacac17905;hpb=e0081f7ba6fc9f1e4484d3e291fd30065ad5b620 diff --git a/altoslib/AltosMap.java b/altoslib/AltosMap.java index 1841277f..e3c4a6a7 100644 --- a/altoslib/AltosMap.java +++ b/altoslib/AltosMap.java @@ -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 @@ -15,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_10; +package org.altusmetrum.altoslib_11; import java.io.*; import java.lang.*; @@ -51,6 +52,7 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener { }; AltosMapInterface map_interface; + int scale; AltosMapCache cache; @@ -328,7 +330,8 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener { if (!tiles.containsKey(point)) { AltosLatLon ul = transform.lat_lon(point); AltosLatLon center = transform.lat_lon(new AltosPointDouble(x + AltosMap.px_size/2, y + AltosMap.px_size/2)); - AltosMapTile tile = map_interface.new_tile(cache, ul, center, zoom, maptype, px_size); + AltosMapTile tile = map_interface.new_tile(cache, ul, center, zoom, maptype, px_size, scale); + debug("show state %s url %s\n", AltosMapTile.status_name(tile.store.status()), tile.store.url); tile.add_listener(this); tiles.put(point, tile); } @@ -475,11 +478,16 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener { drag_stop(x, y); } - public AltosMap(AltosMapInterface map_interface) { + public AltosMap(AltosMapInterface map_interface, int scale) { this.map_interface = map_interface; + this.scale = scale; cache = new AltosMapCache(map_interface); line = map_interface.new_line(); path = map_interface.new_path(); set_zoom_label(); } + + public AltosMap(AltosMapInterface map_interface) { + this(map_interface, 1); + } }