通过wfs删除要素
删除feature是wfs协议中的最后一个例子了,和之前的修改,添加差不多,大同小异。还是先看界面:
选择查询
按钮,把所有的feature加载到前端,然后勾选选择
复选框,就可以在地图上选择要删除的feature,图示选择之前添加的W
形状的线条,然后点击删除选中Feature
按钮,就可以把feature删除掉。
在开发者工具窗口里面可以看到删除feature的http请求: http://localhost:8080/geoserver/wfs?service=wfs
,其发送的内容为:
<Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<Delete typeName="feature:nyc_roads" xmlns:feature="http://geoserver.org/nyc_roads">