2

我还没有找到如何在 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 中的等价物是什么?

4

1 回答 1

0

查看有关 OL3 和 mapserver 的本教程,看看它是否有帮助http://vipassanaandenvironmentalinformatics.blogspot.com/2013/06/web-gis-development-using-openlayers-3.html

于 2014-10-23T21:37:02.977 回答