A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/unique-types/ below:

Unique types | Overview | ArcGIS Maps SDK for JavaScript 4.33

USA freeways styled with a unique value renderer displaying freeway types

What is a unique types style?

A unique types style assigns distinct symbols to unique data values returned from a field or expression in a layer. You can use this style to visualize what something represents, such as:

How a unique types style works

This style is configured with a Unique Value Renderer. This renderer requires the following:

  1. A reference to a data value either from a field name, or an Arcade expression.
  2. A list of unique value infos that match a unique symbol with an expected value returned from the field or expression.
Examples Categorical data

This example demonstrates how to visualize categories using a string attribute value. The app visualizes freeways based on their classification: interstate, state highway, or U.S. highway.

  1. Create a Unique Value Renderer.
  2. Reference the field name containing the classification values.
  3. Create unique value info objects and assign a symbol to each expected value.
  4. You can optionally add a default symbol to represent all features that don't have a matching value.

Expand

Use dark colors for code blocks Copy

31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
      const hwyRenderer = {
        type: "unique-value",
        legendOptions: {
          title: "Freeway type",
        },
        field: "RTTYP",
        uniqueValueInfos: [
          {
            value: "S",
            label: "State highway",
            symbol: {
              type: "simple-line",
              color: "#e6d800",
              width: "6px",
              style: "solid",
            },
          },
          {
            value: "I",
            label: "Interstate",
            symbol: {
              type: "simple-line",
              color: "#e60049",
              width: "6px",
              style: "solid",
            },
          },
          {
            value: "U",
            label: "US Highway",
            symbol: {
              type: "simple-line",
              color: "#9b19f5",
              width: "6px",
              style: "solid",
            },
          },
        ],
      };
Points of interest (3D)

This example demonstrates how to visualize points of interest (POI) in a 3D scene. This demo shows how to create POI symbols with a PictureMarkerSymbol. You can also use web styles to create the same visualization.

  1. Create a unique value renderer.
  2. Reference the field name containing the location type (e.g. museum, park, etc.).
  3. Create unique value info objects and assign a symbol to each expected value.

Expand

Use dark colors for code blocks Copy

90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
      // Expand the code above to view how each marker
      // symbol is created in getUniqueValueSymbol()
      const pointsRenderer = {
        type: "unique-value",
        field: "Type",
        uniqueValueInfos: [
          {
            value: "Museum",
            symbol: getUniqueValueSymbol(
              "https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/live/Museum.png",
              "#D13470",
            ),
          },
          {
            value: "Restaurant",
            symbol: getUniqueValueSymbol(
              "https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/live/Restaurant.png",
              "#F97C5A",
            ),
          },
          {
            value: "Church",
            symbol: getUniqueValueSymbol(
              "https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/live/Church.png",
              "#884614",
            ),
          },
          {
            value: "Hotel",
            symbol: getUniqueValueSymbol(
              "https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/live/Hotel.png",
              "#56B2D6",
            ),
          },
          {
            value: "Park",
            symbol: getUniqueValueSymbol(
              "https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/live/Park.png",
              "#40C2B4",
            ),
          },
        ],
      };
Ordinal data

This example demonstrates how to create ordinal categories from a numeric field attribute using an Arcade expression. This app classifies highways by low, medium, or high truck traffic.

Note

You can also use a class breaks renderer to accomplish the same visualization using numeric data.

  1. Create a unique value renderer.
  2. Write an Arcade expression to classify the data into ordinal categories: low, medium, and high. Then reference it in the valueExpression property. See the snippet below.
  3. Create unique value info objects and assign a symbol to each expected value.
  4. You can optionally add a default symbol to represent all features that don't have a matching value.

Arcade expression classifying the numeric data

Use dark colors for code blocks Copy

24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 26 27 28 29 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
      var traffic = $feature.AADT;
      When(
        traffic > 80000, "High",
        traffic > 20000, "Medium",
        "Low"
      );

Reference the Arcade expression in the valueExpression property

Expand

Use dark colors for code blocks Copy

43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
      const renderer = {
        type: "unique-value",
        valueExpression: `
            var traffic = $feature.AADT;
            When(
              traffic > 80000, "High",
              traffic > 20000, "Medium",
              "Low"
            );
          `,
        valueExpressionTitle: "Traffic volume",
        uniqueValueInfos: [
          {
            value: "High",
            symbol: {
              type: "simple-line",
              color: "#810f7c",
              width: "6px",
              style: "solid",
            },
          },
          {
            value: "Medium",
            symbol: {
              type: "simple-line",
              color: "#8c96c6",
              width: "3px",
              style: "solid",
            },
          },
          {
            value: "Low",
            symbol: {
              type: "simple-line",
              color: "#9d978b",
              width: "1px",
              style: "solid",
            },
          },
        ],
      };
Categorical data (3D)

This example visualizes buildings based on building type: residential, commercial or mixed use. A unique value renderer assigns a color to each building based on the building's usage attribute.

Steps
  1. Create different symbols for each building type.
  2. Assign the symbols to a unique value renderer.
  3. Assign the renderer to the scene layer.

Expand

Use dark colors for code blocks Copy

30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
      const typeRenderer = {
        type: "unique-value",
        legendOptions: {
          title: "Building Type",
        },
        defaultSymbol: {
          type: "mesh-3d",
          symbolLayers: [
            {
              type: "fill",
              material: { color: "#FFB55A", colorMixMode: "replace" },
            },
          ],
        },
        defaultLabel: "Others",
        field: "landuse",
        uniqueValueInfos: [
          {
            value: "MIPS",
            symbol: {
              type: "mesh-3d",
              symbolLayers: [
                {
                  type: "fill",
                  material: { color: "#FD7F6F", colorMixMode: "replace" },
                },
              ],
            },
            label: "Office",
          },
          {
            value: "RESIDENT",
            symbol: {
              type: "mesh-3d",
              symbolLayers: [
                {
                  type: "fill",
                  material: { color: "#7EB0D5", colorMixMode: "replace" },
                },
              ],
            },
            label: "Residential",
          },
          {
            value: "MIXRES",
            symbol: {
              type: "mesh-3d",
              symbolLayers: [
                {
                  type: "fill",
                  material: { color: "#BD7EBE", colorMixMode: "replace" },
                },
              ],
            },
            label: "Mixed use",
          },
          {
            value: "MIXED",
            symbol: {
              type: "mesh-3d",
              symbolLayers: [
                {
                  type: "fill",
                  material: { color: "#B2E061", colorMixMode: "replace" },
                },
              ],
            },
            label: "Mixed use without residential",
          },
        ],
      };
API support Full support Partial support No support

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4