diff --git a/src/common/layers/LayersDirective.js b/src/common/layers/LayersDirective.js index 4c37e6a4..a211d642 100644 --- a/src/common/layers/LayersDirective.js +++ b/src/common/layers/LayersDirective.js @@ -45,7 +45,7 @@ scope.reorderLayer = function(startIndex, endIndex) { var length = mapService.map.getLayers().getArray().length - 1; - var layer = mapService.map.removeLayer(mapService.map.getLayers().getAt(length - startIndex)); + var layer = mapService.map.removeLayer(mapService.map.getLayers().item(length - startIndex)); mapService.map.getLayers().insertAt(length - endIndex, layer); }; diff --git a/src/common/map/MapService.js b/src/common/map/MapService.js index 78ac2574..09fef3e1 100644 --- a/src/common/map/MapService.js +++ b/src/common/map/MapService.js @@ -706,9 +706,9 @@ if (coordinate == null) { return ''; } - var z = coordinate.z; - var x = coordinate.x; - var y = (1 << z) - coordinate.y - 1; + var z = coordinate[0]; + var x = coordinate[1]; + var y = (1 << z) - coordinate[2] - 1; return '/proxy/?url=' + url + minimalConfig.name + '/' + z + '/' + x + '/' + y + '.png'; } })