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:
@@ -22,7 +22,8 @@
|
|||||||
<div id="docs">
|
<div id="docs">
|
||||||
<p>
|
<p>
|
||||||
This example shows the basic use of a vector layer with the
|
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>
|
||||||
<p>
|
<p>
|
||||||
See the <a href="wfs-states.js" target="_blank">wfs-states.js
|
See the <a href="wfs-states.js" target="_blank">wfs-states.js
|
||||||
|
|||||||
@@ -13,7 +13,13 @@ function init() {
|
|||||||
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
||||||
{layers: "basic"}
|
{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", {
|
new OpenLayers.Layer.Vector("States", {
|
||||||
|
minScale: 15000000,
|
||||||
strategies: [new OpenLayers.Strategy.BBOX()],
|
strategies: [new OpenLayers.Strategy.BBOX()],
|
||||||
protocol: new OpenLayers.Protocol.WFS({
|
protocol: new OpenLayers.Protocol.WFS({
|
||||||
url: "http://demo.opengeo.org/geoserver/wfs",
|
url: "http://demo.opengeo.org/geoserver/wfs",
|
||||||
|
|||||||
Reference in New Issue
Block a user