I  am trying to build an application that projects a layer of
infrastructure over a static Google map.

The infrastructure data is returned from a WMS server, and is in
WGS84.

I can do this easily using the tiled map API, but am having trouble
with the static map API. (I can't use JavaScript in this application,
so I can't make use of any API calls.)

I need to define a bounding box for the overlay to send to the WMS
server, which means converting the pixel dimensions of the graphic
into coordinates.

I have found some routines that convert pixels to map coordinates. (I
can post them, but they seem to be fairly widely used.) However, the
problem is that while they return the coordinates as degrees, they
aren't really in WGS84 - i.e. they don't apply the datum (presumably
they are really degrees in a spherical projection). Consequently, the
infrastructure maps are fairly good with respect to longitude, but go
progressively out of alignment in latitude.

I'm trying to use the CS2CS utility to convert projections, but I
don't have anything I can feed into it. (To covert Mercator to WGS84,
it expects coordinates in metres, not degrees.)

Perhaps if I knew the resolution at each zoom level, I could just use
that to calculate the extents of the graphic from the centre. But I
can't seem to find this information anywhere.

But really, I need some routines that allow me to convert between
pixels and coordinates and back, and allow me to re-project.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to