Package | com.distriqt.extension.nativemaps.events |
Class | public class NativeMapEvent |
Inheritance | NativeMapEvent ![]() |
Property | Defined By | ||
---|---|---|---|
data : String
This field contains any extra data attached to the map event. | NativeMapEvent | ||
markerId : int
The ID of a map marker relating to the event, if any. | NativeMapEvent | ||
position : LatLng
A LatLng object relating to the position of an event, if available. | NativeMapEvent |
Method | Defined By | ||
---|---|---|---|
NativeMapEvent(type:String, data:String, position:LatLng = null, markerId:int = -1, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
| NativeMapEvent | ||
clone():Event [override] | NativeMapEvent |
Constant | Defined By | ||
---|---|---|---|
MAP_CREATED : String = nativemaps:map:created [static]
Dispatched when the map is created. | NativeMapEvent | ||
MAP_LOAD_COMPLETE : String = nativemaps:map:load:complete [static]
Dispatched when the map begins loading
Note that loading/render events will be dispatched often when the map is being moved/panned/zoomed.
This event is not always reliable, in that it may not be dispatched when map tiles
were cached previously, and is only supported on iOS. | NativeMapEvent | ||
MAP_LOAD_FAILED : String = nativemaps:map:load:failed [static]
Dispatched when the map fails to load properly. | NativeMapEvent | ||
MAP_LOAD_START : String = nativemaps:map:load:start [static]
Dispatched when the map begins loading
Note that loading/render events will be dispatched often when the map is being moved/panned/zoomed.
Use MAP_RENDER_START instead for reliability, MAP_LOAD_START is not available on Android
Available on iOS only, not supported on Android
| NativeMapEvent | ||
MAP_MOVE_COMPLETE : String = nativemaps:map:move:complete [static]
Dispatched when the map has completed moving or panning. | NativeMapEvent | ||
MAP_RENDER_COMPLETE : String = nativemaps:map:render:complete [static]
Dispatched when the map finishes rendering. | NativeMapEvent | ||
MAP_RENDER_START : String = nativemaps:map:render:start [static]
Dispatched when the map begins rendering. | NativeMapEvent | ||
MAP_ZOOM_CHANGED : String = nativemaps:map:zoom:changed [static]
Dispatched when the zoom level is changed. | NativeMapEvent | ||
MARKER_DRAG_END : String = nativemaps:marker:drag:end [static]
Dispatched when a user stops dragging a map marker. | NativeMapEvent | ||
MARKER_DRAG_START : String = nativemaps:marker:drag:start [static]
Dispatched when a user begins dragging a map marker. | NativeMapEvent | ||
MARKER_INFO_WINDOW_TOUCHED : String = nativemaps:marker:infowindow:touched [static]
Dispatched when the info window for a marker is tapped by the user. | NativeMapEvent | ||
MARKER_TOUCHED : String = nativemaps:marker:touched [static]
Dispatched when a map marker is tapped by the user. | NativeMapEvent | ||
USER_LOCATION_ERROR : String = nativemaps:userlocation:error [static]
Dispatched when there was an error obtaining the user location on iOS. | NativeMapEvent | ||
USER_LOCATION_UPDATE : String = nativemaps:userlocation:update [static]
Dispatched when the user's location updates when the user location is enabled on iOS. | NativeMapEvent |
data | property |
data:String
This field contains any extra data attached to the map event. Not commonly used at present.
In all cases currently this will be an empty string (""), except in the case of the MAP_CREATED event, where this value will be "success" or "failure".
public function get data():String
public function set data(value:String):void
markerId | property |
markerId:int
The ID of a map marker relating to the event, if any.
For events relating to map markers, the integer ID of the marker will be supplied in this event.
Provided for the following event types: MARKER_TOUCHED, MARKER_DRAG_START, MARKER_DRAG_END, MARKER_INFO_WINDOW_TOUCHED
Will be -1 for any other event types. public function get markerId():int
public function set markerId(value:int):void
position | property |
position:LatLng
A LatLng object relating to the position of an event, if available.
This will be supplied for any event types that refer to a specific map position.
Provided for the following event types: MAP_MOVE_COMPLETE, MARKER_DRAG_END, MAP_TOUCHED, MAP_TOUCHED_LONG
public function get position():LatLng
public function set position(value:LatLng):void
See also
NativeMapEvent | () | Constructor |
public function NativeMapEvent(type:String, data:String, position:LatLng = null, markerId:int = -1, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
Parameterstype:String | |
data:String | |
position:LatLng (default = null )
| |
markerId:int (default = -1 )
| |
bubbles:Boolean (default = false )
| |
cancelable:Boolean (default = false )
|
clone | () | method |
override public function clone():Event
ReturnsEvent |
MAP_CREATED | Constant |
public static const MAP_CREATED:String = nativemaps:map:created
Dispatched when the map is created.
MAP_LOAD_COMPLETE | Constant |
public static const MAP_LOAD_COMPLETE:String = nativemaps:map:load:complete
Dispatched when the map begins loading
Note that loading/render events will be dispatched often when the map is being moved/panned/zoomed.
This event is not always reliable, in that it may not be dispatched when map tiles were cached previously, and is only supported on iOS. It's usually better to listen for the MAP_RENDER_COMPLETE event.
Available on iOS only, not supported on Android
MAP_LOAD_FAILED | Constant |
public static const MAP_LOAD_FAILED:String = nativemaps:map:load:failed
Dispatched when the map fails to load properly.
Note that loading/render events will be dispatched often when the map is being moved/panned/zoomed.
Available on iOS only, not supported on Android
MAP_LOAD_START | Constant |
public static const MAP_LOAD_START:String = nativemaps:map:load:start
Dispatched when the map begins loading
Note that loading/render events will be dispatched often when the map is being moved/panned/zoomed.
Use MAP_RENDER_START instead for reliability, MAP_LOAD_START is not available on Android
Available on iOS only, not supported on Android
MAP_MOVE_COMPLETE | Constant |
public static const MAP_MOVE_COMPLETE:String = nativemaps:map:move:complete
Dispatched when the map has completed moving or panning.
The #position parameter will contain the new centre LatLng location of the map.
MAP_RENDER_COMPLETE | Constant |
public static const MAP_RENDER_COMPLETE:String = nativemaps:map:render:complete
Dispatched when the map finishes rendering.
Note that loading/render events will be dispatched often when the map is being moved/panned/zoomed.
This should generally be used instead of the MAP_LOAD_COMPLETE as it will be more reliable.
Note: On iOS this is only supported in iOS7 and above. MAP_LOAD_COMPLETE will fire for iOS6 or lower.
Available on iOS 7+ and Android
MAP_RENDER_START | Constant |
public static const MAP_RENDER_START:String = nativemaps:map:render:start
Dispatched when the map begins rendering.
Note that loading/render events will be dispatched often when the map is being moved/panned/zoomed.
This should generally be used instead of the MAP_LOAD_START as it will be more reliable.
Note: On iOS this is only supported in iOS7 and above. MAP_LOAD_COMPLETE will fire for iOS6 or lower.
Available on iOS 7+ and Android
MAP_ZOOM_CHANGED | Constant |
public static const MAP_ZOOM_CHANGED:String = nativemaps:map:zoom:changed
Dispatched when the zoom level is changed.
The zoom level value is not supplied with this event. Query NativeMaps.service.getZoom() to obtain the current zoom level.
MARKER_DRAG_END | Constant |
public static const MARKER_DRAG_END:String = nativemaps:marker:drag:end
Dispatched when a user stops dragging a map marker.
The #markerID parameter will be the ID of the marker being dragged. The #position parameter will contain the LatLng position the marker was dropped at.
MARKER_DRAG_START | Constant |
public static const MARKER_DRAG_START:String = nativemaps:marker:drag:start
Dispatched when a user begins dragging a map marker.
The #markerID parameter will be the ID of the marker being dragged.
MARKER_INFO_WINDOW_TOUCHED | Constant |
public static const MARKER_INFO_WINDOW_TOUCHED:String = nativemaps:marker:infowindow:touched
Dispatched when the info window for a marker is tapped by the user.
The #markerId parameter will contain the ID of the marker associated with the info window tapped.
Note: In order to receive this event on iOS, ensure the 'showInfoWindowButton' property of the MapMarker is set to true.
MARKER_TOUCHED | Constant |
public static const MARKER_TOUCHED:String = nativemaps:marker:touched
Dispatched when a map marker is tapped by the user.
The #markerID parameter will be the ID of the marker that was tapped.
USER_LOCATION_ERROR | Constant |
public static const USER_LOCATION_ERROR:String = nativemaps:userlocation:error
Dispatched when there was an error obtaining the user location on iOS.
The #data parameter will contain a text description of the error.
Available on iOS only, not supported on Android
USER_LOCATION_UPDATE | Constant |
public static const USER_LOCATION_UPDATE:String = nativemaps:userlocation:update
Dispatched when the user's location updates when the user location is enabled on iOS.
The #location parameter will contain a LatLng object representing the user's location.
Available on iOS only, not supported on Android