<< Click to Display Table of Contents >>

SuperGIS Server JavaScript API

 

new sg.layers.BingTiledLayer()

 

 

Description

新增 Bing Maps.

 

Position

BingTiledLayer.js

 

 

 

Parameters

 

Parameter

Type

Description

options

Object

設定圖磚圖層

set object

Name

Type

Description

key

String

Bing Maps key

 

 

Properties

 

Properties

Type

Description

TYPE_AERIAL_WITH_LABEL

String

aerial with label

TYPE_AERIAL

String

aerial

TYPE_ROAD

String

road

culture

String

地圖語系 (預設值為:zh-Hant)

mapType

String

地圖類型

maxScale

Number

可顯示的最大比例尺

minScale

Number

可顯示的最小比例尺

extent

sg.geometry.Extent

圖層範圍

loadError

Error

如果圖層載入失敗,此欄位有值

map

MapBase

圖層被加入的MapBase

name

String

圖層名稱

node

DOMNODE

圖層html節點

opacity

Number

透明度,範圍為0到1

0:透明

1:不透明

spatialReference

sg.SpatialReference

圖層坐標系統

tileInfo

sg.layers.TileInfo

圖磚資訊

title

String

圖層標題

visible

Boolean

圖層是否可見

True: 可見
False: 不可見

 

 

Methods

 

Methods

Type

Description

getMap()

Returns:

MapBase

取得圖層所屬的地圖控制項。

Returns:

Type

Description

MapBase

圖層所屬的地圖控制項。

getName()

Returns:

String

取得圖層名稱

Returns:

Type

Description

String

圖層名稱

getNode()

Returns:

DOMNODE

取得圖層html節點

Returns:

Type

Description

DOMNODE

圖層html節點

getTileUrl(s, x, y)

s:Number

x:Number

y;Number

Returns:String

取得指定層級索引圖磚的網址

Name

Type

Description

s

Number

圖磚層級

x

Number

圖磚的x索引

y

Number

圖磚的y索引

Returns:

Type

Description

String

圖磚網址

getTitle()

Returns:

String

取得圖層標題

Returns:

Type

Description

String

圖層標題

getVisible()

Returns:

Boolean

取得圖層可見度

Returns:

Type

Description

Boolean

圖層可見度

True: 可見
False: 不可見

Initialize()


圖層被加入MapBase時所呼叫的初始化方法

putName(newVal)

String

設定圖層名稱

Name

Type

Description

newVal

String

圖層名稱

putTitle(newVal)

String

設定圖層標題

Name

Type

Description

newVal

String

圖層標題

putVisible(newVal)

Boolean

設定圖層可見度

Name

Type

Description

newVal

Boolean

圖層可見度

True: 可見
False: 不可見

RebuildElement()


重繪圖層

RemoveSelf()


移除圖層

UpdateElement()


更新圖層

hide()


隱藏圖層

setMaxScale(maxScale)

Number

設定圖層可見的最大比例尺

Name

Type

Description

maxScale

Number

最大比例尺

setMinScale(minScale)

Number

設定圖層可見的最小比例尺

Name

Type

Description

minScale

Number

最小比例尺

setOpacity(opacity)

Number

設定圖層透明度

Name

Type

Description

opacity

Number

圖層透明度

0: 透明
1: 不透明

show()


顯示圖層

UpdateElement()


更新圖層

 

 

Events

 

Event

Description

load

當圖層讀取完成時觸發

 

 

Example

 

 

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

 

var bingKey = lyrs[i].getAttribute("Key");

var bingLayer = new sg.layers.BingTiledLayer({

    key: bingKey

});

 

 

 

See live example

 


©2015 Supergeo Technologies Inc.