DisplayStyle2dState Class

A display style that can be applied to 2d views.

Extends

Methods

Name Description
constructor(props: DisplayStyleProps, iModel: IModelConnection): DisplayStyle2dState    

Inherited methods

Name Inherited from Description
attachMapLayer(options: { mapLayerIndex: MapLayerIndex, settings: MapLayerSettings }): void DisplayStyleState Attach a map layer to display style.
attachRealityModel(props: ContextRealityModelProps): ContextRealityModelState DisplayStyleState Attach a ContextRealityModel to this display style.
changeBackgroundMapProps(props: BackgroundMapProps): void DisplayStyleState Modify a subset of the background map display settings.
changeBackgroundMapProvider(props: BackgroundMapProviderProps): void DisplayStyleState Change aspects of the BackgroundMapProvider from which background map imagery is obtained.
changeBaseMapTransparency(transparency: number): void DisplayStyleState Change the map base transparency as a number between 0 and 1.
changeMapLayerCredentials(mapLayerIndex: MapLayerIndex, userName?: string, password?: string): void DisplayStyleState Change the credentials for a map layer.
changeMapLayerProps(props: Partial<MapLayerProps>, mapLayerIndex: MapLayerIndex): void DisplayStyleState Modify a subset of a map layer settings.
changeMapSubLayerProps(props: Partial<MapSubLayerProps>, subLayerId: SubLayerId, mapLayerIndex: MapLayerIndex): void DisplayStyleState Modify a subset of a sub-layer settings.
changeRenderTimeline(timelineId: string): Promise<void> DisplayStyleState Change the Id of the RenderTimeline element that hosts the RenderSchedule.Script to be applied by this display style for
clone(iModel?: IModelConnection): this DisplayStyleState Make an independent copy of this EntityState
detachMapLayerByIndex(mapLayerIndex: MapLayerIndex): void DisplayStyleState Detach map layer at index (-1 to remove all layers)
detachRealityModelByNameAndUrl(name: string, url: string): boolean DisplayStyleState Detach the first ContextRealityModel that matches the specified name and url.
dropSubCategoryOverride(id: string): void DisplayStyleState Remove any SubCategoryOverride applied to a SubCategoryAppearance by this style.
equalState(other: DisplayStyleState): boolean DisplayStyleState Performs logical comparison against another display style.
equals(other: this): boolean DisplayStyleState Return true if this EntityState is equal to another one.
findMapLayerIndexByNameAndSource(name: string, source: string, isOverlay: boolean): number DisplayStyleState Lookup a maplayer index by name and source.
forEachRealityModel(func: (model: ContextRealityModelState) => void): void DisplayStyleState Call a function for each reality model attached to this display style.
getOSMBuildingRealityModel(): undefined | ContextRealityModelState DisplayStyleState Get the ContextRealityModelState that displays the OpenStreetMap worldwide building layer, if enabled.
getSubCategoryOverride(id: string): undefined | SubCategoryOverride DisplayStyleState Obtain the overrides applied to a SubCategoryAppearance by this style.
hasAttachedRealityModel(name: string, url: string): boolean DisplayStyleState Return if a context reality model is attached.
is3d(): this is DisplayStyle3dState DisplayStyleState Returns true if this is a 3d display style.
load(): Promise<void> DisplayStyleState Ensures all of the data required by the display style is loaded.
mapLayerAtIndex(mapLayerIndex: MapLayerIndex): undefined | MapLayerSettings DisplayStyleState Return the map layer settings for a map layer at the provided index.
moveMapLayerToBottom(mapLayerIndex: MapLayerIndex): void DisplayStyleState Move map layer to bottom.
moveMapLayerToIndex(fromIndex: number, toIndex: number, isOverlay: boolean): void DisplayStyleState Reorder map layers
moveMapLayerToTop(mapLayerIndex: MapLayerIndex): void DisplayStyleState Move map layer to top.
overrideSubCategory(id: string, ovr: SubCategoryOverride): void DisplayStyleState Customize the way geometry belonging to a SubCategory is drawn by this display style.
setOSMBuildingDisplay(options: OsmBuildingDisplayOptions): boolean DisplayStyleState Set the display of the OpenStreetMap worldwide building layer in this display style by attaching or detaching the reality model displaying the buildings.
toJSON(): ElementProps DisplayStyleState Obtain this element's JSON representation.

Properties

Name Type Description
className Accessor Static ReadOnly string The name of the BIS class associated with this class.  
settings Accessor ReadOnly DisplayStyleSettings The container for this display style's settings.  

Inherited properties

Name Type Inherited from Description
backgroundColor Accessor ColorDef DisplayStyleState The background color for this DisplayStyle
backgroundMapBase Accessor BaseLayerSettings DisplayStyleState Settings controlling how the base map is displayed within a view.
The base map can be provided by any map imagery source or set to be a single color.
backgroundMapSettings Accessor BackgroundMapSettings DisplayStyleState The settings controlling how a background map is displayed within a view.
baseMapTransparency Accessor ReadOnly number DisplayStyleState Return map base transparency as a number between 0 and 1.
classFullName Accessor Static ReadOnly string DisplayStyleState Get full BIS class name of this Entity in the form "SchemaName:ClassName".
classFullName Readonly string DisplayStyleState The full class name in the form "schema:class".
className Accessor ReadOnly string DisplayStyleState The name of the BIS class associated with this class.
code Readonly Code DisplayStyleState The Code for this element
contextRealityModelStates Accessor ReadOnly ReadonlyArray<ContextRealityModelState> DisplayStyleState ContextRealityModelStates attached to this display style.
federationGuid Readonly string | undefined DisplayStyleState A FederationGuid assigned to this element by some other federated database
hasSubCategoryOverride Accessor ReadOnly boolean DisplayStyleState Returns true if an SubCategoryOverrides are defined by this style.
id Readonly string DisplayStyleState The Id of this Entity.
iModel Readonly IModelConnection DisplayStyleState The iModel from which this Entity was loaded
jsonProperties Readonly [key: string]: any DisplayStyleState Optional json properties of this Entity.
model Readonly string DisplayStyleState The ModelId of the Model containing this element
monochromeColor Accessor ColorDef DisplayStyleState The color used to draw geometry in monochrome mode.
name Accessor ReadOnly string DisplayStyleState The name of this DisplayStyle
onOSMBuildingDisplayChanged Readonly BeEvent<(osmBuildingDisplayEnabled: boolean) => void> DisplayStyleState Event raised just after setOSMBuildingDisplay changes the enabled state of the OSM buildings.
onScheduleScriptChanged Readonly BeEvent<(newScript: RenderSchedule.Script) => void> DisplayStyleState Event raised just before the scheduleScript property is changed.
onScheduleScriptReferenceChanged Readonly BeEvent<(newScriptReference: RenderSchedule.ScriptReference) => void> DisplayStyleState Event raised just before the scheduleScriptReference property is changed.
parent Readonly RelatedElement | undefined DisplayStyleState The parent Element of this, or undefined if no parent.
realityModels Accessor ReadOnly Iterable<ContextRealityModelState> DisplayStyleState Iterate over the reality models attached to this display style.
scheduleScript Accessor undefined | RenderSchedule.Script DisplayStyleState The RenderSchedule.Script that animates the contents of the view, if any.
scheduleScriptReference Accessor ReadOnly undefined | RenderSchedule.ScriptReference DisplayStyleState The RenderSchedule.Script that animates the contents of the view, if any, along with the Id of the element that hosts the script.
schemaName Accessor Static ReadOnly string DisplayStyleState The name of the BIS schema for this class.
userLabel Readonly string | undefined DisplayStyleState A user-assigned label for this element.
viewFlags Accessor ViewFlags DisplayStyleState Flags controlling various aspects of the display style.
wantShadows Accessor ReadOnly boolean DisplayStyleState Returns true if solar shadow display is enabled by this display style.

Defined in

Last Updated: 28 October, 2024