Allow for users to determine whether the bounding box should be encoded or
not on WMS and WFS layers. This change, by default, makes us compliant with the WMS spec again. git-svn-id: http://svn.openlayers.org/trunk/openlayers@4038 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -28,6 +28,43 @@
|
||||
t.eq(setSize, true, "Renderer resize called on map size change.");
|
||||
|
||||
}
|
||||
function test_Layer_WFS_drawmap(t) {
|
||||
t.plan(2);
|
||||
var map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WFS( "Owl Survey",
|
||||
"http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
|
||||
{typename: "OWLS", maxfeatures: 10},
|
||||
{ featureClass: OpenLayers.Feature.WFS});
|
||||
map.addLayer(layer);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
try {
|
||||
map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
|
||||
} catch (Exception) {
|
||||
}
|
||||
t.eq(layer.tile.url, "http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?typename=OWLS&maxfeatures=10&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-187.890625,-36.6796875,-12.109375,156.6796875", "Tile URL is set correctly when not encoded");
|
||||
var map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}
|
||||
);
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WFS( "Owl Survey",
|
||||
"http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
|
||||
{typename: "OWLS", maxfeatures: 10},
|
||||
{ featureClass: OpenLayers.Feature.WFS, 'encodeBBOX': true});
|
||||
map.addLayer(layer);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
try {
|
||||
map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
|
||||
} catch (Exception) {
|
||||
}
|
||||
t.eq(layer.tile.url, "http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?typename=OWLS&maxfeatures=10&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-187.890625%2C-36.679687%2C-12.109375%2C156.679688", "Tile URL is set correctly when not encoded");
|
||||
}
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user