@geogirafe/lib-geoportal
    Preparing search index...
    Index

    Constructors

    Properties

    currentShape: DrawingShape | null = null
    draw: Draw | null = null
    drawingLayer: VectorLayer
    drawingSource: VectorSource
    editContextMenu: ContextMenu | null = null
    fixedLength: number = 0
    modifiableFeatures: Collection<Feature<Geometry>> = ...
    modify: Modify | null = null
    snap: Snap | null = null

    Methods

    • Adds features to the drawing source if they are missing and updates their style each time a property changes. Adding them to the source is only necessary if the feature originates from a deserialized state and not from a drawing action in the map.

      Parameters

      • dFeatures: DrawingFeature[]

        An array of DrawingFeature objects to be added.

      Returns void

    • Parameters

      • coordinates: SketchCoordType
      • geom: SimpleGeometry

      Returns SimpleGeometry

    • Parameters

      • coordinates: SketchCoordType
      • geom: SimpleGeometry

      Returns SimpleGeometry

    • Parameters

      • coordinates: SketchCoordType
      • geom: SimpleGeometry

      Returns SimpleGeometry

    • Parameters

      • coordinates: SketchCoordType
      • geom: SimpleGeometry
      • proj: Projection

      Returns SimpleGeometry

    • Check if there is a vertex of a selected (=editable) feature within the pixel tolerance of the clicked coordinates.

      Parameters

      • coordinate: Coordinate

      Returns boolean

    • Handles the addition of a feature to the vector source. This method is triggered when a new feature is drawn and added to the vector source at end of the draw interaction. It creates a DrawingFeature to save in the state, containing a unique id and the feature geometry as a geojson. To identify the ol feature in the map, it receives the same id as the DrawingFeature.

      Parameters

      • e: VectorSourceEvent

        The add-feature event.

      Returns void