How to convert the tile index x, y, z of GeographicTilingscheme to the tile index xyz of WebMercatorTilingscheme? Cesium should have this function internally, but which specific block is it in

How to convert the tile index x, y, z of GeographicTilingscheme to the tile index xyz of WebMercatorTilingscheme? Cesium should have this function internally, but which specific block is it in

Hi @shengqin_guo,

There will be no direct correspondence between the tiles, since they are shaped differently. But if you simply want to find one Web Mercator tile that has some overlap with a given Geographic tile, you could look at these functions:

  1. GeographicTilingScheme.prototype.tileXYToRectangle will return a Rectangle containing the tile
  2. Rectangle.center can return the centerpoint of the rectangle
  3. WebMercatorTilingScheme.prototype.positionToTileXY will then find the indices of the tile containing that centerpoint