Cleanup and example updates

This commit is contained in:
Andreas Hocevar
2015-06-18 09:49:03 +02:00
parent 31cfa0d952
commit e6f5c2a008
3 changed files with 7 additions and 4 deletions

View File

@@ -115,7 +115,6 @@ ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet =
metersPerUnit;
var tileWidth = elt[tileWidthPropName];
var tileHeight = elt[tileHeightPropName];
var matrixHeight = elt['MatrixHeight'];
if (switchOriginXY) {
origins.push([elt[topLeftCornerPropName][1],
elt[topLeftCornerPropName][0]]);
@@ -126,7 +125,7 @@ ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet =
tileSizes.push(tileWidth == tileHeight ?
tileWidth : [tileWidth, tileHeight]);
// top-left origin, so height is negative
sizes.push([elt['MatrixWidth'], -matrixHeight]);
sizes.push([elt['MatrixWidth'], -elt['MatrixHeight']]);
});
return new ol.tilegrid.WMTS({