// Path: src/org/osmdroid/overlays/MapEventsReceiver.java
// public interface MapEventsReceiver {
// 
// 	/**
// 	 * @param p
// 	 *            the position where the event occurred.
// 	 * @return true if the event has been "consumed" and should not be handled
// 	 *         by other objects.
// 	 */
// 	boolean singleTapUpHelper(GeoPoint p);
// 
// 	/**
// 	 * @param p
// 	 *            the position where the event occurred.
// 	 * @return true if the event has been "consumed" and should not be handled
// 	 *         by other objects.
// 	 */
// 	boolean longPressHelper(GeoPoint p);
// 
// 	/**
// 	 * @param p1 p2
// 	 *            the position where the event occurred for 2 finger.
// 	 * @return true if the event has been "consumed" and should not be handled
// 	 *         by other objects.
// 	 */
// 	boolean longPressHelper(GeoPoint p1, GeoPoint p2);
// }


import java.util.Timer;
import java.util.TimerTask;
import org.oscim.core.GeoPoint;
import org.oscim.event.Event;
import org.oscim.event.Gesture;
import org.oscim.event.GestureListener;
import org.oscim.event.MotionEvent;
import org.oscim.layers.Layer;
import org.oscim.map.Map;
import org.osmdroid.overlays.MapEventsReceiver;
/*
 * Copyright 2013 Ahmad Saleem
 * Copyright 2013 Hannes Janetzek
 *
 * This program is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */

package org.oscim.overlay;



public class DistanceTouchOverlay extends Layer implements Map.InputListener,
        GestureListener {

	private static final int LONGPRESS_THRESHOLD = 800;

	private Timer mLongpressTimer;

	private float mPrevX1, mPrevX2, mPrevY1, mPrevY2;
	private float mCurX1, mCurX2, mCurY1, mCurY2;

	// private final static int POINTER_UP = -1;
	// private int mPointer1 = POINTER_UP;
	// private int mPointer2 = POINTER_UP;

// Path: src/org/osmdroid/overlays/MapEventsReceiver.java
// public interface MapEventsReceiver {
// 
// 	/**
// 	 * @param p
// 	 *            the position where the event occurred.
// 	 * @return true if the event has been "consumed" and should not be handled
// 	 *         by other objects.
// 	 */
// 	boolean singleTapUpHelper(GeoPoint p);
// 
// 	/**
// 	 * @param p
// 	 *            the position where the event occurred.
// 	 * @return true if the event has been "consumed" and should not be handled
// 	 *         by other objects.
// 	 */
// 	boolean longPressHelper(GeoPoint p);
// 
// 	/**
// 	 * @param p1 p2
// 	 *            the position where the event occurred for 2 finger.
// 	 * @return true if the event has been "consumed" and should not be handled
// 	 *         by other objects.
// 	 */
// 	boolean longPressHelper(GeoPoint p1, GeoPoint p2);
// }


// Path: src/org/oscim/overlay/DistanceTouchOverlay.java
import java.util.Timer;
import java.util.TimerTask;
import org.oscim.core.GeoPoint;
import org.oscim.event.Event;
import org.oscim.event.Gesture;
import org.oscim.event.GestureListener;
import org.oscim.event.MotionEvent;
import org.oscim.layers.Layer;
import org.oscim.map.Map;
import org.osmdroid.overlays.MapEventsReceiver;

/*
 * Copyright 2013 Ahmad Saleem
 * Copyright 2013 Hannes Janetzek
 *
 * This program is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */

package org.oscim.overlay;



public class DistanceTouchOverlay extends Layer implements Map.InputListener,
        GestureListener {

	private static final int LONGPRESS_THRESHOLD = 800;

	private Timer mLongpressTimer;

	private float mPrevX1, mPrevX2, mPrevY1, mPrevY2;
	private float mCurX1, mCurX2, mCurY1, mCurY2;

	// private final static int POINTER_UP = -1;
	// private int mPointer1 = POINTER_UP;
	// private int mPointer2 = POINTER_UP;

	private final MapEventsReceiver mReceiver;