需要客户端交互式 2D 世界地图:最佳地图包? 或者最好的 C++ 图形/画布库制作一个?

发布于 2024-07-10 17:02:32 字数 481 浏览 10 评论 0原文

我需要一张二维世界政治地图,我将在上面绘制图标、文本和移动的线条。 用户将与地图进行交互,放置和移动图标,并且放大和缩小地图。

谷歌地图界面离我需要的不是很远,但这与网络无关; 它是一个 Windows MFC 应用程序,我想与应用程序中的地图(而不是 Web 界面)的 C++ API 进行交互。 理想情况下,我也不需要单独的服务器,并且任何服务器都必须在本地运行(而不是在互联网上)。 我应该使用什么罐装地图包或图形库来执行此操作? 我没有图形编程经验。

这是严格的 2D,所以我认为 Google Earth 或 WorldWind 这样的东西不合适。 良好的矢量图形支持会很酷,并且轻松绘制位图也很重要。

所有的罐装选项似乎都是面向网络的。 SDL 是我所知道的灵活画布编程的全部内容,但对于可能是一个常见问题,制作自己的地图似乎需要大量工作。 还有更高层次的东西吗? 也许有一种方法可以与 adobe Flash 对象交互? 我相当无知。

I need a 2d political map of the world on which I will draw icons, text, and lines that move around. Users will interact with the map, placing and moving the icons, and they will zoom in and out of the map.

The Google Maps interface isn't very far from what I need, but this is NOT web related; it's a Windows MFC application and I want to talk to a C++ API for a map that lives in the application, not a web interface. Ideally I don't want a separate server, either, and any server MUST run locally (not on the Internet). What canned map package or graphics library should I use to do this? I have no graphics programming experience.

This is strictly 2D, so I don't think something like Google Earth or WorldWind would be appropriate. Good vector graphics support would be cool, and easy drawing of bitmaps is important.

All the canned options seem web oriented. SDL is about all I know of for flexible canvas programming, but it seems like making my own map would be a lot of work for what is probably a common problem. Is there anything higher level? Maybe there's a way to interact with an adobe Flash object? I'm fairly clueless.

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

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

发布评论

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

评论(4

避讳 2024-07-17 17:02:32

Perhaps:
http://www.codeplex.com/SharpMap

ESRI MapObjects
http://www.esri.com/software/mapobjects/index.html
ESRI MapObjects LT
http://www.esri.com/software/mapobjectslt/index.html

See
http://www.esri.com/software/mapobjectslt/about/mo_vs_lt.html
for a comparison of the two MapObjects feature sets.

ESRI may have a replacement to the MapObjects libraries

烛影斜 2024-07-17 17:02:32

您可能想尝试 Mapnik C++/Python GIS 工具包

您可以查看 Marble Widget,它是 KDE Marble 项目的一部分。 也有用于此目的的 Windows 二进制文件,但它们可能依赖于 Qt。

You might want to try the Mapnik C++/Python GIS Toolkit.

You can take a look at the Marble Widget, which is part of KDE's Marble project. There are Windows binaries for this, too, but they might be dependent on Qt.

时光沙漏 2024-07-17 17:02:32

您可以使用术语 GIS(地理信息系统)来扩展您的搜索。 我确信它会更容易。 关于这个主题有很多东西。

这是我找到的页面: http://www.ucancode.net/Gis-Source- Code.htm

或:http://opensourcegis.org/

You could extend your search by using the term GIS (Geographic Information System). I'm sure its gonna be easier. There's a lot of stuff out there on that subject.

Here's a page I found: http://www.ucancode.net/Gis-Source-Code.htm

or: http://opensourcegis.org/

最初的梦 2024-07-17 17:02:32

是的,Marble 还有一个优点,即它在单个控件中提供了一种现成的解决方案(在 Qt 的技术术语中称为“小部件”)。

对 Qt 的依赖(顺便说一句,这是唯一的依赖)也可能被视为一个优势:Qt 即将推出的版本是根据 LGPL 获得许可的,因此即使您计划在专有应用程序中使用它,也不应该有任何真正的依赖。担心。 当然,Qt 和 Marble 是跨平台的,并且提供了非常直观且易于理解的 API。 与常见的 GIS 解决方案不同,Marble API 和小部件的使用主要针对不太了解 GIS 的人。 因此,即使您对 GIS 中使用的技术术语感到害怕,它的用法也很容易理解。

Marble 提供了多种编程接口:

您可以创建自己的 Marble 插件并在其中进行绘制,也可以对 MarbleWidget 控件进行子类化。 对于简单的 HelloWorld 应用程序,请参阅:

http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus

Yes, Marble has also the advantage that it provides kind of a ready made solution in a single control (called "widget" in Qt's technical terms).

The dependency on Qt (which is the only dependency btw.) might also be seen as an advantage: Qt's upcoming version is licensed under the LGPL, so even if you plan to use this in a proprietary application then there shouldn't be any real worries. And of course Qt and Marble are cross-plattform and provide an API that is very intuitive and easy to understand. Unlike common GIS solutions the Marble API and the usage of the widget is rather focused on people who don't know much about GIS. So its usage is quite easy to understand even if you feel scared by technical terms used in GIS.

Marble offers several interfaces to programming:

You can either create your own Marble plugins and paint inside those or you can subclass the MarbleWidget control. For a simple HelloWorld application see:

http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus

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