Method Overview
Name | Return Type | Summary | |
---|---|---|---|
Object | Clones a type scheme object. more details | more details | |
Object | Returns a primary scheme and secondary schemes defining symbol properties for type-based data-driven visualizions in a Layer. more details | more details |
Method Details
cloneScheme(scheme){Object}
Clones a type scheme object.
Parameter:scheme PointTypeScheme | PolylineTypeScheme | PolygonTypeSchemeThe type scheme object to clone.
Returns:Type Description Object Returns a clone of the given type scheme object. Example:// clones the primary scheme returned from the getSchemes() method var typeScheme = primaryScheme.clone();
getSchemes(params){Object}
Returns a primary scheme and secondary schemes defining symbol properties for type-based data-driven visualizions in a Layer. 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.
Known Values: point | multipoint | polyline | polygon | meshoptionalworldScale BooleanIndicates 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
.optionalview SceneViewThe 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.
Returns:Type Description Object Returns an object containing the optimal type scheme to use for the given basemap; it also contains secondary schemes. See the table below for more details of this object. Property Type Description primaryScheme PointTypeScheme | PolylineTypeScheme | PolygonTypeScheme The type scheme best suited for the given basemap and geometry type. secondarySchemes Object[] Additional type schemes that may be used to visualize data of the given geometry type overlaid on the given basemap. 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
PointTypeScheme
Properties defining the symbology scheme used to visualize point features driven by type-based attribute data.
Properties:colors Color[]The fill colors of the point symbols comprising the theme.
noDataColor ColorThe color of the point symbol used to indicate features with no data.
outline ObjectProperties for defining the outline of the marker symbol.
Specification:color ColorThe outline color of the marker symbol.
width NumberThe width of the marker symbol in pixels or points.
size NumberThe default size of the point symbol in pixels, points, or real-world units.
opacity NumberThe opacity of the point symbol.
PolygonTypeScheme
Properties defining the symbology scheme used to visualize polygon features driven by type-based attribute data.
Properties:colors Color[]The fill colors of the symbols comprising the theme.
noDataColor ColorThe color of the fill symbol used to indicate features with no data.
outline ObjectProperties for defining the outline of the fill symbol.
Specification:color ColorThe outline color of the fill symbol.
width NumberThe width of the fill symbol's outline in pixels or points.
opacity NumberThe opacity of the symbol (0 - 1).
PolylineTypeScheme
Properties defining the symbology scheme used to visualize polyline features driven by type-based attribute data.
Properties:colors Color[]The colors of the line symbols comprising the theme.
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.
opacity NumberThe opacity of the line symbol (0 - 1).