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