ia.TileLayer Class
For handling Background Tile layers.
Constructor
ia.TileLayer
-
inSource
Parameters:
-
inSource
StringThe spatial source.
Item Index
Methods
Properties
Methods
_mapEventHandler
-
event
Handles when to carry out hit tests.
Parameters:
-
event
ia.MapMouseEventA
ia.MapMouseEvent
.
_renderTile
-
tile
Renders a tile image.
Parameters:
-
tile
ObjectThe tile object.
addCanvases
()
Adds drawing canvases for the layer when the layer is shown. This method was introduced to fix a bug a chrome when multiple canvases were affecting rendering. It basically reduces the number of unused canvases which are taking up memory.
addEventListener
-
eventType
-
fnc
-
obj
Add an event listener.
Parameters:
-
eventType
StringThe type of event to listen for.
-
fnc
FunctionThe function to call when the event occurs.
-
obj
ObjectAn optional parent object.
clear
()
Clears all canvases in the layer.
createCanvas
()
HTML Canvas
Creates a new canvas.
Returns:
dispatchEvent
-
event
Dispatch an event to the listeners.
Parameters:
-
event
ObjectThe event object.
getVisible
()
Boolean
Gets the visibility of the layer.
Returns:
loadSource
()
Loads the source data.
parseData
-
data
Parses the data after its completed loading.
Parameters:
-
data
JSONThe raw data.
removeCanvases
()
Removes drawing canvases for the layer when the layer is hidden. This method was introduced to fix a bug a chrome when multiple canvases were affecting rendering. It basically reduces the number of unused canvases which are taking up memory.
removeListener
-
obj
Removes all event listeners for the given object.
Parameters:
-
obj
ObjectThe object.
render
()
Draws or renders the tiles.
setMap
-
map
-
map
Sets the map and canvas for the layer.
Parameters:
-
map
ia.MapThe map.
-
map
HTML ElementThe container.
setVisible
-
value
Sets the visibility of the layer.
Parameters:
-
value
Booleantrue/false.
Properties
canvas
HTML Canvas
The canvas associated with this layer.
context
HTML Canvas Context
The canvas context associated with this layer.
id
String
The id of the layer.
Default: ""
interactive
Boolean
Is selection and highlighting switched on.
Default: false
isLoaded
Boolean
Indicates whether the layer is loaded.
Default: false
name
String
The name of the layer.
Default: ""
showDataTips
Boolean
Are data tips displayed.
Default: trueE
showInLayerList
Boolean
Should the layer be displayed ina layer list.
Default: false
showLabels
Boolean
Show labels.
Default: false
url
Number
The minimum display extent.
Default: -Infinity
url
String
The spatial data source for the layer.
url
Number
The maximum display extent.
Default: Infinity
url
String
The path to tiles.
Default: "./"