I am fairly new to open layers and have only been working with WMS layers.
Trying to add a WFS from our existing WFS Service which is located at
http://localhost/RedWFS/Request.aspx

Below is my attempt to add a WFS layer except I'm sure the information I've
entered into featureType, featureNS are wrong. Just not sure exactly what to
put in here. When I do a request on my WFS for the BAS_Hydro layer ( by
going to
http://localhost/RedWFS/request.aspx?REQUEST=getFeature&SERVICE=WFS&TYPENAME=BAS_HYDRO&version=1.0.0)
the output for this WFS layer I want to add is -

<xs:element name="BAS_HYDRO" type="gmgml:BAS_HYDROType"
substitutionGroup="gml:_Feature" /> 
- <xs:complexType name="BAS_HYDROType">
- <xs:complexContent>
- <xs:extension base="gml:AbstractFeatureType">
- <xs:sequence>
  <xs:element name="HydroID" type="xs:int" /> 
  <xs:element name="Hydro_Type" type="gmgml:BAS_HYDRO_Hydro_TypeType"
minOccurs="0" /> 
  <xs:element name="Hydro_Name" type="gmgml:BAS_HYDRO_Hydro_NameType"
minOccurs="0" /> 
  <xs:element name="Geometry" type="gmgml:Polygon_MultiPolygonPropertyType"
minOccurs="0" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>
- <xs:simpleType name="BAS_HYDRO_Hydro_TypeType">
- <xs:restriction base="xs:string">
  <xs:maxLength value="50" /> 
  </xs:restriction>
  </xs:simpleType>
- <xs:simpleType name="BAS_HYDRO_Hydro_NameType">
- <xs:restriction base="xs:string">
  <xs:maxLength value="50" /> 
  </xs:restriction>
  </xs:simpleType>

So not sure exactly what to put in for featureNS. I tried the following but
doesn't work, any help appreciated! I just get a javascript error with the
following

                var layer = new OpenLayers.Layer.Vector("BAS_HYDRO", {
                    strategies: [new OpenLayers.Strategy.BBOX()],
                    protocol: new OpenLayers.Protocol.WFS({
                        url:  "http://localhost/RedWFS/";,
                        featureType: "BAS_HYDRO",
                        featureNS: "http://www.intergraph.com/geomedia/gml";
                    })
                });
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Question-on-adding-WFS-layer-featureNS-tp5531090p5531090.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to