Packagecom.yahoo.maps.api.markers
Classpublic class LoaderMarker
InheritanceLoaderMarker Inheritance Marker Inheritance flash.display.Sprite

Wraps a Loader class inside a Marker that allows you to load SWF files or images (PNG, GIF, JPG) by URL or ByteArray.


Example
   var url:String = "http://unknown.example.com/content.swf";
   var request:URLRequest = new URLRequest(url);
   
   var marker:LoaderMarker = new LoaderMarker();
   marker.latlon = new LatLon(34.011,-118.492);
   marker.contentLoaderInfo.addEventListener(Event.COMPLETE, handleMarkerLoadComplete);
   marker.load( request );
  
   _yahooMap.markerManager.addMarker(marker);
  
   function handleMarkerLoadComplete(event:Event):void
   {
    // handle the event 
   }
  

See also

Loader


Public Properties
 PropertyDefined by
 Inheritedaddress : Address
The markers location as an Address
Marker
 Inheritedcontainer : Sprite
The container in which all markers are children of.
Marker
  content : DisplayObject
[read-only] Contains the root display object of the SWF file or image (JPG, PNG, or GIF) file that was loaded by using the load() method.
LoaderMarker
  contentLoaderInfo : LoaderInfo
[read-only] Returns a LoaderInfo object corresponding to the object being loaded.
LoaderMarker
 InheriteddragEnabled : Boolean
Determines whether the marker is draggable.
Marker
 InheritedgroupId : String
An ID which you can assign to the marker, to enable you to fetch a group of markers using the MarkerManager.
Marker
 Inheritedlatlon : LatLon
The markers location as a latitude and longitude.
Marker
  loader : Loader
[read-only] Returns the Loader object.
LoaderMarker
 Inheritedmanager : MarkerManager
Marker
 Inheritedmap : IYahooMap
A reference to the owning YahooMap instance.
Marker
 InheritedmaxZoom : int
The maximum zoom level this marker should be shown at.
Marker
 InheritedminZoom : int
The minimum zoom level this marker should be shown at.
Marker
Public Methods
 MethodDefined by
  
Creates a new LoaderMarker object.
LoaderMarker
 Inherited
Returns the markers current position as a LatLon object by converting the markers local XY point.
Marker
  
close():void
Cancels a load() method operation that is currently in progress for the LoaderMarker instance.
LoaderMarker
  
destroy():void
Frees the markers resources in preparation for garbage collection.
LoaderMarker
 Inherited
Converts a LatLon object to a local XY point.
Marker
 Inherited
Converts a local XY point to a LatLon object.
Marker
  
load(request:URLRequest, context:LoaderContext = null):void
Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into an object that is a child of this Loader object.
LoaderMarker
  
loadBytes(bytes:ByteArray, context:LoaderContext = null):void
Loads from binary data stored in a ByteArray object.
LoaderMarker
 Inherited
promoteToTop():void
Sets the marker child index (its depth) to the top in the marker container.
Marker
  
unload():void
Removes a child of this Loader object that was loaded by using the load() method.
LoaderMarker
Events
 EventSummaryDefined by
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
Property detail
contentproperty
content:DisplayObject  [read-only]

Contains the root display object of the SWF file or image (JPG, PNG, or GIF) file that was loaded by using the load() method.

Implementation
    public function get content():DisplayObject
contentLoaderInfoproperty 
contentLoaderInfo:LoaderInfo  [read-only]

Returns a LoaderInfo object corresponding to the object being loaded.

Implementation
    public function get contentLoaderInfo():LoaderInfo
loaderproperty 
loader:Loader  [read-only]

Returns the Loader object.

Implementation
    public function get loader():Loader
Constructor detail
LoaderMarker()constructor
public function LoaderMarker()

Creates a new LoaderMarker object.

Method detail
close()method
public function close():void

Cancels a load() method operation that is currently in progress for the LoaderMarker instance.

destroy()method 
public override function destroy():void

Frees the markers resources in preparation for garbage collection.

load()method 
public function load(request:URLRequest, context:LoaderContext = null):void

Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into an object that is a child of this Loader object.

Parameters
request:URLRequest
 
context:LoaderContext (default = null)
loadBytes()method 
public function loadBytes(bytes:ByteArray, context:LoaderContext = null):void

Loads from binary data stored in a ByteArray object.

Parameters
bytes:ByteArray
 
context:LoaderContext (default = null)
unload()method 
public function unload():void

Removes a child of this Loader object that was loaded by using the load() method.