FeatureCollectionLayer.withFeatureCollection constructor
- FeatureCollection featureCollection
Creates a new feature collection layer object.
Parameters:
featureCollection
— The feature collection to initialize this layer with.
Implementation
factory FeatureCollectionLayer.withFeatureCollection(
FeatureCollection featureCollection) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_FeatureCollectionLayer_createWithFeatureCollection(
featureCollection._handle, errorHandler);
});
final FeatureCollectionLayer object =
Layer._instanceCache.instanceWith(handle);
object._featureCollection.cache(featureCollection);
return object;
}