API Docs for: 2.2
Show:

MQ.TileLayer Class

Extends L.TileLayer

Constructor

MQ.TileLayer

(
  • [options]
)

Parameters:

  • [options] Object optional
    • [key] optional

      API key

    • [mapType] default = 'map'
    • [ext] default = 'png'
    • [attribution] default = '© Mapquest'

Methods

_calculateTileCoords

() nw: L.Point, se: L.Point, colcount: number, rowcount: number private

Calculates and returns an object with the column/row coordinates of each of the viewable area's 4 corners:

  • nw: [col, row] -- upper left
  • se: [col, row] -- lower right
  • colcount: Count of visible tiles in the horizontal direction
  • rowcount: Count of visible tiles in the vertical direction

Returns <nw: L.Point, se: L.Point, colcount: number, rowcount: number>

}

_getFlags

() Map: boolean, sat: boolean, hyb: boolean private

Returns <Map: boolean, sat: boolean, hyb: boolean>

}

_loadTransactionImage

(
  • map
  • type
  • accum1
  • accum2
  • lastScale
)
private

Parameters:

_onMapDestroy

() private

_onViewReset

(
  • event
)
private

"viewreset" event on the map calledon: zoom

Parameters:

_positiveOrZero

(
  • n
)
Number private

Parameters:

Returns <Number>

_resetStats

(
  • toZero
)
private

Called by sendTransactions when complete

Parameters:

_resetTransactionPosition

() private

Reset position gets called whenever the scale changes such that the transform is reset. It is also called immediately upon adding this instance to the layers collection.

_sendTransactions

() Boolean private

Returns <Boolean>

_setBaseLayer

(
  • map
)
private

Parameters:

getTileUrl

(
  • tilePoint
)
String

Retrieve the url for the tile at tilePoint

Parameters:

Returns <String>

initialize

(
  • options
)
protected

Parameters:

onAdd

(
  • map
)
protected

Parameters:

onRemove

(
  • map
)
protected

Parameters:

setMapType

(
  • mapType
)

Parameters:

  • mapType String

    ['map', 'hyb', 'sat', 'light', 'dark']

setUrl

(
  • urlPattern
  • redraw
)
protected

This method is defined here to dissuade developers from overriding the tile source url

Parameters:

Events

maptypechange

Fired when changing mapType via the setMapType method.

Event Payload:

mqbaselayerchange

Fired when map's baseLayer changes