Packagecom.esri.ags.virtualearth
Classpublic class VETiledLayer
InheritanceVETiledLayer Inheritance TiledMapServiceLayer Inheritance Layer Inheritance mx.core.UIComponent

Allows you to use basemaps from Bing Maps (formerly Microsoft Virtual Earth). You can set the mapStyle to switch between "road", "aerial" and "aerialWithLabels". You can set the culture to "en-US", "jp-JP" etc to return map labels on the images returned Bing Maps tile servers in the language of the culture.

Note: Bing Maps tiles and geocoding were added in version 1.2.


Example
MXML to use VETiledLayer:
 <esri:Map>
     <esri:VETiledLayer
         environment="production"
         tokenURL=http://myserver:8081/ve/vetoken.jsp
         mapStyle="road"
     />
 </esri:Map>

ActionScript to use VETiledLayer:
 var veTiledLayer:VETiledLayer = new VETiledLayer();
 veTiledLayer.tokenURL = "http://myserver:8081/ve/vetoken.jsp";
 veTiledLayer.environment = "production";
 veTiledLayer.mapStyle = VETiledLayer.MAP_STYLE_ROAD;
 myMap.addLayer(veTiledLayer);

See also

Concepts - Using Bing Maps in the ArcGIS API for Flex
Concepts - Getting started with Bing Maps in the ArcGIS API for Flex


Public Properties
 PropertyDefined by
  clientToken : String
The Bing Maps client token.
VETiledLayer
  culture : String
The language of the culture to use for map labels on the Bing Maps tiles.
VETiledLayer
 InheriteddisplayLevels : Array
Levels to display in layer, based on LOD.level.
TiledMapServiceLayer
  environment : String
The Bing Maps server environment, use either "staging" or "production".
VETiledLayer
 InheritedfadeInFrameCount : uint
The number of frames it will take for the tiles to fade in.
TiledMapServiceLayer
 InheritedfullExtent : Extent
The full extent of the layer.
TiledMapServiceLayer
 InheritedinitialExtent : Extent
The initial extent of the layer.
Layer
 InheritedisInScaleRange : Boolean
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
When the layer is loaded, the value becomes "true" and layer properties can be accessed.
Layer
 Inheritedmap : Map
A reference to the Map this layer is in.
Layer
  mapStyle : String
The map style can be set to "road" (default), "aerial" or "aerialWithLabels".
VETiledLayer
 InheritedmaxScale : Number = 0
The maximum scale of the layer [added in version 1.3].
Layer
 InheritedminScale : Number = 0
The minimum scale of the layer [added in version 1.3].
Layer
  serverToken : String
The Bing Maps server token for use with the Virtual Earth adapter.
VETiledLayer
  spatialReference : SpatialReference
[read-only] Returns a SpatialReference with a wkid value of 102100.
VETiledLayer
 InheritedtileInfo : TileInfo
Contains information about the tiling scheme.
TiledMapServiceLayer
  tokenDuration : Number
The duration of the token (until it expires).
VETiledLayer
  tokenURL : String
The URL to the "Get Virtual Earth Token" page.
VETiledLayer
  units : String
[read-only] Returns Units.METERS
VETiledLayer
Public Methods
 MethodDefined by
  
VETiledLayer(environment:String = "staging", culture:String = "en-US", mapStyle:String = "road")
Creates a new VETiledLayer object.
VETiledLayer
 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
 Inherited
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
updateLayer():void
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
 EventSummaryDefined by
 Inherited Dispatched when a tile's content loading is complete and the tile has finished fading in.TiledMapServiceLayer
 Inherited Dispatched when a tile input/output error occurs.TiledMapServiceLayer
 Inherited Fires after layer properties for the layer are successfully populated.Layer
 Inherited Fires if the layer is unable to load.Layer
 Inherited Dispatched when all the tiles have either been completed or have errored.TiledMapServiceLayer
Public Constants
 ConstantDefined by
  MAP_STYLE_AERIAL : String = "aerial"
[static] Bing Maps Aerial is the aerial imagery map style.
VETiledLayer
  MAP_STYLE_AERIAL_WITH_LABELS : String = "aerialWithLabels"
[static] Bing Maps Aerial with Labels is the aerial imagery map style with a road overlay.
VETiledLayer
  MAP_STYLE_ROAD : String = "road"
[static] Bing Maps Roads is the road map style.
VETiledLayer
Property detail
clientTokenproperty
clientToken:String  [read-write]

The Bing Maps client token.

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

Implementation
    public function get clientToken():String
    public function set clientToken(value:String):void
cultureproperty 
culture:String  [read-write]

The language of the culture to use for map labels on the Bing Maps tiles.

The default value is en-US.

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

Implementation
    public function get culture():String
    public function set culture(value:String):void

See also

environmentproperty 
environment:String  [read-write]

The Bing Maps server environment, use either "staging" or "production".

The default value is staging.

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

Implementation
    public function get environment():String
    public function set environment(value:String):void
mapStyleproperty 
mapStyle:String  [read-write]

The map style can be set to "road" (default), "aerial" or "aerialWithLabels".

The default value is road.

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

Implementation
    public function get mapStyle():String
    public function set mapStyle(value:String):void
serverTokenproperty 
serverToken:String  [read-write]

The Bing Maps server token for use with the Virtual Earth adapter.

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

Implementation
    public function get serverToken():String
    public function set serverToken(value:String):void
spatialReferenceproperty 
spatialReference:SpatialReference  [read-only]

Returns a SpatialReference with a wkid value of 102100.

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

Implementation
    public function get spatialReference():SpatialReference
tokenDurationproperty 
tokenDuration:Number  [read-write]

The duration of the token (until it expires). If tokenURL is set, this will be passed to the tokenURL and new client and server tokens will be retrieved every (tokenDuration - 1) minutes.

The default value is 480 minutes.

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

Implementation
    public function get tokenDuration():Number
    public function set tokenDuration(value:Number):void
tokenURLproperty 
tokenURL:String  [read-write]

The URL to the "Get Virtual Earth Token" page. The token retrieved from this URL will be set as the serverToken.

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

Implementation
    public function get tokenURL():String
    public function set tokenURL(value:String):void

See also

unitsproperty 
units:String  [read-only]

Returns Units.METERS

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

Implementation
    public function get units():String
Constructor detail
VETiledLayer()constructor
public function VETiledLayer(environment:String = "staging", culture:String = "en-US", mapStyle:String = "road")

Creates a new VETiledLayer object.

Parameters
environment:String (default = "staging") — Bing Maps server environment (staging or production)
 
culture:String (default = "en-US") — set the language of the culture for the map labels.
 
mapStyle:String (default = "road") — map style.
Constant detail
MAP_STYLE_AERIALconstant
public static const MAP_STYLE_AERIAL:String = "aerial"

Bing Maps Aerial is the aerial imagery map style.

MAP_STYLE_AERIAL_WITH_LABELSconstant 
public static const MAP_STYLE_AERIAL_WITH_LABELS:String = "aerialWithLabels"

Bing Maps Aerial with Labels is the aerial imagery map style with a road overlay.

MAP_STYLE_ROADconstant 
public static const MAP_STYLE_ROAD:String = "road"

Bing Maps Roads is the road map style.