In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to add Qt dynamic". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to add Qt dynamic"!
I. Preface
When adding device points or area shapes, we will consider whether to write directly static to the web page to load or dynamic js function to load asynchronously. This needs to be based on the actual needs of the site. If you only need to load once, it is recommended to be static. If you still need to add dynamically during the run, use the dynamic js function interaction method, most of the scenes are dynamically added. After all, this is executed asynchronously, and it is relatively flexible, and it is silly to write it into the web page in a static way. The data can be seen on the web page, and there is no confidentiality to speak of. In the previous two articles to do administrative divisions and point aggregation, the two methods are also supported, specific on-site how to facilitate how to come.
Adding dynamically is equivalent to making the demo on the official website in the form of js function calls. The demo on the official website is mainly demonstrated in the way of static writing. In order to be more intuitive and easier to understand, if it is a Qt programmer or C++ program, it will take a lost time to learn how to encapsulate it into a js function call. After all, there is no concept of data type in js, and unity is var. Equivalent to the QVariant type in Qt, the so-called everything is var, arrays and array objects are handled directly with [], which is quite convenient.
II. Functional features
Both online map and offline map modes are supported.
Support webkit kernel, webengine kernel and IE kernel at the same time.
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.
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
4. Related code void MapBaiDu::addPolyline (QStringList & list) {/ / Common attributes of covers, 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.