In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to filter map clicks in the secondary development of TE. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
In the secondary development of TE, the mouse click on the 3D map is realized by connecting the mouse click event OnLButtonClicked, and the return of this event is Flags (mouse click mode), X (screen horizontal coordinates of 3D map), Y (screen vertical coordinates of 3D map). According to the coordinates of x and y, using the PixelToWorld method under Window, you can obtain an IWorldPointInfo object, which contains an object's id (ObjectID). Empty when there is no map object in the point, a geospatial location of the current mouse click (IPosition) and the type of scene object clicked (Type).
In development, sometimes according to the click of the object, display pop-up bubble information, or perform some operations in the map, first of all, to get the object, it is necessary to determine that the object's ObjectID cannot be empty, so that you can use the GetObject method (in both Creator and ProjectTree, after the id is unified, the effect is the same), get the clicked object, otherwise an error will be reported.
After obtaining the object, you can judge the type of the object, such as label, line, face, etc., because the mouse click can be obtained from all the objects on the map, so according to the folder where the object is located, the vector data should be judged according to the name of the layer. whether to respond to the mouse click.
In the interface of ProjectTree, we can judge the parent node of a single object, that is, the id of the upper Group, according to the GetNextItem method, and then use the GetItemName method to obtain the name of the Group and judge, so as to display the corresponding information.
For the objects in the layer, according to id, the acquired object is IFeature, and the object contains the LayerID of the layer. After obtaining the id of the layer, you can also use the GetItemName method to obtain the name of the layer and filter the layer information.
Of course, getting an object in GetObject can also be controlled according to the type of object.
A single object contains the main attribute information, which is the tree name of the object, which can be used as a keyword to return information, or it can be written and read in ClientData.
The layer contains attributes, which can be associated according to the attribute information, and the information contained in the layer can be flexibly controlled.
Thank you for reading! This is the end of this article on "how to filter map clicks in the secondary development of TE". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
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.