![](/img/trans.png)
[英]Geoserver and Openlayers - Show detailed message error in WFS-T
[英]Using wfs-t in OpenLayers 3?
我在Web應用程序中使用OpenLayers-3.6.0 。 我有wfs層,如下所示:
var url="http://localhost:8080/geoserver/wfs?&" +
"service=wfs&version=1.1.0&request=GetFeature&typeNames=usa:states";
var format = new ol.format.WFS({});
var source = new ol.source.Vector({
url: 'proxy.cgi?url='+ encodeURIComponent(url),
format: format
});
layer wfs = new ol.layer.Vector({
title: 'states',
source: source
});
我按如下方式編輯此Point層:
draw = new ol.interaction.Draw({
source: source,
type: 'Point'
});
現在,我想將此層保存在服務器端。 在OpenLayers-2中,我們定義了一個saveStrategy,然后調用它的save方法。 顯示如下:
var saveStrategy = new OpenLayers.Strategy.Save();
/*
* change layer's features
*/
saveStratefy.save();
我該如何在OpenLayers-3.6.0中做到這一點 ?
現在由應用程序代碼來處理。 Boundless SDK為此提供了一些代碼。 請參閱: http : //boundlessgeo.com/2014/06/openlayers-editing-wfs-t/以及此存儲庫中的代碼: https : //github.com/boundlessgeo/suite/blob/master/sdk/src/主/資源/客戶/ OL3常見/應用/ TransactionHandler.js
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.