Changeset 9180 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2015-12-27T16:37:14+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r9176 r9180 170 170 * @throws IllegalArgumentException when Imagery is not supported by layer 171 171 */ 172 protected abstract AbstractTMSTileSource getTileSource(ImageryInfo info) throws IllegalArgumentException;172 protected abstract AbstractTMSTileSource getTileSource(ImageryInfo info); 173 173 174 174 protected Map<String, String> getHeaders(TileSource tileSource) { … … 266 266 /** 267 267 * Returns average number of screen pixels per tile pixel for current mapview 268 * @param zoom zoom level 269 * @return average number of screen pixels per tile pixel 268 270 */ 269 271 private double getScaleFactor(int zoom) { … … 874 876 } 875 877 876 /* 877 * This can and will return null for tiles that are not 878 * already in the cache. 878 /** 879 * Returns tile at given position. 880 * This can and will return null for tiles that are not already in the cache. 881 * @param x tile number on the x axis of the tile to be retrieved 882 * @param y tile number on the y axis of the tile to be retrieved 883 * @param zoom zoom level of the tile to be retrieved 884 * @return tile at given position 879 885 */ 880 886 private Tile getTile(int x, int y, int zoom) { 881 if (x < tileSource.getTileXMin(zoom) || x > tileSource.getTileXMax(zoom) || y < tileSource.getTileYMin(zoom) || y > tileSource.getTileYMax(zoom)) 887 if (x < tileSource.getTileXMin(zoom) || x > tileSource.getTileXMax(zoom) 888 || y < tileSource.getTileYMin(zoom) || y > tileSource.getTileYMax(zoom)) 882 889 return null; 883 890 return tileCache.getTile(tileSource, x, y, zoom); … … 1166 1173 /** 1167 1174 * Create a TileSet by EastNorth bbox taking a layer shift in account 1175 * @param topLeft top-left lat/lon 1176 * @param botRight bottom-right lat/lon 1177 * @param zoom zoom level 1168 1178 */ 1169 1179 private TileSet(EastNorth topLeft, EastNorth botRight, int zoom) { … … 1173 1183 /** 1174 1184 * Create a TileSet by known LatLon bbox without layer shift correction 1185 * @param topLeft top-left lat/lon 1186 * @param botRight bottom-right lat/lon 1187 * @param zoom zoom level 1175 1188 */ 1176 1189 private TileSet(LatLon topLeft, LatLon botRight, int zoom) { … … 1543 1556 1544 1557 /** 1545 * This isn't very efficient, but it is only used when the 1546 * user right-clicks on the map. 1558 * Returns tile for a pixel position.<p> 1559 * This isn't very efficient, but it is only used when the user right-clicks on the map. 1560 * @param px pixel X coordinate 1561 * @param py pixel Y coordinate 1562 * @return Tile at pixel position 1547 1563 */ 1548 1564 private Tile getTileForPixelpos(int px, int py) { … … 1576 1592 if (clickedTile == null) 1577 1593 return null; 1578 /*Main.debug("Clicked on tile: " + clickedTile.getXtile() + " " + clickedTile.getYtile() + 1579 " currentZoomLevel: " + currentZoomLevel);*/ 1594 if (Main.isTraceEnabled()) { 1595 Main.trace("Clicked on tile: " + clickedTile.getXtile() + " " + clickedTile.getYtile() + 1596 " currentZoomLevel: " + currentZoomLevel); 1597 } 1580 1598 return clickedTile; 1581 1599 }
Note:
See TracChangeset
for help on using the changeset viewer.