Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Icon

Icon defines a IMarker's icon. Mapster provides several default icons.

// Create your own default icon.
const icon =  new Icon("https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_red.png", 22, 40, 22 / 2, 40)

// Or use a default icon.
cons icon = Icon.DEFAULT_RED;

Hierarchy

  • Icon

Index

Constructors

constructor

  • new Icon(url: string, width: number, height: number, anchorX: number, anchorY: number): Icon
  • Adds one marker to collection.

    Parameters

    • url: string

      Icons url.

    • width: number

      Icons width.

    • height: number

      Icons height.

    • anchorX: number

      Image anchor's position on X axis.

    • anchorY: number

      Image anchor's position on Y axis.

    Returns Icon

Properties

Static DEFAULTS

DEFAULTS: Icon[] = [Icon.DEFAULT_RED,Icon.DEFAULT_BLACK,Icon.DEFAULT_BLUE,Icon.DEFAULT_GREEN,Icon.DEFAULT_GREY,Icon.DEFAULT_ORANGE,Icon.DEFAULT_PURPLE,Icon.DEFAULT_WHITE,Icon.DEFAULT_YELLOW,]

Static DEFAULT_BLACK

DEFAULT_BLACK: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_black.png',22,40,22 / 2,40,)

Static DEFAULT_BLUE

DEFAULT_BLUE: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_blue.png',22,40,22 / 2,40,)

Static DEFAULT_GREEN

DEFAULT_GREEN: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_green.png',22,40,22 / 2,40,)

Static DEFAULT_GREY

DEFAULT_GREY: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_grey.png',22,40,22 / 2,40,)

Static DEFAULT_ORANGE

DEFAULT_ORANGE: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_orange.png',22,40,22 / 2,40,)

Static DEFAULT_PURPLE

DEFAULT_PURPLE: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_purple.png',22,40,22 / 2,40,)

Static DEFAULT_RED

DEFAULT_RED: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_red.png',22,40,22 / 2,40,)

Static DEFAULT_WHITE

DEFAULT_WHITE: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_white.png',22,40,22 / 2,40,)

Static DEFAULT_YELLOW

DEFAULT_YELLOW: Icon = new Icon('https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_yellow.png',22,40,22 / 2,40,)

Accessors

anchorX

  • get anchorX(): number
  • Returns number

anchorY

  • get anchorY(): number
  • Returns number

height

  • get height(): number
  • Returns number

url

  • get url(): string
  • Returns string

width

  • get width(): number
  • Returns number

Generated using TypeDoc