| Package | com.afcomponents.umap.display.birdseye |
| Class | public class BirdsEyeManager |
| Inheritance | BirdsEyeManager Manager MapObjectContainer MapObject flash.display.Sprite |
| Implements | IManager |
import com.afcomponents.umap.core.UMap;
import com.afcomponents.umap.providers.microsoft.MapPointProxy;
import com.afcomponents.umap.providers.microsoft.BingProvider;
import com.afcomponents.umap.providers.microsoft.BingEnvironment;
// create UMap instance
var map:UMap = new UMap();
map.setSize (550,400);
addChild (map);
// initalize proxy
MapPointProxy.initialize("http://www.umapper.com/demo/dmitry/msproxy.php");
// force staging environment
BingEnvironment.type = BingEnvironment.STAGING;
// select Bing provider
map.setProvider(new BingProvider());
map.setMapType(BingProvider.ROAD);
// add birdseye button
// don't forget to add Button to the library from the components panel!
import fl.controls.Button;
var button:Button = new Button();
button.label = "Birds EYE";
button.enabled = false;
button.x = button.y = 10;
addChild(button);
// initizlize birds eye manager
import com.afcomponents.umap.display.birdseye.BirdsEyeManager;
var birdseye:BirdsEyeManager = new BirdsEyeManager();
map.addManager(birdseye);
// listen for birds eye status change
birdseye.addEventListener(Event.CHANGE, birdseyeUpdate);
function birdseyeUpdate(event:Event):void
{
trace("Birds eye changed, available: " + birdseye.available);
button.enabled = birdseye.available;
}
// add click handler to button
button.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void
{
// select bird's eye map type
map.setMapType(birdseye.mapType);
}
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | asDisplayObject : DisplayObject
Returns reference to the object as a DisplayObject instance.
| MapObject | |
| available : Boolean [read-only]
| BirdsEyeManager | ||
![]() | core : UMap
Returns reference to the core UMap object.
| MapObject | |
![]() | id : uint
Gets or sets the ID of the object.
| MapObject | |
| mapType : IMapType
[read-only]
| BirdsEyeManager | ||
![]() | name : String
Gets or sets the name of the object.
| MapObject | |
![]() | owner : IMapObjectContainer
Returns reference to the owner container object.
| MapObject | |
| Method | Defined by | ||
|---|---|---|---|
| BirdsEyeManager | |||
![]() |
addObject(object:IMapObject):void
Adds new IMapObject to the container.
| MapObjectContainer | |
![]() |
bringForward(object:IMapObject):void
Moves the attached IMapObject forward in the display list.
| MapObjectContainer | |
![]() |
bringToFront(object:IMapObject):void
Brings the attached IMapObject to the top of the display list.
| MapObjectContainer | |
![]() |
clearObjects(filter:Class = null):void
Removes all attached objects.
| MapObjectContainer | |
![]() |
dispose():void
Releases all the resources accuired by the object.
| MapObjectContainer | |
![]() |
getObject(id_or_name:*, filter:Class = null):IMapObject
Searches for an object with specified id or name.
| MapObjectContainer | |
![]() |
getObjectById(id:uint, filter:Class = null):IMapObject
Searches for an object with specified id.
| MapObjectContainer | |
![]() |
getObjectByName(name:String, matchCase:Boolean = false, filter:Class = null):IMapObject
Searches for an object with specified name.
| MapObjectContainer | |
![]() |
getObjects(filter:Class = null):Array
Returns an array of IMapObjects that where added to the container.
| MapObjectContainer | |
|
getSceneBounds():Array
Returns scene bounds
| BirdsEyeManager | ||
![]() |
init():void
| Manager | |
![]() |
isOwnerVisible():Boolean
Recursevly checks visibility of parent objects
| MapObjectContainer | |
![]() |
ready():void
| Manager | |
| BirdsEyeManager | |||
|
refreshMetadata():void
Makes an GetImageryMetadat request to find out uri and subdomains
| BirdsEyeManager | ||
![]() |
remove():void
Removes the object from the owner container object.
| MapObject | |
![]() |
removeObject(object:IMapObject):void
Removes IMapObject from the container.
| MapObjectContainer | |
![]() |
sendBackward(object:IMapObject):void
Sends the attached IMapObject backward in the display list.
| MapObjectContainer | |
![]() |
sendToBack(object:IMapObject):void
Sends the attached IMapObject to the bottom of the display list.
| MapObjectContainer | |
![]() |
setOwner(owner:IMapObjectContainer):void
Adds the object to the specified IMapObjectContainer.
| MapObjectContainer | |
![]() |
toString():String
Returns a textual representation of the object.
| MapObject | |
![]() |
updateComponentProperty(property:String, value:*):void
| Manager | |
![]() |
updateMapType(mapType:IMapType):void
| Manager | |
![]() |
updatePosition(latlng:LatLng):void
| Manager | |
![]() |
updateSize(width:Number, height:Number):void
| Manager | |
![]() |
updateZoom(zoom:Number):void
| Manager | |
| available | property |
available:Boolean [read-only]Implementation
public function get available():Boolean
| mapType | property |
| BirdsEyeManager | () | constructor |
public function BirdsEyeManager()
| getSceneBounds | () | method |
public function getSceneBounds():ArrayReturns scene bounds
ReturnsArray |
| refresh | () | method |
public function refresh(latlng:LatLng = null, zoom:Number):voidParameters
latlng:LatLng (default = null) |
|
zoom:Number |
| refreshMetadata | () | method |
public function refreshMetadata():voidMakes an GetImageryMetadat request to find out uri and subdomains