Saturday, 1 April 2017

javascript - Syntax of WFS request in OpenLayers


I am in need of the correct syntax for loading WFS layer using OpenLayers. I have gone through many examples on the OpenLayers site and other examples, but can't figure out how to use the necessary and optional options like strategies, protocols etc



Answer



Where is somethin like


var wfsLayer = new OpenLayers.Layer.Vector({
protocol: new OpenLayers.Protocol.WFS({
url: 'http://example.com/wfs',

featureType: 'myFeatureTypeName',
featureNS: 'topp',
geometryName: 'the_geom'
}),
strategies: [ new OpenLayers.Strategy.BBOX() ]
});

getting you? Can you see any GetFeature-Request in Firebug or Inspector? Have you set up your OpenLayers.ProxyHost variable?


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...