I have an interpolated temperature data samples that covers a map evenly. The data is in the form of (lat,lon,temp). I want to render that data on top of google maps. I tried google heat maps and the rendering is inaccurate.

I assume one way to do it is to have a layer stored in geoserver. I don't want to use this option. I would prefer if the data are included with the webpage and rendered at runtime.

What technique should I follow?

It seems that is is possible to render polygons in google maps. You could set the opacity, and color. What I did is interpolating temperature at different degrees, and then creating a large number of polygons that get rendered on top of the map.

The color of each polygon is changed based on the approximated temperature value. I got the following results:

Rendering large number of polygons on top of google maps

Now I have the following isse: File size is too large, about 1MB is needed to store the code of java script.

How can I send the java script code in compact format to the client?

Also let me know if there is an alternative way to render polygons on top of google maps.


1 Answer 1


Use Leaflet. It is under 31kb in size and easier to use. You can do a whole lot of things including data rendering in top of google as well as other maps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.