@magiclane/maps-sdk
    Preparing search index...

    Class MapViewPathCollection

    Collection of paths for a map view.

    This class should not be instantiated directly. Instead, use the MapViewPreferences.paths getter to obtain an instance.

    Index

    Constructors

    • Parameters

      • id: number
      • mapId: number
      • mapPointerId: number

      Returns MapViewPathCollection

    Accessors

    • get mapId(): number

      Returns number

    • get mapPointerId(): number

      Returns number

    • get pointerId(): number

      Returns number

    • get size(): number

      Get the number of paths in this collection.

      Returns number

      The number of paths

    Methods

    • Add a path to the collection.

      Parameters

      • path: Path

        The path to be added.

      • Optionaloptions: { colorBorder?: Color; colorInner?: Color; szBorder?: number; szInner?: number }

        Optional object for path appearance:

        • colorBorder: The border color of the path. By default, the one from the current map view style is used.
        • colorInner: The inner color of the path. By default, the one from the current map view style is used.
        • szBorder: The border size of the path in mm. If < 0, the one from the current map view style is used.
        • szInner: The inner size of the path in mm. If < 0, the one from the current map view style is used.

      Returns void

    • Remove all paths from the collection.

      Returns void

    • Get the border color for the path specified by index.

      If the result is transparent, then the index does not exist in the collection.

      Parameters

      • index: number

        The path index

      Returns Color

      The border color

    • Get the border size for the path specified by index.

      If the result is -1, then the index does not exist in the collection.

      Parameters

      • index: number

        The path index

      Returns number

      The border size

    • Get the fill color for the path specified by index.

      If the result is transparent, then the index does not exist in the collection.

      Parameters

      • index: number

        The path index

      Returns Color

      The inner color

    • Get the inner size for the path specified by index.

      If the result is -1, then the index does not exist in the collection.

      Parameters

      • index: number

        The path index

      Returns number

      The inner size

    • Get the path specified by index.

      Parameters

      • index: number

        The path index

      Returns Path | null

      The path or null if index is invalid

    • Get the path specified by name.

      Parameters

      • name: string

        The path name

      Returns Path | null

      The path or null if not found

    • Remove the path from the collection.

      Parameters

      • path: Path

        The path to be removed

      Returns void

    • Remove the path specified by index.

      Parameters

      • index: number

        The path index

      Returns void