1

I have a map created with Google Maps. I want to overlay over some data I am downloading dynamically, covering the whole world. That data is a matrix as follows:

1024 values for the longitude (fixed 0.3515625 degrees/value)

512 values for the latitude (fixed 0.3515625 degrees/value)

I have created an html5 canvas that I populate dynamically with the data above, as one pixel per value of the input matrix.

However, the superimposed image does not match the (Google Maps) map below, which is in Mercator projection.

I have searched how to specify a specific projection for the overlay, expecting Google Maps to stretch the canvas for me, but I am afraid it won't do that, and will only convert the corner coordinate.

Is there a way to tell Google Maps to dynamically reproject my image? (a la GDAL, but in realtime).

  • Why do you only have 336 degrees of longitude? With a ratio of 2:1 your raster might work as WGS84 with a fixed resolution in both directions. Google Maps fills the hole world in a square, that's why they don't align. – AndreJ Apr 1 '15 at 14:38
  • Sorry, that was an errata, I just fixed the question with the right degrees per value. – Jose Gómez Apr 1 '15 at 14:50
  • So we have a rectangle covering the whole world with resolution 2:1, where values are separated by fixed latitudes, and on the other side the Google Maps base map, with its mercator projection where screen size changes with the latitude. – Jose Gómez Apr 1 '15 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.