@Test public void testLonLatZoomToTileQuad() { double[] coords = {7, 51}; int levelOfDetail = 5; String quadKey = BingTileUtil.lonLatToQuadKey(coords[0], coords[1], levelOfDetail); Assert.assertEquals("12020", quadKey); String quadKey2 = BingTileUtil.lonLatToQuadKey(coords[0], coords[1], 12); Assert.assertEquals("120203023133", quadKey2); }
public static String lonLatToQuadKey(double lon, double lat, int zoomLevel) { int[] pixelXY = BingTileUtil.lonLatToPixelXY(lon, lat, zoomLevel); int[] tileXY = BingTileUtil.pixelXYToTileXY(pixelXY[0], pixelXY[1]); return BingTileUtil.tileXYToQuadKey(tileXY[0], tileXY[1], zoomLevel); }
BingTileUtil { public static String lonLatToQuadKey(double lon, double lat, int zoomLevel) { int[] pixelXY = BingTileUtil.lonLatToPixelXY(lon, lat, zoomLevel); int[] tileXY = BingTileUtil.pixelXYToTileXY(pixelXY[0], pixelXY[1]); return BingTileUtil.tileXYToQuadKey(tileXY[0], tileXY[1], zoomLevel); } }
BingTileUtil { public static String lonLatToQuadKey(double lon, double lat, int zoomLevel) { int[] pixelXY = BingTileUtil.lonLatToPixelXY(lon, lat, zoomLevel); int[] tileXY = BingTileUtil.pixelXYToTileXY(pixelXY[0], pixelXY[1]); return BingTileUtil.tileXYToQuadKey(tileXY[0], tileXY[1], zoomLevel); } private  BingTileUtil(); }
BingTileUtil { public static String lonLatToQuadKey(double lon, double lat, int zoomLevel) { int[] pixelXY = BingTileUtil.lonLatToPixelXY(lon, lat, zoomLevel); int[] tileXY = BingTileUtil.pixelXYToTileXY(pixelXY[0], pixelXY[1]); return BingTileUtil.tileXYToQuadKey(tileXY[0], tileXY[1], zoomLevel); } private  BingTileUtil(); static int[] lonLatToPixelXY(double longitude, double latitude, int zoomLevel); static double[] pixelXYToLonLat(int pixelX, int pixelY, int zoomLevel); static int mapSize(int zoomLevel); static int[] pixelXYToTileXY(int pixelX, int pixelY); static String tileXYToQuadKey(int tileX, int tileY, int zoomLevel); static String lonLatToQuadKey(double lon, double lat, int zoomLevel); static ReferencedEnvelope getTileBoundingBox(double lon, double lat, int zoomLevel); }
BingTileUtil { public static String lonLatToQuadKey(double lon, double lat, int zoomLevel) { int[] pixelXY = BingTileUtil.lonLatToPixelXY(lon, lat, zoomLevel); int[] tileXY = BingTileUtil.pixelXYToTileXY(pixelXY[0], pixelXY[1]); return BingTileUtil.tileXYToQuadKey(tileXY[0], tileXY[1], zoomLevel); } private  BingTileUtil(); static int[] lonLatToPixelXY(double longitude, double latitude, int zoomLevel); static double[] pixelXYToLonLat(int pixelX, int pixelY, int zoomLevel); static int mapSize(int zoomLevel); static int[] pixelXYToTileXY(int pixelX, int pixelY); static String tileXYToQuadKey(int tileX, int tileY, int zoomLevel); static String lonLatToQuadKey(double lon, double lat, int zoomLevel); static ReferencedEnvelope getTileBoundingBox(double lon, double lat, int zoomLevel);  }