Skip to main content

MapObject

Abstract MapObject class. Extended by Region & Marker

@abstract
@param
@param

Hierarchy

Index

Constructors

constructor

Properties

optionaldetails

element

element: HTMLElement | SVGElement

events

events: Events

id

id: string

mapsvg

mapsvg: MapSVGMap

name

name: string = "mapObject"

optionalpopover

optionaltooltip

tooltip?: Tooltip

Methods

attr

  • attr(v1: any, v2?: any): string
  • Sets attribute of an SVG object


    Parameters

    • v1: any

      attribute name or object: {name: value, name: value}

    • v2: any = null

      value

    Returns string

getCenter

  • Returns center of an object in pixel coordinates


    Returns ScreenPoint

    • [x,y]

getCenterLatLng

  • Returns center of an object in geo-coordinates


    Parameters

    • yShift: any

    Returns GeoPoint

getCenterSVG

  • Returns center of an object in SVG coordinates


    Returns SVGPoint

getComputedStyle

  • getComputedStyle(prop: string, elem?: HTMLElement | SVGElement): string
  • Returns style of a given property of an SVG object


    Parameters

    • prop: string

      property name

    • optionalelem: HTMLElement | SVGElement

      SVG object

    Returns string

    • style

getGeoBounds

getStyle

  • getStyle(prop: string): string
  • Returns style of a property of the SVG object


    Parameters

    • prop: string

      property name

    Returns string

setId

  • setId(id: string): void
  • Set ID of an object


    Parameters

    • id: string

    Returns void

staticgetComputedStyle

  • getComputedStyle(prop: string, elem?: HTMLElement | SVGElement): string
  • Parameters

    • prop: string
    • optionalelem: HTMLElement | SVGElement

    Returns string