Cesium.WebMercatorTilingScheme

Hi. I have been asked to look into producing quantized mesh tiles in Web Mercator format which the documentation suggests is possible. However attempts to do so and find online examples has proven difficult. f.i. I have tried to get tiles from Cesium ion and Maptiler in this format but the returned tiles are WGS84 as seen in the layer.json file
“projection”: “EPSG:4326”
Does anyone know of an example I can use to get a projection of EPSG:3857 quantized mesh tiles.

this is how i request the tiles
const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(
terrainUrl,
{
requestVertexNormals: true,
// Explicitly specify Web Mercator tiling scheme for terrain
tilingScheme: new Cesium.WebMercatorTilingScheme()
}
);

Hi @Alan_Rose,

The tillingScheme property of CesiumTerrainProvider is read-only, and not part of the constructor options. CesiumTerrainProvider automatically sets the value of tilingScheme based on the layer.json file that it receives from the server.

Both Cesium World Terrain and Maptiler’s quantized mesh tileset are provided in EPSG:4326. If you need tiles in EPSG:3857, you will either need to find a different data source, or re-tile the terrain data yourself.

Can I ask why EPSG:3857 is necessary? As discussed in this older thread, you can combine 4326 terrain with 3857 imagery in CesiumJS. Are you wanting to use the terrain tiles in a different viewer?

Correct. I want to display in a different viewer and I was asked if I could make QM tiles in Web Mercator format to match the imagery. I also wanted to verify my QM service was producing tiles in the correct format in a Cesium viewer. I set the projection in the layer.json to EPSG:3857 however the root tile is currently been rejected in Cesium.
net::ERR_CONTENT_DECODING_FAILED 200 (OK). This maybe my error to fix. This is as far as I have got so far so was hoping really there might be a demo out there I could study. We are displaying the terrain in 2.5D

FYI I fixed my error. The root tile was not gzipped. I think I should be Ok from here. Thank you for the reply.

1 Like