Biribu
Biribu

Reputation: 3823

Median value of heatmap in google maps zoom out

I have a webpage to show some sound values. But when I zoom out, values are added and red zone is bigger that it really is.

You can see an example here: https://developers.google.com/maps/documentation/javascript/heatmaplayer

down side has an example and if you make zoom out, you see the red part bigger.

Is it possible to modify this behaviour to make a median or something similar? It is quite strange that during night, if you zoom out, red zone is so big (meaning that there is too much noise)

Upvotes: 0

Views: 467

Answers (1)

Lynn Chen
Lynn Chen

Reputation: 88

The merge rule of Google heatmap is currently density-based. Unfortunately, it still cannot provide a custom merge rule due to its implementation:

Current implementation of heatmap is very perfomance and is computed at client side. The idea is to render each feature as a greyed blur circle. The issue is if two circles overlaps the intersection zone becomes dark greyed because values are added. Later when all features are rendered the class gets an images of the layer, as a grid of pixels, and substitute each grey value pixel (0..255) with a gradient color previously created. (Referenced from Google Forum)

So, maybe you can try the heatmap provided by Nokia. It seems they provide a value-based heatmap, whose merge rule is not defined by density but the value of points.

Upvotes: 1

Related Questions