Skip to main content
added 229 characters in body
Source Link
geographika
  • 14.4k
  • 4
  • 55
  • 79

You should be able to set a defaultFilter, or once the filterprotocol is created you can use mergeWithDefaultFilter.

var protocol = new OpenLayers.Protocol.WFS({
    version: "1.1.0",
    url: MapBase.Configuration.GeoServer.WFS_Service.EndPointURL,
    featurePrefix: MapBase.Configuration.GeoServer.WFS_Service.featurePrefix,
    featureType: MapBase.Configuration.GeoServer.WFS_Service.featureType,
    featureNS: MapBase.Configuration.GeoServer.WFS_Service.featureNS,
    geometryName: MapBase.Configuration.GeoServer.WFS_Service.geometryName,
    srsName: "EPSG:4326",
    defaultFilter: myFilter
});

protocol.mergeWithDefaultFilter(myNewFilter);

For the projection you can add in the following for WFS 1.1.0:

srsName: "EPSG:4326"

A few more details here.

You should be able to set a defaultFilter, or once the filter is created you can use mergeWithDefaultFilter.

var protocol = new OpenLayers.Protocol.WFS({
    version: "1.1.0",
    url: MapBase.Configuration.GeoServer.WFS_Service.EndPointURL,
    featurePrefix: MapBase.Configuration.GeoServer.WFS_Service.featurePrefix,
    featureType: MapBase.Configuration.GeoServer.WFS_Service.featureType,
    featureNS: MapBase.Configuration.GeoServer.WFS_Service.featureNS,
    geometryName: MapBase.Configuration.GeoServer.WFS_Service.geometryName,
    defaultFilter: myFilter
});

protocol.mergeWithDefaultFilter(myNewFilter);

You should be able to set a defaultFilter, or once the protocol is created you can use mergeWithDefaultFilter.

var protocol = new OpenLayers.Protocol.WFS({
    version: "1.1.0",
    url: MapBase.Configuration.GeoServer.WFS_Service.EndPointURL,
    featurePrefix: MapBase.Configuration.GeoServer.WFS_Service.featurePrefix,
    featureType: MapBase.Configuration.GeoServer.WFS_Service.featureType,
    featureNS: MapBase.Configuration.GeoServer.WFS_Service.featureNS,
    geometryName: MapBase.Configuration.GeoServer.WFS_Service.geometryName,
    srsName: "EPSG:4326",
    defaultFilter: myFilter
});

protocol.mergeWithDefaultFilter(myNewFilter);

For the projection you can add in the following for WFS 1.1.0:

srsName: "EPSG:4326"

A few more details here.

Source Link
geographika
  • 14.4k
  • 4
  • 55
  • 79

You should be able to set a defaultFilter, or once the filter is created you can use mergeWithDefaultFilter.

var protocol = new OpenLayers.Protocol.WFS({
    version: "1.1.0",
    url: MapBase.Configuration.GeoServer.WFS_Service.EndPointURL,
    featurePrefix: MapBase.Configuration.GeoServer.WFS_Service.featurePrefix,
    featureType: MapBase.Configuration.GeoServer.WFS_Service.featureType,
    featureNS: MapBase.Configuration.GeoServer.WFS_Service.featureNS,
    geometryName: MapBase.Configuration.GeoServer.WFS_Service.geometryName,
    defaultFilter: myFilter
});

protocol.mergeWithDefaultFilter(myNewFilter);