Packagecom.afcomponents.umap.interfaces
Interfacepublic interface IOverlay extends IMapObject, flash.events.IEventDispatcher, flash.events.IEventDispatcher
SubinterfacesIInfoWindow
ImplementorsLayer, Overlay, TileLayerOverlay

IOverlay is the basic interface for UMap graphical overlay objects.



Public Properties
 PropertyDefined by
 InheritedasDisplayObject : DisplayObject
Returns reference to the object as a DisplayObject instance.
IMapObject
  autoCloseInfo : Boolean
Gets or sets the autCloseInfo flag, which indicates whether to close info window automatically when user clicks somewhere on the map.
IOverlay
  autoInfo : Boolean
Gets or sets the autInfo flag, which indicates whether to open info window automatically upon mouse click.
IOverlay
 Inheritedcore : UMap
Returns reference to the core UMap object.
IMapObject
  description : String
Gets or sets the description text of the Overlay.
IOverlay
  draggable : Boolean
Gets or sets Overlay's draggable property.
IOverlay
 Inheritedid : uint
Gets or sets the ID of the object.
IMapObject
  info : IInfoWindow
[read-only] Return referens to opened InfoWindow
IOverlay
  infoParam : Object
Gets or sets the info window param object.
IOverlay
  infoStyle : Object
Gets or sets the info window style object associated with the Overlay.
IOverlay
 Inheritedname : String
Gets or sets the name of the object.
IMapObject
 Inheritedowner : IMapObjectContainer
Returns reference to the owner container object.
IMapObject
  point : Point
[read-only] Returns the position of the Overlay in bitmap coordinates.
IOverlay
  position : LatLng
Gets or set the geographical position of the Overlay.
IOverlay
  visible : Boolean
Gets or sets the Overlay's visibility.
IOverlay
Public Methods
 MethodDefined by
  
Creates an exact copy of this Overlay and returns it to the user.
IOverlay
  
Closes info window that is currently opened.
IOverlay
 Inherited
dispose():void
Releases all the resources accuired by the object.
IMapObject
  
Retruns Overlay bounds in geographical coordinates.
IOverlay
  
getBoundsXY(zoom:Number = 0):Bounds
Retruns Overlay bounds in bitmap coordinates.
IOverlay
  
getStyle():Object
Returns a copy of the style object.
IOverlay
  
hide():void
Hides overlay.
IOverlay
  
invalidate():void
Schedules the Overlay for invalidation in 1 frame after this call.
IOverlay
  
openInfoWindow(param:Object = null, style:Object = null):IInfoWindow
Opens new info window with the specified parameters & style.
IOverlay
  
redraw():void
Redraws the overlay.
IOverlay
  
refresh(full:Boolean = false):void
Refreshes overlay position on the map.
IOverlay
 Inherited
remove():void
Removes the object from the owner container object.
IMapObject
 Inherited
Adds the object to the specified IMapObjectContainer.
IMapObject
  
setStyle(style:Object):void
Sets the style for this Overlay from an Object or another Style.
IOverlay
  
show():void
Shows overlay.
IOverlay
 Inherited
toString():String
Returns a textual representation of the object.
IMapObject
  
toXML(full:Boolean = true, afcTags:Boolean = false):XML
Builds an XML object in KML 2.1 format that describes the Overlay & it's style.
IOverlay
  
updatePosition(latlng:LatLng):void
Invoked when map center has been updated.
IOverlay
  
updateZoom(zoom:Number):void
Invoked when map zoom has been updated.
IOverlay
Property detail
autoCloseInfoproperty
autoCloseInfo:Boolean  [read-write]

Gets or sets the autCloseInfo flag, which indicates whether to close info window automatically when user clicks somewhere on the map.

The default value is true.

Implementation
    public function get autoCloseInfo():Boolean
    public function set autoCloseInfo(value:Boolean):void
autoInfoproperty 
autoInfo:Boolean  [read-write]

Gets or sets the autInfo flag, which indicates whether to open info window automatically upon mouse click.

The default value is true.

Implementation
    public function get autoInfo():Boolean
    public function set autoInfo(value:Boolean):void
descriptionproperty 
description:String  [read-write]

Gets or sets the description text of the Overlay.

Implementation
    public function get description():String
    public function set description(value:String):void
draggableproperty 
draggable:Boolean  [read-write]

Gets or sets Overlay's draggable property.

Implementation
    public function get draggable():Boolean
    public function set draggable(value:Boolean):void
infoproperty 
info:IInfoWindow  [read-only]

Return referens to opened InfoWindow

Implementation
    public function get info():IInfoWindow
infoParamproperty 
infoParam:Object  [read-write]

Gets or sets the info window param object.

Implementation
    public function get infoParam():Object
    public function set infoParam(value:Object):void

See also

infoStyleproperty 
infoStyle:Object  [read-write]

Gets or sets the info window style object associated with the Overlay.

Implementation
    public function get infoStyle():Object
    public function set infoStyle(value:Object):void

See also

pointproperty 
point:Point  [read-only]

Returns the position of the Overlay in bitmap coordinates.

Implementation
    public function get point():Point
positionproperty 
position:LatLng  [read-write]

Gets or set the geographical position of the Overlay.

The default value is (lat=0, lng=0).

Implementation
    public function get position():LatLng
    public function set position(value:LatLng):void
visibleproperty 
visible:Boolean  [read-write]

Gets or sets the Overlay's visibility.

Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
Method detail
clone()method
public function clone():IOverlay

Creates an exact copy of this Overlay and returns it to the user. Please note that it doesn't attach new Overlay to the same or any other parent.

Returns
IOverlay — New Overlay with the same properties.
closeInfoWindow()method 
public function closeInfoWindow():void

Closes info window that is currently opened.

getBoundsLatLng()method 
public function getBoundsLatLng():LatLngBounds

Retruns Overlay bounds in geographical coordinates.

Returns
LatLngBounds — Overlay bounding rectangle in geographical coordinates.
getBoundsXY()method 
public function getBoundsXY(zoom:Number = 0):Bounds

Retruns Overlay bounds in bitmap coordinates. Use zoom parameter to specify zoom level for bounds conversion.

Parameters
zoom:Number (default = 0) — Defines the zoom level at which to perform bounds conversion; if omitted, current zoom level will be used.

Returns
Bounds — Overlay bounding rectangle in bitmap coordinates.
getStyle()method 
public function getStyle():Object

Returns a copy of the style object.

Returns
Object — A clone of the current style object.
hide()method 
public function hide():void

Hides overlay. Fires OverlayEvent.HIDE & OverlayEvent.CHAGNED events if visibility has been changed.

invalidate()method 
public function invalidate():void

Schedules the Overlay for invalidation in 1 frame after this call.

openInfoWindow()method 
public function openInfoWindow(param:Object = null, style:Object = null):IInfoWindow

Opens new info window with the specified parameters & style. Info window is placed in the center of the object.

Default info window parameters are stored in _infoParam property, but can be overriden by param parameter of the function call. Also you can define the default autoClose value within the parent layer's infoParam object.

Style objects will be concatinated. Here is the order of concatination:

  • InfoWindow.getDefaultStyle() - info window default static style.
  • Layer.infoStyle - parent layer info style.
  • Overlay.infoStyle - local infoStyle property
  • style - style parameter of the function call.
  • Parameters
    param:Object (default = null) — Object that describes the parameters of the InfoWindow.
     
    style:Object (default = null) — Object that defines InfoWindow's style.

    Returns
    IInfoWindow — Reference to the opened info window object.

    See also

    redraw()method 
    public function redraw():void

    Redraws the overlay.

    Override this method in your subclass and call super.redraw() immediately before actual redraw so that OverlayEvent.BEFORE_REDRAW event will be automatically fired. At the end of your drawing don't forget to manually fire OverlayEvent.REDRAW event.

    refresh()method 
    public function refresh(full:Boolean = false):void

    Refreshes overlay position on the map. If the full paramter is set to true then bitmap coordinates for this overlay are recalculated. Otherwise overlay will be repositioned using previuosly calculated coordinates.

    Parameters
    full:Boolean (default = false) — Indicates whether to perform full refresh.
    setStyle()method 
    public function setStyle(style:Object):void

    Sets the style for this Overlay from an Object or another Style. After setting the style, Overlay will be invalidated.

    Parameters
    style:Object — which contains style properties you wish to overwrite.
    show()method 
    public function show():void

    Shows overlay. Fires OverlayEvent.SHOW & OverlayEvent.CHAGNED events if visibility has been changed.

    toXML()method 
    public function toXML(full:Boolean = true, afcTags:Boolean = false):XML

    Builds an XML object in KML 2.1 format that describes the Overlay & it's style. Flag full indicates whether to build a complete KML data or just a container.

    Parameters
    full:Boolean (default = true) — A value of true if you want to return a full KML file with header; false if you want to get only a container with style and placemark nodes.
     
    afcTags:Boolean (default = false) — Flag that determines whether to generate KML data with extended AFC tags.

    Returns
    XML — XML object in KML 2.1 format.
    updatePosition()method 
    public function updatePosition(latlng:LatLng):void

    Invoked when map center has been updated.

    Parameters
    latlng:LatLng — Geographical coordinates of the new map center.
    updateZoom()method 
    public function updateZoom(zoom:Number):void

    Invoked when map zoom has been updated.

    Parameters
    zoom:Number — New zoom level.