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:
19
examples/wms-long-url.js
Normal file
19
examples/wms-long-url.js
Normal 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})
|
||||
}
|
||||
Reference in New Issue
Block a user