ia.LayerBase Class
The base class for map layers.
Constructor
ia.LayerBase
    
        ()
    
    
    
    
    
    
    
    
    
    Item Index
Methods
Properties
Methods
_mapEventHandler
    
        - 
                    
                        
event 
Handles when to carry out hit tests.
Parameters:
- 
                    
                        
eventia.MapMouseEventA
ia.MapMouseEvent. 
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:
- 
                    
                        
eventTypeStringThe type of event to listen for.
 - 
                    
                        
fncFunctionThe function to call when the event occurs.
 - 
                    
                        
objObjectAn 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:
- 
                    
                        
eventObjectThe event object.
 
getVisible
    
        ()
    
    
        
            Boolean
        
    
    
    
    
    
    
    
    
    Gets the visibility of the layer.
Returns:
loadSource
    
        ()
    
    
    
    
    
    
    
    
    
    Loads the source 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:
- 
                    
                        
objObjectThe object.
 
render
    
        ()
    
    
    
    
    
    
    
    
    
    Renders the layer.
setMap
    
        - 
                    
                        
map - 
                    
                        
map 
Sets the map and canvas for the layer.
Parameters:
- 
                    
                        
mapia.MapThe map.
 - 
                    
                        
mapHTML ElementThe container.
 
setVisible
    
        - 
                    
                        
value 
Sets the visibility of the layer.
Parameters:
- 
                    
                        
valueBooleantrue/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