将用户输入保存到 postgis 表策略
我有 openlayers、geoserver 和 postgis/postgres 工作得很好。我正在尝试创建一个允许用户向地图添加点的应用程序。创建点后,我需要一个弹出表单来显示各种控件,允许用户输入有关点已添加到的位置的信息。
使用postgis,我是否创建一个单独的表来保存基于添加点的p键的用户输入?对我来说似乎是个好主意,但我注意到 openlayers 的 featureadded 事件在将点添加到数据库之前被触发。我可以使用 geoserver 来保存用户输入,还是需要创建自己的模块来处理用户输入?
I have openlayers, geoserver and postgis/postgres working quite nicely. I'm trying to create an app that allows a user to add a point to a map. After the point is created, I need a popup form to show with various controls that allows the user to input info about the location the point has been added to.
With postgis, do I create a seperate table to hold the user input based on the p key of the added point? Seems like a good idea to me, but I noticed the featureadded event of openlayers is triggered before the point is added to the database. Can I use geoserver to handle saving the user input, or do I need to create my own module to handle user input?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
OpenLayers 中的“featureadded”事件完全是客户端,当您向矢量图层添加功能时发生。它不知道您是否将特征保存到数据库中。
为什么不这样做:
'featureadded' event in OpenLayers is totally client-side that occurs when you add feature to a vector layer. It has no idea whether you save feature to the database or not.
Why don't you do it like this: