Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of style copy in TE Vector layer

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail the example analysis of style copying in TE vector layers. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

In the process of making fly, we need to set the style of vector layer, there are still many types of vector layer, and there are many attributes to be set in each type. The basic types are mainly divided into three categories, point layer, line layer and surface layer, the extension types of line and surface layer are relatively small, and the point layer contains more types, including icons, text, models and so on.

The following figure is a drop-down list of the types of point layers that can be extended:

There are also relatively many setting parameters for one type:

In the process of data production, fly data contains several data of the same type, and it is quite time-consuming to set the properties of these layers one by one. At this time, through program development, you can copy the style of the layer when a layer is set up.

The specific implementation is as follows:

1. First get the set vector layer, that is, the source layer, and use ProjectTree.FindItem (itemid) or other methods

2. Get the vector layer that needs to be set, that is, the target layer, and use ProjectTree.FindItem (itemid) or other methods

3. Make a list of the attributes of the style, such as those Text, Text Color and other English attributes in the above figure, into a list that can be cycled by the program.

4. A layer generally contains a FeatureGroup, and some layers also contain an annotation layer (Annotation). The main layer can be obtained through FeatureGroups [0], and the annotation layer can be obtained through FeatureGroups.Annotation.

5. SetClassification and SetProperty are available in FeatureGroup to style layers. These styles are cyclically acquired from the source layer through GetProperty and GetClassification.

6. Loop the list of styles, refresh the layer and display the new style.

7. The difference between SetClassification and SetProperty can be judged by using the code FeatureGroup.IsClassified (propertyName), which is embodied in the data production.

Normal properties, using SetProperty

Multiple attributes: using SetClassification

This is the end of this article on "sample Analysis of style replication in TE Vector layer". 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, please 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report