PolylineOptions
定义多段线的选项。
开发者指南
如需了解详情,请阅读形状开发者指南。
继承的常量摘要
继承自 android.os.Parcelable 接口
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
继承的方法摘要
继承自 java.lang.Object 类
布尔值
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
整型
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
字符串
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
继承自 android.os.Parcelable 接口
abstract
int
|
describeContents()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
公共构造函数
public
PolylineOptions
()
公共方法
将多段线的颜色设为 32 位 ARGB 颜色。默认颜色为黑色 ( 0xff000000
)。
public PolylineOptions
geodesic
(boolean geodesic)
指定是否将此多段线的各个线段绘制为测地线。默认设置为 false
。
public
int
getJointType
()
public
List<LatLng>
getPoints
()
public
Cap
getStartCap
()
public
boolean
isClickable
()
返回
- 如果多段线可点击,则为
true
;如果多段线不可点击,则为 false
。
public
boolean
isGeodesic
()
返回
- 如果多段线线段应为测地线段,则为
true
;false
部位不应为测地线段。
public
boolean
isVisible
()
返回
- 如果多段线可见,则为
true
;如果不可见,则为 false
。
设置多段线的描边图案。默认描边图案是纯色,由 null
表示。
设置多段线的宽度(以像素为单位)。默认值为 10。
指定多段线的 zIndex,即绘制顺序。如需详细了解 zIndex,请参阅此类顶部的文档。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-05-13。
[null,null,["最后更新时间 (UTC):2025-05-13。"],[[["`PolylineOptions` defines properties like color, width, and visibility for polylines on a map."],["You can customize the appearance of polylines with caps, joints, patterns, and geodesic settings."],["`PolylineOptions` allows adding vertices individually or as a collection to build the polyline's path."],["Control the polyline's interactivity by setting it as clickable or not."],["Manage the drawing order of the polyline by specifying its zIndex."]]],["`PolylineOptions` defines configurations for a polyline. Key actions include adding vertices using `add` or `addAll` with `LatLng` objects, and adding styles with `addSpan` or `addAllSpans` with `StyleSpan` objects. You can set the polyline's `color`, `width`, `geodesic` property, `clickable` status, `visible` property, `endCap`, `startCap`, `jointType`, `pattern` and `zIndex`. Methods exist to get these attributes.\n"]]