size
require(["esri/renderers/smartMapping/symbology/size"], function(sizeSchemes) { /* code goes here */ });
esri/renderers/smartMapping/symbology/size
Object containing helper methods for generating optimal symbols for data-driven size visualizations. The getSchemes() method is used to generate symbol properties best suited to the given geometry type and basemap.
Method Overview
Name | Return Type | Summary | Object | |
---|---|---|---|---|
SizeScheme | Clones a size scheme object. more details | more details | size | |
SizeSchemes | Returns a primary scheme and secondary schemes defining symbol properties for size-based data-driven visualizions in a FeatureLayer. more details | more details | size |
Method Details
- cloneScheme(scheme){SizeScheme}
Clones a size scheme object.
Parameter:scheme SizeSchemeThe SizeScheme object to clone.
Returns:Type Description SizeScheme Returns a clone of the given size scheme object. Example:// clones the primary scheme returned from the getSchemes() method var sizeScheme = primaryScheme.clone();
- getSchemes(params){SizeSchemes}
Returns a primary scheme and secondary schemes defining symbol properties for size-based data-driven visualizions in a FeatureLayer. The
basemap
parameter determines the color of the graphics used to visualize each feature. ThegeometryType
determines which type of symbol to return.Parameters:params ObjectSee the table below for details of each parameter that may be passed to this function.
Specification:The basemap to pair with the visualization. This value indicates the best symbol color for visualizing features against the given basemap.
geometryType StringThe geometry type of the features to visualize.
Possible Values: point | multipoint | polyline | polygon
view SceneViewoptionalThe SceneView instance in which the scheme will be used. This property is only applicable when the scheme will be used in conjunction with 3D symbols.
worldScale BooleanoptionalIndicates if the size units of the scheme will be in meters. This should be
true
when the scheme is intended for 3D volumetric symbology. Aview
must be provided if this property is set totrue
.Returns:Type Description SizeSchemes Returns an object containing the optimal size scheme to use for the given basemap and secondary schemes that may also be used. Example:// gets the primary scheme for the features of the given geometry type and basemap var schemes = sizeSchemes.getSchemes({ basemap: map.basemap, geometryType: featureLayer.geometryType }); // the best default scheme for the layer and basemap var primaryScheme = schemes.primaryScheme;
Type Definitions
Properties defining the symbology scheme used to visualize features with attribute data-driven size.
- SizeSchemeForPoint
Properties defining the symbology scheme used to visualize point features driven by attribute data.
- Properties:
- color Color
The fill color of the marker symbol.
noDataColor ColorThe color of the marker symbol used to indicate features with no data and features that are out of range.
outline ObjectProperties for defining the outline of the marker symbol.
size NumberThe default size of the marker symbol in pixels or points.
noDataSize NumberThe size of the marker symbol (in pixels or points) used to indicate features with no data and features that are out of range.
minSize NumberThe minimum size of a marker symbol in pixels or points representing features with low data values.
maxSize NumberThe maximum size of a marker symbol in pixels or points representing features with high data values.
opacity NumberThe opacity of the marker symbol.
- SizeSchemeForPolygon
Properties defining the symbology scheme used to visualize polygon features driven by attribute data. When visualized by size, polygons are represented with marker symbols.
- Properties:
- marker SizeSchemeForPoint
The scheme defining the symbology of the marker symbol used to represent polygon features by size.
background ObjectThe schema defining the backgound symbol of the feature. This is a fill symbol.
opacity NumberThe opacity of the symbol.
- SizeSchemeForPolyline
Properties defining the symbology scheme used to visualize polyline features driven by attribute data.
- Properties:
- color Color
The color of the line symbol.
noDataColor ColorThe color of the line symbol used to indicate features with no data and features that are out of range.
width NumberThe default width of the line symbol in pixels or points.
noDataWidth NumberThe width of the line symbol in pixels or points used to indicate features with no data and features that are out of range.
minWidth NumberThe minimum width of a line symbol in pixels or points representing features with low data values.
maxWidth NumberThe maximum width of a line symbol in pixels or points representing features with high data values.
opacity NumberThe opacity of the line symbol.
- SizeSchemes
The return object of the getSchemes() method.
- Properties:
- primaryScheme SizeScheme
The size scheme best suited for the given basemap and geometry type.
secondarySchemes SizeScheme[]Additional size schemes that may be used to visualize data of the given geometry type overlaid on the given basemap.
basemapId StringThe ID of the basemap associated with the given schemes.