<< Click to Display Table of Contents >>

SuperGIS Server JavaScript API

 

new sg.InfoTemplate(title, content)

 

 

Description

建立一個InfoTemplete 物件

 

Position

InfoWindow.js

 

 

Parameters

 

Parameter

Type

Description

title

String

視窗標題

content

String

訊息內容

 

 

Methods

 

Methods

Type

Description

setContent(content)

String

設定訊息內容

Name

Type

Description

content

String

訊息內容

setTitle(content)

String

設定視窗標題

Name

Type

Description

content

String

視窗標題

 

 

Example

 

 

<link rel="stylesheet" type="text/css" href="css/InfoWindow.css" />

<script type="text/javascript" src="scripts/Infowindow.js"></script>

                         

 

polygonLayer = new sg.layers.FeatureLayer("agent.aspx", {

      name: "world"});

 

var tmplate = new sg.InfoTemplate("${NAME}", "${*}");

polygonLayer.setInfoTemplate(template);

 

 

 

See live example

 

 

 


©2015 Supergeo Technologies Inc.