For now, we require a projection on loc internally.

This commit is contained in:
Tim Schaub
2012-06-23 19:59:49 +02:00
parent 12fb6c5af4
commit 2fcbce30bc
2 changed files with 4 additions and 2 deletions

View File

@@ -329,7 +329,8 @@ ol.Map.prototype.setZoom = function(zoom, opt_anchor) {
newRes = this.getResolutionForZoom(newZoom);
newCenter = new ol.Loc(
anchorLoc.getX() + (size.width/2 - opt_anchor.x) * newRes,
anchorLoc.getY() - (size.height/2 - opt_anchor.y) * newRes
anchorLoc.getY() - (size.height/2 - opt_anchor.y) * newRes,
undefined, this.getProjection()
);
} else {
newCenter = this.center_;