3

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.

Kindly advice what technique to follow.

yours sincerely

Update

t 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?

If anyone knows how to compact the data then please let me know.

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

thank you.

1

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?

If anyone knows how to compact the data then please let me know.

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

thank you.

  • Please post this in the question. – neogeomat Nov 7 '13 at 13:19
  • 1
    What data format are you using? Which Javascript library are you using? Can you share your code? It seems that we can help you. – neogeomat Nov 7 '13 at 13:20
  • I am not using any special data format. I am generating a javascript at runtime when the web page is being requested. The javascript code fills an array with Lat,Lon, and color values. Then it creates polygons - available in the google maps api - sets their colors based on the array, and finally renders them. – mkaatr Nov 7 '13 at 17:00
0

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, privacy policy and cookie policy

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