/** * Reads data for an area defined by the tile in the upper left and the tile in * the lower right corner. The default implementation combines the results from * all tiles, a possibly inefficient solution. * Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY * * @param upperLeft tile that defines the upper left corner of the requested area. * @param lowerRight tile that defines the lower right corner of the requested area. * @return map data for the tile. */ public MapReadResult readLabels(Tile upperLeft, Tile lowerRight) { if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) { new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile"); } MapReadResult result = new MapReadResult(); for (int x = upperLeft.tileX; x <= lowerRight.tileX; x++) { for (int y = upperLeft.tileY; y <= lowerRight.tileY; y++) { Tile current = new Tile(x, y, upperLeft.zoomLevel, upperLeft.tileSize); result.add(readLabels(current), false); } } return result; }
private MapReadResult readLabels(Tile tile, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(tile)) { MapReadResult result = mdb.readLabels(tile); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
private MapReadResult readMapData(Tile tile, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(tile)) { MapReadResult result = mdb.readMapData(tile); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
/** * Reads POI data for an area defined by the tile in the upper left and the tile in * the lower right corner. The default implementation combines the results from * all tiles, a possibly inefficient solution. * Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY * * @param upperLeft tile that defines the upper left corner of the requested area. * @param lowerRight tile that defines the lower right corner of the requested area. * @return map data for the tile. */ public MapReadResult readPoiData(Tile upperLeft, Tile lowerRight) { if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) { new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile"); } MapReadResult result = new MapReadResult(); for (int x = upperLeft.tileX; x <= lowerRight.tileX; x++) { for (int y = upperLeft.tileY; y <= lowerRight.tileY; y++) { Tile current = new Tile(x, y, upperLeft.zoomLevel, upperLeft.tileSize); result.add(readPoiData(current), false); } } return result; }
private MapReadResult readMapData(Tile upperLeft, Tile lowerRight, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(upperLeft)) { MapReadResult result = mdb.readMapData(upperLeft, lowerRight); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
private MapReadResult readPoiData(Tile upperLeft, Tile lowerRight, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(upperLeft)) { MapReadResult result = mdb.readPoiData(upperLeft, lowerRight); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
/** * Reads data for an area defined by the tile in the upper left and the tile in * the lower right corner. The default implementation combines the results from * all tiles, a possibly inefficient solution. * Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY * * @param upperLeft tile that defines the upper left corner of the requested area. * @param lowerRight tile that defines the lower right corner of the requested area. * @return map data for the tile. */ public MapReadResult readMapData(Tile upperLeft, Tile lowerRight) { if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) { new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile"); } MapReadResult result = new MapReadResult(); for (int x = upperLeft.tileX; x <= lowerRight.tileX; x++) { for (int y = upperLeft.tileY; y <= lowerRight.tileY; y++) { Tile current = new Tile(x, y, upperLeft.zoomLevel, upperLeft.tileSize); result.add(readMapData(current), false); } } return result; }
private MapReadResult readLabels(Tile upperLeft, Tile lowerRight, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(upperLeft)) { MapReadResult result = mdb.readLabels(upperLeft, lowerRight); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
private MapReadResult readPoiData(Tile tile, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(tile)) { MapReadResult result = mdb.readPoiData(tile); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
boolean queryReadWaterInfo = false; MapReadResult mapFileReadResult = new MapReadResult();
@Override public MapReadResult readMapData(final Tile tile) { // a dummy operation that puts a fake turning_circle into the middle of each tile. // this is just to not having to change the rendertheme MapReadResult result = new MapReadResult(); result.pointOfInterests = new ArrayList<>(); result.ways = new ArrayList<>(); Tag tag = new Tag("highway", "turning_circle"); List<Tag> tags = new ArrayList<>(); tags.add(tag); result.pointOfInterests.add(new PointOfInterest((byte) 5, tags, tile.getBoundingBox().getCenterPoint())); return result; }
@Override public MapReadResult readPoiData(final Tile tile) { // a dummy operation that puts a fake turning_circle into the middle of each tile. // this is just to not having to change the rendertheme MapReadResult result = new MapReadResult(); result.pointOfInterests = new ArrayList<>(); result.ways = new ArrayList<>(); Tag tag = new Tag("highway", "turning_circle"); List<Tag> tags = new ArrayList<>(); tags.add(tag); result.pointOfInterests.add(new PointOfInterest((byte) 5, tags, tile.getBoundingBox().getCenterPoint())); return result; }
private MapReadResult readLabels(Tile tile, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(tile)) { MapReadResult result = mdb.readLabels(tile); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
/** * Reads data for an area defined by the tile in the upper left and the tile in * the lower right corner. The default implementation combines the results from * all tiles, a possibly inefficient solution. * Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY * * @param upperLeft tile that defines the upper left corner of the requested area. * @param lowerRight tile that defines the lower right corner of the requested area. * @return map data for the tile. */ public MapReadResult readMapData(Tile upperLeft, Tile lowerRight) { if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) { new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile"); } MapReadResult result = new MapReadResult(); for (int x = upperLeft.tileX; x <= lowerRight.tileX; x++) { for (int y = upperLeft.tileY; y <= lowerRight.tileY; y++) { Tile current = new Tile(x, y, upperLeft.zoomLevel, upperLeft.tileSize); result.add(readMapData(current), false); } } return result; }
/** * Reads POI data for an area defined by the tile in the upper left and the tile in * the lower right corner. The default implementation combines the results from * all tiles, a possibly inefficient solution. * Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY * * @param upperLeft tile that defines the upper left corner of the requested area. * @param lowerRight tile that defines the lower right corner of the requested area. * @return map data for the tile. */ public MapReadResult readPoiData(Tile upperLeft, Tile lowerRight) { if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) { new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile"); } MapReadResult result = new MapReadResult(); for (int x = upperLeft.tileX; x <= lowerRight.tileX; x++) { for (int y = upperLeft.tileY; y <= lowerRight.tileY; y++) { Tile current = new Tile(x, y, upperLeft.zoomLevel, upperLeft.tileSize); result.add(readPoiData(current), false); } } return result; }
private MapReadResult readMapData(Tile tile, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(tile)) { MapReadResult result = mdb.readMapData(tile); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
private MapReadResult readLabels(Tile upperLeft, Tile lowerRight, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(upperLeft)) { MapReadResult result = mdb.readLabels(upperLeft, lowerRight); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
private MapReadResult readPoiData(Tile tile, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(tile)) { MapReadResult result = mdb.readPoiData(tile); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
private MapReadResult readPoiData(Tile upperLeft, Tile lowerRight, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(upperLeft)) { MapReadResult result = mdb.readPoiData(upperLeft, lowerRight); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }
private MapReadResult readMapData(Tile upperLeft, Tile lowerRight, boolean deduplicate) { MapReadResult mapReadResult = new MapReadResult(); for (MapDataStore mdb : mapDatabases) { if (mdb.supportsTile(upperLeft)) { MapReadResult result = mdb.readMapData(upperLeft, lowerRight); if (result == null) { continue; } boolean isWater = mapReadResult.isWater & result.isWater; mapReadResult.isWater = isWater; mapReadResult.add(result, deduplicate); } } return mapReadResult; }