WmtsLayer.withLayerInfo constructor
- WmtsLayerInfo layerInfo, {
- WmtsTileMatrixSet? tileMatrixSet,
- TileImageFormat preferredImageFormat = TileImageFormat.unknown,
Creates a WMTS layer from the WMTS layer information, tile matrix set Id and preferred image format.
Parameters:
layerInfo
— A WmtsLayerInfo.tileMatrixSet
— A WmtsTileMatrix.preferredImageFormat
— The preferred image format of the WMTS layer.
Implementation
factory WmtsLayer.withLayerInfo(
WmtsLayerInfo layerInfo, {
WmtsTileMatrixSet? tileMatrixSet,
TileImageFormat preferredImageFormat = TileImageFormat.unknown,
}) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_WMTSLayer_createWithWMTSLayerInfoCombined(
layerInfo._handle,
tileMatrixSet?._handle ?? ffi.nullptr,
preferredImageFormat.coreValue,
errorHandler,
);
});
final WmtsLayer object = Layer._instanceCache.instanceWith(handle);
object._tileMatrixSet.cache(tileMatrixSet);
return object;
}