【发布时间】:2020-05-18 03:42:47
【问题描述】:
我已关注this example,使用 geoserver 在 openlayers 地图中保存/编辑元素
geoserver 层通过 postgis 连接到 postgres 数据库;在 postgis 中,我添加了有关插入新记录的某些约束,即两个多边形不能相互接触/不能包含另一个多边形
如何使用 openlayers 显示这些约束错误?使用 WFS-T 插入请求,我只收到以下消息:
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://myserver:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue">
<ows:ExceptionText>Update error: Error occured updating features</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
我可以在 geoserver 中获取整个堆栈跟踪,并确定触发了什么约束,有没有办法通过 openlayers 获取更多细节?
【问题讨论】:
标签: javascript openlayers geoserver