@Override public void onMapEvent(final Event e, MapPosition mapPosition) { if (activeTask != null) { activeTask.cancel(true); } activeTask = new DrawPathTask(app); activeTask.execute(route.getGeometry()); }
private void teardownLinedrawing() { mapController.getMap().events.unbind(mapListener); if (activeTask != null) { activeTask.cancel(true); } mapController.clearLines(); mapFragment.updateMap(); }