In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to achieve overlay interaction with Qt". In daily operation, I believe that many people have doubts about how to achieve overlay interaction with Qt. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to achieve overlay interaction with Qt". Next, please follow the editor to study!
I. Preface
Baidu Map itself provides a very friendly and perfect JS function interface for adding all kinds of overlays, such as annotation points, rectangular areas, circular areas, irregular segments, arcs, etc., which basically covers a variety of application scenarios, and the official documents and examples are also relatively perfect. Although the examples use html+js, programmers who can write programs can understand them. For example, if Qt wants to interact with him, just interact with him in the traditional way, and write the corresponding js function in the web file. Baidu Maps actually provides a floating toolbar, which is supported by both online and offline maps. After opening the floating toolbar, select the corresponding cover to draw on the map directly in the floating toolbar, and then use the js method to obtain the location coordinates of the corresponding cover.
The cover information set by the method of the map itself will be scaled automatically with the zoom of the map, which is a better way. Another way is to directly place a widget transparent overlay on the web map control, and redraw the signals transmitted by the changes such as map movement and scaling on widget. This method is very convenient for students with higher mastery length in painter drawing. After all, the drawing is under the control of the master.
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, effect picture
5. Related code void MapBaiDu::addPolyline (QStringList & list) {/ / generic attributes of the covering, including color line thickness, etc. You can change QString property = getOverlayProperty () by yourself; / / add broken line list dynamically
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.