Google 地圖平台即將推出新版地圖樣式。新版地圖樣式內建全新的預設調色盤,並且提升地圖體驗、改善服務的可用性。所有地圖樣式都將於 2025 年 3 月自動更新。請參閱「
Google 地圖平台新版地圖樣式」一文,進一步瞭解適用範圍及如何提早啟用。
PolygonOptions
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
定義多邊形的選項。
開發人員指南
詳情請參閱「形狀」開發人員指南。
繼承常數摘要
來自介面
android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
繼承方法摘要
來自類別
java.lang.Object
布林值
|
equals(物件 arg0)
|
最終等級<?>
|
getClass()
|
int
|
hashCode()
|
最後
void
|
notify()
|
最後
void
|
notifyAll()
|
字串
|
toString()
|
最後
void
|
wait(long arg0, int arg1)
|
最後
void
|
wait(Long arg0)
|
最後
void
|
wait()
|
來自介面
android.os.Parcelable
抽象 int |
describeContents()
|
抽象
void
|
writeToParcel(Parcel arg0, int arg1)
|
公用方法
public
PolygonOptions
fillColor
(int color)
指定多邊形的填滿顏色,格式為 32 位元 ARGB。預設顏色為黑色 ( 0xff000000
)。
public
PolygonOptions
geodesic
(boolean geodesic)
指定是否要繪製這個多邊形的每個線段做為測地線。預設為 false
public
int
getFillColor
()
public
List<List<LatLng>>
getHoles
()
傳回
List<LatLng>
清單,用於指定多邊形的孔。
public
List<LatLng>
getPoints
()
public
int
getStrokeColor
()
public
int
getStrokeJointType
()
public
float
getStrokeWidth
()
public
float
getZIndex
()
public
boolean
isClickable
()
傳回
- 如果多邊形可點擊,則為
true
;如果不點擊,則為 false
。
公開布林值
isGeodesic
()
傳回
- 如果多邊形線段應為測地線,則為
true
;如果不能,則為 false
。
public
boolean
isVisible
()
傳回
true
表示可顯示的多邊形,如果無法顯示,則為 false
。
public
PolygonOptions
strokeColor
(int color)
指定多邊形的筆觸色彩,格式為 32 位元 ARGB。預設顏色為黑色 ( 0xff000000
)。
指定多邊形輪廓的筆觸模式。預設的筆劃圖案為實心,以 null
表示。
以螢幕像素為單位指定多邊形的筆觸寬度。預設寬度為 10。
public
PolygonOptions
visible
(boolean visible)
指定多邊形的顯示設定。預設的顯示設定為 true
。
指定多邊形的 zIndex,也就是繪製的順序。如要進一步瞭解 zIndex,請參閱這個類別頂端的說明文件。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-07-26 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]