WmsLayer.withLayerInfos constructor

WmsLayer.withLayerInfos(
  1. List<WmsLayerInfo> layerInfos
)

Creates a WmsLayer from the specified WmsLayerInfo objects.

Parameters:

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;
}