In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you the "QT map compilation of how to achieve offline outline map", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "QT map compilation of how to achieve offline outline map" this article.
I. Preface
When offline contours are used, there is no convenience for online contours. Online contours can be directly passed into the name, and offline ones can only be drawn by themselves. Generally, you need to use a regional profile downloader to download the corresponding js files for the areas you need. In fact, it is a collection of coordinate points, which can be downloaded where there is a network. It can also be obtained by drawing irregular polygonal areas on the map, as long as you are familiar with the outline of the area.
The loading of the offline contour map first introduces the coordinate point array js file of the region, and then reads the data of the file into the custom addBoundary function to draw, and can also set the color, thickness, transparency and so on.
II. Functional features
Both online map and offline map modes are supported.
It also supports webkit kernel, webengine kernel, miniblink kernel and IE kernel.
Multiple dimension points can be set, including name, address, longitude and latitude.
You can set whether the map can be clicked, dragged, or scrolled.
You can set the protocol version, secret key, theme style, central coordinates, central city, geocoding location, and so on.
Can set the map zoom scale and level, thumbnails, scale, road information and other controls visible.
Support map interaction, such as mouse press to get the latitude and longitude of the corresponding location.
Support to query the route, you can set the starting point, end point, route mode, route mode, route scheme (minimum time, least transfer, least walk, do not take the subway, shortest distance, avoid highway).
Can display dots, lines and surfaces tools, and can draw lines, points, rectangles, circles and so on directly on the map.
Administrative divisions can be set up, a certain urban area drawing layer can be specified, and the online map automatically outputs the administrative division boundary points to the js file for offline map use.
Multiple coverings can be added statically or dynamically. Support points, broken lines, polygons, rectangles, circles, arcs, point aggregations, etc.
Provides a function interface to handle latitude and longitude resolution to address and address resolution to latitude and longitude coordinates.
The demo provided can be directly selected to perform corresponding processing such as route query.
You can get the collection of point coordinate information queried by the route, such as for robot coordinate navigation.
Encapsulates a wealth of functions such as deleting specified points and all points, deleting specified coverings and all coverings, etc.
Callout point pop-up box information can be customized in standard html format.
Dimension point click event optional 0-do not process 1-own pop-up box 2-send a signal.
Dimension points can be animated 0-do not process 1-Jump 2-fall
Dimension points can be set up local picture files and so on.
The function interface is friendly and unified, and it is easy to use, just one class.
Support js dynamic interaction to add points, delete points, clear points, reset points, no need to refresh the page.
Support any Qt version, any system, any compiler.
Third, experience address
Experience address: https://pan.baidu.com/s/1ZxG-oyUKe286LPMPxOrO2A extraction code: o05q file name: bin_map.zip
Domestic site: https://gitee.com/feiyangqingyun
International site: https://github.com/feiyangqingyun
4. Effect picture
5. Related code void MapBaiDu::addOverlay (QStringList & list) {if (overlayTypes.count () = 0 | | overlayTypes.count ()! = overlayPoints.count ()) {return;} / / judge different types and add multiple coverings int count = overlayTypes.count (); for (int I = 0; I < count; + + I) {OverlayType type = overlayTypes.at (I); QStringList points = overlayPoints.at (I) QString property = getOverlayProperty (); / / to support multiple coverings, each overlay has a different variable name QString name; if (type = = OverlayType_Marker) {name = QString ("marker%1") .Arg (I + 1); list
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.