diff options
author | Bdale Garbee <bdale@gag.com> | 2016-06-17 10:02:00 -0600 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2016-06-17 10:02:00 -0600 |
commit | 085336c45ce0577031a7af5de117a8b856160708 (patch) | |
tree | 13a145eab69e38f2658359fa8395e7257b3c3fb9 /altoslib/AltosMap.java | |
parent | 50c9a54ac6b04458970eedfa6d3e0e25f41c765f (diff) | |
parent | 639e461ded29a48c155afea12171cbfc191ccfd7 (diff) |
Merge branch 'branch-1.6' into debian
Diffstat (limited to 'altoslib/AltosMap.java')
-rw-r--r-- | altoslib/AltosMap.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/altoslib/AltosMap.java b/altoslib/AltosMap.java index 1841277f..0c775f33 100644 --- a/altoslib/AltosMap.java +++ b/altoslib/AltosMap.java @@ -15,7 +15,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 +51,7 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener { }; AltosMapInterface map_interface; + int scale; AltosMapCache cache; @@ -328,7 +329,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 +477,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); + } } |