- Point2D.Double map_latlng;
- map_latlng = latlng(new Point2D.Double(px_size/2, px_size/2));
-
- File pngfile = new File(AltosPreferences.logdir(),
- FileCoord(map_latlng, zoom));
- try {
- BufferedImage myPicture;
- myPicture = ImageIO.read(pngfile);
- setIcon(new ImageIcon( myPicture ));
- System.out.printf("# Found file %s\n", pngfile);
- g2d = myPicture.createGraphics();
- } catch (Exception e) {
- // throw new RuntimeException(e);
- System.out.printf("# Failed to find file %s\n", pngfile);
- System.out.printf(" wget -O '%s' 'http://maps.google.com/maps/api/staticmap?center=%.6f,%.6f&zoom=%d&size=%dx%d&sensor=false&maptype=hybrid&format=png32'\n", pngfile, map_latlng.x, map_latlng.y, zoom, px_size, px_size);
- }