MQ.TileLayer Class
- NOTE: This is typically not instantiated directly, instead use MQ.mapLayer, MQ.satelliteLayer or MQ.hybridLayer factory methods instead.
Constructor
MQ.TileLayer
(
-
[options]
Parameters:
-
[options]
Object optional-
[key]
optionalAPI key
-
[mapType]
default = 'map' -
[ext]
default = 'png' -
[attribution]
default = '© Mapquest'
-
Methods
Events
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
(
private
-
map
-
type
-
accum1
-
accum2
-
lastScale
_onMapDestroy
()
private
_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.
setUrl
(
protected
-
urlPattern
-
redraw
This method is defined here to dissuade developers from overriding the tile source url
Parameters:
-
urlPattern
urlTemplate -
redraw
Object
Events
maptypechange
Fired when changing mapType
via the setMapType
method.
Event Payload:
-
response
Object-
layer
MQ.TileLayer
-
mqbaselayerchange
Fired when map's baseLayer changes