cimSymbolUtils

require(["esri/symbols/support/cimSymbolUtils"], function(cimSymbolUtils) { /* code goes here */ });
Object: esri/symbols/support/cimSymbolUtils
Since: ArcGIS API for JavaScript 4.16

Provides utility functions for CIMSymbols. These methods will allow you to get and set the size, color, and rotation of a CIMsymbol.

Method Overview

NameReturn TypeSummaryObject

Sets the color of the symbol layers of a CIMSymbol to a given value if the symbol layer is not color locked.

more details
more detailscimSymbolUtils

Sets the rotation value of a CIMSymbol.

more details
more detailscimSymbolUtils
Color

Returns the first color of the symbol layers in a CIMSymbol.

more details
more detailscimSymbolUtils
Number

Returns the rotation value of a CIMSymbol.

more details
more detailscimSymbolUtils
Number

Returns the size of a given CIMSymbol.

more details
more detailscimSymbolUtils

Scales the largest layer of a CIMSymbol to a given size.

more details
more detailscimSymbolUtils

Method Details

applyCIMSymbolColor(symbol, color)

Sets the color of the symbol layers of a CIMSymbol to a given value if the symbol layer is not color locked.

Parameters:
symbol CIMSymbol

The CIMSymbol to set the color on.

color Color

The desired color value for the symbol.

applyCIMSymbolRotation(symbol, rotation)

Sets the rotation value of a CIMSymbol.

Parameters:
symbol CIMSymbol

The CIMSymbol to set the rotation on.

rotation Number

The desired rotation of the symbol in degrees.

getCIMSymbolColor(symbol){Color}

Returns the first color of the symbol layers in a CIMSymbol.

Parameter:
symbol CIMSymbol

The CIMSymbol from which to get the color.

Returns:
TypeDescription
ColorReturns the color of the CIMSymbol.
getCIMSymbolRotation(symbol){Number}

Returns the rotation value of a CIMSymbol.

Parameter:
symbol CIMSymbol

The CIMSymbol from which to get the rotation.

Returns:
TypeDescription
NumberThe rotation value of the symbol in degrees.
getCIMSymbolSize(symbol){Number}

Returns the size of a given CIMSymbol. The size of a CIMSymbol is defined as the size of the largest symbol layer.

Parameter:
symbol CIMSymbol

The CIMSymbol from which to get the size.

Returns:
TypeDescription
NumberReturns the size of the symbol in pixels.
scaleCIMSymbolTo(symbol, size)

Scales the largest layer of a CIMSymbol to a given size. The other symbol layers will scale accordingly.

Parameters:
symbol CIMSymbol

The CIMSymbol to scale.

size Number

The desired size for the symbol.

API Reference search results

NameTypeModule
Loading...