| Package | org.openscales.core.control |
| Class | public class Zoom |
| Inheritance | Zoom Control flash.display.Sprite |
| Subclasses | ZoomBar |
| Property | Defined By | ||
|---|---|---|---|
![]() | active : Boolean | Control | |
| buttons : Vector.<Button> | Zoom | ||
![]() | isReduced : Boolean
Indicates if the control display is normal or reduced
| Control | |
![]() | map : Map | Control | |
![]() | position : Pixel | Control | |
| slideFactor : int
The list of buttons of this pan component
| Zoom | ||
| Property | Defined By | ||
|---|---|---|---|
![]() | _active : Boolean = false | Control | |
![]() | _isReduced : Boolean | Control | |
![]() | _map : Map = null | Control | |
| sliderImg : Class | Zoom | ||
| zoombarImg : Class | Zoom | ||
| zoomMinusMiniImg : Class | Zoom | ||
| zoomPlusMiniImg : Class | Zoom | ||
| zoomWorldMiniImg : Class | Zoom | ||
| Method | Defined By | ||
|---|---|---|---|
Zoom(position:Pixel = null) | Zoom | ||
addButton(name:String, image:Bitmap, xy:Pixel, sz:Size, alt:String = null):void
Add a button as child of the pan component and add it on the buttons list. | Zoom | ||
click(evt:Event):void
Handle click event. | Zoom | ||
destroy():void [override]
| Zoom | ||
doubleClick(evt:Event):Boolean
Handle double-click event. | Zoom | ||
draw():void [override]
| Zoom | ||
![]() | onMapLanguageChange(event:I18NEvent):void
to be overrided in sub classes
| Control | |
![]() | Control | ||
![]() | toggleDisplay(event:Event = null):void | Control | |
| buttons | property |
buttons:Vector.<Button> public function get buttons():Vector.<Button> public function set buttons(value:Vector.<Button>):void| slideFactor | property |
slideFactor:intThe list of buttons of this pan component
public function get slideFactor():int public function set slideFactor(value:int):void| sliderImg | property |
protected var sliderImg:Class| zoombarImg | property |
protected var zoombarImg:Class| zoomMinusMiniImg | property |
protected var zoomMinusMiniImg:Class| zoomPlusMiniImg | property |
protected var zoomPlusMiniImg:Class| zoomWorldMiniImg | property |
protected var zoomWorldMiniImg:Class| Zoom | () | Constructor |
public function Zoom(position:Pixel = null)position:Pixel (default = null) |
| addButton | () | method |
public function addButton(name:String, image:Bitmap, xy:Pixel, sz:Size, alt:String = null):voidAdd a button as child of the pan component and add it on the buttons list. The button is also linked to MouseEvent.CLICK and MouseEvent.DOUBLE_CLICK
Parameters
name:String — The name of the component on the flash scene (mandatory)
| |
image:Bitmap — The bitmap linked to the button display (mandatory)
| |
xy:Pixel — The position of the button on the scene (mandatory)
| |
sz:Size — The size for the button on the scene (mandatory)
| |
alt:String (default = null) — The html alt parameter
|
| click | () | method |
public function click(evt:Event):voidHandle click event. Switch on the button click and do the linked action (pan in the good orientation)
Parameters
evt:Event — The event received (return if not MouseEvent)
|
| destroy | () | method |
override public function destroy():void
| doubleClick | () | method |
public function doubleClick(evt:Event):BooleanHandle double-click event. No action to do for this component so stop the propagation of the event.
Parameters
evt:Event — The event received
|
Boolean — false
|
| draw | () | method |
override public function draw():void
var theMap = Map();
theMap.addControl(new Zoom());