Issue #2300 Fixed NPE in TileSetRenderable with ConcurrentHashMap
Change-Id: I9d92e330c66364b2eb904d5858eb6d8a4a75a542 Former-commit-id:dc6ed0a61e
[formerly 34f9fdb02b82dd27d8f266bcd78291ebd9586bb5] Former-commit-id:6eedb5e26d
This commit is contained in:
parent
a7a4f9d60e
commit
7175092cb9
1 changed files with 9 additions and 6 deletions
|
@ -446,12 +446,15 @@ public class TileSetRenderable implements IRenderable {
|
|||
TileLevel level = tileSet.getTileLevel(lastPaintedLevel);
|
||||
double[] grid = level.crsToGrid(localX, localY);
|
||||
Tile tile = level.getTile(grid[0], grid[1]);
|
||||
DrawableImage di = imageMap.get(tile);
|
||||
if (di != null) {
|
||||
IImage image = di.getImage();
|
||||
if (image instanceof IColormappedImage) {
|
||||
return ((IColormappedImage) image).getValue((int) grid[0]
|
||||
% tileSize, (int) grid[1] % tileSize);
|
||||
if (tile != null) {
|
||||
DrawableImage di = imageMap.get(tile);
|
||||
if (di != null) {
|
||||
IImage image = di.getImage();
|
||||
if (image instanceof IColormappedImage) {
|
||||
return ((IColormappedImage) image).getValue(
|
||||
(int) grid[0] % tileSize, (int) grid[1]
|
||||
% tileSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (TransformException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue