Umbraco:存储空间数据

发布于 2024-11-27 02:18:48 字数 815 浏览 4 评论 0 原文

我正在研究 Umbraco 用作大型 CMS 项目的基础,但该项目需要 SQL Server 2008 数据库来存储针对内容的空间数据

作为 Umbraco 的新手,我仍在阅读文档并慢慢建立其架构的想法。然而到目前为止,Umbraco 似乎并不支持空间数据的存储。

似乎只有四种数据库数据类型选项:date、integer、ntext、nvarchar

是否可以将空间数据存储到数据库?

更新:对 Umbraco 工作原理的进一步研究表明我走错了路。似乎实现此目的的方法是将纬度/经度数据存储在 Umbraco 使用的常用 XML 格式内的数据中。

然后使用 Spatial.net 扩展是在 Lucene.net,而不是使用有限的搜索功能检查公开。

然而,这一切仍然是理论上的,我只是无法实现这一点。如果我在有人回答这个问题之前这样做,我会在这里发布我的发现以帮助其他人。

I'm researching Umbraco for use as a base in a large CMS project, however the project calls for the SQL Server 2008 database to store spatial data against content.

Being new to Umbraco I'm still reading through the documentation and slowly building up an idea of it's architecture. However so far it doesn't look like Umbraco supports the storage of spatial data.

There only appears to be four database datatype options: date, integer, ntext, nvarchar

Is it possible to store spatial data to the database?

Update: Futher research into how Umbraco works has showed me I was on the wrong track. It seems the way to do this is store the lat/long data in the data inside the usual XML format Umbraco uses.

Then to use the Spatial.net extensions that have been built on top of Lucene.net, rather than use the limited search capabilities Examine exposes.

However this is all still theoretical, I've just not been able to achieve this. If I do before someone answers this question, I'll post my findings here to help others.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

裂开嘴轻声笑有多痛 2024-12-04 02:18:48

您可以了解如何在 Umbraco 中制作用户控件(使用 Visual Studio)。

Umbraco“文档类型”的多功能性也可能足以满足您的需求。

可以以任何方式扩展 Umbraco 以获得您想要的解决方案。我不知道您希望空间数据如何与前端交互 - 因此很难提供直接的解决方案。

You could take a look at how to make user controls (with Visual Studio) in Umbraco.

It is also possible the versatility in Umbraco 'Document Types' is enough for you.

It is possible to extend Umbraco in any sort of way to get the solution you want. I don't know how you want the spatial data to interact with your frontend - so it is difficult to provide a direct solution.

沙与沫 2024-12-04 02:18:48

尽管有多种方法可以存储空间数据并使用 Spatial.net,这不是一个非常优雅的解决方案。

相反,我在 SQL Server 2008 中创建了一个附加表,其中包含几何/地理数据类型以及对其所连接的 Umbraco 内容的引用

然后我得到了一个 事件无论内容是否添加/更新/删除,钩子都会更新此钩子。

Although there are ways to store spatial data and perform queries against it using Spatial.net, it's not a very elegant solution.

Instead I've created an additional table in SQL Server 2008 with the geometry/geography datatype and a reference to the Umbraco content it's connected with.

I've then got a event hook which updates this whether content is added/updated/deleted.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文