Have Layer.WMS support WMS version 1.3 with the axis order sequence, r=elemoine,crschmidt,ahocevar (closes #2284)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9775 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
52
examples/wms-v13.html
Normal file
52
examples/wms-v13.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
var map, map2;
|
||||
|
||||
function init(){
|
||||
// clear array to simulate a wrong axis order request
|
||||
map = new OpenLayers.Map( 'map' );
|
||||
var layer = new OpenLayers.Layer.WMS(
|
||||
"OpenLayers WMS",
|
||||
"http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?",
|
||||
{layers: 'Foundation.GTOPO30', version: '1.3.0'},
|
||||
{singleTile: true, yx: []}
|
||||
);
|
||||
map.addLayer(layer);
|
||||
|
||||
map.zoomToMaxExtent();
|
||||
|
||||
map2 = new OpenLayers.Map( 'map2' );
|
||||
var layer2 = new OpenLayers.Layer.WMS(
|
||||
"OpenLayers WMS",
|
||||
"http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?",
|
||||
{layers: 'Foundation.GTOPO30', version: '1.3.0'},
|
||||
{singleTile: true}
|
||||
);
|
||||
map2.addLayer(layer2);
|
||||
|
||||
map2.zoomToMaxExtent();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1 id="title"> WMS version 1.3 (axis order) Example</h1>
|
||||
|
||||
<div id="tags">
|
||||
</div>
|
||||
<p id="shortdesc">
|
||||
Shows an example of the influence of axis order on WMS 1.3 GetMap requests.
|
||||
</p>
|
||||
<div id="map" class="smallmap"></div>
|
||||
<div id="map2" class="smallmap"></div>
|
||||
<div id="docs">
|
||||
WMS version 1.3 introduced the axis order sequence, so that for e.g. EPSG:4326 the bbox coordinate
|
||||
values need to be flipped (LatLon instead of LonLat). The first map uses the incorrect (WMS 1.1) axis
|
||||
order against a WMS 1.3 service, resulting in corrupted maps. The second map shows how to correctly
|
||||
request a map in EPSG:4326 against a WMS 1.3 service.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user