Made Tile.Image.IFrame an addin which will be used only if a layer is configured with the maxGetUrlLength option. This deprecates Layer.WMS.Post. r=tschaub (closes #2824)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10755 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2010-09-16 21:54:22 +00:00
parent 1284b71bbc
commit ce90aebfd0
11 changed files with 300 additions and 224 deletions

19
examples/wms-long-url.js Normal file
View File

@@ -0,0 +1,19 @@
// a long text that we set as dummy param (makeTheUrlLong) to make the url long
var longText = new Array(205).join("1234567890");
var map = new OpenLayers.Map( 'map' );
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic', makeTheUrlLong: longText},
{tileOptions: {maxGetUrlLength: 2048}}
);
map.addLayer(layer);
map.zoomToMaxExtent();
// add behavior to dom elements
document.getElementById("longurl").onclick = function() {
layer.mergeNewParams({makeTheUrlLong: longText})
}
document.getElementById("shorturl").onclick = function() {
layer.mergeNewParams({makeTheUrlLong: null})
}