| Package | com.afcomponents.umap.core |
| Class | public class MapObjectContainer |
| Inheritance | MapObjectContainer MapObject flash.display.Sprite |
| Implements | IMapObjectContainer |
| Subclasses | Control, Display, GridLayer, Layer, Manager, ManagerControl, TileLayerOverlay |
It extends the MapObject class and implements the IMapObjectContainer interface.
You can add and remove MapObjects, as whell as list them all, or with a filter.
You should never create an instance of this class directly.
See also
| Method | Defined by | ||
|---|---|---|---|
|
MapObjectContainer(param:Object = null)
MapObjectContainer constructor.
| MapObjectContainer | ||
|
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 | ||
|
isOwnerVisible():Boolean
Recursevly checks visibility of parent objects
| MapObjectContainer | ||
![]() |
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 | |
| MapObjectContainer | () | constructor |
public function MapObjectContainer(param:Object = null)
MapObjectContainer constructor. Creates new container for MapObjects.
You can pass MapObjectContainer's name
and visibility via param object.
ID will be assigned to the object automatically.
param:Object (default = null) — that specifies additional properties.
|
| addObject | () | method |
public function addObject(object:IMapObject):voidAdds new IMapObject to the container.
Parametersobject:IMapObject — Reference to an object that should be added to the container.
|
| bringForward | () | method |
public function bringForward(object:IMapObject):voidMoves the attached IMapObject forward in the display list.
Parametersobject:IMapObject — Reference to IMapObject that should be moved forward.
|
| bringToFront | () | method |
public function bringToFront(object:IMapObject):voidBrings the attached IMapObject to the top of the display list.
Parametersobject:IMapObject — Reference to IMapObject that should be brought to front.
|
| clearObjects | () | method |
public function clearObjects(filter:Class = null):voidRemoves all attached objects. If filter parameter is defined, only removes objects of the specified class.
Parametersfilter:Class (default = null) — Class that should be used as a filter.
|
| dispose | () | method |
public override function dispose():voidReleases all the resources accuired by the object.
| getObject | () | method |
public function getObject(id_or_name:*, filter:Class = null):IMapObject
Searches for an object with specified id or name.
Additionally you can filter objects by it's type.
For speed, please consider using getObjectById(), and getObjectByName() methods.
id_or_name:* — ID or name of the object. If you pass a Number object will be searched by it's ID.
If you pass a String object will be searched by it's name and the letter case will not match.
|
|
filter:Class (default = null) — Class that should be used as a filter.
|
IMapObject —
Reference to the found object or null if it was not found.
|
| getObjectById | () | method |
public function getObjectById(id:uint, filter:Class = null):IMapObjectSearches for an object with specified id. Additionally you can filter objects by it's type.
Parametersid:uint — ID of the object.
|
|
filter:Class (default = null) — Class that should be used as a filter.
|
IMapObject —
Reference to the found object or null if it was not found.
|
| getObjectByName | () | method |
public function getObjectByName(name:String, matchCase:Boolean = false, filter:Class = null):IMapObjectSearches for an object with specified name. Additionally you can specify whether to match case when searching and you can also filter objects by it's type.
Parametersname:String — Name of the object.
|
|
matchCase:Boolean (default = false) — Defines whether to match case when searching.
|
|
filter:Class (default = null) — Class that should be used as a filter.
|
IMapObject —
Reference to the found object or null if it was not found.
|
| getObjects | () | method |
public function getObjects(filter:Class = null):ArrayReturns an array of IMapObjects that where added to the container. Additionally you can specify a class name to return only the objects of that class.
Parametersfilter:Class (default = null) — Name of the class that should be used as a filter.
|
Array — An Array holding all the attached objects.
|
| isOwnerVisible | () | method |
public function isOwnerVisible():BooleanRecursevly checks visibility of parent objects
ReturnsBoolean |
| removeObject | () | method |
public function removeObject(object:IMapObject):voidRemoves IMapObject from the container.
Parametersobject:IMapObject — Reference to an object that should be removed from the container.
|
| sendBackward | () | method |
public function sendBackward(object:IMapObject):voidSends the attached IMapObject backward in the display list.
Parametersobject:IMapObject — Reference to IMapObject that should be sent backward.
|
| sendToBack | () | method |
public function sendToBack(object:IMapObject):voidSends the attached IMapObject to the bottom of the display list.
Parametersobject:IMapObject — Reference to IMapObject that should be sent to back.
|
| setOwner | () | method |
public override function setOwner(owner:IMapObjectContainer):voidAdds 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.
owner:IMapObjectContainer — New owner of the object.
|