Just to show where on the map the official launch location is.
Signed-off-by: Keith Packard <keithp@keithp.com>
last_state = state.state;
}
last_state = state.state;
}
+ public void draw_circle(double lat, double lon) {
+ final Point2D.Double pt = pt(lat, lon);
+
+ for (Point offset : mapTiles.keySet()) {
+ AltosSiteMapTile tile = mapTiles.get(offset);
+ Point2D.Double ref = translatePoint(pt, tileCoordOffset(offset));
+ tile.draw_circle(ref);
+ }
+ }
+
private AltosSiteMapTile createTile(Point offset) {
AltosSiteMapTile tile = new AltosSiteMapTile(px_size);
mapTiles.put(offset, tile);
private AltosSiteMapTile createTile(Point offset) {
AltosSiteMapTile tile = new AltosSiteMapTile(px_size);
mapTiles.put(offset, tile);
final double latitude = lat.get_value();
final double longitude = lon.get_value();
map.setBaseLocation(latitude,longitude);
final double latitude = lat.get_value();
final double longitude = lon.get_value();
map.setBaseLocation(latitude,longitude);
+ map.draw_circle(latitude,longitude);
loading = true;
bgLoad thread = new bgLoad(map);
thread.start();
loading = true;
bgLoad thread = new bgLoad(map);
thread.start();
public void clearMap() {
fillLabel(mapLabel, Color.GRAY, px_size);
public void clearMap() {
fillLabel(mapLabel, Color.GRAY, px_size);
+ g2d = fillLabel(draw, new Color(127,127,127,0), px_size);
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setStroke(new BasicStroke(6, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
}
static Color stateColors[] = {
}
static Color stateColors[] = {
+ public void draw_circle(Point2D.Double pt) {
+ g2d.setColor(Color.RED);
+ g2d.drawOval((int)pt.x-5, (int)pt.y-5, 10, 10);
+ g2d.drawOval((int)pt.x-20, (int)pt.y-20, 40, 40);
+ g2d.drawOval((int)pt.x-35, (int)pt.y-35, 70, 70);
+ }
+
public static Graphics2D fillLabel(JLabel l, Color c, int px_size) {
BufferedImage img = new BufferedImage(px_size, px_size,
BufferedImage.TYPE_INT_ARGB);
public static Graphics2D fillLabel(JLabel l, Color c, int px_size) {
BufferedImage img = new BufferedImage(px_size, px_size,
BufferedImage.TYPE_INT_ARGB);