(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; }; }
Set the detailed data displayed by the heat map. After implementation, it can be displayed immediately
@param {Json Object} data
{"<b>max</b>" : {Number} Maximum value of weight,
<br />"<b>data</b>" : {Array} Coordinate detailed data, the format is as follows<br/>
{"lng":116.421969,"lat":39.913527,"count":3}, where<br/>
lng lat is the longitude and latitude respectively, count weight value
Add detailed coordinate points of the power map
@param {Number} lng longitude coordinate
@param {Number} lat longitude coordinate
@param {Number} count longitude coordinate
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article

12 Jul 2016
PHP implements the method of calculating the distance between Baidu map coordinates, PHP coordinates. PHP implements the method of calculating the distance between Baidu map coordinates, PHP coordinates This article describes the PHP method of calculating the distance between Baidu map coordinates. Share it with everyone for your reference, specifically

13 Dec 2024
Linking Static Libraries to Other Static Libraries: A Comprehensive ApproachStatic libraries provide a convenient mechanism to package reusable...

28 Oct 2024
Suppression of Tensorflow Debugging OutputTensorflow prints extensive information about loaded libraries, found devices, and other debugging data...

03 Jan 2025
Overflow: Hidden and Expansion of HeightjQuery distinguishes itself from other JavaScript libraries through its cross-platform compatibility and...

30 Oct 2024
Native Java Image Processing Libraries for High-Quality ResultsAs you have encountered limitations with ImageMagick and JAI, let's explore other...

27 Dec 2024
Executing Command Line Binaries in Node.jsExecuting third-party binaries is an essential task when porting CLI libraries from other languages to...


Hot Tools

PHP library for dependency injection containers
PHP library for dependency injection containers

A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking

Small PHP library for optimizing images
Small PHP library for optimizing images
