org.mapfish.print.map.tiled.wmts.WmtsLayerParserPlugin 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.wmts;
import com.codahale.metrics.MetricRegistry;
import org.geotools.coverage.grid.GridCoverage2D;
import org.mapfish.print.config.Template;
import org.mapfish.print.map.MapLayerFactoryPlugin;
import org.mapfish.print.map.geotools.AbstractGridCoverageLayerPlugin;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ForkJoinPool;
import javax.annotation.Nonnull;
/**
* Renders WMTS layers.
* Type: wmts
* [[examples=printwmts_tyger_ny_EPSG_3857]]
*/
public final class WmtsLayerParserPlugin extends AbstractGridCoverageLayerPlugin
implements MapLayerFactoryPlugin {
private static final Set TYPENAMES = Collections.singleton("wmts");
@Autowired
private ForkJoinPool forkJoinPool;
@Autowired
private MetricRegistry registry;
@Override
public Set getTypeNames() {
return TYPENAMES;
}
@Override
public WMTSLayerParam createParameter() {
return new WMTSLayerParam();
}
@Nonnull
@Override
public WMTSLayer parse(
@Nonnull final Template template,
@Nonnull final WMTSLayerParam param) {
String styleRef = param.rasterStyle;
return new WMTSLayer(this.forkJoinPool,
super.createStyleSupplier(template, styleRef),
param, this.registry, template.getConfiguration());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy