Show:

ia.TileLayer Class

Extends ia.LayerBase
Module: ia

For handling Background Tile layers.

Constructor

ia.TileLayer

(
  • inSource
)

Parameters:

  • inSource String

    The spatial source.

Methods

_mapEventHandler

(
  • event
)
private

Handles when to carry out hit tests.

Parameters:

_renderTile

(
  • tile
)
private

Renders a tile image.

Parameters:

  • tile Object

    The 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 String

    The type of event to listen for.

  • fnc Function

    The function to call when the event occurs.

  • obj Object

    An optional parent object.

clear

()

Clears all canvases in the layer.

createCanvas

() HTML Canvas

Creates a new canvas.

Returns:

HTML Canvas: The canvas.

dispatchEvent

(
  • event
)

Dispatch an event to the listeners.

Parameters:

  • event Object

    The event object.

getVisible

() Boolean

Gets the visibility of the layer.

Returns:

Boolean: true/false.

loadSource

()

Inherited from ia.LayerBase but overwritten in ia\maps\layers\TileLayer.js:113

Loads the source data.

parseData

(
  • data
)

Parses the data after its completed loading.

Parameters:

  • data JSON

    The 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 Object

    The object.

render

()

Inherited from ia.LayerBase but overwritten in ia\maps\layers\TileLayer.js:59

Draws or renders the tiles.

setMap

(
  • map
  • map
)

Sets the map and canvas for the layer.

Parameters:

  • map ia.Map

    The map.

  • map HTML Element

    The container.

setVisible

(
  • value
)

Sets the visibility of the layer.

Parameters:

  • value Boolean

    true/false.

Properties

bBox

ia.BoundingBox

The bounding box for the layer.

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

map

ia.Map

The map associated with this layer.

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: "./"