API Docs for: 7.2
Show:

MQA.MapTile Class

Extends MQA.Tile
Module: MQA

Represents a map tile in display coordinate space. This is the default implementation used by MQA.TileLayer instances.

Constructor

MQA.MapTile

(
  • zoom
  • colRom
)

Parameters:

  • zoom Number

    the zoomLevel the tile exists at

  • colRom Array

    the [x,y] tile coordinates for the tile

Properties

colRow

Array

Inherited from MQA.Tile

The [x,y] coordinates of the tile in display space.

servers

Array

Inherited from MQA.Tile

The list of server names to pull the tile images from. This is used to overcome the limitations of some browsers that limit the number of open connections per host.

type

String

Inherited from MQA.Tile

The tile type. Used to build the tile URL.

zoom

Number

Inherited from MQA.Tile

The zoom level the tile exists in.

Methods

getElt

() Element

Inherited from MQA.Tile

Builds the actual DOM Element representation of the tile. For all Tile instances this is an IMG Element. If you have a custom class that uses Tile as its prototype, you'll unlikely need to override this method. getPath, the type property, and the servers property are the main customization points.

Returns <Element>

the IMG element that represents the tile.

getKey

() String

Inherited from MQA.Tile

Returns the unique key for the tile.

Returns <String>

the unique key

getPath

() String

Inherited from MQA.Tile

Returns the base path for the tile URL. Comes before the type, zoom, and colRow parts of the tile URL are built. Useful for versioning tiles.

Returns <String>

the base path for the tile URL

getServer

() String

Inherited from MQA.Tile

Returns the server host for this tile. (ex: tile1.mytileserver.com)

Returns <String>

the hostname for the tile URL

renderTile

(
  • tile
)
Element private

Inherited from MQA.Tile

Creates the img element representation of the Tile instance.

Parameters:

Returns <Element>

the img element that represents the tile in the DOM