百度地圖的熱力圖PHP類庫
(function(w){ // the heatmapFactory creates heatmap instances var heatmapFactory = (function(){ // store object constructor // a heatmap contains a store // the store has to know about the heatmap in order to trigger heatmap updates when datapoints get added var store = function store(hmap){ var _ = { // data is a two dimensional array // a datapoint gets saved as data[point-x-value][point-y-value] // the value at [point-x-value][point-y-value] is the occurrence of the datapoint data: [], // tight coupling of the heatmap object heatmap: hmap }; // the max occurrence - the heatmaps radial gradient alpha transition is based on it this.max = 1; this.get = function(key){ return _[key]; }; this.set = function(key, value){ _[key] = value; }; }
設定熱力圖展現的詳細資料, 實作之後,即可以立刻展現
#@param {Json Object } data
{"<b>max</b>" : {Number} 權重的最大值,
<br />"<b>data</b>" : {Array} 座標詳細資料,格式如下<br/>
{"lng":116.421969,"lat":39.913527,"count":3}, 其中<br/>
#lng lat分別為經緯度, count權重值
免責聲明
本站所有資源皆由網友貢獻或各大下載網站轉載。請自行檢查軟體的完整性!本站所有資源僅供學習參考。請不要將它們用於商業目的。否則,一切後果都由您負責!如有侵權,請聯絡我們刪除。聯絡方式:admin@php.cn
相關文章

24 Dec 2024
了解 Python 類別繼承在 Python 中,類別可以從其他類別繼承,這使它們能夠存取父類別的屬性並...

07 Dec 2024
在 NetBeans 中設定類別路徑在 NetBeans 中使用 Java 時,您可能需要調整類別路徑以包含其他程式庫或 JAR...

03 Jan 2025
了解欄位初始化問題在您的程式碼中,您有一個儲存庫類別 (DinnerRepository) 和一個服務類別 (Service),它使用...

21 Jul 2016
PHP5試用(二)。抽象類別 抽象類別不能被實例化。 抽象類別與其它類別一樣,允許定義變數及方法。 抽象類別同樣可以定義一個抽象的方法,抽象類別的方法不會被執

06 Dec 2024
SimpleDateFormat 的線程安全性問題儘管 Java 因其線程安全類別而聞名,但 SimpleDateFormat 類別是一個例外,它...


Hot Tools

熱門文章
丟失記錄:Bloom&Rage -Corey和Dylan的鎖組合
19 Feb 2025
手游攻略
Longvinter:完整的釣魚指南
21 Feb 2025
手游攻略
KCD 2:Zhelejov Marshes的地圖位置和解決方案
19 Feb 2025
手游攻略
Hello Kitty Island冒險:重新啟動機器人任務演練
16 Feb 2025
手游攻略
三角洲力量:如何找到鑰匙卡
16 Feb 2025
手游攻略