[OpenLayers-Users] WMS overlay alignment on Google Map baselayer
Christopher Schmidt
crschmidt at crschmidt.net
Tue Aug 22 06:30:26 CDT 2006
On Mon, Aug 21, 2006 at 09:03:03PM -0500, Ross Mongin wrote:
>
> So it seems like there is some agreement that there should be
> functionality within OpenLayers to enable WMS layers to work with
> projected base layers. A couple approaches seem apparent: 1) Create
> a WMS layer subclass that would expose the key basemap methods needed
> to calculate the correct tile bounds. 2) Handle the reprojection
> within OpenLayers, creating the necessary class to calculate the tile
> bounds. I have not looked at the feasibility of doing option 1, but
> it seems like it would make sense to allow the baselayers to handle
> implementation of calculating the correct conversions from pixel x, y
> to lat / lon. Option 2 seems like it would be tough to manage as
> more baselayers become availible, each with thier own projection
> nuances.
>
> Thoughts / suggestions?
Ross --
There's a ticket open in Trac,
http://trac.openlayers.org/ticket/196#preview , with a description of
the way this feature will probably need to be implemented: specifically,
using map.getLatLonFrom*Px. (* is because there are three methods
similar to this, and I don't know exactly which one is needed.)
If there's a good patch for this functionality on the ticket, it might
be possible to get it into 2.1 instead of 2.2. I hope the description in
the ticket is adequate to get started -- the place to start reading the
code is Layer/Grid.js, and you'll want to look for anyplace that calls
tile.moveTo or layer.addTile.
Regards,
Christopher Schmidt
More information about the Users
mailing list