In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 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 add custom information to a single object in the secondary development of te, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let's take a look at it.
In the secondary development of te, attribute information can be stored in the vector layer, and the attribute information of a single object can be obtained by clicking on the object in the layer, but a single object in fly can only get the basic attribute information in te, such as a text tag, which can be identified by the name on the information tree of fly, or the text on the text tag, and some other information is basic attributes. In fact, te also provides interfaces to add custom attribute information to these individual objects, and these custom information can be obtained through the developed interface.
These attribute information, when you need to develop, first add to fly, save in fly, and the information can be saved.
The specific implementation method is as follows (C #):
/ / create an object with set_ClientData in it. The keyword and the content contained in it are all in text format.
Var hole = sgworld.Creator.CreateHoleOnTerrain (sgworld.Creator.GeometryCreator.CreateGeometryFromWKT ("POLYGON (6 / 6 / 11 / 11 / 11 / 11 / 11 / 11 / 11 / 11 / 11 / 11 / 6 / 6), string.Empty," Hole on terrain ")
/ / this adds key content information to the object
Hole.set_ClientData ("keywords", "information content")
/ / the information in the content can be extracted through the get function.
Var data = hole.get_ClientData ("keyword")
This method is relatively simple, that is, it needs to be written during the development of the program.
In js, you write in a different way.
/ / directly through the information equal to the keyword in ClientData
Hole.ClientData ("keyword") = "information content"
/ / extract the information from the content through ClientData
Var data = hole.ClientData ("MyData")
Thank you for reading this article carefully. I hope the article "how to add custom information to a single object in the secondary development of TE" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.