![]() |
AI2 Component
(Version nb184)
|
Public Member Functions | |
void | onReady (MapController map) |
void | onBoundsChanged () |
void | onZoom () |
void | onSingleTap (double latitude, double longitude) |
void | onDoubleTap (double latitude, double longitude) |
void | onLongPress (double latitude, double longitude) |
void | onFeatureClick (MapFeature feature) |
void | onFeatureLongPress (MapFeature feature) |
void | onFeatureStartDrag (MapFeature feature) |
void | onFeatureDrag (MapFeature feature) |
void | onFeatureStopDrag (MapFeature feature) |
MapEventListener provides a high-level interface to respond programmatically to events on the underlying MapView implementation independent of the library used.
Definition at line 37 of file MapFactory.java.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onBoundsChanged | ( | ) |
The Map's bounds were changed, for example due to a user-initiated zoom or pan event. Users can check Map#BoundingBox() for the updated bounds.
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onDoubleTap | ( | double | latitude, |
double | longitude | ||
) |
onDoubleTap is raised when the user double-taps on the Map but no feature is present at the location to handle the double-tap event.
latitude | Latitude of the double-tap event |
longitude | Longitude of the double-tap event |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onFeatureClick | ( | MapFeature | feature | ) |
onFeatureClick is raised when the user single-taps on a MapFeature.
feature | The map feature clicked by the user. |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onFeatureDrag | ( | MapFeature | feature | ) |
onFeatureDrag is raised as the user drags the map feature. Handlers for this event should run quickly because they block the UI thread and will make the dragging behavior appear sluggish.
feature | The map feature the user is dragging. |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onFeatureLongPress | ( | MapFeature | feature | ) |
onFeatureLongPress is raised when the user long-presses on a MapFeature without moving their location significantly enough to trigger a dragging gesture.
feature | The map feature long-pressed by the user. |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onFeatureStartDrag | ( | MapFeature | feature | ) |
onFeatureStartDrag is raised when the user starts dragging a MapFeature.
feature | The map feature the user has started dragging. |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onFeatureStopDrag | ( | MapFeature | feature | ) |
onFeatureStopDrag is raised when the user completes a dragging motion by releasing their touch from the screen.
feature | The map feature the user has released from dragging. |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onLongPress | ( | double | latitude, |
double | longitude | ||
) |
onLongPress is raised when the user long-presses on the Map without moving their location significantly enough to trigger a panning gesture.
latitude | Latitude of the long-press event |
longitude | Longitude of the long-press event |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onReady | ( | MapController | map | ) |
The Map is ready for user interaction.
map | The MapController for the underlying Map implementation. |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onSingleTap | ( | double | latitude, |
double | longitude | ||
) |
onSingleTap is raised when the user taps on the Map but no feature is present at the location to handle the tap event.
latitude | Latitude of the tap event |
longitude | Longitude of the tap event |
Implemented in com.google.appinventor.components.runtime.Map.
void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onZoom | ( | ) |
The Map's zoom level has changed, for example due to a user-initiated zoom event. Users can check Map#ZoomLevel() for the updated zoom level.
Implemented in com.google.appinventor.components.runtime.Map.