| Package | com.afcomponents.umap.display.infowindow |
| Class | public class ImagePanel |
| Inheritance | ImagePanel Panel flash.display.Sprite |
| Implements | IPanel |
InfoWindow panel which can load and display a .jpg, .png, .gif, .swf asset file.
Asset uri can be specified via InfoWindow.content property, as a String object.
import com.afcomponents.umap.core.UMap;
import com.afcomponents.umap.display.infowindow.ImagePanel;
// create UMap object
var map:UMap = new UMap();
map.setSize(550, 400);
addChild(map);
// init info window param object
var param:Object = {
content: "http://www.afcomponents.com/content/images/layout/logo.gif",
contentType: ImagePanel
}
// define info window style
var style:Object = {
fill: "rgb",
fillRGB: 0x555555,
fillAlpha: 1,
strokeRGB: 0x0,
close: false
}
// open info window with a specific style
map.openInfoWindow(param, style);
ContentType constants instead of direct class importing.
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | asDisplayObject : DisplayObject
Returns a reference to the Panel as a DisplayObject.
| Panel | |
| loader : Loader [read-only]
Returns reference to the asset loader object.
| ImagePanel | ||
| Property | Defined by | ||
|---|---|---|---|
![]() | _autoSize : String
Auto size type.
| Panel | |
![]() | _data : *
Panel data.
| Panel | |
| _loaded : Boolean
Indicates whether content has been loaded.
| ImagePanel | ||
| _loader : Loader
Loader used for loading the asset.
| ImagePanel | ||
![]() | _maxSize : Size
Maximum possible size.
| Panel | |
![]() | _size : Size
Desired size.
| Panel | |
| _style : MediaStyle
MediaStyle object which defines the asset display style.
| ImagePanel | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
close():void
Invoked by info window when it has been closed.
| Panel | |
![]() |
dispose():void
Invoked by Info Window to tell the panel auto size type and maximum size.
| Panel | |
![]() |
getData():*
Returns panel data.
| Panel | |
|
Returns actual size of the Panel.
| ImagePanel | ||
![]() |
Returns the style object associated with the panel.
| Panel | |
![]() |
Initalizes the panel options.
| Panel | |
![]() |
move(x:Number, y:Number):void
Moves panel to the specified point.
| Panel | |
![]() |
reset():void
Refreshes the panel.
| Panel | |
![]() |
resize():void
Invoked when the size of the panel should be updated.
| Panel | |
![]() |
setData(value:*):void
Sets new panel data.
| Panel | |
![]() |
setFinalSize(size:Size):void
Invoked by InfoWindow to inform the Panel about the final available size for the panel.
| Panel | |
![]() |
Invoked by InfoWindow to inform the Panel about the desired size.
| Panel | |
![]() |
setStyle(style:Object):void
Sets the style of the panel.
| Panel | |
| _loaded | property |
protected var _loaded:BooleanIndicates whether content has been loaded.
| _loader | property |
protected var _loader:LoaderLoader used for loading the asset.
| loader | property |
loader:Loader [read-only]Returns reference to the asset loader object.
Implementation public function get loader():Loader
| _style | property |
protected var _style:MediaStyleMediaStyle object which defines the asset display style.
| getSize | () | method |