Home PHP Libraries Other libraries Baidu map heat map PHP class library
Baidu map heat map PHP class library
(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


Disclaimer

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

PHP implements the method of calculating the distance between Baidu map coordinates, PHP coordinates_PHP tutorial PHP implements the method of calculating the distance between Baidu map coordinates, PHP coordinates_PHP tutorial

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

How Do I Link Static Libraries That Depend on Other Static Libraries? How Do I Link Static Libraries That Depend on Other Static Libraries?

13 Dec 2024

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

How to Silence TensorFlow\'s Debugging Output? How to Silence TensorFlow\'s Debugging Output?

28 Oct 2024

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

How Does jQuery Simplify DOM Manipulation for Web Developers? How Does jQuery Simplify DOM Manipulation for Web Developers?

03 Jan 2025

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

Which native Java image processing library is right for you? Which native Java image processing library is right for you?

30 Oct 2024

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

How to Execute Command Line Binaries in Node.js? How to Execute Command Line Binaries in Node.js?

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...

See all articles