Maps and Navigation (C++)
地图和导航(C++)
Maps and Navigation provides C++ utilities for geocoding (finding a geographic coordinate from a street address) and navigation (including driving and walking directions).
地图和导航提供了用于地理编码(从街道地址查找地理坐标)和导航(包括驾驶和步行方向)的C++实用程序。
Currently it is not possible to interact with maps via C++. Mapping applications must use the Maps and Navigation (QML) API.
目前无法通过C++与地图交互。地图应用程序必须使用地图和导航(QML)API。
Geocoding
地理编码
In C++, an address-to-coordinate query is performed using the geocode() method of the QGeoCodingManager class. For coordinate-to-address queries, the reverseGeocode() method is available on the same class. Instances of QGeoCodingManager are available via QGeoServiceProvider.
在C++中,使用QGeoCodingManager类的geoce()方法执行地址到坐标查询。对于坐标来处理查询,reverseGeocode()方法可用于同一类。QGeoCodingManager的实例可以通过QGeoServiceProvider获得。
Key Classes
关键类
QGeoServiceProvider | Provides a QGeoCodingManager instance ready for use. 提供可供使用的QGeoCodingManager实例。 |
QGeoCodingManager | Accepts queries and produces QGeoCodeReply objects. |
QGeoCodeReply | Contains the results of a geocoding query. 包含地理编码查询的结果。 |
Navigation
导航
In C++, a route query is performed using the calculate() method of the QGeoRoutingManager class. The returned route reply can contain multiple routes to the same destination.
在C++中,路由查询是使用QGeoRoutingManager类的calculate()方法执行的。返回的路由回复可以包含到同一目的地的多条路由。
Key Classes
关键类
QGeoServiceProvider | Provides a QGeoCodingManager instance ready for use. |
QGeoRoutingManager | Accepts queries and produces QGeoRouteReply objects. |
QGeoRouteReply | Contains the results of a routing query. 包含路由查询的结果。 |
QGeoRoute | Contains information about a route. 包含有关路线的信息。 |
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.