In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 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 and delete emptying reset points in Qt". The explanation in the article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "how to add and delete emptying reset points in Qt".
I. Preface
In the related projects of map application, the function of identifying some device points on the map and interacting with them is the most frequently used, so a mechanism is needed to dynamically add, delete, empty and reset. Reset means to reset the longitude and latitude of all points in the map. In fact, it is to empty out and then re-add the information of all points one by one. The asynchronous interaction function of JS is very powerful. It is OK to execute the corresponding JS function directly. There is no need to refresh the web page. At first, I didn't know how to JS when I did it many years ago. At that time, the worst way to think of it was to write it in the code, so every change required to reload the web page. Later, I found that it was really a bad way. Since there is an asynchronous refresh method, why not use it? since I learned the JS asynchronous refresh method. Simply change all kinds of methods into JS functions, and pass in the corresponding parameters, which take into account a variety of known situations as much as possible, making it convenient for users to add them.
When learning JS grammar, I found that the programs are more or less the same. as the saying goes, we can basically get started after we are familiar with the general grammar. the biggest difference with C++ is that he does not have the concept of data type. as an interpretive language, he automatically converts data types when it is executed, and all the work is left to the interpreter, which makes it very convenient for programmers and var everywhere. Even if it is an array or an object, everything is wav, and the specific data type is known only when the value is actually assigned.
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
IV. The related code void MapBaiDu::addMarker (QStringList & list) {/ / dynamically add points / / name indicates text text / / addr indicates address / / point indicates longitude and latitude coordinates / / action indicates what action is triggered after clicking-do not process 1-send signal / / animation indicates whether to animate effect 0-do not process 1-Jump 2-fall / / iconfile indicates icon file path If it is not set, the default icon is used. Note that the size of the picture / / iconindex indicates that the icon corresponds to the index list in the picture.
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.