本文整理汇总了Java中org.geomajas.configuration.RasterLayerInfo.getTileHeight方法的典型用法代码示例。如果您正苦于以下问题:Java RasterLayerInfo.getTileHeight方法的具体用法?Java RasterLayerInfo.getTileHeight怎么用?Java RasterLayerInfo.getTileHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.geomajas.configuration.RasterLayerInfo
的用法示例。
在下文中一共展示了RasterLayerInfo.getTileHeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TileServiceState
import org.geomajas.configuration.RasterLayerInfo; //导入方法依赖的package包/类
public TileServiceState(GeoService geoService, RasterLayerInfo layerInfo) {
try {
crs = geoService.getCrs2(layerInfo.getCrs());
} catch (LayerException e) {
throw new IllegalStateException(e);
}
maxBounds = new Envelope(layerInfo.getMaxExtent().getX(), layerInfo.getMaxExtent().getMaxX(), layerInfo
.getMaxExtent().getY(), layerInfo.getMaxExtent().getMaxY());
resolutions = new ArrayList<Double>();
if (layerInfo.getZoomLevels() != null) {
for (ScaleInfo scale : layerInfo.getZoomLevels()) {
resolutions.add(1. / scale.getPixelPerUnit());
}
// Sort in decreasing order !!!
Collections.sort(resolutions);
Collections.reverse(resolutions);
}
tileWidth = layerInfo.getTileWidth();
tileHeight = layerInfo.getTileHeight();
}
示例2: postProcess
import org.geomajas.configuration.RasterLayerInfo; //导入方法依赖的package包/类
private void postProcess(RasterLayer layer) throws LayerException {
RasterLayerInfo info = layer.getLayerInfo();
for (ScaleInfo scale : info.getZoomLevels()) {
// for raster layers we don't accept x:y notation !
if (scale.isPixelPerUnitBased()) {
throw new LayerException(ExceptionCode.CONVERSION_PROBLEM, "Raster layer " + layer.getId()
+ " has zoom level " + scale.getNumerator() + ":" + scale.getDenominator()
+ " in disallowed x:y notation");
}
// add the resolution for deprecated api support
info.getResolutions().add(1. / scale.getPixelPerUnit());
}
if (0 == info.getTileWidth()) {
throw new LayerException(ExceptionCode.LAYER_CONFIGURATION_PROBLEM, layer.getId(),
"tileWidth should not be zero.");
}
if (0 == info.getTileHeight()) {
throw new LayerException(ExceptionCode.LAYER_CONFIGURATION_PROBLEM, layer.getId(),
"tileHeight should not be zero.");
}
}