OpenLayers加载SFS服务

    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服务)