[idvusers] IDV and googlemaps

Hi all, excuse the previous post, hit send a bit early...

I am wondering if there has been any interest in using the IDV codebase to
produce layers suitable for use in the google maps api?

In the api, you can define a GTiledLayer, as a png image set, accessible
by the api via some url.  the api fills in the url by supplying tile
identifiers x,y and z (zoom). so as the user pans around in a gmaps app,
your site will be getting requests for tile x,y, at zoom z.  as you return
the image, the layer is integrated into the display.

I have gathered enough info on googlemaps's map projection, a spherical
earth mercator cropped at +-85deg lat to give a square world.  However,
the twist is that google use not an earth radius, say km, in their
projection, but use pixel space directly.  So at zoom 0, where the whole
world fits in one 256 pixel square image, the 'radius' for the mercator
maths is 256/2pi.

so we can get from any visad lat,lon into google world.  My idea is then
to figure the bounding box of any data I have, in google pixel space
units. Then set this box as my default map projection.  Thus the rendered
data will transform exactly into the visad 'box'.  Then, via a projection
control, map the box exactly to the visad canvas, where the canvas is
exactly the size of said bounding box.

So the data is then rendered to a bufferedimage whose anchor point is
somewhere in the google pixel space.  It then remains to just apply a
tiling routine to cut that image up according to google tiling system.

My end goal is a function taking an IDV Displayable type and producing say
a zip/tarball of the tiles that could then be integrated into a googlemaps
application (and i note that GWT has a module for this).

Or I am barking up the wrong tree?  Would I be better off with real web
map servers?

Any comments appreciated.