Manages a stack of markers using a singleton pattern.

  • getInstance() returns the global instance.
  • showMarker() pushes a new marker onto the stack.
  • hideMarker() pops the last marker.
  • clear() removes all markers.

Typical usage is to show temporary marker that appear and disappear based on user cursor movement or snapping events.

Constructors

Methods

  • Creates and shows a new OSNAP marker at the specified position in world coordinate system. The marker is added to the top of the internal stack.

    Parameters

    • pos: AcGeVector2dLike

      Position in world coordinate system

    • Optionaltype: AcEdMarkerType

      Marker shape type

    • Optionalsize: number

      Marker size in pixels

    • Optionalcolor: string

      Marker color (CSS string)

    Returns AcEdMarker

  • Returns the marker at the top of the marker stack without removing it.

    This method is safe to call even when the stack is empty. In that case, it returns undefined.

    Returns undefined | AcEdMarker

    The top marker of the internal stack, or undefined if the stack contains no marker.