*
* 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
import android.location.LocationListener;
import android.location.Criteria;
-import org.altusmetrum.altoslib_10.*;
+import org.altusmetrum.altoslib_11.*;
/**
* This Activity appears as a dialog. It lists any paired devices and
* by the user, the MAC address of the device is sent back to the parent
* Activity in the result Intent.
*/
-public class PreloadMapActivity extends Activity implements AltosLaunchSiteListener, AltosMapInterface, AltosMapLoaderListener, LocationListener {
+public class PreloadMapActivity extends Activity implements AltosLaunchSiteListener, AltosMapLoaderListener, LocationListener {
private ArrayAdapter<AltosLaunchSite> known_sites_adapter;
});
}
+ public void debug(String format, Object ... arguments) {
+ AltosDebug.debug(format, arguments);
+ }
+
/* AltosLaunchSiteListener interface */
+
public void notify_launch_sites(final List<AltosLaunchSite> sites) {
this.runOnUiThread(new Runnable() {
public void run() {
});
}
- AltosMap map;
-
- class PreloadMapImage implements AltosImage {
- public void flush() {
- }
-
- public PreloadMapImage(File file) {
- }
- }
-
- public AltosMapPath new_path() {
- return null;
- }
-
- public AltosMapLine new_line() {
- return null;
- }
-
- public AltosImage load_image(File file) throws Exception {
- return new PreloadMapImage(file);
- }
-
- public AltosMapMark new_mark(double lat, double lon, int state) {
- return null;
- }
-
- class PreloadMapTile extends AltosMapTile {
- public void paint(AltosMapTransform t) {
- }
-
- public PreloadMapTile(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 AltosMapTile new_tile(AltosMapCache cache, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) {
- return new PreloadMapTile(cache, upper_left, center, zoom, maptype, px_size);
- }
-
- public int width() {
- return AltosMap.px_size;
- }
-
- public int height() {
- return AltosMap.px_size;
- }
-
- public void repaint() {
- }
-
- public void repaint(AltosRectangle damage) {
- }
-
- public void set_zoom_label(String label) {
- }
-
- public void select_object(AltosLatLon latlon) {
- }
-
- public void debug(String format, Object ... arguments) {
- AltosDebug.debug(format, arguments);
- }
-
/* LocationProvider interface */
AltosLaunchSite current_location_site;
AltosDebug.debug("PreloadMap load %f %f %d %d %f %d\n",
lat, lon, min, max, r, t);
- loader = new AltosMapLoader(map, this, lat, lon, min, max, r, t);
+ loader = new AltosMapLoader(this, lat, lon, min, max, r, t, AltosMapOffline.scale);
} catch (ParseException e) {
AltosDebug.debug("PreloadMap load raised exception %s", e.toString());
}
known_sites_spinner.setAdapter(known_sites_adapter);
known_sites_spinner.setOnItemSelectedListener(new SiteListListener());
- map = new AltosMap(this);
-
// Listen for GPS and Network position updates
LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);