Code example for GestureDetector

0
    private OnMapDragListener onDragListener;
    private final GoogleMapController mapController = new GoogleMapController(getController());
 
    public GoogleMapView(Context context, AttributeSet attrs) {
        super(context, attrs);
        gestureDetector = new GestureDetector(context, new GestureListener());
    } 
 
    public GoogleMapView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        gestureDetector = new GestureDetector(context, new GestureListener());
    } 
 
    public GoogleMapView(Context context, String apiKey) {
        super(context, apiKey);
        gestureDetector = new GestureDetector(context, new GestureListener());
    } 
 
    @Override 
    public void draw(Canvas canvas) {
        try {