FeatureLayer.withFeatureTable constructor

FeatureLayer.withFeatureTable(
  1. FeatureTable featureTable
)

Creates a new feature layer from a given FeatureTable.

Any inherited FeatureTable type can be used as the input parameter for this constructor, except FeatureCollectionTable. To display features in a FeatureCollectionTable, use FeatureCollectionLayer.

Parameters:

  • featureTable — The feature table used as the data source of the feature layer.

Implementation

factory FeatureLayer.withFeatureTable(FeatureTable featureTable) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_FeatureLayer_createWithFeatureTable(
        featureTable._handle, errorHandler);
  });
  return Layer._instanceCache.instanceWith(handle);
}