Changes between Version 1 and Version 2 of BluePrintGISWFSLayers


Ignore:
Timestamp:
12/22/10 14:28:54 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintGISWFSLayers

    v1 v2  
    55(If Local, why not just use normal [wiki:BluePrintGISFeatureLayers Feature Layers]?)
    66
     7http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/getfeature-wfs.html
     8{{{
     9   layer = new OpenLayers.Layer.WMS(
     10       "States WMS/WFS",
     11       "http://demo.opengeo.org/geoserver/ows",
     12       {layers: 'topp:states', format: 'image/gif'}
     13   );
     14   select = new OpenLayers.Layer.Vector("Selection", {styleMap:
     15       new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])
     16   });
     17   hover = new OpenLayers.Layer.Vector("Hover");
     18   map.addLayers([layer, hover, select]);
     19
     20   control = new OpenLayers.Control.GetFeature({
     21       protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer),
     22       box: true,
     23       hover: true,
     24       multipleKey: "shiftKey",
     25       toggleKey: "ctrlKey"
     26   });
     27   control.events.register("featureselected", this, function(e) {
     28       select.addFeatures([e.feature]);
     29   });
     30   control.events.register("featureunselected", this, function(e) {
     31       select.removeFeatures([e.feature]);
     32   });
     33   control.events.register("hoverfeature", this, function(e) {
     34       hover.addFeatures([e.feature]);
     35   });
     36   control.events.register("outfeature", this, function(e) {
     37       hover.removeFeatures([e.feature]);
     38   });
     39   map.addControl(control);
     40   control.activate();
     41}}}
    742----
    843[wiki:BluePrintGeographicInformationSystems GIS BluePrints]