Example #1
0
 @Override
 public boolean onTouchEvent(MotionEvent event) {
   boolean handled = false;
   for (MapControl ctrl : controls) {
     handled = ctrl.onTouchEvent(event, this) || handled;
   }
   return handled;
 }
Example #2
0
  public MapView(Context context, Map map) {
    super(context);

    this.map = map;
    this.map.bind(this);

    tx = new TransformPipeline(map);
    viewport = new Viewport();

    controls = Arrays.asList(new PanControl(), new DoubleTapZoomControl(), new PinchZoomControl());
    for (MapControl ctrl : controls) {
      ctrl.init(this);
    }

    renderWorker = new RenderWorker(this);
  }