Polyline class
Draws a line through geographical locations on the map.
- Annotations
Constructors
-
Polyline({required PolylineId polylineId, bool consumeTapEvents = false, Color color = Colors.black, Cap endCap = Cap.buttCap, bool geodesic = false, JointType jointType = JointType.mitered, List<
LatLng> points = const <LatLng>[], List<PatternItem> patterns = const <PatternItem>[], Cap startCap = Cap.buttCap, bool visible = true, int width = 10, int zIndex = 0, VoidCallback? onTap}) -
Creates an immutable object representing a line drawn through geographical locations on the map.
const
Properties
- color → Color
-
Line segment color in ARGB format, the same format used by Color. The default value is black (0xff000000).
final
- consumeTapEvents → bool
-
True if the Polyline consumes tap events.
final
- endCap → Cap
-
The cap at the end vertex of the polyline.
final
- geodesic → bool
-
Indicates whether the segments of the polyline should be drawn as geodesics, as opposed to straight lines
on the Mercator projection.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- jointType → JointType
-
Joint type of the polyline line segments.
final
- mapsId → PolylineId
-
A identifier for this object.
no setter
- onTap → VoidCallback?
-
Callbacks to receive tap events for polyline placed on this map.
final
-
patterns
→ List<
PatternItem> -
The stroke pattern for the polyline.
final
-
points
→ List<
LatLng> -
The vertices of the polyline to be drawn.
final
- polylineId → PolylineId
-
Uniquely identifies a Polyline.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startCap → Cap
-
The cap at the start vertex of the polyline.
final
- visible → bool
-
True if the marker is visible.
final
- width → int
-
Width of the polyline, used to define the width of the line segment to be drawn.
final
- zIndex → int
-
The z-index of the polyline, used to determine relative drawing order of
map overlays.
final
Methods
-
clone(
) → Polyline - Creates a new Polyline object whose values are the same as this instance.
-
copyWith(
{Color? colorParam, bool? consumeTapEventsParam, Cap? endCapParam, bool? geodesicParam, JointType? jointTypeParam, List< PatternItem> ? patternsParam, List<LatLng> ? pointsParam, Cap? startCapParam, bool? visibleParam, int? widthParam, int? zIndexParam, VoidCallback? onTapParam}) → Polyline - Creates a new Polyline object whose values are the same as this instance, unless overwritten by the specified parameters.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object - Converts this object to something serializable in JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override