geoview-core - v2.2.0
    Preparing search index...

    Class Transform

    Class used for transforming features on a map.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    mapViewer: MapViewer

    Reference the MapViewer associated with this interaction

    Methods

    • Applies a transformation from a grabbed coordinate to a new coordinate (Keyboard / Crosshair). Handles all transformation types internally based on the handle type.

      Parameters

      • startCoordinate: number[]

        The coordinate where the handle was grabbed

      • endCoordinate: number[]

        The coordinate to transform to

      • handleType: HandleType

        The type of handle being transformed

      Returns boolean

      Whether the transformation was successfully applied

    • Initializes transformation state for keyboard-based transformations (Keyboard / Crosshair). Must be called after grabbing a handle and before applying transformations.

      Parameters

      • coordinate: number[]

        The coordinate where the transformation begins

      • handleType: HandleType

        The type of handle being transformed

      Returns boolean

      True if the keyboard transform was successfully initiated, false otherwise (e.g. if no handle at coordinate or transform instance not initialized)

    • Selects a feature for transformation.

      Parameters

      • feature: Feature<Geometry>

        The feature to select

      • clearHistory: boolean = true

        If true, clears the previous history stack. Default is true

      Returns void