Polyline class

线相关的覆盖物类,内部的属性,描述了覆盖物的纹理、颜色、线宽等特征

Inheritance

Constructors

Polyline({required List<LatLng> points, double width = 10, bool visible = true, bool geodesic = false, double alpha = 1.0, DashLineType dashLineType = DashLineType.none, CapType capType = CapType.butt, JoinType joinType = JoinType.bevel, BitmapDescriptor? customTexture, ArgumentCallback<String>? onTap, Color color = const Color(0xCCC4E0F0)})
默认构造函数

Properties

alpha double
透明度
final
capType CapType
线头类型
final
color Color
覆盖物颜色,默认值为(0xCCC4E0F0).
final
customTexture BitmapDescriptor?
自定义纹理图片,注意: 如果设置了自定义纹理图片,则color的设置将无效;
final
dashLineType DashLineType
虚线类型
final
geodesic bool
是否为大地曲线
final
hashCode int
The hash code for this object.
no setteroverride
id String
no setterinherited
joinType JoinType
连接点类型
final
onTap → ArgumentCallback<String>?
点击回调(回调参数为id)
final
points List<LatLng>
覆盖物的坐标点数组,points不能为空
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
visible bool
是否可见
final
width double
线宽,单位为逻辑像素,同Android中的dp,iOS中的point
final

Methods

clone() Polyline
override
copyWith({List<LatLng>? pointsParam, double? widthParam, int? zIndexParam, bool? visibleParam, double? alphaParam, DashLineType? dashLineTypeParam, CapType? capTypeParam, JoinType? joinTypeParam, BitmapDescriptor? customTextureParam, ArgumentCallback<String>? onTapParam, Color? colorParam}) Polyline
实际copy函数
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setIdForCopy(String copyId) → void
inherited
toMap() Map<String, dynamic>
将对象转换为可序列化的map.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override