search
HomePHP LibrariesOther librariesBaidu map heat map PHP class library
Baidu map heat map PHP class library

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

(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 tutorialPHP implements the method of calculating the distance between Baidu map coordinates, PHP coordinates_PHP tutorial

12Jul2016

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?

13Dec2024

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?

28Oct2024

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?

03Jan2025

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?

30Oct2024

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

How to Create and Utilize Static Libraries in g  ?How to Create and Utilize Static Libraries in g ?

24Oct2024

This article guides developers on crafting static libraries in C using g . It demonstrates how to compile source code into object files, create static libraries, and incorporate them into other projects. By leveraging this approach, developers can

See all articles