FeatureAppearance Class
Defines overrides for selected aspects of a Feature's symbology. Any member defined in the appearance overrides that aspect of symbology for all Features to which the appearance is applied.
The rgb and transparency overrides, if defined, apply to all geometry by default. However, the color and transparency of "linear" geometry can optionally be controlled independently from the rest of the geometry via lineRgb and lineTransparency. Linear geometry consists of any of the following:
- Curves and line strings;
- Points and point strings; and
- The outlines of planar regions. The edges of 3d surfaces like spheres are not considered linear geometry.
@see FeatureOverrides to customize the appearance of multiple features.
Methods
Name | Description | |
---|---|---|
constructor(props: FeatureAppearanceProps): FeatureAppearance Protected | ||
clone(changedProps: FeatureAppearanceProps): FeatureAppearance | Create a copy of this appearance, overriding any properties explicitly specified by changedProps . |
|
cloneProps(changedProps: FeatureAppearanceProps): FeatureAppearanceProps | Convert this appearance to JSON, and override any properties explicitly specified by changedProps in the result. |
|
equals(other: FeatureAppearance): boolean | ||
extendAppearance(base: FeatureAppearance): FeatureAppearance | Produce a FeatureAppearance from the supplied appearance in which any aspect not defined by the base appearance is overridden by this appearance. | |
getLineRgb(): undefined | RgbColor | Get the color that will be applied to linear geometry, or undefined if not overridden. | |
getLineTransparency(): undefined | number | Get the transparency that will be applied to linear geometry, or undefined if not overridden. | |
toJSON(): FeatureAppearanceProps | ||
fromJSON(props?: FeatureAppearanceProps): FeatureAppearance Static | ||
fromRgb(color: ColorDef): FeatureAppearance Static | Create a FeatureAppearance that overrides only the RGB color. | |
fromRgba(color: ColorDef, viewDependentTransparency: booleanfalse): FeatureAppearance Static | Create a FeatureAppearance that overrides the RGB and transparency. | |
fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance Static | Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride. | |
fromTransparency(transparencyValue: number, viewDependent: booleanfalse): FeatureAppearance Static | Create a FeatureAppearance that overrides only the transparency |
Properties
Name | Type | Description | |
---|---|---|---|
anyOverridden Accessor ReadOnly | boolean | Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). | |
defaults Static Readonly | FeatureAppearance | An appearance that overrides nothing. | |
emphasized Readonly | "true" | undefined | If true, the feature will be rendered using the Settings defined by Viewport.emphasisSettings to make it stand out. | |
ignoresMaterial Readonly | "true" | undefined | If true, don't apply the RenderMaterial to the feature's surfaces. | |
isFullyTransparent Accessor ReadOnly | boolean | ||
linePixels Readonly | LinePixels | undefined | The pixel pattern applied to lines and edges. | |
lineRgb Readonly | "false" | RgbColor | If defined, overrides the color of linear geometry independently of rgb. | |
lineTransparency Readonly | number | "false" | If defined, overrides the transparency of linear geometry independently of transparency. | |
matchesDefaults Accessor ReadOnly | boolean | Returns true if this appearance does not override any aspects of symbology. | |
nonLocatable Readonly | "true" | undefined | If true, the feature will not be drawn when using Viewport.readPixels, meaning Tools will not be able to interact with it. | |
overridesLinePixels Accessor ReadOnly | boolean | ||
overridesNonLocatable Accessor ReadOnly | boolean | ||
overridesRgb Accessor ReadOnly | boolean | ||
overridesSymbology Accessor ReadOnly | boolean | ||
overridesTransparency Accessor ReadOnly | boolean | ||
overridesWeight Accessor ReadOnly | boolean | ||
rgb Readonly | RgbColor | undefined | Overrides the feature's color. | |
transparency Readonly | number | undefined | The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent. | |
viewDependentTransparency Readonly | "true" | undefined | If true, then transparency and/or lineTransparency will only be applied if transparency is enabled and the current RenderMode supports transparency. | |
weight Readonly | number | undefined | The width of lines and edges in pixels as an integer in [1, 31]. |
Defined in
- core/common/src/FeatureSymbology.ts Line 139
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.