Separate ol.projection module from ol.Projection class

This commit is contained in:
Tom Payne
2013-03-03 13:09:13 +01:00
parent 3e420313a2
commit fcc620af7d
28 changed files with 165 additions and 149 deletions

View File

@@ -15,6 +15,7 @@ goog.require('ol.RotationConstraint');
goog.require('ol.Size');
goog.require('ol.View');
goog.require('ol.animation');
goog.require('ol.projection');
/**
@@ -46,7 +47,7 @@ ol.View2D = function(opt_view2DOptions) {
var values = {};
values[ol.View2DProperty.CENTER] = goog.isDef(view2DOptions.center) ?
view2DOptions.center : null;
values[ol.View2DProperty.PROJECTION] = ol.Projection.createProjection(
values[ol.View2DProperty.PROJECTION] = ol.projection.createProjection(
view2DOptions.projection, 'EPSG:3857');
if (goog.isDef(view2DOptions.resolution)) {
values[ol.View2DProperty.RESOLUTION] = view2DOptions.resolution;
@@ -353,7 +354,7 @@ ol.View2D.createConstraints_ = function(view2DOptions) {
numZoomLevels = view2DOptions.numZoomLevels;
zoomFactor = view2DOptions.zoomFactor;
} else {
var projectionExtent = ol.Projection.createProjection(
var projectionExtent = ol.projection.createProjection(
view2DOptions.projection, 'EPSG:3857').getExtent();
maxResolution = Math.max(
projectionExtent.maxX - projectionExtent.minX,