FeatureCollectionTable.withGeoElements constructor
- required List<
GeoElement> geoElements, - required List<
Field> fields,
Creates a FeatureCollectionTable populated from the specified GeoElement collection.
The geometry type and spatial reference will be inferred from the geo-elements passed in. Note that this constructor may take some time to complete depending on how many geo-elements are passed in.
Parameters:
Implementation
factory FeatureCollectionTable.withGeoElements({
required List<GeoElement> geoElements,
required List<Field> fields,
}) {
_initializeArcGISEnvironmentIfNeeded();
final coreGeoElements = geoElements.toMutableArray(
valueType: _ElementType.variant,
);
final coreFields = fields.toMutableArray(
valueType: _ElementType.field,
);
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_FeatureCollectionTable_createWithGeoElements(
coreGeoElements._handle,
coreFields._handle,
errorHandler,
);
});
final FeatureCollectionTable object =
FeatureTable._instanceCache.instanceWith(handle);
object._fields.value.setCache(fields);
return object;
}