use of org.activityinfo.server.report.generator.map.TiledMap in project activityinfo by bedatadriven.
the class ImageMapRenderer method drawBasemap.
protected void drawBasemap(MapReportElement element, TileHandler tileHandler) {
TiledMap map = createTileMap(element);
BaseMap baseMap = element.getContent().getBaseMap();
try {
if (baseMap instanceof TileBaseMap) {
drawTiledBaseMap(tileHandler, map, baseMap);
} else if (baseMap instanceof GoogleBaseMap) {
drawTiledBaseMap(tileHandler, map, MapboxLayers.toTileBaseMap(baseMap));
}
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Exception drawing basemap", e);
}
}
use of org.activityinfo.server.report.generator.map.TiledMap in project activityinfo by bedatadriven.
the class ImageMapRenderer method createTileMap.
protected TiledMap createTileMap(MapReportElement element) {
AiLatLng center = element.getCenter() != null ? element.getCenter() : element.getContent().getCenter();
TiledMap map = new TiledMap(element.getWidth(), element.getHeight(), center, element.getContent().getZoomLevel());
return map;
}
Aggregations