ESM: import * as sizeSchemes from "@arcgis/core/smartMapping/symbology/size.js";
CDN: const sizeSchemes = await $arcgis.import("@arcgis/core/smartMapping/symbology/size.js");
Object: @arcgis/core/smartMapping/symbology/size
Since: ArcGIS Maps SDK for JavaScript 4.2
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 Method DetailsClones a size scheme object.
Returns
Example
// clones the primary scheme returned from the getSchemes() method
let sizeScheme = primaryScheme.clone();
Returns a primary scheme and secondary schemes defining symbol properties for size-based data-driven visualizations in a FeatureLayer. The basemap
parameter determines the color of the graphics used to visualize each feature. The geometryType
determines which type of symbol to return.
Parameters
Specification
See the table below for details of each parameter that may be passed to this function.
Specification
optionalThe Esri basemap to pair with the visualization. This value indicates the best symbol colors for visualizing features against the given basemap. If you have a non-Esri basemap (e.g. a VectorTileLayer basemap with a custom style) or no basemap at all, then use the basemapTheme
parameter instead of this parameter.
If you have a non-Esri basemap (e.g. a VectorTileLayer basemap with a custom style) or no basemap at all, use this parameter to indicate whether the background of the visualization is light
or dark
.
Possible Values:"light"|"dark"
The geometry type of the features to visualize.
Possible Values:"point"|"multipoint"|"polyline"|"polygon"
optionalThe 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.
optionalIndicates if the size units of the scheme will be in meters. This should be true
when the scheme is intended for 3D volumetric symbology. A view
must be provided if this property is set to true
.
Returns
Type Description SizeSchemes | null | undefined 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
let schemes = sizeSchemes.getSchemes({
basemap: map.basemap,
geometryType: featureLayer.geometryType
});
// the best default scheme for the layer and basemap
let primaryScheme = schemes.primaryScheme;
getThemes(basemap){Theme[]}
Returns metadata for the available themes. If a basemap is provided, returns themes that work best with the given basemap.
Returns
Type Description Theme[] Returns an object containing information about the available themes for the given basemap.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.
The fill color of the marker symbol.
The color of the marker symbol used to indicate features with no data and features that are out of range.
Properties for defining the outline of the marker symbol.
The outline color of the marker symbol.
The width of the marker symbol in pixels or points.
The default size of the marker symbol in pixels or points.
The size of the marker symbol (in pixels or points) used to indicate features with no data and features that are out of range.
The minimum size of a marker symbol in pixels or points representing features with low data values.
The maximum size of a marker symbol in pixels or points representing features with high data values.
optionalThe 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.
The scheme defining the symbology of the marker symbol used to represent polygon features by size.
The schema defining the backgound symbol of the feature. This is a fill symbol.
The color of the fill symbol representing the polygon.
Properties for defining the outline of the background fill symbol.
The outline color of the background fill symbol.
The width of the background fill symbol's outline in pixels or points.
The opacity of the symbol.
SizeSchemeForPolyline
Properties defining the symbology scheme used to visualize polyline features driven by attribute data.
The color of the line symbol.
The color of the line symbol used to indicate features with no data and features that are out of range.
The default width of the line symbol in pixels or points.
The width of the line symbol in pixels or points used to indicate features with no data and features that are out of range.
The minimum width of a line symbol in pixels or points representing features with low data values.
The maximum width of a line symbol in pixels or points representing features with high data values.
optionalThe opacity of the line symbol.
SizeSchemes
The return object of the getSchemes() method.
The size scheme best suited for the given basemap and geometry type.
Additional size schemes that may be used to visualize data of the given geometry type overlaid on the given basemap.
optionalThe ID of the basemap associated with the given schemes.
optionalIndicates whether the average basemap color is light
or dark
.
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