<< Click to Display Table of Contents >>

SuperGIS Server JavaScript API

 

new sg.controls.Guage()

 

 

Description

量器控制項。以視覺化方式展現數值以及最大值之間的關係。

 

Position

controls.js

 

 

 

Parameters

 

Parameter

Type

Description

param

Object

控制項設定物件

set object

Name

Type

Description

maxDataValue

Number

最大值

dataField

String

資料欄位名稱

caption

String

說明文字

title

String

控制項標題

dataLabelField

String

資料標題欄位名稱

unitLabel

String

數值單位的文字

color

String

指示條顏色

node

DOMNODE

控制項節點

 

 

 

Methods

 

Method

Type

Description

setCaption(p)

String

設定說明文字

Name

Type

Description

p

String

說明文字

setFeature(p)

sg.Graphic

設定目標Graphic

Name

Type

Description

p

sg.Graphic

目標Graphic

setLabel(p)

String

設定資料標題

Name

Type

Description

p

String

資料標題

setTitle(p)

String

設定控制項標題

Name

Type

Description

p

String

控制項標題

setValue(p)

Number

設定數值

Name

Type

Description

p

String

數值

show()

none

顯示控制項

destroy()

none

移除控制項

startup()

none

初始化控制項

 

 

Example

 

 

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

 

var param = {

     layer: featureLayer,

     maxDataValue: 600,

     dataField: "value",

     unitLabel: "mm",

     title: "Precipitation station",

     caption: "Precipitation value",

     dataLabelField: "Name"

     };

var gaugeNode = document.getElementById("gaugeNode");

var gaugeControl = new sg.controls.Gauge(param, gaugeNode);

gaugeControl.startup();

 

 

 

See live example

 


©2015 Supergeo Technologies Inc.