API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class Tile

Package | org.openscales.core.tile
Class | public class Tile
Inheritance | Tile flash.display.Sprite
Subclasses | ImageTile

A tile maybe a single tile (for example in WMS or WFS) or part of a Grid like in WMS-C. It is a graphical Sprite that use the draw function to display itself.

Public Properties

| Property | Defined by
--- | --- | ---
|  | bounds : Bounds | Tile
|  | drawn : Boolean | Tile
|  | layer : Layer | Tile
|  | loadComplete : Boolean [read-only] Whether or not the tile is loading | Tile
|  | onLoadEnd : Function | Tile
|  | onLoadStart : Function | Tile
|  | position : Pixel | Tile
|  | size : Size | Tile
|  | url : String | Tile

Protected Properties

| Property | Defined by
--- | --- | ---
|  | _drawPosition : Pixel = null | Tile
|  | loading : Boolean [write-only] Used to set loading status of tile | Tile

Public Methods

| Method | Defined by
--- | --- | ---
|  | Tile(layer:Layer, position:Pixel, bounds:Bounds, url:String, size:Size) | Tile
|  | clear():void | Tile
|  | clearAndMoveTo(bounds:Bounds, position:Pixel, redraw:Boolean = true):void Reposition the tile. | Tile
|  | destroy():void | Tile
|  | draw():Boolean Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn. | Tile
|  | getBoundsFromBaseLayer(position:Pixel):Bounds Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels | Tile
|  | moveTo(bounds:Bounds, position:Pixel, redraw:Boolean = true):void | Tile
|  | withinMapBounds():Boolean | Tile

Property detail

bounds | property

`bounds:Bounds` [read-write]Implementation
`public function get bounds():Bounds`
`public function set bounds(value:Bounds):void`

drawn | property |

`drawn:Boolean` [read-write]Implementation
`public function get drawn():Boolean`
`public function set drawn(value:Boolean):void`

_drawPosition | property |

`protected var _drawPosition:Pixel = null`

layer | property |

`layer:Layer` [read-write]Implementation
`public function get layer():Layer`
`public function set layer(value:Layer):void`

loadComplete | property |

`loadComplete:Boolean` [read-only]

Whether or not the tile is loading

Implementation
`public function get loadComplete():Boolean`

loading | property |

`loading:Boolean` [write-only]

Used to set loading status of tile

Implementation
`protected function set loading(value:Boolean):void`

onLoadEnd | property |

`onLoadEnd:Function` [read-write]Implementation
`public function get onLoadEnd():Function`
`public function set onLoadEnd(value:Function):void`

onLoadStart | property |

`onLoadStart:Function` [read-write]Implementation
`public function get onLoadStart():Function`
`public function set onLoadStart(value:Function):void`

position | property |

`position:Pixel` [read-write]Implementation
`public function get position():Pixel`
`public function set position(value:Pixel):void`

size | property |

`size:Size` [read-write]Implementation
`public function get size():Size`
`public function set size(value:Size):void`

url | property |

`url:String` [read-write]Implementation
`public function get url():String`
`public function set url(value:String):void`
Constructor detail

Tile | () | constructor

`public function Tile(layer:Layer, position:Pixel, bounds:Bounds, url:String, size:Size)`Parameters

| `layer:Layer`
| `position:Pixel`
| `bounds:Bounds`
| `url:String`
| `size:Size`

Method detail

clear | () | method

`public function clear():void`

clearAndMoveTo | () | method |

`public function clearAndMoveTo(bounds:Bounds, position:Pixel, redraw:Boolean = true):void`

Reposition the tile.

Parameters

| `bounds:Bounds`
| `position:Pixel`
| `redraw:Boolean` (default = `true`)``

destroy | () | method |

`public function destroy():void`

draw | () | method |

`public function draw():Boolean`

Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn.

Returns

| `Boolean` — Whether or not the tile should actually be drawn.

getBoundsFromBaseLayer | () | method |

`public function getBoundsFromBaseLayer(position:Pixel):Bounds`

Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels

Parameters

| `position:Pixel`

Returns

| `Bounds` — bounds

moveTo | () | method |

`public function moveTo(bounds:Bounds, position:Pixel, redraw:Boolean = true):void` Parameters

| `bounds:Bounds`
| `position:Pixel`
| `redraw:Boolean` (default = `true`)``

withinMapBounds | () | method |

`public function withinMapBounds():Boolean`

Returns

| `Boolean`