| Package | com.afcomponents.umap.core |
| Class | public class UMap |
| Inheritance | UMap fl.core.UIComponent |
Stage or create component at run-time:
import com.afcomponents.umap.core.UMap; var map:UMap = new UMap(); map.setSize(300,300); addChild(map);
| Property | Defined by | ||
|---|---|---|---|
| componentStyle : Object
Defines the component style.
| UMap | ||
| control : Control
[read-only]
Returns a reference to
core.Control object instance. | UMap | ||
| display : Display
[read-only]
Returns a reference to
core.Display object instance. | UMap | ||
| doubleClickMode : String
Defines an action that should be taken when a user double-clicks the map.
| UMap | ||
| embedFonts : Boolean
Defines whether to use embedded font outlines within the map.
| UMap | ||
| enableDragging : Boolean
Defines whether map dragging is enabled.
| UMap | ||
| enableKeyboardHandler : Boolean
Defines whether to use keyboard to control the map.
| UMap | ||
| enableMouseHandler : Boolean
Defines whether to use mouse to control the map.
| UMap | ||
| enableScrollWheelZoom : Boolean
Defines whether to use mouse wheel to control the map.
| UMap | ||
| enableStrictMode : Boolean
Defines whether component will raise errors when invalid input was recieved.
| UMap | ||
| errorSymbol : String
Defines a class name of the symbol in the library that should be used for error indicating.
| UMap | ||
| intZoom : uint [read-only]
Returns current zoom level rounded down.
| UMap | ||
| language : String
Defines a two-letter ISO code of a language to use with the map.
| UMap | ||
| mapType : String
Defines current map type name.
| UMap | ||
| panEasing : *
Defines panning easing function.
| UMap | ||
| panning : Boolean [read-only]
Returns
true if map is auto-panning at the moment. | UMap | ||
| panSpeed : uint
Defines panning speed in 0.1 of a second.
| UMap | ||
| ready : Boolean [read-only]
Returns
true if map settings have been loaded. | UMap | ||
| targetZoom : Number [read-only]
Returns target zoom level if
animateZoom property set to true or current zoom level. | UMap | ||
| zoom : Number [read-only]
Returns current zoom level.
| UMap | ||
| zoomAtPointer : Boolean
Defines whether we should zoom in at pointer position rather than at the center of the map.
| UMap | ||
| zoomEasing : *
Defines zoom easing function.
| UMap | ||
| zoomSpeed : uint
Defines zoom animation speed in 0.1 of a second.
| UMap | ||
| Method | Defined by | ||
|---|---|---|---|
|
UMap(param:Object = null)
UMap constructor.
| UMap | ||
|
Adds new IMapControl object to the GUI.
| UMap | ||
|
Adds new IManager object to the managers list.
| UMap | ||
|
Adds new IOverlay object to the default layer, invalidates and refreshes it.
| UMap | ||
|
cancelDoubleClick():void
Cancels double-click event generation.
| UMap | ||
|
cancelDragging():void
Cancels map dragging.
| UMap | ||
|
cancelPanning():void
Stops panning animation.
| UMap | ||
|
closeInfoWindow():void
Closes info window that is currently opened.
| UMap | ||
|
convertBounds(bounds:*, zoom:Number = 0):*
Converts LatLngBounds to Bitmap Bounds and visa-versa.
| UMap | ||
|
dispose():void
Frees all the resources accuired by the component & destroys it.
| UMap | ||
|
fromXML(xml:XML):void
Sets the map view, map type & provider from a special UMapSettings KML node.
| UMap | ||
|
getBitmapXYFromComponentXY(point:Point, zoom:Number = 0):Point
Converts a point in component coordinates to a point in bitmap coordinates.
| UMap | ||
|
getBitmapXYFromLatLng(latlng:LatLng, zoom:Number = 0):Point
Converts a point in geographical coordinates to a point in bitmap coordinates.
| UMap | ||
|
Returns a BoundsLatLng object that represents current map view in geographical coordinates.
| UMap | ||
|
Returns a Bounds object that represents current map view in bitmap coordinates.
| UMap | ||
|
getBoundsZoomLevel(bounds:LatLngBounds, offset:Point = null, decimal:Boolean = false):Number
Retruns zoom level, at which map view can fit the specified bounds rectangle.
| UMap | ||
|
Returns a LatLng object that holds geographical coordinates of the center point.
| UMap | ||
|
getCenterXY():Point
Returns a Point object that holds bitmap coordinates of the center point.
| UMap | ||
|
getComponentXYFromBitmapXY(point:Point, zoom:Number = 0):Point
Converts a point in bitmap coordinates to a point in component coordinates.
| UMap | ||
|
getComponentXYFromLatLng(latlng:LatLng, zoom:Number = 0):Point
Converts a point in geographical coordinates to a point in component coordinates.
| UMap | ||
|
Retursn reference to the default layer.
| UMap | ||
|
Returns a reference to the info window that is currently opened.
| UMap | ||
|
getLanguage():String
Returns a two-letter ISO language code that will be used by the map.
| UMap | ||
|
getLatLngFromBitmapXY(point:Point, zoom:Number = 0):LatLng
Converts a point in bitmap coordinates to a point in geographical coordinates.
| UMap | ||
|
getLatLngFromComponentXY(point:Point, zoom:Number = 0):LatLng
Converts a point in component coordinates to a point in geographical coordinates.
| UMap | ||
|
getManager(name:String):IManager
Searches for an IManager object with specfied name that was attached to a managers list.
| UMap | ||
|
getManagers():Array
Returns an Array holding all the IManager objects attached to managers list.
| UMap | ||
|
getMouseBitmapXY(zoom:Number = 0, limitBitmap:Boolean = true):Point
Returns bitmap point of the mouse pointer.
| UMap | ||
|
getMouseLatLng(zoom:Number = 0, limitBitmap:Boolean = true):LatLng
Returns geographical position of the mouse pointer.
| UMap | ||
|
getOverlay(id_or_name:*):IOverlay
Searches for an IOverlay object with specfied name or id, that was attached to a default layer.
| UMap | ||
|
getOverlays():Array
Returns an Array holding all the IOverlay objects attached to default layer.
| UMap | ||
|
getSavedPosition():Object
Returns an object that holds previously saved position.
| UMap | ||
|
lockMapView(lock:Boolean = true):void
Freeze the map view.
| UMap | ||
|
openInfoWindow(param:Object = null, style:Object = null):IInfoWindow
Opens new info window with the specified parameters and style.
| UMap | ||
|
panByXY(distance:Point, immediate:Boolean = false):void
Pans the map view by a certain distance in pixels.
| UMap | ||
|
Pans the map to the specified point.
| UMap | ||
|
removeManager(manager:IManager):void
Removes specified IManager object from the managers list.
| UMap | ||
|
removeOverlay(overlay:IOverlay):void
Removes specified IOverlay object from the default layer.
| UMap | ||
|
returnToSavedPosition():void
Pans the map to the prviously saved center & zoom level.
| UMap | ||
|
savePosition():void
Saves current map center coordinates and zoom level.
| UMap | ||
|
setBounds(bounds:LatLngBounds, offset:Point = null, immediate:Boolean = false, maxZoomLevel:Number = 0):Boolean
Sets the map view position and zoom, so that it fits the specified LatLngBounds rectangle.
| UMap | ||
|
Sets the map view to the given center, optionally also sets the zoom level.
| UMap | ||
|
setComponentStyle(style:Object):void
Sets the component style.
| UMap | ||
|
setMapType(mapTypeName:String):void
Attempts to change the map type by it's name.
| UMap | ||
|
setProvider(providerClassOrInstance:*):Boolean
Sets the provider for the UMap either by Class reference or a IProvider instance.
| UMap | ||
|
setZoom(zoom:Number, immediate:Boolean = false):void
Sets the map zoom level.
| UMap | ||
|
toXML(afcTags:Boolean = false):XML
Returns XML data in KML 2.1 format, which describes all the Overlays attached to the map.
| UMap | ||
|
zoomIn(delta:Number):void
Increases the map zoom level.
| UMap | ||
|
zoomOut(delta:Number):void
Decreases the map zoom level.
| UMap | ||
|
Zoom the map to a given point & zoom level.
| UMap | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when user drags the map. | UMap | |||
| Dispatched when user starts dragging the map. | UMap | |||
| Dispatched when user stops dragging the map. | UMap | |||
| Dispatched when info window has been closed. | UMap | |||
| Dispatched when info window has been opened. | UMap | |||
| Dispatched when the map has been clicked. | UMap | |||
| Dispatched when the map has been double clicked. | UMap | |||
| Dispatched when automatic panning of the map has been finished. | UMap | |||
| Dispatched when the map view is panning. | UMap | |||
| Dispatched when the map view starts panning. | UMap | |||
| Dispatched when the map view stops panning. | UMap | |||
| Dispatched when map property has changed. | UMap | |||
| Dispatched when the map has entered ready state. | UMap | |||
Dispatched when UMap map type changes. | UMap | |||
Dispatched when UMap center position changes. | UMap | |||
Dispatched when UMap zoom level changes. | UMap | |||
| Dispatched when the map zoom is changing. | UMap | |||
| Dispatched when the map zoom starts changing. | UMap | |||
| Dispatched when the map zoom stops changing. | UMap | |||
| componentStyle | property |
componentStyle:Object [read-write]Defines the component style.
Implementation public function get componentStyle():Object
public function set componentStyle(value:Object):void
See also
| control | property |
control:Control [read-only]
Returns a reference to core.Control object instance.
public function get control():Control
| display | property |
display:Display [read-only]
Returns a reference to core.Display object instance.
public function get display():Display
| doubleClickMode | property |
doubleClickMode:String [read-write]Defines an action that should be taken when a user double-clicks the map. Possible values include pan, zoom or none.
The default value is pan.
public function get doubleClickMode():String
public function set doubleClickMode(value:String):void
| embedFonts | property |
embedFonts:Boolean [read-write]Defines whether to use embedded font outlines within the map. Currently this property effects only CopyrightControl. Copyright control text will be always displayed in 10pt _sans font.
The default value is false.
public function get embedFonts():Boolean
public function set embedFonts(value:Boolean):void
| enableDragging | property |
enableDragging:Boolean [read-write]Defines whether map dragging is enabled.
The default value is true.
public function get enableDragging():Boolean
public function set enableDragging(value:Boolean):void
| enableKeyboardHandler | property |
enableKeyboardHandler:Boolean [read-write]Defines whether to use keyboard to control the map.
The default value is true.
public function get enableKeyboardHandler():Boolean
public function set enableKeyboardHandler(value:Boolean):void
| enableMouseHandler | property |
enableMouseHandler:Boolean [read-write]Defines whether to use mouse to control the map.
The default value is true.
public function get enableMouseHandler():Boolean
public function set enableMouseHandler(value:Boolean):void
| enableScrollWheelZoom | property |
enableScrollWheelZoom:Boolean [read-write]
Defines whether to use mouse wheel to control the map.
Mouse wheel will not work if enableMouseHandler is set to false.
The default value is true.
public function get enableScrollWheelZoom():Boolean
public function set enableScrollWheelZoom(value:Boolean):void
| enableStrictMode | property |
enableStrictMode:Boolean [read-write]Defines whether component will raise errors when invalid input was recieved.
The default value is false.
public function get enableStrictMode():Boolean
public function set enableStrictMode(value:Boolean):void
| errorSymbol | property |
errorSymbol:String [read-write]
Defines a class name of the symbol in the library that should be used for error indicating.
For best viewing experince your symbol should be 256x256 pixels.
For error text output, your symbol should contain a TextField named errorMessage.
Leave this parameter blank or type in "default" to use the default symbol.
The default value is "default".
public function get errorSymbol():String
public function set errorSymbol(value:String):void
| intZoom | property |
intZoom:uint [read-only]Returns current zoom level rounded down.
Implementation public function get intZoom():uint
| language | property |
language:String [read-write]
Defines a two-letter ISO code of a language to use with the map.
Please note, that you should setup this proepry right after you create the component.
Please put auto if you want Flash to determine the language automatically.
The default value is "auto".
public function get language():String
public function set language(value:String):void
| mapType | property |
mapType:String [read-write]
Defines current map type name.
Use setMapType() function to change it.
The default value is "map".
public function get mapType():String
public function set mapType(value:String):void
| panEasing | property |
panEasing:* [read-write]Defines panning easing function. You can pass a String value (it should be in the list) or a any easing function reference.
The default value is Regular.easeOut.
public function get panEasing():*
public function set panEasing(value:*):void
| panning | property |
panning:Boolean [read-only]
Returns true if map is auto-panning at the moment.
public function get panning():Boolean
| panSpeed | property |
panSpeed:uint [read-write]Defines panning speed in 0.1 of a second. The higher the number, the lower the speed of panning. For example, if panSpeed = 5, it will take half a second to pan the map to a specific point.
The default value is 3.
public function get panSpeed():uint
public function set panSpeed(value:uint):void
| ready | property |
ready:Boolean [read-only]
Returns true if map settings have been loaded.
public function get ready():Boolean
| targetZoom | property |
targetZoom:Number [read-only]
Returns target zoom level if animateZoom property set to true or current zoom level.
public function get targetZoom():Number
| zoom | property |
zoom:Number [read-only]Returns current zoom level.
Implementation public function get zoom():Number
| zoomAtPointer | property |
zoomAtPointer:Boolean [read-write]Defines whether we should zoom in at pointer position rather than at the center of the map.
The default value is false.
public function get zoomAtPointer():Boolean
public function set zoomAtPointer(value:Boolean):void
| zoomEasing | property |
zoomEasing:* [read-write]Defines zoom easing function. You can pass a String value (it should be in the list) or a any easing function reference.
The default value is Regular.easeOut.
public function get zoomEasing():*
public function set zoomEasing(value:*):void
| zoomSpeed | property |
zoomSpeed:uint [read-write]Defines zoom animation speed in 0.1 of a second. The higher the number, the lower the speed of zooming. For example, if zoomnSpeed = 5, it will take half a second to zoom the map to a specific point.
The default value is 3.
public function get zoomSpeed():uint
public function set zoomSpeed(value:uint):void
| UMap | () | constructor |
public function UMap(param:Object = null)
UMap constructor.
Initializes the UMap component. Loads the defaults for the properties,
and the attempts to load parameters specified in the param object.
param:Object (default = null) |
import com.afcomponents.umap.core.UMap;
import com.afcomponents.umap.types.Size;
var map:UMap = new UMap({size:new Size(300,300), animatePan:true});
addChild(map);
| addControl | () | method |
public function addControl(control:IMapControl):IMapControlAdds new IMapControl object to the GUI.
Parameterscontrol:IMapControl — Target IMapControl object to add.
|
IMapControl —
Reference to added IMapControl object.
|
| addManager | () | method |
public function addManager(manager:IManager):IManagerAdds new IManager object to the managers list.
Parametersmanager:IManager — Target IManager object to add.
|
IManager —
Reference to added IManager object.
|
| addOverlay | () | method |
public function addOverlay(overlay:IOverlay):IOverlayAdds new IOverlay object to the default layer, invalidates and refreshes it.
Parametersoverlay:IOverlay — Target IOverlay object to add.
|
IOverlay —
Reference to added IOverlay object.
|
| cancelDoubleClick | () | method |
public function cancelDoubleClick():voidCancels double-click event generation. Call this function each time mouse button is released to cancel the double-click.
| cancelDragging | () | method |
public function cancelDragging():voidCancels map dragging. Call this function each time mouse button is pressed to cancel the dragging.
| cancelPanning | () | method |
public function cancelPanning():voidStops panning animation.
| closeInfoWindow | () | method |
public function closeInfoWindow():voidCloses info window that is currently opened.
| convertBounds | () | method |
public function convertBounds(bounds:*, zoom:Number = 0):*Converts LatLngBounds to Bitmap Bounds and visa-versa. Additionally you can specify zoom level at which the conversion should be performed, otherwise current zoom level will be used.
Parametersbounds:* — LatLngBounds or Bounds object.
|
|
zoom:Number (default = 0) — Zoom level at which the conversion should be performed.
|
* — Bounds or LatLngBounds object as the result of conversion; null if an error occured.
|
| dispose | () | method |
public function dispose():voidFrees all the resources accuired by the component & destroys it.
| fromXML | () | method |
public function fromXML(xml:XML):voidSets the map view, map type & provider from a special UMapSettings KML node.
Parametersxml:XML — UMapSettings node.
|
<umap:UMapSettings xmlns="http://earth.google.com/kml/2.1" xmlns:umap="http://www.afcomponents.com/as3/umap">
<center>{longitude},{latitude},0.00000000</center>
<zoom>1</zoom>
<type>road</type>
<provider>com.afcomponents.umap.providers.microsoft::MicrosoftProvider</provider>
</umap:UMapSettings>| getBitmapXYFromComponentXY | () | method |
public function getBitmapXYFromComponentXY(point:Point, zoom:Number = 0):PointConverts a point in component coordinates to a point in bitmap coordinates.
Parameterspoint:Point — A point in component coordinates.
|
|
zoom:Number (default = 0) — Zoom level at which the conversion should be performed, current zoom level is used if this parameter has been omitted.
|
Point — A point in bitmap coordinates.
|
| getBitmapXYFromLatLng | () | method |
public function getBitmapXYFromLatLng(latlng:LatLng, zoom:Number = 0):PointConverts a point in geographical coordinates to a point in bitmap coordinates.
Parameterslatlng:LatLng — A point in component coordinates.
|
|
zoom:Number (default = 0) — Zoom level at which the conversion should be performed, current zoom level is used if this parameter has been omitted.
|
Point — A point in geographical coordinates.
|
| getBoundsLatLng | () | method |
public function getBoundsLatLng():LatLngBoundsReturns a BoundsLatLng object that represents current map view in geographical coordinates.
ReturnsLatLngBounds —
An object that represents current map view in geographical coordinates.
|
| getBoundsXY | () | method |
public function getBoundsXY():BoundsReturns a Bounds object that represents current map view in bitmap coordinates.
ReturnsBounds —
An object that represents current map view in bitmap coordinates.
|
| getBoundsZoomLevel | () | method |
public function getBoundsZoomLevel(bounds:LatLngBounds, offset:Point = null, decimal:Boolean = false):Number
Retruns zoom level, at which map view can fit the specified bounds rectangle.
By defualt, the function will return integer zoom, but you can iverride it with the decimal flag.
bounds:LatLngBounds — Target bounds rectangle.
|
|
offset:Point (default = null) — Flag which indicates whether returned zoom level should be decimal (true), or integer (false).
|
|
decimal:Boolean (default = false) |
Number — Zoom level, at which map view can fit the specified bounds rectangle, or -1 if an error occured.
|
| getCenter | () | method |
public function getCenter():LatLngReturns a LatLng object that holds geographical coordinates of the center point.
ReturnsLatLng —
An object that holds geographical coordinates of the center point.
|
| getCenterXY | () | method |
public function getCenterXY():PointReturns a Point object that holds bitmap coordinates of the center point.
ReturnsPoint — An object that holds bitmap coordinates of the center point.
|
| getComponentXYFromBitmapXY | () | method |
public function getComponentXYFromBitmapXY(point:Point, zoom:Number = 0):PointConverts a point in bitmap coordinates to a point in component coordinates.
Parameterspoint:Point — A point in bitmap coordinates.
|
|
zoom:Number (default = 0) — Zoom level at which the conversion should be performed, current zoom level is used if this parameter has been omitted.
|
Point — A point in component coordinates.
|
| getComponentXYFromLatLng | () | method |
public function getComponentXYFromLatLng(latlng:LatLng, zoom:Number = 0):PointConverts a point in geographical coordinates to a point in component coordinates.
Parameterslatlng:LatLng — A point in geographical coordinates.
|
|
zoom:Number (default = 0) — Zoom level at which the conversion should be performed, current zoom level is used if this parameter has been omitted.
|
Point — A point in component coordinates.
|
| getDefaultLayer | () | method |
public function getDefaultLayer():LayerRetursn reference to the default layer. All overlays that are added via UMap.addOverlay() function calls are added to this layer.
ReturnsLayer —
Reference to the default layer.
|
| getInfoWindow | () | method |
public function getInfoWindow():IInfoWindowReturns a reference to the info window that is currently opened.
ReturnsIInfoWindow —
Reference to the opened info window.
|
| getLanguage | () | method |
public function getLanguage():String
Returns a two-letter ISO language code that will be used by the map.
Unlike language property this method always returns a valid language code.
String — Two-letter ISO language code.
|
| getLatLngFromBitmapXY | () | method |
public function getLatLngFromBitmapXY(point:Point, zoom:Number = 0):LatLngConverts a point in bitmap coordinates to a point in geographical coordinates.
Parameterspoint:Point — A point in bitmap coordinates.
|
|
zoom:Number (default = 0) — Zoom level at which the conversion should be performed, current zoom level is used if this parameter has been omitted.
|
LatLng —
A point in geographical coordinates.
|
| getLatLngFromComponentXY | () | method |
public function getLatLngFromComponentXY(point:Point, zoom:Number = 0):LatLngConverts a point in component coordinates to a point in geographical coordinates.
Parameterspoint:Point — A point in component coordinates.
|
|
zoom:Number (default = 0) — Zoom level at which the conversion should be performed, current zoom level is used if this parameter has been omitted.
|
LatLng —
A point in geographical coordinates.
|
| getManager | () | method |
public function getManager(name:String):IManagerSearches for an IManager object with specfied name that was attached to a managers list.
Parametersname:String — Name of an IManager object.
|
IManager —
Reference to the first found IManager object or null if nothing was found.
|
| getManagers | () | method |
public function getManagers():ArrayReturns an Array holding all the IManager objects attached to managers list.
ReturnsArray — An Array holding all the IManager objects.
|
| getMouseBitmapXY | () | method |
public function getMouseBitmapXY(zoom:Number = 0, limitBitmap:Boolean = true):PointReturns bitmap point of the mouse pointer. If mouse pointer is out of the map view, returns null. Additionally you can specify a zoom level at which to perform the calculation.
Parameterszoom:Number (default = 0) — Zoom level at which the calculation should be performed, current zoom level is used if this parameter has been omitted.
|
|
limitBitmap:Boolean (default = true) — Limits the mouse pointer in the map bitmap, specify a value of false to cancel limitation.
|
Point — A point bitmap coordinates, or null if pointer is out of the map view.
|
| getMouseLatLng | () | method |
public function getMouseLatLng(zoom:Number = 0, limitBitmap:Boolean = true):LatLngReturns geographical position of the mouse pointer. If mouse pointer is out of the map view, returns null. Additionally you can specify a zoom level at which to perform the calculation.
Parameterszoom:Number (default = 0) — Zoom level at which the calculation should be performed, current zoom level is used if this parameter has been omitted.
|
|
limitBitmap:Boolean (default = true) — Limits the mouse pointer in the map bitmap, specify a value of false to cancel limitation.
|
LatLng —
A point geographical coordinates, or null if pointer is out of the map view.
|
| getOverlay | () | method |
public function getOverlay(id_or_name:*):IOverlaySearches for an IOverlay object with specfied name or id, that was attached to a default layer.
Parametersid_or_name:* — Either name of an IOverlay object or it's id.
|
IOverlay —
Reference to the first found IOverlay object or null if nothing was found.
|
| getOverlays | () | method |
public function getOverlays():ArrayReturns an Array holding all the IOverlay objects attached to default layer.
ReturnsArray — An Array holding all the IOverlay objects.
|
| getSavedPosition | () | method |
public function getSavedPosition():ObjectReturns an object that holds previously saved position.
ReturnsObject |
| lockMapView | () | method |
public function lockMapView(lock:Boolean = true):voidFreeze the map view. This is achieved by disabling mouse dragging & scroll wheel zoom, keyboard controls, and double click action.
To unlock the view call lockMapview(false).
When unlocking the map view, all handlers will be reenbled and the double click mode
will be returned to DoubleClickMode.PAN.
lock:Boolean (default = true) — Defines whether to lock (true) or unlock the map view (false).
|
| openInfoWindow | () | method |
public function openInfoWindow(param:Object = null, style:Object = null):IInfoWindowOpens new info window with the specified parameters and style.
Parametersparam:Object (default = null) — Object that defines info window parameters.
|
|
style:Object (default = null) — Object that defines info window style.
|
IInfoWindow —
Reference to the opened info window.
|
| panByXY | () | method |
public function panByXY(distance:Point, immediate:Boolean = false):void
Pans the map view by a certain distance in pixels. If the target point is in the current map view and
animatePan property is set to true, panning occurs with the smooth animation.
Otherwise, or if immediate flag is set to true, map view changes instantly.
Map fires MapEvent.PAN_START when panning starts, MapEvent.PAN_STOP when panning ends
and MapEvent.PAN during the panning animation.
distance:Point — panning distance in pixels
|
|
immediate:Boolean (default = false) — flag that indicates whether to change the map view instantly
|
See also
| panTo | () | method |
public function panTo(latlng:LatLng, immediate:Boolean = false):void
Pans the map to the specified point. If the point is in the current map view and
animatePan property is set to true, panning occurs with the smooth animation.
Otherwise, or if immediate flag is set to true, map view changes instantly.
Map fires MapEvent.PAN_START when panning starts, MapEvent.PAN_STOP when panning ends
and MapEvent.PAN during the panning animation.
latlng:LatLng — target panning point
|
|
immediate:Boolean (default = false) — flag that indicates whether to change the map view instantly
|
See also
| removeManager | () | method |
public function removeManager(manager:IManager):voidRemoves specified IManager object from the managers list.
Parametersmanager:IManager — IManager that should be removed.
|
| removeOverlay | () | method |
public function removeOverlay(overlay:IOverlay):voidRemoves specified IOverlay object from the default layer.
Parametersoverlay:IOverlay — IOverlay that should be removed.
|
| returnToSavedPosition | () | method |
public function returnToSavedPosition():voidPans the map to the prviously saved center & zoom level.
| savePosition | () | method |
public function savePosition():void
Saves current map center coordinates and zoom level.
Use returnToSavedPosition() method to pan back to saved map view.
| setBounds | () | method |
public function setBounds(bounds:LatLngBounds, offset:Point = null, immediate:Boolean = false, maxZoomLevel:Number = 0):BooleanSets the map view position and zoom, so that it fits the specified LatLngBounds rectangle.
Parametersbounds:LatLngBounds — Target bounds rectangle.
|
|
offset:Point (default = null) — A flag which defines whether to set bounds immediately (true), or use animation.
To control animation, use animatePan and animateZoom properties.
|
|
immediate:Boolean (default = false) — If specified, defines the maximum zoom level that can be set. Prevents "too close" zooming.
|
|
maxZoomLevel:Number (default = 0) |
Boolean — A value of false an error occured while trying to set new bounds; false if has not.
|
| setCenter | () | method |
public function setCenter(latlng:LatLng, zoom:Number = 0):void
Sets the map view to the given center, optionally also sets the zoom level.
When map center point changes, DisplayEvent.UPDATE_POSITION is fired.
When zoom level changes, DisplayEvent.UPDATE_ZOOM is fired.
latlng:LatLng — new center point
|
|
zoom:Number (default = 0) — new zoom level
|
import com.afcomponents.umap.core.UMap; import com.afcomponents.umap.types.LatLng; var map:UMap = new UMap(); map.setSize(300, 300); map.setCenter(new LatLng(30,-20)); addChild(map);
| setComponentStyle | () | method |
public function setComponentStyle(style:Object):voidSets the component style. After setting new style, invalidates the component.
Parametersstyle:Object — An object which defines new component style.
|
| setMapType | () | method |
public function setMapType(mapTypeName:String):void
Attempts to change the map type by it's name.
It the map is not ready, new map type will be saved and checked after
Control will enter ready state.
When map type changes, DisplayEvent.UPDATE_MAP_TYPE is fired.
mapTypeName:String — New map type name.
|
See also
import com.afcomponents.umap.core.UMap;
var map:UMap = new UMap();
map.setSize(300, 300);
map.setMapType("satellite");
addChild(map);| setProvider | () | method |
public function setProvider(providerClassOrInstance:*):BooleanSets the provider for the UMap either by Class reference or a IProvider instance.
ParametersproviderClassOrInstance:* — Class or IProvider Object instance that defines the new provider for UMap.
|
Boolean — A value of true if the provider change was successfull; false if it was not.
|
import com.afcomponents.umap.providers.Providers; map.setProvider(Providers.MICROSOFT);
| setZoom | () | method |
public function setZoom(zoom:Number, immediate:Boolean = false):void
Sets the map zoom level.
When zoom level changes, DisplayEvent.UPDATE_ZOOM is fired.
If smoothZoom property is set to false,
the zoom level will be rounded up to the nearest integer.
zoom:Number — Target zoom level.
|
|
immediate:Boolean (default = false) — A flag which defines whether to set zoom immediately.
Used only when animatePan is set to true.
|
| toXML | () | method |
public function toXML(afcTags:Boolean = false):XMLReturns XML data in KML 2.1 format, which describes all the Overlays attached to the map.
ParametersafcTags:Boolean (default = false) — Flag that determines whether to generate KML data with extended AFC tags.
|
XML — XML data or null if an error occured.
|
| zoomIn | () | method |
public function zoomIn(delta:Number):void
Increases the map zoom level. If delta is specified increases zoom level by delta,
otherwise increases zoom level by 1.
If smoothZoom property is set to false,
the zoom level will be rounded up to the nearest integer.
When zoom level changes, DisplayEvent.UPDATE_ZOOM is fired.
delta:Number — Zoom in amount.
|
| zoomOut | () | method |
public function zoomOut(delta:Number):void
Decreases the map zoom level. If delta is specified decreases zoom level by delta,
otherwise decreases zoom level by 1.
If smoothZoom property is set to false,
the zoom level will be rounded up to the nearest integer.
When zoom level changes, DisplayEvent.UPDATE_ZOOM is fired.
delta:Number — Zoom out amount.
|
| zoomTo | () | method |
public function zoomTo(latlng:LatLng, zoom:Number, immediate:Boolean = false):voidZoom the map to a given point & zoom level. This function differs from
Parameterslatlng:LatLng — Target zoom level.
|
|
zoom:Number — A flag which defines whether to set zoom immediately.
Used only when animatePan is set to true.
|
|
immediate:Boolean (default = false) |
| drag | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.DRAG
Dispatched when user drags the map.
The MapEvent.DRAG constant defines the value of the type property of an
drag event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | null |
| dragStart | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.DRAG_START
Dispatched when user starts dragging the map.
The MapEvent.DRAG_START constant defines the value of the type property of an
dragStart event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | null |
| dragStop | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.DRAG_STOP
Dispatched when user stops dragging the map.
The MapEvent.DRAG_STOP constant defines the value of the type property of an
dragStop event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | null |
| infoWindowClose | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.INFO_WINDOW_CLOSE
Dispatched when info window has been closed.
The MapEvent.INFO_WINDOW_CLOSE constant defines the value of the type property of an
infoWindowClose event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | Reference to the closed info window. |
| infoWindowOpen | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.INFO_WINDOW_OPEN
Dispatched when info window has been opened.
The MapEvent.INFO_WINDOW_OPEN constant defines the value of the type property of an
infoWindowOpen event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | Reference to the opened info window. |
| mapClick | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.CLICK
Dispatched when the map has been clicked.
The MapEvent.CLICK constant defines the value of the type property of an
mapClick event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the click. |
param | null |
| mapDoubleClick | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.DOUBLE_CLICK
Dispatched when the map has been double clicked.
The MapEvent.DOUBLE_CLICK constant defines the value of the type property of an
mapDoubleClick event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the double click. |
param | null |
| moveEnd | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.MOVE_END
Dispatched when automatic panning of the map has been finished.
The MapEvent.MOVE_END constant defines the value of the type property of an
moveEnd event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | null |
| pan | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.PAN
Dispatched when the map view is panning.
The MapEvent.ZOOM constant defines the value of the type property of a
zoom event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | Object which describes zoom animation: startZoom, targetZoom, currentZoom |
| panStart | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.PAN_START
Dispatched when the map view starts panning.
The MapEvent.PAN_START constant defines the value of the type property of a
panStart event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | null |
| panStop | event |
com.afcomponents.umap.events.MapEvent
com.afcomponents.umap.events.MapEvent.PAN_STOP
Dispatched when the map view stops panning.
The MapEvent.PAN_STOP constant defines the value of the type property of a
panStop event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget |
The object that is actively processing the OverlayEvent object with an event listener. |
target | Reference to the core.UMap instance. |
latlng | Geographical coordinates of the map center point. |
param | null |
| propertyChanged | event |