Cant get WebMapTileServiceImageryProvider to work with WebMercatorTilingScheme

var test = new Cesium.WebMapTileServiceImageryProvider({
url: “{Style}&tilematrixset={TileMatrixSet}&tilematrix={TileMatrix}&tilerow={TileRow}&tilecol={TileCol}&login=&password=&format=image/jpeg”,
layer: “orto_foraar”,
style: “default”,
tileMatrixSetID: “View1”,
tileMatrixLabels: [“L00”, “L01”, “L02”, “L03”, “L04”, “L05”, “L06”, “L07”, “L08”, “L09”, “L10”, “L11”, “L12”, “L13”],
format: “image/jpg”,
rectangle: Cesium.Rectangle.fromDegrees(3.32016, 53.113655, 17.55777, 58.35397),
tilingScheme: new Cesium.WebMercatorTilingScheme({
rectangleSouthwestInMeters: new Cesium.Cartesian2(120000, 5900000),
rectangleNortheastInMeters: new Cesium.Cartesian2(1000000, 6500000),
numberOfLevelZeroTilesX: 3,


i removed the credentials for the url, but cesium fails before it start loading tiles.


Uncaught TypeError: Cannot read property ‘x’ of undefined

the 1.12 minified file.

Is the configuration correct above or am i missing something. If its correct I can try debug some more.

I got this when using the unminifized version,

Uncaught DeveloperError: The imagery provider’s rectangle and minimumLevel indicate that there are 6 tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.

I got those from the document, but I guess I can recalculate some bounds to make it fit the tiling schema and make it work. will give it a try

doh, nvm, i am mixing up the documents and reading from the wrong projection file.

Coordinates are wrong.

So, back with a reprojected layer in the right projection.

I am unsure how I get past the requirement when the first layer in my wtms is actually of 7 by 14 tiles as seen in the gapabilities document:



-1878007.03 9436480.79





I found another of our wmts that has been configured more appropriated and got it working :

The configuration trick was to make sure that the WMTS has layers all the way to its lvl 0 of the tiling schema.
and use rectangle to limit where it should request tiles.

var test = new Cesium.WebMapTileServiceImageryProvider({

url:“{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.jpeg”,// url: “{Style}&tilematrixset={TileMatrixSet}&tilematrix={TileMatrix}&tilerow={TileRow}&tilecol={TileCol}&login=pks-ascend-xyz&password=3erQRJAd&format=image/jpeg”,

layer: “VDOrtho2014AprilWebMercator”,

style: “default”,


tileMatrixLabels: [“00”, “01”, “02”, “03”, “04”, “05”, “06”, “07”, “08”, “09”, “10”, “11”, “12”, “13”, “14”, “15”, “16”, “17”, “18”, “19”],

format: “image/jpg”,

rectangle: Cesium.Rectangle.fromDegrees(11.25, 55.5791209568, 12.0327758789, 56.0310189643), //Cesium.Rectangle.fromDegrees(3.32016, 53.113655, 17.55777, 58.35397),