memory<T extends Object> static method
Loads and displays polygons from memory data on a map.
The bytes parameter contains the polygon data as a Uint8List.
Example:
PowerGeoJSONPolygons.memory(
myGeojsonData,
polygonCulling: true,
)
Implementation
static Widget memory<T extends Object>(
Uint8List bytes, {
// layer
Key? key,
bool polygonCulling = false,
PolygonProperties<T>? polygonProperties,
Polygon<T> Function(
List<List<LatLng>> coordinates,
Map<String, dynamic>? map,
)?
builder,
MapController? mapController,
}) {
assert(
(builder == null && polygonProperties != null) ||
(polygonProperties == null && builder != null),
);
return EnhancedFutureBuilder<Widget>(
future: _memoryPolygons(
bytes,
builder: builder,
polygonProperties: polygonProperties,
key: key,
polygonCulling: polygonCulling,
mapController: mapController,
),
rememberFutureResult: true,
whenDone: (Widget snapshotData) => snapshotData,
whenNotDone: const Center(child: CupertinoActivityIndicator()),
);
}