API Docs for: 0.1.0
Show:

L.PtvLayer.Background Class

Extends L.TileLayer
Defined in: src\Background.js:6
Module: L.PtvLayer

Provides the PTV Background TileLayer class.

Constructor

L.PtvLayer.Background

(
  • client
  • options
)

Defined in src\Background.js:6

Parameters:

  • client XMapClient

    XMapClient object

  • options Object

    The options object

    • [format] String optional

      The image format used in tile requests.

    • [beforeSend] String optional

      Function to be called before sending the request with the request object given as first parameter. The (modified) request object must be returned.

    • [errorTileUrl] String optional

      The image to display when requests fail.

Methods

_loadTile

(
  • tile
  • tilePoint
)
private

Loads a specific tile and shows the result when finished.

Parameters:

  • tile DOMElement

    The tile dom img element

  • tilePoint Point

    The tile point

_requestTile

(
  • tile
  • tilePoint
)
private

Requests a specific tile from the server.

Parameters:

  • tile DOMElement

    The tile dom img element

  • tilePoint Point

    The tile point

L.PtvLayer.Background

(
  • client
  • options
)

Constructor

Parameters:

  • client XMapClient

    optional XMapClient object

  • options Object

    optional options object

Properties

options

Object

Default options used in this class.

options.beforeSend

Function

Function to be called before sending the request with the request object given as first parameter. The (modified) request object must be returned.

Default: null

options.bounds

L.LatLngBounds

The world bounds for PTV Maps.

Default: [[85.0, -178.965000], [-66.5, 178.965000]]

options.errorTileUrl

String

The image to display when requests fail.

Default: "tile-error.png"

options.format

String

The image format used in tile requests.

Default: "PNG"

options.minZoom

Boolean

Minimum zoom number.

Default: true

options.noWrap

Boolean

If set to true, the tiles just won't load outside the world width (-180 to 180 longitude) instead of repeating.

Default: true