AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.MapFactory.MapEventListener Interface Reference
Inheritance diagram for com.google.appinventor.components.runtime.util.MapFactory.MapEventListener:
com.google.appinventor.components.runtime.Map

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)
 

Detailed Description

MapEventListener provides a high-level interface to respond programmatically to events on the underlying MapView implementation independent of the library used.

Author
ewpat.nosp@m.ton@.nosp@m.mit.e.nosp@m.du (Evan W. Patton)

Definition at line 37 of file MapFactory.java.

Member Function Documentation

◆ onBoundsChanged()

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.

◆ onDoubleTap()

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.

Parameters
latitudeLatitude of the double-tap event
longitudeLongitude of the double-tap event

Implemented in com.google.appinventor.components.runtime.Map.

◆ onFeatureClick()

void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onFeatureClick ( MapFeature  feature)

onFeatureClick is raised when the user single-taps on a MapFeature.

Parameters
featureThe map feature clicked by the user.

Implemented in com.google.appinventor.components.runtime.Map.

◆ onFeatureDrag()

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.

Parameters
featureThe map feature the user is dragging.

Implemented in com.google.appinventor.components.runtime.Map.

◆ onFeatureLongPress()

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.

Parameters
featureThe map feature long-pressed by the user.

Implemented in com.google.appinventor.components.runtime.Map.

◆ onFeatureStartDrag()

void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onFeatureStartDrag ( MapFeature  feature)

onFeatureStartDrag is raised when the user starts dragging a MapFeature.

Parameters
featureThe map feature the user has started dragging.

Implemented in com.google.appinventor.components.runtime.Map.

◆ onFeatureStopDrag()

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.

Parameters
featureThe map feature the user has released from dragging.

Implemented in com.google.appinventor.components.runtime.Map.

◆ onLongPress()

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.

Parameters
latitudeLatitude of the long-press event
longitudeLongitude of the long-press event

Implemented in com.google.appinventor.components.runtime.Map.

◆ onReady()

void com.google.appinventor.components.runtime.util.MapFactory.MapEventListener.onReady ( MapController  map)

The Map is ready for user interaction.

Parameters
mapThe MapController for the underlying Map implementation.

Implemented in com.google.appinventor.components.runtime.Map.

◆ onSingleTap()

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.

Parameters
latitudeLatitude of the tap event
longitudeLongitude of the tap event

Implemented in com.google.appinventor.components.runtime.Map.

◆ onZoom()

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.


The documentation for this interface was generated from the following file: