baseLayer breaks after adding WMTS-layer

    const viewer = new Cesium.Viewer('cesiumContainer', {
      baseLayer: new Cesium.ImageryLayer.fromProviderAsync(
       Cesium.TileMapServiceImageryProvider.fromUrl(
        Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"),
        ),
      ),
      terrainProvider: new Cesium.EllipsoidTerrainProvider(),
      baseLayerPicker: false,
      geocoder: false,
      navigationHelpButton: false,
      homeButton: false,
      sceneModePicker: false,
      animation: false,
      timeline: false,
      infoBox: false,
      fullscreenButton: false,
      selectionIndicator: false,
    });    

    const ortokuva = new Cesium.WebMapTileServiceImageryProvider({
      url : 'https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts?api-key=AK',
      layer : 'ortokuva',
      style : 'default',
      format : 'image/jpeg',
      tileMatrixSetID : 'WGS84_Pseudo-Mercator',
      maximumLevel: 18,
    });
    viewer.imageryLayers.addImageryProvider(ortokuva);

What is going wrong, my script or a bug?

Hi @kmrv, welcome to the community! I don’t have an API key for that imagery provider, so I can’t reproduce the problem. Are there any error messages in the console?

You could also look at the “Network” tab in Chrome DevTools, find a link to the imagery tiles being loaded, and load them in a separate tab to make sure the image appearance is what you expected.

No error messages in the console.

It seems that there are some white tiles provided from that data source.

API key is available from Maanmittauslaitos if you want to reproduce this but so far it seems to be an issue with bad data.

1 Like