google-mapsgoogle-maps-api-3

How can I make a heatmap like the price heatmap of Housing.com


I have been trying for some weeks to come up with a price map. My inspiration is the heatmap found on the website of Housing.com . The link to the map is: https://housing.com/dsl/heatmaps/mumbai/buy

I have tried: Google maps Javascript API 3 heatmap,js library and many other websites. The resulting map that I am getting is visually less appealing. Have they defined boundaries for very small regions and then introduced the gradient(which, again I am unaware how to implement.) Any thoughts on how it might have been implemented are welcomed.


Solution

  • They don't use Google Maps Heatmaps Layer in the application, or any other library for creating heatmaps. You can see that between the requests the webpage makes are images like this, this and also more for bigger zoom levels. They just render these images over custom styled google maps as tiles.

    More on how to render custom tiles over google maps, check this part of docs. For more information how to style the map below the heatmap to look like in the example, check this parts of docs.

    Creating tiles images to render over your google maps can be troublesome, there are some tools, like this one which should be able to help you, but is paid. I don't know of any free solutions, you can create it manually although it might take some time.

    Hope this helps you to better understand the implementation techniques behind the referenced map.