Ticket #2914 (closed feature: fixed)
Respect layer projection if it equals the map projection
| Reported by: | ahocevar | Owned by: | ahocevar |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.11 Release |
| Component: | Layer.WMS | Version: | 2.10 |
| Keywords: | Cc: | ||
| State: | Complete |
Description
With several projection codes available for the same projection, but WMS servers that do not support all of these, it makes sense to respect the layer projection for WMS GetMap requests when they equal the map projection.
Let's say our map is in EPSG:3857, the official web mercator EPSG code, but it uses a layer that only supports the equal EPSG:900913 projection, we should be able to do:
var map = new OpenLayers.Map("map", {
projection: "EPSG:3857"
/* ... */
});
var layer = new OpenLayers.Layer.WMS("mywms", "/path/to/wms",
{layers: "world"},
{projection: "EPSG:900913"}
);
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

