Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MarkerStyle

A data type that provides style options for marker objects on a map.

Hierarchy

  • MarkerStyle

Index

Properties

Optional callout

callout: string | CalloutFormatter

Function used to format the marker callout content based on the provided object data.

Optional className

className: string

Style class name to add to the marker's DOM element.

Optional html

html: string

HTML content to use when rendering the icon.

Optional icon

icon: { anchor?: number[]; retinaUrl?: string; url: string }

Provides the icon options for the style. If a value for html is provided, the marker will be rendered as HTML and this value will be ignored.

Type declaration

  • Optional anchor?: number[]

    The point coordinates of the tip of the icon (relative to the top-left corner).

  • Optional retinaUrl?: string

    URL to a retina sized version of the icon image. If not provided, the url icon path will be used for retina devices.

  • url: string

    The URL to the icon image (absolute or relative to the script path).

Optional size

size: number[]

Size of the icon as [width, height], e.g. [20,15]

Optional skip

skip: boolean

Whether the marker instance should be skipped, which means a marker will not be created for this model nor will it be rendered to the map. This is typically used if you want to conditionally render markers on the map based on model state or values.

Optional spacing

spacing: number

Minimum distance, in screen pixels/points, between rendered markers on the map. If not specified or 0, then all markers will be rendered (default).

Optional svg

svg: { image?: { position?: AnchorType | Point; size?: number[]; transform?: string; translate?: { x?: number; y?: number }; url: string }; shape?: ShapeStyle & { position?: AnchorType | Point; translate?: { x?: number; y?: number }; type: string }; text?: TextStyle | TextStyle[] }

Provides the options for rendering the icon as an SVG element. If a value for html is provided, the marker will be rendered as HTML and this value will be ignored.

Type declaration

  • Optional image?: { position?: AnchorType | Point; size?: number[]; transform?: string; translate?: { x?: number; y?: number }; url: string }
    • Optional position?: AnchorType | Point

      Position of the element within its parent container. Supports an anchor string for relative positioning, or an { x, y } point for absolute positioning.

    • Optional size?: number[]

      Image size.

    • Optional transform?: string

      Defines a list of transform definitions that are applied to the element.

    • Optional translate?: { x?: number; y?: number }

      Position translation amount in x and y axis.

      • Optional x?: number
      • Optional y?: number
    • url: string

      Image URL.

  • Optional shape?: ShapeStyle & { position?: AnchorType | Point; translate?: { x?: number; y?: number }; type: string }

    The shape options.

  • Optional text?: TextStyle | TextStyle[]

    The text style options.

Optional zIndex

zIndex: number

The z-index to apply to the marker when rendering on the map.

Generated using TypeDoc