[OpenLayers-Users] Re: Get Features from a WMS Layer

IvanBell Ivan.Bell at CCA.com
Mon May 23 22:39:27 EDT 2011


I thought I would include a couple of other examples of what I tried, neither
of which worked.




var wfs = new OpenLayers.Layer.Vector( "MyFeatures", {
             strategies: [new OpenLayers.Strategy.BBOX()],
             protocol: new OpenLayers.Protocol.WFS({
                url: "http://localhost:8081//geoserver/wfs",
                    featureType: "MyLayer",
                    featureNS: "http://localhost:8081/geoserver/wfs",
                    featurePrefix: "MyMap",
                    schema:
"http://localhost:8081/geoserver/wfs?service=wfs&version=1.1.0&request=DescribeFeatureType&typename=MyMap:MyLayer"
             })
          });



Also, I tried:




var wfs = new OpenLayers.Layer.Vector( "MyFeatures", {
             strategies: [new OpenLayers.Strategy.BBOX()],
             projection: new OpenLayers.Projection( "EPSG:68156405" ),
             protocol: new OpenLayers.Protocol.WFS({
                url: "http://localhost:8081//geoserver/wfs",
                    version: "1.1.0",
                    srsName: "EPSG:68156405",
                    featureType: "MyLayer",
                    featureNS: "http://localhost:8081/geoserver",
                    featurePrefix: "MyMap",
                    schema:
"http://localhost:8081/geoserver/wfs?service=wfs&version=1.1.0&request=DescribeFeatureType&typename=MyMap:MyLayer"
             })
          });



Both of these were trial-and-error (my last and only resort) from some
Googling.



-----
Up the Irons!!!
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Get-Features-from-a-WMS-Layer-tp6396039p6397022.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110523/339a1d0b/attachment.html


More information about the Users mailing list