<String > expression |
Optional |
Deprecated. As of v3.19 use valueExpression instead. Allows a size to be defined based on the scale. "view.scale" is the only expression currently supported. Added at 3.14 |
<String | Function > field |
Required |
Required name of the feature attribute field that contains the data value. Or a function that returns the data value. |
<Object > legendOptions |
Optional |
An object providing options for displaying the size ramp in the legend. See the object specification table for legendOptions above. |
<Number > maxDataValue |
Optional |
Maximum data value. |
<Object > maxSize |
Required |
Specifies the largest marker size to use at any given map scale. Note: This is required if valueUnit is set to "unknown".
In version 3.13, this could only be set as a number which represented the symbol size in pixels.
Beginning with 3.14, it now is an object that contains:
expression : (Required) A string value that allows a size to be defined based on the scale. "view.scale" is the only expression currently supported, but is subject to change in future implementations.
stops : (Required) An array of objects that define the maximum size of the symbol at various values of the expression . Each object in the array has a numeric size property and a numeric value property. If the value calculated from the expression matches the value of a stop, than the size corresponding to that stop is selected. For example, if expression is set to "view.scale" , the value corresponds to the map's scale. The size represents the maximum symbol size (in pixels) that corresponds to this scale. If the map scale matches the scale value of a stop, the size corresponding to that stop value is used as the maximum symbol size for the features. If the map scale value falls between two stops, the maximum symbol size is interpolated between the sizes of the two stops.
The minSize and maxSize stop values are usually the same, although it is possible to have different values depending on how minSize is calculated versus the maxSize .
The sample snippet below illustrates a scenario where the stops are optimized and minSize and maxSize values are different. In this snippet, all the scales smaller than 288895 have a minSize of 16 and maxSize of 80 . This could be optimized by removing the first stop from both minSize and maxSize . The scale values would remain identical even after removing the first stop. This could vary depending on how many consecutive stops have the same size.
{
"type": "sizeInfo",
"field": "pop2000",
"minDataValue": 493782,
"maxDataValue": 33871648,
"valueUnit": "unknown",
"minSize": {
"type": "sizeInfo",
"expression": "view.scale",
"stops": [
{ "value": 1128, "size": 16 },
{ "value": 288895, "size": 16 },
{ "value": 73957191, "size": 9 },
{ "value": 591657528, "size": 2 }
]
},
"maxSize": {
"type": "sizeInfo",
"expression": "view.scale",
"stops": [
{ "value": 1128, "size": 80 },
{ "value": 288895, "size": 80 },
{ "value": 73957191, "size": 50 },
{ "value": 591657528, "size": 25 }
]
},
}
type : String value indicating the type of rendering, e.g., "sizeInfo".
target : String value indicating that the sizeInfo should be applied to the outline of polygons. This value can be "outline" or null .
"maxSize": {
"type": "sizeInfo",
"expression": "view.scale",
"stops": [
{"value": 1128, "size": 80},
{"value": 288895, "size": 80},
{"value": 73957191, "size": 50},
{"value": 591657528, "size": 25}
]
}
|
<Number > minDataValue |
Required |
Minimum data value (required if valueUnit is "unknown"). |
<Object > minSize |
Required |
Specifies the smallest marker size to use at any given map scale. Note: This is required if valueUnit is set to "unknown".
In version 3.13, this could only be set as a number which represented the symbol size in pixels.
Beginning with 3.14, it now is an object that contains:
expression : (Required) A string value that allows a size to be defined based on the scale. "view.scale" is the only expression currently supported, but is subject to change in future implementations.
stops : (Required) An array of objects that define the minimum size of the symbol at various values of the expression . Each object in the array has a numeric size property and a numeric value property. If the value calculated from the expression matches the value of a stop, than the size corresponding to that stop is selected. For example, if expression is set to "view.scale" , the value corresponds to the map's scale. The size represents the minimum symbol size (in pixels) that corresponds to this scale. If the map scale matches the scale value of a stop, the size corresponding to that stop value is used as the minimum symbol size for the features. If the map scale value falls between two stops, the minimum symbol size is interpolated between the sizes of the two stops.
The minSize and maxSize stop values are usually the same, although it is possible to have different values depending on how minSize is calculated versus the maxSize .
The sample snippet below illustrates a scenario where the stops are optimized and minSize and maxSize values are different. In this snippet, all the scales smaller than 288895 have a minSize of 16 and maxSize of 80 . This could be optimized by removing the first stop from both minSize and maxSize . The scale values would remain identical even after removing the first stop. This could vary depending on how many consecutive stops have the same size.
{
"type": "sizeInfo",
"field": "pop2000",
"minDataValue": 493782,
"maxDataValue": 33871648,
"valueUnit": "unknown",
"minSize": {
"type": "sizeInfo",
"expression": "view.scale",
"stops": [
{ "value": 1128, "size": 16 },
{ "value": 288895, "size": 16 },
{ "value": 73957191, "size": 9 },
{ "value": 591657528, "size": 2 }
]
},
"maxSize": {
"type": "sizeInfo",
"expression": "view.scale",
"stops": [
{ "value": 1128, "size": 80 },
{ "value": 288895, "size": 80 },
{ "value": 73957191, "size": 50 },
{ "value": 591657528, "size": 25 }
]
},
}
type : String value indicating the type of rendering, e.g., "sizeInfo".
target : String value indicating that the sizeInfo should be applied to the outline of polygons. This value can be "outline" or null .
"maxSize": {
"type": "sizeInfo",
"expression": "view.scale",
"stops": [
{"value": 1128, "size": 80},
{"value": 288895, "size": 80},
{"value": 73957191, "size": 50},
{"value": 591657528, "size": 25}
]
}
|
<String > normalizationField |
Optional |
Name of the feature attribute field used for data normalization. The data value obtained from field is divided by the value obtained from normalizationField before calculating the symbol size. |
<Object[] > stops |
Required |
Added at 3.14
An array of objects that define the size of the symbol. It takes the following properties:
size : A numeric value indicating the size of the symbol
value : A numeric value indicating the value the symbol represents.
var stops =
[
{ "value": 1128, "size": 16 },
{ "value": 288895, "size": 16 },
{ "value": 73957191, "size": 9 },
{ "value": 591657528, "size": 2 }
]
|
<String > type |
Required |
This value must be sizeInfo . |
<String > valueExpression |
Optional |
An Arcade expression evaluating to a number. This expression can reference field values using the $feature global variable and perform mathematical calculations and logical evaluations at runtime. The values returned from this expression are the data used to drive the visualization. Therefore, this property is typically used as an alternative to field in visual variables. |
<String > valueExpressionTitle |
Optional |
The title identifying and describing the associated Arcade expression as defined in the valueExpression property. This is displayed as the title of the corresponding size ramp in the Legend in the absence of a provided title in the legendOptions property. |
<String > valueRepresentation |
Required |
Specifies what the data value measures if it represents a real world distance (required if valueUnit is not "unknown"). The following values are supported:
radius : Data value represents the radius of a circular feature.
diameter : Data value represents the diameter of a circular feature.
area : Data value represents the area of a feature.
width : Data value represents the width of a line.
distance : Data value represents the distance from the center line (one half of the width).
|
<String > valueUnit |
Required |
Required unit of measurement if the data represents a real world distance quantity. Valid values are:
"unknown","inches", "feet", "yards", "miles", "nautical-miles", "millimeters", "centimeters", "decimeters", "meters", "kilometers", "decimal-degrees" .
If the data value represents a non-distance quantity (for example traffic count, census data) then valueUnit should be set to "unknown" . |