memory<T extends Object> static method
- Uint8List bytes, {
- required FeatureCollectionProperties<
T> featureCollectionLayerProperties, - MapController? mapController,
- Key? key,
- bool polygonCulling = false,
- required Widget builder(
- FeatureCollectionProperties<
T> featureCollectionProperties, - Map<
String, dynamic> ? map
- FeatureCollectionProperties<
- PowerMarkerClusterOptions? powerClusterOptions,
Loads and displays GeoJSON feature collections from memory as a Widget.
bytes: The GeoJSON data as a Uint8List.featureCollectionProperties: Properties to customize the appearance of the feature collections.mapController: An optional MapController for controlling the map view.key: An optional Key for identifying the returned Widget.polylineCulling: A boolean indicating whether polyline culling is enabled (default is false).polygonCulling: A boolean indicating whether polygon culling is enabled (default is false).builder: A function that takes thefeatureCollectionPropertiesand a map of feature properties and returns a Widget to render the features.
Returns a Widget displaying the GeoJSON feature collections from memory.
Implementation
static Widget memory<T extends Object>(
Uint8List bytes, {
required FeatureCollectionProperties<T> featureCollectionLayerProperties,
MapController? mapController,
Key? key,
bool polygonCulling = false,
required Widget Function(
FeatureCollectionProperties<T> featureCollectionProperties,
Map<String, dynamic>? map,
)
builder,
PowerMarkerClusterOptions? powerClusterOptions,
}) {
return EnhancedFutureBuilder<Widget>(
future: _memoryFeatureCollections(
bytes,
powerClusterOptions: powerClusterOptions,
featureCollectionLayerProperties: featureCollectionLayerProperties,
mapController: mapController,
polygonCulling: polygonCulling,
builder: builder,
key: key,
),
rememberFutureResult: true,
whenDone: (Widget child) => child,
whenNotDone: const Center(child: CupertinoActivityIndicator()),
);
}