1

Looking for minimal example/advice on getting a WFS service to show up as a vector layer with markers/icons in Openlayers map.

I have created the WFS service in Geomedia WebMap 6.01.11.19 and the Openlayers map.

a snippet from my map html code:

var wfs = new OpenLayers.Layer.Vector("myFeats", {
            minScale: 100000,
            maxScale: 99,
             strategies: [new OpenLayers.Strategy.BBOX()],
             protocol: new OpenLayers.Protocol.WFS({
                    version: "1.1.0",
                    srsName: "EPSG:900913",
                    url: "http://gisdev2/OL_WFS/Request.aspx",
                    featureType: ["myFeats"],
                    featurePrefix: "gmgml",
                    featureNS: "http://www.intergraph.com/geomedia/gml",
                    geometryName: "GEOMETRY_PT",
              }),
             renderers: OpenLayers.Layer.Vector.prototype.renderers
        }
    );     

Opening the IE11 debug console it bombs near this line in the Openlayers.js code

{return this.xmldom?"string"==typeof a?this.xmldom.createNode(1,b,a):this.xmldom.createNode(1,b,""):document.createElementNS(a, b)}

I suspect the problem is with the namespace in the WFS. I have read elsewhere to toggle the checkbox "on" for the 'Feature Collection in WFS namespace' setting in Geomedia WebMap. I have done this. I have also kept the 'Features namespace' value equal to 'http://www.intergraph.com/geomedia/gml' and the 'Features namespace prefix' equal to 'gmgml'.

Still no luck getting the feature to show in the Openlayers map.

1

Needed the formatOptions: {xy: false} set for Intergraph WFS + OL

var wfs = new OpenLayers.Layer.Vector("MyFeats", {
            strategies: [new OpenLayers.Strategy.BBOX(),refresh, 
            clusterStrategy],
            styleMap: styleMap,
            protocol: new OpenLayers.Protocol.WFS({
                    version: "1.0.0",
                    srsName: "EPSG:4326",
                    url: "/OL_WFS/Request.aspx",
                    featureType: "MYFEATSVRTCLR_BRGS",
                    featurePrefix: "gmgml",
                    featureNS: "http://www.intergraph.com/geomedia/gml",
                    geometryName: "GEOMETRY_PT",
                    formatOptions: {
                         xy: false
                    }
              }),
             renderers: OpenLayers.Layer.Vector.prototype.renderers
        }
    );     

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.