Use goog.vec.Mat4.rotateZ
This commit is contained in:
@@ -356,11 +356,7 @@ ol.renderer.Map.prototype.updateMatrices_ = function() {
|
|||||||
-1 / resolution,
|
-1 / resolution,
|
||||||
1);
|
1);
|
||||||
if (this.canRotate() && goog.isDef(rotation)) {
|
if (this.canRotate() && goog.isDef(rotation)) {
|
||||||
goog.vec.Mat4.rotate(this.coordinateToPixelMatrix_,
|
goog.vec.Mat4.rotateZ(this.coordinateToPixelMatrix_, -rotation);
|
||||||
-rotation,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1);
|
|
||||||
}
|
}
|
||||||
goog.vec.Mat4.translate(this.coordinateToPixelMatrix_,
|
goog.vec.Mat4.translate(this.coordinateToPixelMatrix_,
|
||||||
-center.x,
|
-center.x,
|
||||||
|
|||||||
@@ -510,11 +510,7 @@ ol.renderer.webgl.TileLayer.prototype.render = function() {
|
|||||||
(framebufferExtent.maxY - framebufferExtent.minY),
|
(framebufferExtent.maxY - framebufferExtent.minY),
|
||||||
0);
|
0);
|
||||||
if (goog.isDef(mapRotation)) {
|
if (goog.isDef(mapRotation)) {
|
||||||
goog.vec.Mat4.rotate(this.matrix_,
|
goog.vec.Mat4.rotateZ(this.matrix_, mapRotation);
|
||||||
mapRotation,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1);
|
|
||||||
}
|
}
|
||||||
goog.vec.Mat4.scale(this.matrix_,
|
goog.vec.Mat4.scale(this.matrix_,
|
||||||
(mapExtent.maxX - mapExtent.minX) /
|
(mapExtent.maxX - mapExtent.minX) /
|
||||||
|
|||||||
Reference in New Issue
Block a user