Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SpotTag

class

SpotTag

classdesc

Tag holding properties for visualizing the centroid of a geometry.

example
var geometry = new Mapillary.TagComponent.PointGeometry([0.3, 0.3]);
var tag = new Mapillary.TagComponent.SpotTag(
    "id-1",
    geometry
    { editable: true, color: 0xff0000 });

tagComponent.add([tag]);

Hierarchy

  • Tag
    • SpotTag

Index

Constructors

constructor

Events

Static changed

changed: string = "changed"

Event fired when a property related to the visual appearance of the tag has changed.

type

{Tag} The tag instance that has changed.

Static geometrychanged

geometrychanged: string = "geometrychanged"

Event fired when the geometry of the tag has changed.

type

{Tag} The tag instance whose geometry has changed.

Accessors

color

  • get color(): number
  • set color(value: number): void

editable

  • get editable(): boolean
  • set editable(value: boolean): void

geometry

icon

  • get icon(): string
  • set icon(value: string): void

id

  • get id(): string

text

  • get text(): string
  • set text(value: string): void

textColor

  • get textColor(): number
  • set textColor(value: number): void

Methods

fire

  • fire(eventType: string, data: any): void
  • Parameters

    • eventType: string
    • data: any

    Returns void

off

  • off(eventType: string, fn: any): void
  • Unsubscribe from an event by its name.

    Parameters

    • eventType: string

      The name of the event to subscribe to.

    • fn: any

      The handler to remove.

    Returns void

on

  • on(eventType: string, fn: any): void
  • Subscribe to an event by its name.

    Parameters

    • eventType: string

      The name of the event to subscribe to.

    • fn: any

      The handler called when the event occurs.

    Returns void

setOptions

  • Set options for tag.

    description

    Sets all the option properties provided and keps the rest of the values as is.

    fires

    {Tag#changed}

    Parameters

    Returns void

Generated using TypeDoc