MapLayr
    Preparing search index...

    Class Shape

    A drawable path.

    The shape can be configured with either a static path or a path provider (such as ReactiveRoute) for automatic path updates.

    Index

    Constructors

    • Creates a new shape.

      Parameters

      • pathOrProvider: Path | PathProvider | null = null

        The path of the shape, or a path provider. Pass null to create a shape with no path that you can update later.

      Returns Shape

    Accessors

    • get path(): Path | null

      The path that is drawn.

      Returns Path | null

    • set path(newValue: Path | null): void

      Parameters

      • newValue: Path | null

      Returns void

    • get pathProvider(): PathProvider | null

      The current path provider that the shape is subscribed to, or null if one isn't set.

      Returns PathProvider | null

      Setting the path provider will immediately update the current path. If the path provider is set to null, the shape's path will also be cleared. Use clearPathProvider to clear the path provider without clearing the current path.

    • set pathProvider(newValue: PathProvider | null): void

      Parameters

      Returns void

    • get strokeColor(): string

      The colour that is used to stroke the path.

      Returns string

    • set strokeColor(newValue: string): void

      Parameters

      • newValue: string

      Returns void

    • get strokeWidth(): number

      The width of the stroke outline in CSS pixels.

      Returns number

    • set strokeWidth(newValue: number): void

      Parameters

      • newValue: number

      Returns void

    Methods

    • Clears the path provider without clearing the current path.

      Returns void