org.mapfish.print.map.tiled.wms.TiledWmsLayerParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of print-lib Show documentation
Show all versions of print-lib Show documentation
Library for generating PDFs and images from online webmapping services
package org.mapfish.print.map.tiled.wms;
import com.vividsolutions.jts.util.Assert;
import org.mapfish.print.map.image.wms.WmsLayerParam;
import java.awt.Dimension;
import java.net.URISyntaxException;
/**
* The parameters for configuration a Tiled WMS layer.
*
* What is meant by a "tiled wms layer" is a layer based on a WMS layer but instead of a single large image
* for the layer multiple wms requests are made and the resulting images are combined as tiles.
*
*/
public final class TiledWmsLayerParam extends WmsLayerParam {
/**
* A two element array of integers indicating the x and y size of each tile.
*/
public int[] tileSize;
@Override
public void postConstruct() throws URISyntaxException {
super.postConstruct();
Assert.isTrue(this.tileSize.length == 2,
"The tileSize parameter must have exactly two elements, x,y tile size. " +
"Actual number of elements was: " + this.tileSize.length);
}
public Dimension getTileSize() {
return new Dimension(this.tileSize[0], this.tileSize[1]);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy