android:layout_height="wrap_content"
android:text="@string/preload_types"
/>
+<!--
<CheckBox android:id="@+id/preload_hybrid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_height="wrap_content"
android:text="@string/preload_terrain"
/>
+-->
<TextView android:id="@+id/preload_min_zoom_label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
private ArrayAdapter<AltosLaunchSite> known_sites_adapter;
+/*
private CheckBox hybrid;
private CheckBox satellite;
private CheckBox roadmap;
private CheckBox terrain;
+*/
private Spinner known_sites_spinner;
private Spinner min_zoom;
return r;
}
+/*
private int bit(CheckBox box, int value) {
if (box.isChecked())
return 1 << value;
return 0;
}
+*/
private int types() {
+/*
return (bit(hybrid, AltosMap.maptype_hybrid) |
bit(satellite, AltosMap.maptype_satellite) |
bit(roadmap, AltosMap.maptype_roadmap) |
bit(terrain, AltosMap.maptype_terrain));
+*/
+ return 1 << AltosMap.maptype_hybrid;
}
private void load() {
latitude = (EditText) findViewById(R.id.preload_latitude);
longitude = (EditText) findViewById(R.id.preload_longitude);
+/*
hybrid = (CheckBox) findViewById(R.id.preload_hybrid);
satellite = (CheckBox) findViewById(R.id.preload_satellite);
roadmap = (CheckBox) findViewById(R.id.preload_roadmap);
terrain = (CheckBox) findViewById(R.id.preload_terrain);
hybrid.setChecked(true);
+*/
min_zoom = (Spinner) findViewById(R.id.preload_min_zoom);
add_numbers(min_zoom,
}
public boolean set_maptype(int maptype) {
+/*
if (maptype != this.maptype) {
this.maptype = maptype;
tiles.clear();
repaint();
return true;
}
+*/
return false;
}
public void set_load_params(int new_zoom, int new_type, double lat, double lon, int radius, AltosMapTileListener listener) {
if (AltosMap.min_zoom <= new_zoom && new_zoom <= AltosMap.max_zoom)
zoom = new_zoom;
- maptype = new_type;
+/* maptype = new_type; */
load_centre = new AltosLatLon(lat, lon);
load_radius = radius;
load_listener = listener;
this.min_z = min_z;
this.max_z = max_z;
this.radius = radius;
+/*
this.all_types = all_types;
+*/
+ this.all_types = 1 << AltosMap.maptype_hybrid;
this.scale = scale;
this.abort = false;
start();
JLabel zoom_label;
public void set_maptype(int type) {
+/*
map.set_maptype(type);
maptype_combo.setSelectedIndex(type);
+*/
}
/* AltosUIMapPreload functions */
/* internal layout bits */
private GridBagLayout layout = new GridBagLayout();
+/*
JComboBox<String> maptype_combo;
+*/
MapView view;
c.weighty = 0;
add(zoom_out, c);
+/*
maptype_combo = new JComboBox<String>(map.maptype_labels);
maptype_combo.setEditable(false);
c.weightx = 0;
c.weighty = 0;
add(maptype_combo, c);
-
+*/
map = new AltosMap(this);
}
}
JToggleButton load_button;
JButton close_button;
+/*
JCheckBox[] maptypes = new JCheckBox[AltosMap.maptype_terrain - AltosMap.maptype_hybrid + 1];
+*/
JComboBox<Integer> min_zoom;
JComboBox<Integer> max_zoom;
private int all_types() {
+/*
int all_types = 0;
for (int t = AltosMap.maptype_hybrid; t <= AltosMap.maptype_terrain; t++)
if (maptypes[t].isSelected())
all_types |= (1 << t);
return all_types;
+*/
+ return 1 << AltosMap.maptype_hybrid;
}
void center_map(double latitude, double longitude) {
pane.add(close_button, c);
+/*
JLabel types_label = new JLabel("Map Types");
c.gridx = 2;
c.gridwidth = 2;
c.gridy = (type & 1) + 3;
pane.add(maptypes[type], c);
}
+*/
JLabel min_zoom_label = new JLabel("Minimum Zoom");
c.gridx = 4;