1

I am having problems loading wfs layers into IE using openlayers. My code is below. It works fine using Chrome or Firefox but fails in IE. I had a similar problem with WMS but managed to track down OL4JSFProxy which I installed and that is now working fine. However I cannot seem to get WFS working. I am guessing it is a security restriction.

vecLayerSites = new OpenLayers.Layer.Vector("Sites", {

    protocol: new OpenLayers.Protocol.WFS({
      version: "1.1.0",
      //url: "http://www.landcheck.co.uk/geoserver/wfs",
      url: "http://www.landcheck.co.uk/geoserver/OL4JSFProxy/wfs",
      //url: "http://localhost:8080/geoserver/wfs",
      // featureType: "Sites",
      featureType: "DemoSites",
      srsName: "EPSG:27700", 
      featurePrefix: "stm",
      featureNS: "http://www.stmenvironmental.co.uk/stm",
    }),
    projection: 'EPSG:27700',
    strategies: [new OpenLayers.Strategy.BBOX()],
    visibility: true,
    styleMap: new OpenLayers.StyleMap({
      'default': styleContaminated
    }),
    filter: new OpenLayers.Filter.Spatial({
      type: OpenLayers.Filter.Spatial.INTERSECTS,
      value: bufferedBoundaryGeometry
    })
  });
  • IE employs JScript inplace of JavaScript we are familiar with, so there are unexpected behaviors. – neogeomat Jan 24 '16 at 14:47
  • Do you check that the DOM is loaded before trying to run your code? – nmtoken Aug 16 '16 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.