- try {
- SwingUtilities.invokeAndWait( new Runnable() {
- public void run() {
- AltosSiteMapTile tile = addTileAt(tileOffset(pt));
- setViewportView(comp);
-
- Point2D.Double ref, lref;
- ref = translatePoint(pt, tileCoordOffset(tile));
- lref = translatePoint(last_pt, tileCoordOffset(tile));
- tile.show(state, crc_errors, lref, ref);
-
- initMap(tile);
- }
- } );
- } catch (Exception e) {
- // pray
- }
+ final AltosSiteMapTile tile = new AltosSiteMapTile(px_size);
+ final Point offset = tileOffset(pt);
+ mapTiles.put(offset, tile);
+
+ Point2D.Double ref, lref;
+ ref = translatePoint(pt, tileCoordOffset(offset));
+ lref = translatePoint(last_pt, tileCoordOffset(offset));
+ tile.show(state, crc_errors, lref, ref);
+
+ initMap(tile, offset);
+
+ SwingUtilities.invokeLater( new Runnable() {
+ public void run() {
+ addTileAt(tile, offset);
+ setViewportView(comp);
+ }
+ } );