Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TileLayer

Hierarchy

Implements

Index

Constructors

constructor

  • Instantiates a tile layer object given a URL template and optionally an options object.

    Parameters

    Returns TileLayer

Methods

addEventListener

  • addEventListener(type: string, fn: function, context?: any): TileLayer
  • addEventListener(eventMap: any, context?: any): TileLayer

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: function, context?: any): TileLayer
  • Parameters

    Returns TileLayer

addTo

  • Adds the layer to the map.

    Parameters

    Returns TileLayer

bringToBack

  • Brings the tile layer to the bottom of all tile layers.

    Returns TileLayer

bringToFront

  • Brings the tile layer to the top of all tile layers.

    Returns TileLayer

clearAllEventListeners

fire

  • Parameters

    • type: string
    • Optional data: any

    Returns TileLayer

fireEvent

  • fireEvent(type: string, data?: any): TileLayer

getContainer

  • getContainer(): HTMLElement
  • Returns the HTML element that contains the tiles for this layer.

    Returns HTMLElement

hasEventListeners

  • hasEventListeners(type: string): boolean

off

  • off(type: string, fn?: function, context?: any): TileLayer
  • off(eventMap?: any, context?: any): TileLayer
  • Parameters

    • type: string
    • Optional fn: function
    • Optional context: any

    Returns TileLayer

  • Parameters

    • Optional eventMap: any
    • Optional context: any

    Returns TileLayer

on

  • on(type: string, fn: function, context?: any): TileLayer
  • on(eventMap: any, context?: any): TileLayer
  • Parameters

    Returns TileLayer

  • Parameters

    • eventMap: any
    • Optional context: any

    Returns TileLayer

onAdd

  • onAdd(map: Map): void
  • Should contain code that creates DOM elements for the overlay, adds them to map panes where they should belong and puts listeners on relevant map events. Called on map.addLayer(layer).

    Parameters

    Returns void

onRemove

  • onRemove(map: Map): void
  • Should contain all clean up code that removes the overlay's elements from the DOM and removes listeners previously added in onAdd. Called on map.removeLayer(layer).

    Parameters

    Returns void

once

  • once(type: string, fn: function, context?: any): TileLayer
  • Parameters

    Returns TileLayer

redraw

  • Causes the layer to clear all the tiles and request them again.

    Returns TileLayer

removeEventListener

  • removeEventListener(type: string, fn?: function, context?: any): TileLayer
  • removeEventListener(eventMap?: any, context?: any): TileLayer
  • Parameters

    • type: string
    • Optional fn: function
    • Optional context: any

    Returns TileLayer

  • Parameters

    • Optional eventMap: any
    • Optional context: any

    Returns TileLayer

setOpacity

  • Changes the opacity of the tile layer.

    Parameters

    • opacity: number

    Returns TileLayer

setUrl

  • Updates the layer's URL template and redraws it.

    Parameters

    • urlTemplate: string

    Returns TileLayer

setZIndex

  • Sets the zIndex of the tile layer.

    Parameters

    • zIndex: number

    Returns TileLayer