OpenLayers OpenLayers

Ticket #196 (closed feature: fixed)

Opened 2 years ago

Last modified 1 year ago

Support reprojecting WMS layers onto different base layers

Reported by: crschmidt Assigned to: crschmidt
Priority: critical Milestone: 2.2 Release
Component: general Version: 2.0
Keywords: Cc:
State:

Description

Currently, the WMS class does not support reprojecting onto different baselayers. the code to make this work would not be too difficult -- it should be possible to use map.getLatLonFromLayerPx() to obtain a location, rather than calculating the bounds based on essentially what is a tiled id.

The WMS.Untiled already supports reprojection becaues it uses map.getExtent() -- this would be an extension of this logic into the WMS layer.

Note that KaMap and WorldWind layers can not support this, and neither can WMSes which do not work with non-square pixels. However, because this is in the WMS spec, such WMS servers are breaking spec, and are relatively few and far between.

The code to change is likely in the initTiles function of Grid.js, but since this won't work for WorldWind (which uses the same initTiles) it is most likely going to need to be subclassed/abstracted in some way so that only WMS is affected.

This is targetted towards the 2.2 release.

Attachments

reprojectwms.patch (7.6 kB) - added by crschmidt on 10/08/06 12:08:49.

Change History

10/02/06 11:47:55 changed by sderle

  • priority changed from minor to major.

10/02/06 12:08:03 changed by sderle

  • priority changed from major to critical.

10/08/06 12:08:49 changed by crschmidt

  • attachment reprojectwms.patch added.

10/08/06 12:10:50 changed by crschmidt

  • keywords set to +review.
  • status changed from new to assigned.

Patch for reprojecting WMS layers on top of Google.

Schuyler, you want to take a look at this one? I made the reprojection an option, so that people can opt to keep the old (broken) behavior, and also so that layers like ka-map don't have problems when people try to put them on top fo Google... no more so than they already do anyway ;)

10/10/06 09:44:36 changed by sderle

This patch looks good. Two comments:

  • The variable names in Tile.getBoundsFromBaseLayer could perhaps be a bit clearer. It's not obvious what the if/else clause in the middle of the method does just by looking at it.
  • Needs tests. ;-)

10/10/06 11:29:21 changed by crschmidt

  • status changed from assigned to closed.
  • resolution set to fixed.

Committed, r1718.

07/05/07 17:01:13 changed by euzuro

  • keywords deleted.