Packagecom.esri.ags.layers
Classpublic class TiledMapServiceLayer
InheritanceTiledMapServiceLayer Inheritance Layer Inheritance mx.core.UIComponent
Subclasses ArcGISTiledMapServiceLayer, OpenStreetMapLayer, VETiledLayer, WMTSLayer

Base class for all tiled layers that can be added to a map.

See also

com.esri.ags.layers.supportClasses.LOD
com.esri.ags.layers.supportClasses.TileInfo
com.esri.ags.events.LayerEvent


Public Properties
 PropertyDefined By
  displayLevels : Array
Levels to display in layer, based on LOD.level.
TiledMapServiceLayer
  fadeInFrameCount : uint
The number of frames it will take for the tiles to fade in.
TiledMapServiceLayer
  fullExtent : Extent
[read-only] The full extent of the layer.
TiledMapServiceLayer
 InheritedinitialExtent : Extent
[read-only] Initial extent of the layer.
Layer
 InheritedisInScaleRange : Boolean
[read-only] Returns true if the current scale of the map is between the maximum and minimum scale of the layer [added in version 1.3].
Layer
 Inheritedloaded : Boolean
[read-only] When the layer is loaded, the value becomes "true" and layer properties can be accessed.
Layer
 InheritedloadFault : Fault
[read-only] A reference to the fault that is dispatched when the layer throws a loadError event.
Layer
 Inheritedmap : Map
[read-only] A reference to the Map this layer is in.
Layer
 InheritedmaxScale : Number
The maximum scale of the layer [added in version 1.3].
Layer
 InheritedminScale : Number
The minimum scale of the layer [added in version 1.3].
Layer
 InheritedspatialReference : SpatialReference
[read-only] The spatial reference of the layer.
Layer
  tileInfo : TileInfo
[read-only] Contains information about the tiling scheme.
TiledMapServiceLayer
 Inheritedunits : String
[read-only] The units of the layer.
Layer
Public Methods
 MethodDefined By
  
Creates a new TiledMapServiceLayer object.
TiledMapServiceLayer
 Inherited
refresh():void
Causes the layer to redraw or reload its content.
Layer
Protected Methods
 MethodDefined By
 Inherited
Adds listeners for ExtentEvent.EXTENT_CHANGE, ZoomEvent.ZOOM_START, ZoomEvent.ZOOM_UPDATE and ZoomEvent.ZOOM_END.
Layer
 Inherited
When an EXTENT_CHANGE event occurs, this calls invalidateLayer();
Layer
  
getTileURL(level:Number, row:Number, col:Number):URLRequest
Subclasses must override this method to cause tiles to be loaded from their own endpoints.
TiledMapServiceLayer
 Inherited
hideHandler(event:FlexEvent):void
When the layer is hidden (visible is set to false), this calls removeMapListeners().
Layer
 Inherited
Subclasses should call this whenever they would like to have updateLayer() called on them.
Layer
 Inherited
Removes all the layers children.
Layer
 Inherited
Removes the four event listeners added by addMapListeners();
Layer
 Inherited
setLoaded(value:Boolean):void
Subclasses must call this when they've loaded all their properties and are ready to load their content.
Layer
 Inherited
showHandler(event:FlexEvent):void
When the layer is shown (visible is set to true), this calls addMapListeners() and invalidateLayer().
Layer
 Inherited
toScreenX(mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Layer
 Inherited
toScreenY(mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Layer
 Inherited
Subclasses must override this method.
Layer
 Inherited
Finishes the zoom animation.
Layer
 Inherited
Prepares the zoom animation by taking a bitmap of the layer.
Layer
 Inherited
Redraws the bitmap of the layer.
Layer
Events
 Event Summary Defined By
 InheritedFires if the value of isInScaleRange changes.Layer
 InheritedFires after layer properties for the layer are successfully populated.Layer
 InheritedFires if the layer is unable to load.Layer
 InheritedFires when the layer has finished updating its content.Layer
 InheritedFires when the layer begins to update its content.Layer
Property Detail
displayLevelsproperty
displayLevels:Array

Levels to display in layer, based on LOD.level. If null, all levels are displayed.

The default value is null.


Implementation
    public function get displayLevels():Array
    public function set displayLevels(value:Array):void
fadeInFrameCountproperty 
fadeInFrameCount:uint

The number of frames it will take for the tiles to fade in. They will only fade in if this is greater than one.

Note: the fadeInFrameCount property was added in version 1.1 of the ArcGIS API for Flex.

The default value is 4 frames.

This property can be used as the source for data binding.


Implementation
    public function get fadeInFrameCount():uint
    public function set fadeInFrameCount(value:uint):void
fullExtentproperty 
fullExtent:Extent  [read-only]

The full extent of the layer. Subclasses must override this method.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get fullExtent():Extent
tileInfoproperty 
tileInfo:TileInfo  [read-only]

Contains information about the tiling scheme. Subclasses must override this method.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get tileInfo():TileInfo
Constructor Detail
TiledMapServiceLayer()Constructor
public function TiledMapServiceLayer()

Creates a new TiledMapServiceLayer object.

Method Detail
getTileURL()method
protected function getTileURL(level:Number, row:Number, col:Number):URLRequest

Subclasses must override this method to cause tiles to be loaded from their own endpoints. If the returned URL request scheme is set "data", then the image is loaded from the URL request data property as a ByteArray.

     var myByteArray:ByteArray = new ByteArray();
     // Populate myByteArray with image jpg/png formatted content.
     var url:String = "data://L" + level + "R" + row + "C" + col;
     var urlRequest:URLRequest = new URLRequest(url);
     urlRequest.data = myByteArray;
     return urlRequest;
     

Parameters

level:Number — The tile level.
 
row:Number — The tile row.
 
col:Number — The tile column.

Returns
URLRequest — The URLRequest to be used to load the tile.

See also