google.maps.Marker
類
構造函數 | |
---|---|
Marker( | 當地圖加載完成后,創建一個標注 |
方法 | |
---|---|
getAnimation() | Return Value: 返回動畫類型 |
getClickable() | Return Value: 返回是否允許單擊 |
getCursor() | Return Value: 返回鼠標樣式 |
getDraggable() | Return Value: 返回是否允許拖拽 |
getIcon() | Return Value: 返回當前的圖標 |
getLabel() | Return Value: 返回當前的文本標注 |
getMap() | Return Value: 返回Map對象 |
getOpacity() | Return Value: 返回透明度 |
getPosition() | Return Value: 返回位置 |
getTitle() | Return Value: 返回標題 |
getVisible() | Return Value: 返回是否可見 |
getZIndex() | Return Value: 返回層級 |
setAnimation( | Return Value: 設置當前的動畫 可用值: google.maps.Animation.BOUNCE google.maps.Animation.DROP 設置 null 停止動畫 |
setClickable( | Return Value: 是否允許單擊 |
setCursor( | Return Value: 設置鼠標樣式 |
setDraggable( | Return Value: 設置是否拖拽 |
setIcon( | Return Value: 設置圖標 |
setLabel( | Return Value: 設置文本標注 |
setMap( | Return Value: 設置標注顯示的地圖 |
setOpacity( | Return Value: 設置透明度 |
setOptions( | Return Value: 設置標注的選項 |
setPosition( | Return Value: 設置標注位置 |
setTitle( | Return Value: 設置標注標題 |
setVisible( | Return Value: 設置是否可見 |
setZIndex( | Return Value: 設置標注級別 |
事件 | |
---|---|
animation_changed | Arguments: 當動畫改變時觸發 |
click | Arguments: 當單擊鼠標單擊時觸發 |
clickable_changed | Arguments: 當單擊狀態改變時觸發 |
cursor_changed | Arguments: 當鼠標樣式改變觸發 |
dblclick | Arguments: 當鼠標雙擊時觸發 |
drag | Arguments: 當拖動時反復觸發 |
dragend | Arguments: 當拖動結束時觸發 |
draggable_changed | Arguments: 當拖動的狀態改變時觸發 |
dragstart | Arguments: 當拖動開始時觸發 |
icon_changed | Arguments: 當圖標更新時觸發 |
mousedown | Arguments: 當鼠標按壓時觸發 |
mouseout | Arguments: 當鼠標移出時觸發 |
mouseover | Arguments: 當鼠標移動時觸發 |
mouseup | Arguments: 當鼠標放開時觸發 |
position_changed | Arguments: 當位置改變時觸發 |
rightclick | Arguments: 當鼠標右擊時觸發 |
title_changed | Arguments: 當標注標題更新時觸發 |
visible_changed | Arguments: 當可見狀態改變時觸發 |
zindex_changed | Arguments: 當層級改變時觸發 |
google.maps.MarkerOptions
類
屬性 | |
---|---|
anchorPoint | Type: 標注的原點坐標 |
animation | Type: 標注的動畫數據 |
clickable | Type: 是否接收鼠標單擊事件 |
crossOnDrag | Type: 是否允許鼠標移動過程時拖動 |
cursor | Type: 標注的鼠標樣式 |
draggable | Type: 是否允許拖拽 |
icon | Type: 標注的圖標 |
label | Type: 標注的文本標注 |
map | Type: Map 標注的存放地圖對象 |
opacity | Type: 透明度 0到1 |
optimized | Type: 是:將所有的標注一直渲染(默認) 否:標注將單獨渲染,當圖標是GIF或PNG格式時,可設置為false |
position | Type: 標注的位置 必須 |
title | Type: 標注的標題,當鼠標在標注上時顯示 |
visible | Type: 是否可見 |
zIndex | Type: 設置標注的層級,所有的標注都以層級的關鍵進行上下層級顯示 |
google.maps.Icon
對象
屬性 | |
---|---|
anchor | Type: |
labelOrigin | Type: 標注的文本標注的位置,默認在標注的中央 |
origin | Type: 圖標的原點 |
scaledSize | Type: number 放大比例 |
size | Type: 圖標的大小 |
url | Type: The URL of the image or sprite sheet. |
google.maps.MarkerLabel
類
屬性 | |
---|---|
color | Type: 顏色,默認黑色 |
fontFamily | Type: 字體名稱 |
fontSize | Type: 字體大小,默認14px |
fontWeight | Type: 使用 CSS font-weight 屬性 |
text | Type: 顯示的文本 |