我还没有找到如何在 OpenLayers 3 中通过 WFS 处理 MapServer、特定向量的示例。如果有人可以提供示例,将不胜感激。
例如:这就是我在 Openlayers 2 中通过 WFS 请求从 MapServer 创建矢量图层的方式:
baseLayer = new OpenLayers.Layer.Vector( "test",
{
style: {fillColor: "green"},
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.WFS(
{
version: "1.0.0",
url: "http://localhost/cgi-bin/mapserv?map="+mapPath,
featureType: "test",
}),
isBaseLayer: true,
projection: new OpenLayers.Projection("EPSG:31255")
});
map.addLayer(baseLayer);
OpenLayers 3 中的等价物是什么?