Packagecom.afcomponents.umap.core
Classpublic class MapObject
InheritanceMapObject Inheritance flash.display.Sprite
ImplementsIMapObject
SubclassesGridSegment, ImageLoader, MapControl, MapObjectContainer, MouseHandler, Overlay

MapObject is the base class for the display objects used in the map.

It extends the Sprite class and implements the IMapObject interface. You should never create an instance of this class directly.



Public Properties
 PropertyDefined by
  asDisplayObject : DisplayObject
[read-only] Returns reference to the object as a DisplayObject instance.
MapObject
  core : UMap
[read-only] Returns reference to the core UMap object.
MapObject
  id : uint
Gets or sets the ID of the object.
MapObject
  name : String
Gets or sets the name of the object.
MapObject
  owner : IMapObjectContainer
[read-only] Returns reference to the owner container object.
MapObject
Public Methods
 MethodDefined by
  
MapObject(param:Object = null)
MapObject constructor.
MapObject
  
dispose():void
Releases all the resources accuired by the object.
MapObject
  
remove():void
Removes the object from the owner container object.
MapObject
  
Adds the object to the specified IMapObjectContainer.
MapObject
  
toString():String
Returns a textual representation of the object.
MapObject
Property detail
asDisplayObjectproperty
asDisplayObject:DisplayObject  [read-only]

Returns reference to the object as a DisplayObject instance.

Implementation
    public function get asDisplayObject():DisplayObject
coreproperty 
core:UMap  [read-only]

Returns reference to the core UMap object.

Implementation
    public function get core():UMap
idproperty 
id:uint  [read-write]

Gets or sets the ID of the object.

Implementation
    public function get id():uint
    public function set id(value:uint):void
nameproperty 
name:String  [read-write]

Gets or sets the name of the object.

Implementation
    public function get name():String
    public function set name(value:String):void
ownerproperty 
owner:IMapObjectContainer  [read-only]

Returns reference to the owner container object.

Implementation
    public function get owner():IMapObjectContainer
Constructor detail
MapObject()constructor
public function MapObject(param:Object = null)

MapObject constructor. You can pass MapObject's id, name and visibility via param object.

Parameters
param:Object (default = null) — that specifies additional properties.
Method detail
dispose()method
public function dispose():void

Releases all the resources accuired by the object.

remove()method 
public function remove():void

Removes the object from the owner container object.

setOwner()method 
public function setOwner(owner:IMapObjectContainer):void

Adds the object to the specified IMapObjectContainer.

If the object was previosly attached to a container, object will be removed from it. If you specify null instead of the owner, IllegalOperationError will be thrown.

Parameters
owner:IMapObjectContainer — New owner of the object.
toString()method 
public override function toString():String

Returns a textual representation of the object. Template: (name:classname)

Returns
String