美文网首页
OpenLayers加载SFS服务

OpenLayers加载SFS服务

作者: 0尘封 | 来源:发表于2016-12-30 11:24 被阅读0次
        function getFire(building,floor){
             var   filterFire = new OpenLayers.Filter.Comparison({
                    type : OpenLayers.Filter.Comparison.EQUAL_TO,
                    property : "LC",
                    value : floor
            var protocolfire = new OpenLayers.Protocol.WFS.v1_1_0({
                version: "1.1.0",
                url: "http://localhost/SFS/streamer.ashx"
                featureType: 服务名称
                featureNS: "http://www.skylineglobe.com/sfs-schema",
                geometryName: evconfig.fireconfig.layershapeField,
                featurePrefix:"sfs"
            });
            protocolfire.read({
                readOptions: {
                    output: "object"
                },
                maxFeatures: 1000,
                filter: filterFire,
                callback: function (resp) {
                    var features = resp.features;
                  回调函数的方法
                  }
          });
        }
    

    相关文章

      网友评论

          本文标题:OpenLayers加载SFS服务

          本文链接:https://www.haomeiwen.com/subject/pikmvttx.html