From bab1858bfc6291e2ecf02a1b99bf9bcda1659b68 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Wed, 8 Aug 2012 09:20:14 +0200 Subject: [PATCH] slightly modify the wfs-states example to show how to switch between a WMS and a vector layer at a certain scale (non-functional change) --- examples/wfs-states.html | 3 ++- examples/wfs-states.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/wfs-states.html b/examples/wfs-states.html index 655acd4429..ffe6c87bbe 100644 --- a/examples/wfs-states.html +++ b/examples/wfs-states.html @@ -22,7 +22,8 @@

WFS United States (GeoServer) Example

This example shows the basic use of a vector layer with the - WFS protocol. + WFS protocol, and shows how to switch between a WMS and a vector + layer at a certain scale.

See the wfs-states.js diff --git a/examples/wfs-states.js b/examples/wfs-states.js index 6bdb499227..c4e801e6cf 100644 --- a/examples/wfs-states.js +++ b/examples/wfs-states.js @@ -13,7 +13,13 @@ function init() { "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: "basic"} ), + new OpenLayers.Layer.WMS("States WMS", + "http://demo.opengeo.org/geoserver/wms", + {layers: "topp:states", format: "image/png", transparent: true}, + {maxScale: 15000000} + ), new OpenLayers.Layer.Vector("States", { + minScale: 15000000, strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://demo.opengeo.org/geoserver/wfs",