+ if (!in_any) {
+ AltosSiteMapTile tile = addTileAt(tileOffset(pt));
+ Point2D.Double ref, lref;
+ ref = translatePoint(pt, tileCoordOffset(tile));
+ lref = translatePoint(last_pt, tileCoordOffset(tile));
+ initMap(tile);
+ setViewportView(comp);
+ tile.show(state, crc_errors, lref, ref);
+ }
+ last_pt = pt;
+ last_state = state.state;
+ }
+
+ private AltosSiteMapTile addTileAt(Point offset) {
+ GridBagConstraints c = new GridBagConstraints();
+ c.anchor = GridBagConstraints.CENTER;
+ c.fill = GridBagConstraints.BOTH;
+
+ // put some space between the map tiles, debugging only
+ // c.insets = new Insets(5, 5, 5, 5);
+ //
+ AltosSiteMapTile t = new AltosSiteMapTile(px_size);
+ mapTiles.add(t);
+ c.gridx = offset.x + 100;
+ c.gridy = offset.y + 100;
+ layout.setConstraints(t, c);
+ comp.add(t);
+
+ return t;