Class SketchDirective

When added to a VMC view tree as the <vmc-sketch> element, adds the Esri Sketch widget to the map.

Usage example:

<vmc-map>
<vmc-sketch></vmc-sketch>
</vmc-map>

Hierarchy

  • SketchDirective

Implements

  • OnInit
  • OnDestroy

Constructors

  • Parameters

    • destroy$: Observable<null>
    • sketchService: SketchService
    • esriEventer: EsriEventer
    • renderer: Renderer2
    • viewBase: ViewBase

    Returns SketchDirective

Properties

_sketch: BehaviorSubject<null | Sketch> = ...
containerId: null | string = null

A string, representing a DOM element's id attribute. If this input is passed to the component, the sketch widget will be constructed with the passed element. If this value is null, the component will create a new element to host the widget.

Important

If expand is true, the containerId must be null!

destroy$: Observable<null>
esriEventer: EsriEventer
expand: boolean = false

If true, the Sketch widget is added to an Esri Expand widget.

graphicsLayer: null | GraphicsLayer = null

Get a reference to this widget's Esri GraphicsLayer.

layerProperties$: BehaviorSubject<null | GraphicsLayerProperties> = ...
position: VmcWidgetPosition | UIAddPosition = ...

The Esri UIAddPosition describing where in the Map's UI the widget should be placed.

properties$: BehaviorSubject<null | SketchProperties> = ...
renderer: Renderer2
sketch$: Observable<null | Sketch> = ...

An observable stream of the component's active Esri Sketch widget.

sketchExpand: null | Expand = null

A reference to the directives active Esri Expand widget. which contains the Esri Sketch widget.

sketchService: SketchService
view$: Observable<null | MapView | SceneView> = ...

The VMC View Tree's View (scene or map)

viewBase: ViewBase

Events

sketchAdded: EventEmitter<Sketch> = ...

Emits a reference to the Esri Sketch widget when it is added to the map.

sketchCreate: Observable<SketchCreateEvent> = ...

The Esri Sketch "create" event, exposed as an Angular event.

sketchCreateComplete: Observable<SketchCreateEvent> = ...

The Esri Sketch "create" event, exposed as an Angular event.

Remark

This event only fires if the event.state === 'complete'.

sketchDelete: Observable<SketchDeleteEvent> = ...

The Esri Sketch "delete" event, exposed as an Angular event.

sketchEvent: Observable<AnySketchEvent> = ...

All of the Esri Sketch events as a single, combined Angular output event.

sketchExpandAdded: EventEmitter<null | Expand> = ...

Emits a reference to the Esri Expand widget when it is added to the map.

sketchExpandReady: EventEmitter<Expand> = ...

Emits a reference to the Esri Expand widget when its when callback is invoked, indicating the widget has loaded.

sketchReady: EventEmitter<Sketch> = ...

Emits a reference to the Esri Sketch widget when its when callback is invoked, indicating the widget has loaded.

sketchRedo: Observable<SketchRedoEvent> = ...

The Esri Sketch "redo" event, exposed as an Angular event.

sketchUndo: Observable<SketchUndoEvent> = ...

The Esri Sketch "undo" event, exposed as an Angular event.

sketchUpdate: Observable<SketchUpdateEvent> = ...

The Esri Sketch "update" event, exposed as an Angular event.

sketchUpdateComplete: Observable<SketchUpdateEvent> = ...

The Esri Sketch "create" event, exposed as an Angular event.

Remark

This event only fires if the event.state === 'complete'.

Accessors

  • set layerProperties(val: null | GraphicsLayerProperties): void
  • A component input that accepts Esri GraphicsLayer properties. If passed, these properties will be used by the widget to construct its GraphicsLayer reference.

    Parameters

    • val: null | GraphicsLayerProperties

    Returns void

  • set properties(val: null | SketchProperties): void
  • A component input that accepts Sketch properties to use for widget initialization.

    Parameters

    • val: null | SketchProperties

    Returns void

  • get sketch(): null | Sketch
  • Get a reference to the active Esri Sketch widget.

    Returns null | Sketch

  • set sketch(val: null | Sketch): void
  • Private

    Parameters

    • val: null | Sketch

    Returns void

Methods

  • Private

    Returns void

  • Private

    Returns void

  • Parameters

    • view: MapView | SceneView
    • props: null | SketchProperties
    • layerProps: null | GraphicsLayerProperties

    Returns void

Generated using TypeDoc