readme.md 4.9 KB
Newer Older
M
manjaro-xfce 已提交
1 2
# Qt Mercator Map Viewer

M
manjaro-xfce 已提交
3
## 1.特性
丁劲犇's avatar
丁劲犇 已提交
4 5
OpenStreetMap一般是使用Web服务发布瓦片和矢量数据的。本项目主要演示如何使用Qt 搭建一个简单的OpenStreetMap瓦片客户端,实现以下功能:

M
manjaro-xfce 已提交
6
1. OpenStreetMap 服务器瓦片的自动下载与本地缓存。
丁劲犇's avatar
丁劲犇 已提交
7

M
manjaro-xfce 已提交
8
2. 基于Qt插件的接口开发技术,实现高度可扩展的图层。提供两个图层插件范例。第一个插件演示了使用底层QPainter实现绘图、量测功能;第二个插件演示了使用QGraphicsScene系列模型-视图架构在可变比例尺地图上进行静态、动态标注的技术。
丁劲犇's avatar
丁劲犇 已提交
9

M
manjaro-xfce 已提交
10
3. 基于事件、呼叫的图层插件间通信技术。插件可以发布各自的功能,并与主框架、其他插件交互。一个典型的例子是标图插件可以从量测插件获得选取的区域信息,而标图插件支持从外部传入绘图指令完成所有界面上支持的功能。
丁劲犇's avatar
丁劲犇 已提交
11

M
manjaro-xfce 已提交
12
4. 基于Active-Qt的封装技术。这种技术使得 C#, MFC, VB应用可以方便的嵌入OpenStreetMap 地图,并获得事件、命令其动作。
丁劲犇's avatar
丁劲犇 已提交
13 14 15

经过不断试用与修改,这个查看器最终还是完成了设计、实现。查看器,顾名思义,没有编辑功能:说的白一点,只是一个以OpenStreetMap为底图的显示装置罢了。和专业GIS相比,这款基于插件的OpenStreetMap瓦片查看器客户端显得单薄。和消费类GIS(如面向浏览器的地图API)相比,它是本地的,似乎和Native应用更加合拍。

M
manjaro-xfce 已提交
16 17
工具使非计算机专业的工程师们可以拥有一款支持漫游、标图、动画效果的轻量级地理信息插件,特别是掌握C++、C#等本地工具的工程师们可以不经学习即能获得GIS二次开发能力。

M
manjaro-xfce 已提交
18
## 2.技术细节
M
manjaro-xfce 已提交
19

M
manjaro-xfce 已提交
20
技术细节参考博客(BLOG)
M
manjaro-xfce 已提交
21 22

[https://goldenhawking.blog.csdn.net/article/details/50530046](https://goldenhawking.blog.csdn.net/article/details/50530046)
M
manjaro-xfce 已提交
23 24 25 26 27
[https://goldenhawking.blog.csdn.net/article/details/50536047](https://goldenhawking.blog.csdn.net/article/details/50536047)
[https://goldenhawking.blog.csdn.net/article/details/50540203](https://goldenhawking.blog.csdn.net/article/details/50540203)
[https://goldenhawking.blog.csdn.net/article/details/50573015](https://goldenhawking.blog.csdn.net/article/details/50573015)
[https://goldenhawking.blog.csdn.net/article/details/50577231](https://goldenhawking.blog.csdn.net/article/details/50577231)
[https://goldenhawking.blog.csdn.net/article/details/50629028](https://goldenhawking.blog.csdn.net/article/details/50629028)
M
manjaro-xfce 已提交
28

M
manjaro-xfce 已提交
29
## 3.ActiveX 和 图层接口
M
manjaro-xfce 已提交
30

M
manjaro-xfce 已提交
31
参考文档:
丁劲犇's avatar
丁劲犇 已提交
32

M
manjaro-xfce 已提交
33
[documents/zh-CN/Qplanetosm_ActiveX.pdf](documents/zh-CN/Qplanetosm_ActiveX.pdf)
丁劲犇's avatar
丁劲犇 已提交
34

M
manjaro-xfce 已提交
35 36 37


## Introduction
38
---------------------------
丁劲犇's avatar
丁劲犇 已提交
39
We are very glad to publish qplanetosm viewer V1.0.0, a plug-in based cross platform opensource map viewer.
40
This project was orginally designed for Parkinglots status visualization only. A few month ago,  develop team find that plugin system in qt is strong enough , can do many other things than parkinglots project. Main features :
41

丁劲犇's avatar
丁劲犇 已提交
42
This Project contains a cross-platform qt-based openstreetmap(OSM) viewer.
43 44
	* Project qtviewer_planetosm is the main project, provides a plugin system for layer extension. Layers will be able to call coordinates convertion functions using specail interface provided by main framework; Layers can communicate with main-framework and other plugins using event system and function call system. Both event system and function call system is based on key-value style parament delivering (QMap<QString, QVariant>).
	* Project axqtviewer_planetosm stays at a same phycial path with qtviewer_planetosm, it is a win32 active-X warpper if qtviewer_planetosm. C#, VB, MFC and Old Web Apps in win32 will take advantage of this feature. It also provides a key-value event / function call system , using QString. It is mostly like a bridge across internal QMap<QString, QVariant> calls and external QString calls.
丁劲犇's avatar
丁劲犇 已提交
45 46 47 48
2 sample plugin examples, demonstrating how plugin works.
	* Project qtvplugin_grid demonstrating low-level painting and event handling using QPainter and Coordinates convertions.
	* Project qtvplugin_geomarker demonstrating heigh-level painting and event handling using QGraphicsScene system. It may be very interesting to see how to deal with map zooming in QGraphicsScene , keeping point marks same pixel size in different level.
1 ActiveX container, demonstrating how to draw animation marks on OSM Map.
49 50 51 52 53 54 55
	* testcontainer is a active-qt based container. in this container, features will be tested such like event system, plugin method system.

There are also several limitations for this project. 
	* The OSM tiles is just a BACKGROUND image, vector data is not supported. For another word, it is impossible to query road names, place names during navigating.
	* Projection system is limited to mercator projection, others is not supported.
	* In Linux system, active-X control is disabled, we will introduce D-bus or TCP server in future instead.
	
56