WmsLayer.withLayerInfos constructor
- List<
WmsLayerInfo> layerInfos
Creates a WmsLayer from the specified WmsLayerInfo objects.
Parameters:
layerInfos
— A collection of WmsLayerInfo objects.
Implementation
factory WmsLayer.withLayerInfos(
List<WmsLayerInfo> layerInfos,
) {
_initializeArcGISEnvironmentIfNeeded();
final coreLayerInfos = layerInfos.toMutableArray(
valueType: _ElementType.wmsLayerInfo,
);
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_WMSLayer_createWithLayerInfos(
coreLayerInfos._handle,
errorHandler,
);
});
final WmsLayer object = Layer._instanceCache.instanceWith(handle);
object._layerInfos.value.setCache(layerInfos);
return object;
}