string<T extends Object> static method
Loads and displays polygons from a string in GeoJSON format on a map.
The data parameter contains the polygon data in GeoJSON format.
Example:
PowerGeoJSONPolygons.string(
'{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[...]]}}',
mapController: myMapController,
)
Implementation
static PolygonLayer<T> string<T extends Object>(
String data, {
// layer
Key? key,
bool polygonCulling = false,
Polygon<T> Function(
List<List<LatLng>> coordinates,
Map<String, dynamic>? map,
)?
builder,
PolygonProperties<T>? polygonProperties,
MapController? mapController,
}) {
assert(
(builder == null && polygonProperties != null) ||
(polygonProperties == null && builder != null),
);
return _string(
data,
builder: builder,
polygonProperties: polygonProperties,
key: key,
polygonCulling: polygonCulling,
mapController: mapController,
);
}