summaryrefslogtreecommitdiff
path: root/altoslib/AltosMapLoader.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-05-28 01:01:23 -0700
committerKeith Packard <keithp@keithp.com>2015-05-28 01:01:23 -0700
commitba698c2cc48677735046d0881df9c180674e4082 (patch)
tree7c93f1349c5b0df541b101052dd1c3eeaf044831 /altoslib/AltosMapLoader.java
parentc63617415553d97f9be2f19b94365b53d4480c68 (diff)
altoslib: Pass all map loader params to set_load_params
Add zoom and map type to the param list so we don't call set_zoom and set_maptype separately, which only causes lots of extra image loads to get started unnecessarily. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosMapLoader.java')
-rw-r--r--altoslib/AltosMapLoader.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/altoslib/AltosMapLoader.java b/altoslib/AltosMapLoader.java
index 5db20cf8..cf7169ba 100644
--- a/altoslib/AltosMapLoader.java
+++ b/altoslib/AltosMapLoader.java
@@ -41,12 +41,9 @@ public class AltosMapLoader implements AltosMapTileListener {
int layers_loaded;
AltosMap map;
- AltosMapCache cache;
public void do_load() {
- map.set_zoom(cur_z + AltosMap.default_zoom);
- map.set_maptype(cur_type);
- map.set_load_params(latitude, longitude, radius, this);
+ map.set_load_params(cur_z + AltosMap.default_zoom, cur_type, latitude, longitude, radius, this);
}
public int next_type(int start) {
@@ -132,12 +129,10 @@ public class AltosMapLoader implements AltosMapTileListener {
next_load();
}
- public AltosMapCache cache() { return cache; }
+ public AltosMapCache cache() { return map.cache(); }
- public AltosMapLoader(AltosMap map, AltosMapCache cache,
- AltosMapLoaderListener listener) {
+ public AltosMapLoader(AltosMap map, AltosMapLoaderListener listener) {
this.map = map;
- this.cache = cache;
this.listener = listener;
}
}