@Override public IObjectWrapper toScreenLocation(LatLng latLng) throws RemoteException { Point point = new Point(); viewport.toScreenPoint(GmsMapsTypeHelper.fromLatLng(latLng), point); return ObjectWrapper.wrap(GmsMapsTypeHelper.toPoint(point)); }
@Override public VisibleRegion getVisibleRegion() throws RemoteException { viewport.getMapExtents(extents, 0); // TODO: Support non-flat map extents return new VisibleRegion(GmsMapsTypeHelper.toLatLngBounds(viewport.getBBox(null, 0))); }
@Override public LatLng fromScreenLocation(IObjectWrapper obj) throws RemoteException { Point point = GmsMapsTypeHelper.fromPoint((android.graphics.Point) ObjectWrapper.unwrap(obj)); return GmsMapsTypeHelper.toLatLng(viewport.fromScreenPoint((float) point.x, (float) point.y)); }