diff options
author | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
commit | ea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch) | |
tree | af67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/examples/wfs-states.js | |
parent | 59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff) | |
download | postrunner-ea346a785dc1b3f7c156f6fc33da634e1f1a627b.zip |
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/examples/wfs-states.js')
-rw-r--r-- | misc/openlayers/examples/wfs-states.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/misc/openlayers/examples/wfs-states.js b/misc/openlayers/examples/wfs-states.js new file mode 100644 index 0000000..c4e801e --- /dev/null +++ b/misc/openlayers/examples/wfs-states.js @@ -0,0 +1,35 @@ +var map; +OpenLayers.ProxyHost = "proxy.cgi?url="; + +function init() { + // allow testing of specific renderers via "?renderer=Canvas", etc + var renderer = OpenLayers.Util.getParameters(window.location.href).renderer; + renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers; + + map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.WMS("OpenLayers WMS", + "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", + featureType: "states", + featureNS: "http://www.openplans.org/topp" + }), + renderers: renderer + }) + ], + center: [-95.8506355, 37.163851], + zoom: 3 + }); +} |