google.maps.Polygon
類
構造函數 | |
---|---|
Polygon( | 創建一個多邊形 |
方法 | |
---|---|
getDraggable() | Return Value: 返回是否允許拖拽 |
getEditable() | Return Value: 返回是否允許編輯 |
getMap() | Return Value: 返回多邊形的Map對象 |
getPath() | Return Value: 返回多邊形的路徑 |
getPaths() | Return Value: 返回多邊形的所有路徑 |
getVisible() | Return Value: 返回多邊形的可見狀態 |
setDraggable( | Return Value: 設置是否允許拖動 |
setEditable( | Return Value: 設置是否允許編輯 |
setMap( | Return Value: 設置多邊形的Map對象,傳入null,表示將多邊形移除 |
setOptions( | Return Value: 設置多邊形的相關屬性 |
setPath( | Return Value: 設置多邊形的路徑 |
setPaths( | Return Value: 設置多個路徑 |
setVisible( | Return Value: 設置可見狀態 |
事件 | |
---|---|
click | Arguments: 當鼠標單擊多邊形時觸發 |
dblclick | Arguments: 當鼠標雙擊多邊形時觸發 |
drag | Arguments: 當鼠標拖動時反復觸發 |
dragend | Arguments: 當拖動結束后 |
dragstart | Arguments: 當拖動多邊形時觸發 |
mousedown | Arguments: 當鼠標在多邊形上按壓時觸發 |
mousemove | Arguments: 當鼠標在多邊形上移動時觸發 |
mouseout | Arguments: 當鼠標移出多邊形區域時觸發 |
mouseover | Arguments: 當鼠標在多邊形上移動時觸發 |
mouseup | Arguments: 當鼠標在多邊形上彈起時觸發 |
rightclick | Arguments: 當鼠標在多邊形右擊時觸發 |
google.maps.PolygonOptions
對象
屬性 | |
---|---|
clickable | Type: 是否允許單擊 |
draggable | Type: 是否允許拖動 |
editable | Type: 是否允許編輯 |
fillColor | Type: 填充顏色 |
fillOpacity | Type: 透明度,從0.0到1.0 |
geodesic | Type: 是否允許多邊形根據投影相應的就換 |
map | Type: 多邊形的Map對象 |
paths | Type: 多邊形的路徑 |
strokeColor | Type: 描邊顏色,支持所以 CSS3 顏色 |
strokeOpacity | Type: 描邊透明度 0.0到1.0 |
strokePosition | Type: String 描邊的位置,可用的值: google.maps.StrokePosition.INSIDE google.maps.StrokePosition.CENTER google.maps.StrokePosition.OUTSIDE IE8及更早瀏覽器不支持 |
strokeWeight | Type: 描邊的寬度 |
visible | Type: 是否可見 |
zIndex | Type: 多邊形的層級 |