You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Shared/Samples/Apply dictionary renderer to feature layer/README.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,30 +2,25 @@
2
2
3
3
Convert features into graphics to show them with mil2525d symbols.
4
4
5
-

5
+

6
6
7
7
## Use case
8
8
9
-
A dictionary renderer uses a style file along with a rule engine to display advanced symbology.
10
-
This is useful for displaying features using precise military symbology.
9
+
A dictionary renderer uses a style file and a rule engine to display advanced symbology. This is useful for displaying features using precise military symbology.
11
10
12
11
## How to use the sample
13
12
14
13
Pan and zoom around the map. Observe the displayed military symbology on the map.
15
14
16
15
## How it works
17
16
18
-
1. Create a `Geodatabase` using `Geodatabase(geodatabasePath)`.
19
-
2. Load the geodatabase using `Geodatabase.load()`.
20
-
3. Instantiate a `DictionarySymbolStyle` using `DictionarySymbolStyle(dictionarySymbolStylePath)`.
21
-
4. Load the dictionarySymbolStyle using `DictionarySymbolStyle.load()`.
22
-
5. Cycle through each `GeodatabaseFeatureTable` from the geodatabase using `Geodatabase.featureTables`.
23
-
6. Create a `FeatureLayer` from each table within the geodatabase using `FeatureLayer(GeodatabaseFeatureTable)`.
24
-
7. Load the feature layer with `FeatureLayer.load()`.
25
-
8. After the last layer has loaded, create a new `Envelope` from a union of the extents of all layers.
26
-
9. Set the envelope to be the `Viewpoint` of the map view using `MapView.setViewpoint(new Viewpoint(Envelope))`.
27
-
10. Add the feature layer to map using `Map.operationalLayers.add(FeatureLayer)`.
28
-
11. Create a `DictionaryRenderer(SymbolDictionary)` and assign it to the feature layer renderer `featureLayer.renderer = dictionaryRenderer`.
17
+
1. Create and load a `Geodatabase` using a local ".geodatabase" file.
18
+
2. Create and load a `DictionarySymbolStyle` using a style file.
19
+
3. Create a `FeatureLayer` for each of the geodatabase's `featureTables`.
20
+
4. Create a `DictionaryRenderer` using the dictionary symbol style and assign it to the feature layer's `renderer`.
21
+
5. Add the feature layers to the map using `addOperationalLayers(_:)`.
22
+
6. Load the feature layers and create a new `Envelope` from a union of the extents of all layers.
23
+
7. Use the envelope to create a viewpoint and pass it to the map view.
29
24
30
25
## Relevant API
31
26
@@ -34,12 +29,7 @@ Pan and zoom around the map. Observe the displayed military symbology on the map
34
29
35
30
## Offline data
36
31
37
-
Read more about how to set up the sample's offline data [here](https://github.com/Esri/arcgis-runtime-samples-qt#use-offline-data-in-the-samples).
This sample uses the [Joint Military Symbology MIL-STD-2525D style file](https://www.arcgis.com/home/item.html?id=e34835bf5ec5430da7cf16bb8c0b075c) and the [Military Overlay geodatabase](https://www.arcgis.com/home/item.html?id=e0d41b4b409a49a5a7ba11939d8535dc). Both are downloaded from ArcGIS Online automatically.
0 commit comments