HeatMapLayer class

表示使用不同色彩的資料密度, (HeatMap) 。

Extends

建構函式

HeatMapLayer(string | Source, string, HeatMapLayerOptions)

建構新的 HeatMapLayer.。

繼承的屬性

metadata

屬性,用於將自訂資料與圖層產生關聯。

方法

getOptions()

取得熱度圖圖層的選項。

getSource()

取得建立圖層時提供的來源。

setOptions(HeatMapLayerOptions)

設定熱度圖圖層的選項。

繼承的方法

getId()

取得圖層的識別碼

getMap()

取得圖層目前加入的地圖,或為 null。

onAdd(Map)

新增至地圖時呼叫之圖層的初始化方法。

onRemove()

從地圖中移除圖層時所呼叫的方法。 應該為圖層執行任何必要的清除。

建構函式詳細資料

HeatMapLayer(string | Source, string, HeatMapLayerOptions)

建構新的 HeatMapLayer.。

new HeatMapLayer(source: string | Source, id?: string, options?: HeatMapLayerOptions)

參數

source

string | Source

圖層將呈現之資料來源的識別碼或實例。

id

string

圖層的識別碼。 如果未指定,將會產生隨機的。

options
HeatMapLayerOptions

線條圖層的選項。

繼承的屬性詳細資料

metadata

屬性,用於將自訂資料與圖層產生關聯。

metadata?: any

屬性值

any

繼承自Layer.metadata

方法詳細資料

getOptions()

取得熱度圖圖層的選項。

function getOptions(): HeatMapLayerOptions

傳回

getSource()

取得建立圖層時提供的來源。

function getSource(): string | Source

傳回

string | Source

setOptions(HeatMapLayerOptions)

設定熱度圖圖層的選項。

function setOptions(options: HeatMapLayerOptions)

參數

繼承的方法的詳細資料

getId()

取得圖層的識別碼

function getId(): string

傳回

string

繼承自Layer.getId

getMap()

取得圖層目前加入的地圖,或為 null。

function getMap(): Map

傳回

Map

繼承自Layer.getMap

onAdd(Map)

新增至地圖時呼叫之圖層的初始化方法。

function onAdd(map: Map)

參數

map
Map

圖層已新增至的地圖。

繼承自Layer.onAdd

onRemove()

從地圖中移除圖層時所呼叫的方法。 應該為圖層執行任何必要的清除。

function onRemove()

繼承自Layer.onRemove