Skip to content

Commit 712f59a

Browse files
committed
Update readme.
1 parent 6fccec1 commit 712f59a

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

Shared/Samples/Apply dictionary renderer to feature layer/README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,25 @@
22

33
Convert features into graphics to show them with mil2525d symbols.
44

5-
![Image of apply dictionary renderer to feature layer](ApplyDictionayRendererToFeatureLayer.png)
5+
![Image of Apply dictionary renderer to feature layer sample](apply-dictionary-renderer-to-feature-layer.png)
66

77
## Use case
88

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.
1110

1211
## How to use the sample
1312

1413
Pan and zoom around the map. Observe the displayed military symbology on the map.
1514

1615
## How it works
1716

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.
2924

3025
## Relevant API
3126

@@ -34,12 +29,7 @@ Pan and zoom around the map. Observe the displayed military symbology on the map
3429

3530
## Offline data
3631

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).
38-
39-
Link | Local Location
40-
---------|-------|
41-
|[Mil2525d Stylx File](https://www.arcgis.com/home/item.html?id=c78b149a1d52414682c86a5feeb13d30)| `<userhome>`/ArcGIS/Runtime/Data/styles/mil2525d.stylx |
42-
|[Military Overlay geodatabase](https://www.arcgis.com/home/item.html?id=e0d41b4b409a49a5a7ba11939d8535dc)| `<userhome>`/ArcGIS/Runtime/Data/geodatabase/militaryoverlay.geodatabase |
32+
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.
4333

4434
## Tags
4535

Shared/Samples/Apply dictionary renderer to feature layer/README.metadata.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"category": "Visualization",
33
"description": "Convert features into graphics to show them with mil2525d symbols.",
44
"ignore": false,
5-
"images": [],
5+
"images": [
6+
"apply-dictionary-renderer-to-feature-layer.png"
7+
],
68
"keywords": [
79
"military",
810
"symbol",
241 KB
Loading

0 commit comments

Comments
 (0)