diff --git src/org/openstreetmap/gui/jmapviewer/JMapViewer.java src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
index 9ae171e..2e7d375 100644
|
|
|
public class JMapViewer extends JPanel implements TileLoaderListener {
|
| 584 | 584 | tile = tileController.getTile(tilex, tiley, zoom); |
| 585 | 585 | } |
| 586 | 586 | if (tile != null) { |
| 587 | | tile.paint(g, posx, posy); |
| | 587 | tile.paint(g, posx, posy, tilesize, tilesize); |
| 588 | 588 | if (tileGridVisible) { |
| 589 | 589 | g.drawRect(posx, posy, tilesize, tilesize); |
| 590 | 590 | } |
diff --git src/org/openstreetmap/gui/jmapviewer/Tile.java src/org/openstreetmap/gui/jmapviewer/Tile.java
index bfd1eaa..0021bdb 100644
|
|
|
public class Tile {
|
| 219 | 219 | g.drawImage(image, x, y, null); |
| 220 | 220 | } |
| 221 | 221 | |
| | 222 | /** |
| | 223 | * Paints the tile-image on the {@link Graphics} <code>g</code> at the |
| | 224 | * position <code>x</code>/<code>y</code>. |
| | 225 | * |
| | 226 | * @param g the Graphics object |
| | 227 | * @param x x-coordinate in <code>g</code> |
| | 228 | * @param y y-coordinate in <code>g</code> |
| | 229 | * @param width width that tile should have |
| | 230 | * @param height height that tile should have |
| | 231 | */ |
| | 232 | public void paint(Graphics g, int x, int y, int width, int height) { |
| | 233 | if (image == null) |
| | 234 | return; |
| | 235 | g.drawImage(image, x, y, width, height, null); |
| | 236 | } |
| | 237 | |
| | 238 | |
| 222 | 239 | @Override |
| 223 | 240 | public String toString() { |
| 224 | 241 | return "Tile " + key; |