Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Canvas

Hierarchy

  • Canvas

Index

Constructors

Methods

Constructors

constructor

  • Instantiates a Canvas tile layer object given an options object (optionally).

    Parameters

    Returns Canvas

Methods

drawTile

  • drawTile(canvas: HTMLCanvasElement, tilePoint: Point, zoom: number): Canvas
  • You need to define this method after creating the instance to draw tiles; canvas is the actual canvas tile on which you can draw, tilePoint represents the tile numbers, and zoom is the current zoom.

    Parameters

    • canvas: HTMLCanvasElement
    • tilePoint: Point
    • zoom: number

    Returns Canvas

redraw

  • Calling redraw will cause the drawTile method to be called for all tiles. May be used for updating dynamic content drawn on the Canvas

    Returns Canvas