Home > @magiclane/maps-sdk > MapViewPathCollection

MapViewPathCollection class

Collection of paths for a map view.

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

Core

Signature:

export declare class MapViewPathCollection 

Constructors

Constructor

Modifiers

Description

(constructor)(id, mapId, mapPointerId)

Constructs a new instance of the MapViewPathCollection class

Properties

Property

Modifiers

Type

Description

mapId

readonly

number

mapPointerId

readonly

number

pointerId

readonly

number | bigint

size

readonly

number

Get the number of paths in this collection.

Methods

Method

Modifiers

Description

add(path, options)

Add a path to the collection.

clear()

Remove all paths from the collection.

getBorderColorAt(index)

Get the border color for the path specified by index.

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

getBorderSizeAt(index)

Get the border size for the path specified by index.

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

getFillColorAt(index)

Get the fill color for the path specified by index.

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

getInnerSizeAt(index)

Get the inner size for the path specified by index.

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

getPathAt(index)

Get the path specified by index.

getPathByName(name)

Get the path specified by name.

hitTest(area)

Hit test in path collection.

Checks for paths within the given area.

remove(path)

Remove the path from the collection.

removeAt(index)

Remove the path specified by index.