Common attributes for SimpleMarker, SimpleLine and SimpleFill symbols
The size values in a renderer JSON object need to be converted from points to pixels in order to be able to recreate the same renderer using the JSAPI. 96dpi is assumed and there are 72 points in an inch.
Default markup symbols.
Create an SVG swatch that displays a preview of the given symbol
The div to attach the swatch to
The size of the swatch
The esri.symbol.Symbol to create a swatch for
Create an SVG swatch that displays a preview of the given symbol
The div to attach the swatch to
The size of the swatch
The esri.symbol.TextSymbol to create a swatch for
The graphicsLayer used to draw the halo. Not altered in any way.
Returns the ESRI default fill symbol
Returns the ESRI default line symbol
Returns the ESRI default marker symbol
Returns the default markup symbol These may be changed by the configuration of the MarkupModule, though they do not depend on it.
Returns a default symbol
Returns default color. If any modifications are provided, we will return a color with those modifications made
Returns the ESRI default text symbol
Convert from the 'type' propety of an esri.symbol.Symbol to the SymbolType string values
Gets the symbol libraries from the essentials symbol endpoint. Caches responses so we request a particular library only once.
The url for the essentials symbol library.
The library object from Essentials.
Given a simple, unique value, or class breaks based renderer returns the symbol size in points. Note that if the class breaks or unique value renderer defines classes with different symbol sizes, this will return the size of the first class. Does not account for visual variables.
Convert from the 'featureType' string stored in the layer object to a SymbolType
A layer.featureType string
Rotate a point around an origin
origin x
origin y
point x
point y
rotation angle
Fast javascript hashing from https://github.com/darkskyapp/string-hash
A string to create an unsigned integer hash for
Angles are stored differently in ESRI's webMap or REST API symbol representation This converts from the webMap variant to JSAPI
Common attributes for SimpleMarker and SimpleFill symbols