private Point getUpperLeftCornerOfCenterMapTileInScreen( final int[] centerMapTileCoords, final int tileSizePx, final Point reuse) { if (OpenStreetMapViewConstants.DEBUGMODE) Log.d("RMAPS-Me", "YandexTrafficOverlay getUpperLeftCornerOfCenterMapTileInScreen is Called"); final Point out = (reuse != null) ? reuse : new Point(); final int viewWidth = mMapView.getWidth(); final int viewWidth_2 = viewWidth / 2; final int viewHeight = mMapView.getHeight(); final int viewHeight_2 = viewHeight / 2; /* * Calculate the Latitude/Longitude on the left-upper ScreenCoords of the center MapTile. So in the end we can * determine which MapTiles we additionally need next to the centerMapTile. */ final BoundingBoxE6 bb = Util.getBoundingBoxFromMapTile( centerMapTileCoords, mMapView.getZoomLevel(), mRendererInfo.PROJECTION); final float[] relativePositionInCenterMapTile = bb.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation( mMapView.getMapCenterLatitudeE6(), mMapView.getMapCenterLongitudeE6(), null); final int centerMapTileScreenLeft = viewWidth_2 - (int) (0.5f + (relativePositionInCenterMapTile[1] * tileSizePx)); final int centerMapTileScreenTop = viewHeight_2 - (int) (0.5f + (relativePositionInCenterMapTile[0] * tileSizePx)); out.set(centerMapTileScreenLeft, centerMapTileScreenTop); return out; }