<< Click to Display Table of Contents >>

SuperGIS Server JavaScript API

 

new sg.InfoWindow(params, parent)

 

 

Description

建立一個InfoWindow。

 

Position

InfoWindow.js

 

 

Parameters

 

Parameter

Type

Description

params

Object

訊息視窗設定

parent

Object

父節點

 

 

Properties

 

Properties

Type

Description

domNode

DOMNODE

用以建立InfoWindow 的DOM 節點。

isShowing

Boolean

用來決定InfoWindow 是否要顯視的布林值。

True:可見
False:不可見

 

 

Methods

 

Methods

Type

Description

move(point)

sg.geometry.Point

將infoWindow 移動到指定的螢幕坐標。

Name

Type

Description

point

sg.geometry.Point

指定的螢幕位置

setMap(map)

MapBase

此方法將會在物件被設定為地圖的infoWindow 時被呼叫。

Name

Type

Description

map

MapBase


setTitle(title)

String

定義infoWindow 的標題。

Name

Type

Description

title

String

infoWindow 的標題

setContent(content)

String

定義infoWindow 的內容,支援HTML語法

Name

Type

Description

content

String

infoWindow 的內容

show(location)

sg.geometry.Point

在一指定的位置顯示infoWindow。

Name

Type

Description

location

sg.geometry.Point

指定的位置

hide()


隱藏 infoWindow.

resize(width, height)

width:Number

height:Number

指定寬度與高度來重新調整 infoWindow。

Name

Type

Description

width

Number

寬度

height

Number

高度

unsetMap()


將InfoWindow從當前地圖中移除

update()


更新infoWindow

 

 

Events

 

Event

Description

hide

當infoWindow被關閉時呼叫

show

當infoWindow被開啟時呼叫

 

 

See live example

 

 

 


©2015 Supergeo Technologies Inc.