<< Click to Display Table of Contents >>
new sg.Graphic(geometry, symbol, attributes, infoTemplate)
Description
新增一個graphic 物件,常與Symbol,Render一起使用
Position
Graphic.js
Parameters
Parameter |
Type |
Description |
attributes |
Object |
(optional)與圖形相關聯的欄位值。 |
geometry |
sg.geometry.Geometry |
(optional)圖形幾何定義。 |
infoTemplate |
sg.InfoTemplate |
(optional)InfoWindow 中的內容 |
symbol |
sg.symbols.Symbol |
(optional)圖形符號。 |
Properties
Properties |
Type |
Description |
attributes |
Object |
與圖形相關聯的欄位值。 |
geometry |
sg.geometry.Geometry |
圖形幾何定義。 |
layer |
sg.layers.GraphicsLayer |
Graphic所在的圖層。 |
symbol |
sg.symbols.Symbol |
圖形符號。 |
Methods
Methods |
Type |
Description |
||||||
getInfoTemplate() |
Returns: sg.InfoTemplate |
回傳圖形的資料模版。 Returns:
|
||||||
setInfoTemplate(p) |
sg.InfoTemplate |
設定圖形的資料模版。
|
||||||
setSymbol(symbol) |
sg.symbols.Symbol |
定義圖形符號。
|
||||||
setGeometry(geometry) |
sg.geometry |
定義Graphic的幾何資料。
|
||||||
draw() |
none |
繪製圖形。 |
||||||
getLayer() |
回傳包含圖形的圖層。 |
|||||||
hide() |
none |
隱藏圖形。 |
||||||
show() |
none |
顯示圖形。 |
Events
Event |
Description |
click |
單點擊 |
dbl-click |
雙點擊 |
drag-start |
拖曳開始 |
drag |
拖曳 |
drag-end |
拖曳結束 |
mouse-down |
滑鼠位於上方,並按下滑鼠鍵時 |
mouse-move |
滑鼠移動 |
mouse-out |
滑鼠離開 |
mouse-over |
滑鼠位於上方 |
mouse-up |
滑鼠位於上方,並放開滑鼠鍵時 |
Example
|
©2015 Supergeo Technologies Inc.