如何在世界地图图像上突出显示特定国家
我有 IP 数据的实时流。
我想使用 QT 和 QT 在世界地图图像上显示与接收到的 IP 相对应的地理数据。 C++。
在这种情况下你会推荐什么?
PNG 或 SVG?
有没有比维基百科的空白地图更好的图像?
您会推荐什么地理数据数据库?
谢谢你!
I have a real-time flow of IPs' data.
I would like to display geodata, corresponding to received IPs, on world map image using QT & C++.
What would you recommend in that case?
PNG or SVG?
Are there any images out better than Wikipedia's blank maps?
What geodata database would you recommend?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建一个 QWidget,它是 QGraphicsView 的子类,背景是世界的 QImage,QPolygons 表示地图顶部的叠加层(以每个国家的形状)。
然后每隔几毫秒调用一次 update() 。在重载的 PaintEvent 函数中,检查新数据并根据 IP 来源突出显示国家/地区。保持该国家/地区突出显示一定的毫秒或秒数,然后淡化其 alpha 或其他内容。
至于地球图像,请咨询 NASA。它们可以在标准地图投影中为您提供高分辨率的地球图像。
You could create a QWidget which subclasses QGraphicsView, with a QImage of the world in the background, and QPolygons representing overlays (in the shape of each country) on top of the map.
Then call update() every few milliseconds. In your overloaded PaintEvent function, check for new data and highlight a country based on where the IPs are from. Keep that country highlighted for a certain number of milliseconds or seconds, and fade its alpha or something.
As for earth imagery, check with NASA. They can provide you with high, high resolution images of earth in your standard map projection.