Heatmap based on average weights and not on the number of data points

前端 未结 5 1887
逝去的感伤
逝去的感伤 2020-12-28 17:29

I am making a heatmap with Google API v3. I\'ll give an example. Lets consider earthquake magnitudes. I assign weights to each point to specify their magnitude. However goog

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 18:22

    As a partial solution, I've modified heatmap.js from the following project: https://github.com/pa7/heatmap.js

    To get an average at a single long/lat point I've modified the _organiseData function to store the PointCount and PointSum for each x,y position; and with these values I get the average at a point with:

    store[x][y] = storePointSum[x][y] / storePointCount[x][y];

    I'm still working out how to modify the "blend" when multiple x,y coords stack at various map resolutions... If I figure it out I will post it.

    cheers

    ~Aaron

提交回复
热议问题