string<T extends Object> static method
- String data, {
- PolylineProperties<
T> ? polylineProperties, - Polyline<
T> builder()?, - MapController? mapController,
- Key? key,
Displays polylines from GeoJSON data provided as a string on a map.
The PowerGeoJSONPolylines.string method takes GeoJSON data as a string
provided in the data parameter and displays the polylines on a map.
You can customize the rendering of the polylines using polylineProperties and builder.
Example usage:
PowerGeoJSONPolylines.string(
'{ "type": "FeatureCollection", ... }',
polylineProperties: PolylineProperties(
color: Colors.blue,
width: 3.0,
),
mapController: myMapController,
);
The polylineCulling parameter allows you to enable or disable culling of
polylines that are outside the map's viewport, improving performance.
Returns a widget displaying the loaded polylines on the map.
Implementation
static Widget string<T extends Object>(
String data, {
PolylineProperties<T>? polylineProperties,
Polyline<T> Function(List<LatLng> points, Map<String, Object?>? map)?
builder,
MapController? mapController,
Key? key,
}) {
return _string(
data,
polylineProperties: polylineProperties ?? PolylineProperties<T>(),
builder: builder,
key: key,
mapController: mapController,
);
}