CartoType Android API 8.8-7-gb35e4dc71
for Java development on Android
Public Member Functions | List of all members
com.cartotype.MapView Class Reference
Inheritance diagram for com.cartotype.MapView:

Public Member Functions

 MapView (Context aContext, Framework aFramework)
 
void onTap (double aX, double aY)
 
void onDoubleTap (double aX, double aY)
 
void onLongPress (double aX, double aY)
 
boolean onTouchEvent (MotionEvent aEvent)
 
boolean onScale (ScaleGestureDetector aDetector)
 
boolean onScaleBegin (ScaleGestureDetector aDetector)
 
void onScaleEnd (ScaleGestureDetector aDetector)
 
boolean onDown (MotionEvent aEvent)
 
void onShowPress (MotionEvent aMotionEvent)
 
boolean onSingleTapUp (MotionEvent aEvent)
 
boolean onScroll (MotionEvent aInitialEvent, MotionEvent aEvent, float aDx, float aDy)
 
void onLongPress (MotionEvent aEvent)
 
boolean onFling (MotionEvent aInitialEvent, MotionEvent aEvent, final float aVelocityX, final float aVelocityY)
 
boolean onSingleTapConfirmed (MotionEvent aEvent)
 
boolean onDoubleTap (MotionEvent aEvent)
 
boolean onDoubleTapEvent (MotionEvent aMotionEvent)
 

Detailed Description

A graphics-accelerated map view. It draws a Framework using the MapRenderer class, which uses OpenGL ES 2.0. It implements panning and pinch zooming. Any programmatic changes to the Framework object are automatically reflected in the display.

Constructor & Destructor Documentation

◆ MapView()

com.cartotype.MapView.MapView ( Context  aContext,
Framework  aFramework 
)

Creates a MapView object, given an Android context and a CartoType Framework to draw.

Member Function Documentation

◆ onDoubleTap() [1/2]

void com.cartotype.MapView.onDoubleTap ( double  aX,
double  aY 
)

Handles a double tap gesture at a specified point in degrees longitude (aX) and latitude (aY). The base implementation does nothing, but you can implement this method in your derived class.

◆ onDoubleTap() [2/2]

boolean com.cartotype.MapView.onDoubleTap ( MotionEvent  aEvent)

Handles a confirmed double tap by converting the position of the tap to degrees and calling onDoubleTap(double aX,double aY).

◆ onDoubleTapEvent()

boolean com.cartotype.MapView.onDoubleTapEvent ( MotionEvent  aMotionEvent)

Handles a double tap event.

◆ onDown()

boolean com.cartotype.MapView.onDown ( MotionEvent  aEvent)

Handles a touch down event.

◆ onFling()

boolean com.cartotype.MapView.onFling ( MotionEvent  aInitialEvent,
MotionEvent  aEvent,
final float  aVelocityX,
final float  aVelocityY 
)

Handles a fling event by implementing a pan which gets slower for one second then stops.

◆ onLongPress() [1/2]

void com.cartotype.MapView.onLongPress ( double  aX,
double  aY 
)

Handles a long press gesture at a specified point in degrees longitude (aX) and latitude (aY). The base implementation does nothing, but you can implement this method in your derived class.

◆ onLongPress() [2/2]

void com.cartotype.MapView.onLongPress ( MotionEvent  aEvent)

Handles a long press event by converting the long press position to degrees and calling onLongPress(double aX,double aY).

◆ onScale()

boolean com.cartotype.MapView.onScale ( ScaleGestureDetector  aDetector)

Handles a scale event by panning, rotating and zooming the map as needed.

◆ onScaleBegin()

boolean com.cartotype.MapView.onScaleBegin ( ScaleGestureDetector  aDetector)

Handles the start of a scale event.

◆ onScaleEnd()

void com.cartotype.MapView.onScaleEnd ( ScaleGestureDetector  aDetector)

Handles the end of a scale event.

◆ onScroll()

boolean com.cartotype.MapView.onScroll ( MotionEvent  aInitialEvent,
MotionEvent  aEvent,
float  aDx,
float  aDy 
)

Handles a scroll event.

◆ onShowPress()

void com.cartotype.MapView.onShowPress ( MotionEvent  aMotionEvent)

Handles a show-press event; does nothing.

◆ onSingleTapConfirmed()

boolean com.cartotype.MapView.onSingleTapConfirmed ( MotionEvent  aEvent)

Handles a confirmed single tap by converting the position of the tap to degrees and calling onTap(double aX,double aY).

◆ onSingleTapUp()

boolean com.cartotype.MapView.onSingleTapUp ( MotionEvent  aEvent)

Handles a single-tap up event.

◆ onTap()

void com.cartotype.MapView.onTap ( double  aX,
double  aY 
)

Handles a tap gesture at a specified point in degrees longitude (aX) and latitude (aY). The base implementation does nothing, but you can implement this method in your derived class.

◆ onTouchEvent()

boolean com.cartotype.MapView.onTouchEvent ( MotionEvent  aEvent)

Handles a touch event.


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