Skip to content

Commit

Permalink
slightly modify the wfs-states example to show how to switch between …
Browse files Browse the repository at this point in the history
…a WMS and a vector layer at a certain scale (non-functional change)
  • Loading branch information
Bart van den Eijnden committed Aug 8, 2012
1 parent 65cacaa commit bab1858
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/wfs-states.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ <h1 id="title">WFS United States (GeoServer) Example</h1>
<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
Expand Down
6 changes: 6 additions & 0 deletions examples/wfs-states.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bab1858

Please sign in to comment.