【问题标题】:WFS-T call to Geoserver not visualising POIsWFS-T 对 Geoserver 的调用未可视化 POI
【发布时间】:2012-01-12 15:18:00
【问题描述】:

我想连接到 Geoserver 以通过 WFS-T 编辑图层的多个点。我从不同的例子开始尝试这个,但地图没有可视化这些点。我有一个通过 WMS 公开的 openstreetmap 基础层。服务器用我要求的点记录呼叫...... 这是我正在打的电话:

var wfs_layer = new OpenLayers.Layer.Vector("Editable Features", {
                 strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
                 protocol: new OpenLayers.Protocol.Script({
                           url: "http://192.168.0.10:8080/geoserver/wfs",
                           params: {
                                   service: "WFS",
                                   version: "1.0.0",
                                   srsName: "EPSG:3004",
                                   request: "GetFeature",
                                   typeName: "Incendi:inc2008",
                                   outputFormat: "gml3"
                           },
                  filterToParams: function(filter, params) {
                    // example to demonstrate BBOX serialization
                    if (filter.type === OpenLayers.Filter.Spatial.BBOX) {
                        params.bbox = filter.value.toArray();
                        if (filter.projection) {
                            params.bbox.push(filter.projection.getCode());
                        }
                    }
                    return params;
                 }
                 })
 });

提前感谢您的回复

【问题讨论】:

标签: map edit openlayers openstreetmap geoserver


【解决方案1】:

由于对跨域 javascript 的限制。我需要使用主机来启用来自远程服务器的 WFS 调用。

【讨论】:

    猜你喜欢
    • 2017-06-17
    • 2019-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-14
    • 2016-10-03
    • 1970-01-01
    • 2011-01-26
    相关资源
    最近更新 更多