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)

This commit is contained in:
Bart van den Eijnden
2012-08-08 09:20:14 +02:00
parent 65cacaa756
commit bab1858bfc
2 changed files with 8 additions and 1 deletions

View File

@@ -22,7 +22,8 @@
<div id="docs">
<p>
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.
</p>
<p>
See the <a href="wfs-states.js" target="_blank">wfs-states.js

View File

@@ -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",