Before reading this article, you should first have an idea to use arcengine to develop C/S applications, A mature GIS project cannot directly organize the data in the SDE in the form of mxd in terms of data loading. This is unscientific for the following reasons:
1. Data security considerations
An mxd document contains detailed information about mxd data in the SDE database. Generally, the data owner does not want the information to be obtained from the outside.
2. Considering system flexibility
Dynamic symbolic layers can bring great flexibility to programs by dynamically loading the required same layer.
Having to load mxd file directly on mapcontrol, there will be questions about how mxd will not be used to display the symbolic layer. Next, I will introduce the dynamic symbolic layer in two ways:
Using arcengine to develop c/s application data loading is an important function module. the symbol layer in the data loading module is one of its core technologies:
1. Use the system symbolic configuration table to store the layer symbolic information symbolic layer.
First, create a layer symbolic configuration table in the relational database to record the symbolic information of each layer in detail:
As shown in the following table (I only list the configuration table design with simple symbols. For the unique value, you can design it as needed ):
Layer ID |
Symbolic type |
Symbol Library ID |
Symbol name |
|
Point Layer 1 |
Simple symbolic |
1 |
Railway Station |
|
Line Layer 1 |
Simple symbolic |
2 |
Railway Line |
|
Surface Layer 1 |
Simple symbolic |
3 |
Green Area |
|
Then, use each symbolic interface provided by arcengine to perform symbolic rendering on the layer.
2. Use represatation provided by arcengine9.3 to store the symbols
Representation is a new feature of arcgis9.3. It is a representation tool bar in ArcGIS Desktop to create more exquisite and complex map operations through representation.
Download(22.11 KB) 3 minutes ago
You can use the representation toolbar to store the map effect in the element class (only Geodatabase type ).
Download(25.98 KB) 3 minutes ago
Download(14.95 KB) 3 minutes ago
Download(37.78 KB) 3 minutes ago
From the above, we can see that the symbolic information of each element is stored in the corresponding data table in blob mode, so we do not need to configure the table for dynamic symbolic, use the representation-related interfaces and classes provided in the engine to represent each layer.
In summary, I have summarized the solution for layer symbolic development when using arcengine for C/S project development.