Code example for Point

0
    mapView.getController().zoomToSpan(toE6(spanLat), toE6(spanLng));
    mapView.layout(50, 60, 650, 460);
 
    assertThat(mapView.getProjection().toPixels(new GeoPoint(toE6(21), toE6(1)), null)).isEqualTo(new Point(50, 60));
    assertThat(mapView.getProjection().toPixels(new GeoPoint(toE6(11), toE6(16)), null)).isEqualTo(new Point(350, 260));
    assertThat(mapView.getProjection().toPixels(new GeoPoint(toE6(1), toE6(31)), null)).isEqualTo(new Point(650, 460));
  } 
 
  private void dispatchTouchEvent(int action, int x, int y) {
    mapView.dispatchTouchEvent(MotionEvent.obtain(0, 0, action, x, y, 0));
  } 
 
  public static class MyOnTouchListener implements View.OnTouchListener {
    private MotionEvent lastMotionEvent;
 
    @Override public boolean onTouch(View v, MotionEvent event) {
      lastMotionEvent = event;
      return false; 
    } 
  }