@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
45 lines (41 loc) • 1.92 kB
TypeScript
/**
* This module provides utility functions for creating and updating spike symbols for size renderers
* generated with a `spike` theme.
*
* @since 4.33
*/
import type Color from "../../../Color.js";
import type CIMSymbol from "../../../symbols/CIMSymbol.js";
import type { CIMPrimitiveOverride } from "../../../symbols/cim/types.js";
/**
* Creates a spike symbol for use in size renderers generated with a `spike` theme.
*
* @param symbolInfo - An object containing properties of the symbol to create.
* @returns Returns a spike symbol.
*/
export function createSpikeSymbol(symbolInfo: SymbolInfo): CIMSymbol;
/**
* Updates the properties of a spike symbol. This is typically used to update the color and size of the symbol.
*
* @param symbol - The spike symbol to update.
* @param symbolInfo - An object containing properties of the symbol to update.
* @returns Returns the updated spike symbol.
*/
export function updateSpikeSymbol(symbol: CIMSymbol, symbolInfo: Partial<SymbolInfo>): CIMSymbol;
export interface SymbolInfo {
/** The color of the symbol. */
color: Color;
/** The color of the symbol stroke. */
strokeColor?: Color;
/** The base width of the symbol in points. */
baseWidth?: number;
/** The stroke width of the symbol in points. */
strokeWidth?: number;
/** The default height of the symbol. */
defaultHeight?: number;
/** The primitive overrides for the symbol. */
primitiveOverrides?: CIMPrimitiveOverride[] | null;
/** The style of the symbol. */
symbolStyle?: SpikeSymbolStyle;
}
export type SpikeSymbolStyle = "triangle-solid-fill-open-outline" | "triangle-solid-fill-closed-outline" | "triangle-solid-fill-open" | "triangle-solid-fill-closed" | "triangle-gradient-fill-open-outline" | "triangle-gradient-fill-closed-outline" | "triangle-gradient-fill-open" | "triangle-gradient-fill-closed" | "triangle-open-outline" | "triangle-closed-outline";