Rename _ol_proj_Projection_ to Projection
This commit is contained in:
@@ -6,7 +6,7 @@ import OSM from '../src/ol/source/OSM.js';
|
||||
import VectorTileSource from '../src/ol/source/VectorTile.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorTileLayer from '../src/ol/layer/VectorTile.js';
|
||||
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
|
||||
import Projection from '../src/ol/proj/Projection.js';
|
||||
|
||||
|
||||
var replacer = function(key, value) {
|
||||
@@ -48,7 +48,7 @@ var replacer = function(key, value) {
|
||||
}
|
||||
};
|
||||
|
||||
var tilePixels = new _ol_proj_Projection_({
|
||||
var tilePixels = new Projection({
|
||||
code: 'TILE_PIXELS',
|
||||
units: 'tile-pixels'
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
|
||||
import Projection from '../src/ol/proj/Projection.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import {register} from '../src/ol/proj/proj4.js';
|
||||
import proj4 from 'proj4';
|
||||
@@ -15,7 +15,7 @@ register(proj4);
|
||||
|
||||
// Configure the Sphere Mollweide projection object with an extent,
|
||||
// and a world extent. These are required for the Graticule.
|
||||
var sphereMollweideProjection = new _ol_proj_Projection_({
|
||||
var sphereMollweideProjection = new Projection({
|
||||
code: 'ESRI:53009',
|
||||
extent: [-9009954.605703328, -9009954.605703328,
|
||||
9009954.605703328, 9009954.605703328],
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import * as _ol_extent_ from '../src/ol/extent.js';
|
||||
import ImageLayer from '../src/ol/layer/Image.js';
|
||||
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
|
||||
import Projection from '../src/ol/proj/Projection.js';
|
||||
import Static from '../src/ol/source/ImageStatic.js';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import Static from '../src/ol/source/ImageStatic.js';
|
||||
// coordinates directly to map coordinates, so we create a projection that uses
|
||||
// the image extent in pixels.
|
||||
var extent = [0, 0, 1024, 968];
|
||||
var projection = new _ol_proj_Projection_({
|
||||
var projection = new Projection({
|
||||
code: 'xkcd-image',
|
||||
units: 'pixels',
|
||||
extent: extent
|
||||
|
||||
@@ -4,7 +4,7 @@ import {defaults as defaultControls} from '../src/ol/control.js';
|
||||
import ScaleLine from '../src/ol/control/ScaleLine.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import {addProjection, addCoordinateTransforms, transform} from '../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
|
||||
import Projection from '../src/ol/proj/Projection.js';
|
||||
import TileWMS from '../src/ol/source/TileWMS.js';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import TileWMS from '../src/ol/source/TileWMS.js';
|
||||
// ol.proj.addProjection to make it available to the library for lookup by its
|
||||
// code.
|
||||
|
||||
var projection = new _ol_proj_Projection_({
|
||||
var projection = new Projection({
|
||||
code: 'EPSG:21781',
|
||||
// The extent is used to determine zoom level 0. Recommended values for a
|
||||
// projection's validity extent can be found at https://epsg.io/.
|
||||
|
||||
@@ -4,7 +4,7 @@ import {defaults as defaultControls} from '../src/ol/control.js';
|
||||
import ScaleLine from '../src/ol/control/ScaleLine.js';
|
||||
import ImageLayer from '../src/ol/layer/Image.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
|
||||
import Projection from '../src/ol/proj/Projection.js';
|
||||
import ImageWMS from '../src/ol/source/ImageWMS.js';
|
||||
import {register} from '../src/ol/proj/proj4.js';
|
||||
import proj4 from 'proj4';
|
||||
@@ -29,7 +29,7 @@ proj4.defs('EPSG:21781',
|
||||
'+towgs84=660.077,13.551,369.344,2.484,1.783,2.939,5.66 +units=m +no_defs');
|
||||
register(proj4);
|
||||
|
||||
var projection = new _ol_proj_Projection_({
|
||||
var projection = new Projection({
|
||||
code: 'EPSG:21781',
|
||||
extent: [485869.5728, 76443.1884, 837076.5648, 299941.7864]
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import ImageLayer from '../src/ol/layer/Image.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
|
||||
import Projection from '../src/ol/proj/Projection.js';
|
||||
import ImageWMS from '../src/ol/source/ImageWMS.js';
|
||||
import TileWMS from '../src/ol/source/TileWMS.js';
|
||||
|
||||
@@ -37,7 +37,7 @@ var layers = [
|
||||
// projection object. Requesting tiles only needs the code together with a
|
||||
// tile grid of Cartesian coordinates; it does not matter how those
|
||||
// coordinates relate to latitude or longitude.
|
||||
var projection = new _ol_proj_Projection_({
|
||||
var projection = new Projection({
|
||||
code: 'EPSG:21781',
|
||||
units: 'm'
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ import MultiPolygon from '../geom/MultiPolygon.js';
|
||||
import Point from '../geom/Point.js';
|
||||
import Polygon from '../geom/Polygon.js';
|
||||
import _ol_geom_flat_orient_ from '../geom/flat/orient.js';
|
||||
import _ol_proj_Projection_ from '../proj/Projection.js';
|
||||
import Projection from '../proj/Projection.js';
|
||||
import Units from '../proj/Units.js';
|
||||
import _ol_render_Feature_ from '../render/Feature.js';
|
||||
|
||||
@@ -39,7 +39,7 @@ var MVT = function(opt_options) {
|
||||
/**
|
||||
* @type {ol.proj.Projection}
|
||||
*/
|
||||
this.defaultDataProjection = new _ol_proj_Projection_({
|
||||
this.defaultDataProjection = new Projection({
|
||||
code: '',
|
||||
units: Units.TILE_PIXELS
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import {cosh} from '../math.js';
|
||||
import _ol_proj_Projection_ from '../proj/Projection.js';
|
||||
import Projection from '../proj/Projection.js';
|
||||
import Units from '../proj/Units.js';
|
||||
var _ol_proj_EPSG3857_ = {};
|
||||
|
||||
@@ -18,7 +18,7 @@ var _ol_proj_EPSG3857_ = {};
|
||||
* @private
|
||||
*/
|
||||
_ol_proj_EPSG3857_.Projection_ = function(code) {
|
||||
_ol_proj_Projection_.call(this, {
|
||||
Projection.call(this, {
|
||||
code: code,
|
||||
units: Units.METERS,
|
||||
extent: _ol_proj_EPSG3857_.EXTENT,
|
||||
@@ -29,7 +29,7 @@ _ol_proj_EPSG3857_.Projection_ = function(code) {
|
||||
}
|
||||
});
|
||||
};
|
||||
inherits(_ol_proj_EPSG3857_.Projection_, _ol_proj_Projection_);
|
||||
inherits(_ol_proj_EPSG3857_.Projection_, Projection);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/proj/EPSG4326
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_proj_Projection_ from '../proj/Projection.js';
|
||||
import Projection from '../proj/Projection.js';
|
||||
import Units from '../proj/Units.js';
|
||||
var _ol_proj_EPSG4326_ = {};
|
||||
|
||||
@@ -22,7 +22,7 @@ var _ol_proj_EPSG4326_ = {};
|
||||
* @private
|
||||
*/
|
||||
_ol_proj_EPSG4326_.Projection_ = function(code, opt_axisOrientation) {
|
||||
_ol_proj_Projection_.call(this, {
|
||||
Projection.call(this, {
|
||||
code: code,
|
||||
units: Units.DEGREES,
|
||||
extent: _ol_proj_EPSG4326_.EXTENT,
|
||||
@@ -32,7 +32,7 @@ _ol_proj_EPSG4326_.Projection_ = function(code, opt_axisOrientation) {
|
||||
worldExtent: _ol_proj_EPSG4326_.EXTENT
|
||||
});
|
||||
};
|
||||
inherits(_ol_proj_EPSG4326_.Projection_, _ol_proj_Projection_);
|
||||
inherits(_ol_proj_EPSG4326_.Projection_, Projection);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ import Units from '../proj/Units.js';
|
||||
* @struct
|
||||
* @api
|
||||
*/
|
||||
var _ol_proj_Projection_ = function(options) {
|
||||
var Projection = function(options) {
|
||||
/**
|
||||
* @private
|
||||
* @type {string}
|
||||
@@ -110,7 +110,7 @@ var _ol_proj_Projection_ = function(options) {
|
||||
/**
|
||||
* @return {boolean} The projection is suitable for wrapping the x-axis
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.canWrapX = function() {
|
||||
Projection.prototype.canWrapX = function() {
|
||||
return this.canWrapX_;
|
||||
};
|
||||
|
||||
@@ -120,7 +120,7 @@ _ol_proj_Projection_.prototype.canWrapX = function() {
|
||||
* @return {string} Code.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getCode = function() {
|
||||
Projection.prototype.getCode = function() {
|
||||
return this.code_;
|
||||
};
|
||||
|
||||
@@ -130,7 +130,7 @@ _ol_proj_Projection_.prototype.getCode = function() {
|
||||
* @return {ol.Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getExtent = function() {
|
||||
Projection.prototype.getExtent = function() {
|
||||
return this.extent_;
|
||||
};
|
||||
|
||||
@@ -140,7 +140,7 @@ _ol_proj_Projection_.prototype.getExtent = function() {
|
||||
* @return {ol.proj.Units} Units.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getUnits = function() {
|
||||
Projection.prototype.getUnits = function() {
|
||||
return this.units_;
|
||||
};
|
||||
|
||||
@@ -152,7 +152,7 @@ _ol_proj_Projection_.prototype.getUnits = function() {
|
||||
* @return {number|undefined} Meters.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getMetersPerUnit = function() {
|
||||
Projection.prototype.getMetersPerUnit = function() {
|
||||
return this.metersPerUnit_ || Units.METERS_PER_UNIT[this.units_];
|
||||
};
|
||||
|
||||
@@ -162,7 +162,7 @@ _ol_proj_Projection_.prototype.getMetersPerUnit = function() {
|
||||
* @return {ol.Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getWorldExtent = function() {
|
||||
Projection.prototype.getWorldExtent = function() {
|
||||
return this.worldExtent_;
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ _ol_proj_Projection_.prototype.getWorldExtent = function() {
|
||||
* @return {string} Axis orientation.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getAxisOrientation = function() {
|
||||
Projection.prototype.getAxisOrientation = function() {
|
||||
return this.axisOrientation_;
|
||||
};
|
||||
|
||||
@@ -188,7 +188,7 @@ _ol_proj_Projection_.prototype.getAxisOrientation = function() {
|
||||
* @return {boolean} Whether the projection is global.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.isGlobal = function() {
|
||||
Projection.prototype.isGlobal = function() {
|
||||
return this.global_;
|
||||
};
|
||||
|
||||
@@ -198,7 +198,7 @@ _ol_proj_Projection_.prototype.isGlobal = function() {
|
||||
* @param {boolean} global Whether the projection is global.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.setGlobal = function(global) {
|
||||
Projection.prototype.setGlobal = function(global) {
|
||||
this.global_ = global;
|
||||
this.canWrapX_ = !!(global && this.extent_);
|
||||
};
|
||||
@@ -207,7 +207,7 @@ _ol_proj_Projection_.prototype.setGlobal = function(global) {
|
||||
/**
|
||||
* @return {ol.tilegrid.TileGrid} The default tile grid.
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getDefaultTileGrid = function() {
|
||||
Projection.prototype.getDefaultTileGrid = function() {
|
||||
return this.defaultTileGrid_;
|
||||
};
|
||||
|
||||
@@ -215,7 +215,7 @@ _ol_proj_Projection_.prototype.getDefaultTileGrid = function() {
|
||||
/**
|
||||
* @param {ol.tilegrid.TileGrid} tileGrid The default tile grid.
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.setDefaultTileGrid = function(tileGrid) {
|
||||
Projection.prototype.setDefaultTileGrid = function(tileGrid) {
|
||||
this.defaultTileGrid_ = tileGrid;
|
||||
};
|
||||
|
||||
@@ -225,7 +225,7 @@ _ol_proj_Projection_.prototype.setDefaultTileGrid = function(tileGrid) {
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.setExtent = function(extent) {
|
||||
Projection.prototype.setExtent = function(extent) {
|
||||
this.extent_ = extent;
|
||||
this.canWrapX_ = !!(this.global_ && extent);
|
||||
};
|
||||
@@ -237,7 +237,7 @@ _ol_proj_Projection_.prototype.setExtent = function(extent) {
|
||||
* [minlon, minlat, maxlon, maxlat].
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.setWorldExtent = function(worldExtent) {
|
||||
Projection.prototype.setWorldExtent = function(worldExtent) {
|
||||
this.worldExtent_ = worldExtent;
|
||||
};
|
||||
|
||||
@@ -248,7 +248,7 @@ _ol_proj_Projection_.prototype.setWorldExtent = function(worldExtent) {
|
||||
* @param {function(number, ol.Coordinate):number} func Function
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.setGetPointResolution = function(func) {
|
||||
Projection.prototype.setGetPointResolution = function(func) {
|
||||
this.getPointResolutionFunc_ = func;
|
||||
};
|
||||
|
||||
@@ -258,7 +258,7 @@ _ol_proj_Projection_.prototype.setGetPointResolution = function(func) {
|
||||
* @return {function(number, ol.Coordinate):number|undefined} The custom point
|
||||
* resolution function (if set).
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getPointResolutionFunc = function() {
|
||||
Projection.prototype.getPointResolutionFunc = function() {
|
||||
return this.getPointResolutionFunc_;
|
||||
};
|
||||
export default _ol_proj_Projection_;
|
||||
export default Projection;
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../../../../src/ol/Map.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
import ScaleLine from '../../../../src/ol/control/ScaleLine.js';
|
||||
import {fromLonLat} from '../../../../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
|
||||
describe('ol.control.ScaleLine', function() {
|
||||
var map;
|
||||
@@ -272,7 +272,7 @@ describe('ol.control.ScaleLine', function() {
|
||||
center: [0, 0],
|
||||
zoom: 0,
|
||||
resolutions: [1],
|
||||
projection: new _ol_proj_Projection_({
|
||||
projection: new Projection({
|
||||
code: 'METERS',
|
||||
units: 'm',
|
||||
getPointResolution: function(r) {
|
||||
@@ -286,7 +286,7 @@ describe('ol.control.ScaleLine', function() {
|
||||
center: [0, 0],
|
||||
zoom: 0,
|
||||
resolutions: [1],
|
||||
projection: new _ol_proj_Projection_({
|
||||
projection: new Projection({
|
||||
code: 'PIXELS',
|
||||
units: 'pixels',
|
||||
metersPerUnit: 1 / 1000,
|
||||
|
||||
@@ -11,7 +11,7 @@ import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import {addProjection, addCoordinateTransforms, transform, get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import {remove as removeTransform} from '../../../../src/ol/proj/transforms.js';
|
||||
import CircleStyle from '../../../../src/ol/style/Circle.js';
|
||||
import Fill from '../../../../src/ol/style/Fill.js';
|
||||
@@ -356,7 +356,7 @@ describe('ol.format.KML', function() {
|
||||
});
|
||||
|
||||
it('can transform and write XYZ Point geometries', function() {
|
||||
addProjection(new _ol_proj_Projection_({code: 'double'}));
|
||||
addProjection(new Projection({code: 'double'}));
|
||||
addCoordinateTransforms('EPSG:4326', 'double',
|
||||
function(coordinate) {
|
||||
return [2 * coordinate[0], 2 * coordinate[1]];
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
import {register} from '../../../src/ol/proj/proj4.js';
|
||||
import _ol_proj_EPSG3857_ from '../../../src/ol/proj/EPSG3857.js';
|
||||
import _ol_proj_EPSG4326_ from '../../../src/ol/proj/EPSG4326.js';
|
||||
import _ol_proj_Projection_ from '../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../src/ol/proj/Projection.js';
|
||||
|
||||
|
||||
describe('ol.proj', function() {
|
||||
@@ -71,11 +71,11 @@ describe('ol.proj', function() {
|
||||
it('gives that custom 3413 is equivalent to self', function() {
|
||||
var code = 'EPSG:3413';
|
||||
|
||||
var source = new _ol_proj_Projection_({
|
||||
var source = new Projection({
|
||||
code: code
|
||||
});
|
||||
|
||||
var destination = new _ol_proj_Projection_({
|
||||
var destination = new Projection({
|
||||
code: code
|
||||
});
|
||||
|
||||
@@ -101,11 +101,11 @@ describe('ol.proj', function() {
|
||||
|
||||
it('requires code and units to be equal for projection evquivalence',
|
||||
function() {
|
||||
var proj1 = new _ol_proj_Projection_({
|
||||
var proj1 = new Projection({
|
||||
code: 'EPSG:3857',
|
||||
units: 'm'
|
||||
});
|
||||
var proj2 = new _ol_proj_Projection_({
|
||||
var proj2 = new Projection({
|
||||
code: 'EPSG:3857',
|
||||
units: 'tile-pixels'
|
||||
});
|
||||
@@ -194,14 +194,14 @@ describe('ol.proj', function() {
|
||||
describe('canWrapX()', function() {
|
||||
|
||||
it('requires an extent for allowing wrapX', function() {
|
||||
var proj = new _ol_proj_Projection_({
|
||||
var proj = new Projection({
|
||||
code: 'foo',
|
||||
global: true
|
||||
});
|
||||
expect(proj.canWrapX()).to.be(false);
|
||||
proj.setExtent([1, 2, 3, 4]);
|
||||
expect(proj.canWrapX()).to.be(true);
|
||||
proj = new _ol_proj_Projection_({
|
||||
proj = new Projection({
|
||||
code: 'foo',
|
||||
global: true,
|
||||
extent: [1, 2, 3, 4]
|
||||
@@ -212,14 +212,14 @@ describe('ol.proj', function() {
|
||||
});
|
||||
|
||||
it('requires global to be true for allowing wrapX', function() {
|
||||
var proj = new _ol_proj_Projection_({
|
||||
var proj = new Projection({
|
||||
code: 'foo',
|
||||
extent: [1, 2, 3, 4]
|
||||
});
|
||||
expect(proj.canWrapX()).to.be(false);
|
||||
proj.setGlobal(true);
|
||||
expect(proj.canWrapX()).to.be(true);
|
||||
proj = new _ol_proj_Projection_({
|
||||
proj = new Projection({
|
||||
code: 'foo',
|
||||
global: true,
|
||||
extent: [1, 2, 3, 4]
|
||||
@@ -395,7 +395,7 @@ describe('ol.proj', function() {
|
||||
it('does not overwrite existing projections in the registry', function() {
|
||||
register(proj4);
|
||||
var epsg4326 = getProjection('EPSG:4326');
|
||||
new _ol_proj_Projection_({
|
||||
new Projection({
|
||||
code: 'EPSG:4326',
|
||||
units: 'degrees',
|
||||
extent: [-45, -45, 45, 45]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import * as transforms from '../../../../src/ol/proj/transforms.js';
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ describe('transforms.remove()', function() {
|
||||
var units = 'degrees';
|
||||
|
||||
it('removes functions cached by transforms.add()', function() {
|
||||
var foo = new _ol_proj_Projection_({
|
||||
var foo = new Projection({
|
||||
code: 'foo',
|
||||
units: units,
|
||||
extent: extent
|
||||
});
|
||||
var bar = new _ol_proj_Projection_({
|
||||
var bar = new Projection({
|
||||
code: 'bar',
|
||||
units: units,
|
||||
extent: extent
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Map from '../../../../../src/ol/Map.js';
|
||||
import View from '../../../../../src/ol/View.js';
|
||||
import ImageLayer from '../../../../../src/ol/layer/Image.js';
|
||||
import _ol_proj_Projection_ from '../../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../../src/ol/proj/Projection.js';
|
||||
import Static from '../../../../../src/ol/source/ImageStatic.js';
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ describe('ol.renderer.canvas.ImageLayer', function() {
|
||||
|
||||
var map, target, source;
|
||||
beforeEach(function(done) {
|
||||
var projection = new _ol_proj_Projection_({
|
||||
var projection = new Projection({
|
||||
code: 'custom-image',
|
||||
units: 'pixels',
|
||||
extent: [0, 0, 200, 200]
|
||||
|
||||
@@ -11,7 +11,7 @@ import MVT from '../../../../../src/ol/format/MVT.js';
|
||||
import Point from '../../../../../src/ol/geom/Point.js';
|
||||
import VectorTileLayer from '../../../../../src/ol/layer/VectorTile.js';
|
||||
import {get as getProjection, fromLonLat} from '../../../../../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../../src/ol/proj/Projection.js';
|
||||
import _ol_render_canvas_ from '../../../../../src/ol/render/canvas.js';
|
||||
import _ol_render_Feature_ from '../../../../../src/ol/render/Feature.js';
|
||||
import CanvasVectorTileLayerRenderer from '../../../../../src/ol/renderer/canvas/VectorTileLayer.js';
|
||||
@@ -201,7 +201,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
});
|
||||
|
||||
it('Geometries are transformed from tile-pixels', function() {
|
||||
var proj = new _ol_proj_Projection_({code: 'EPSG:3857', units: 'tile-pixels'});
|
||||
var proj = new Projection({code: 'EPSG:3857', units: 'tile-pixels'});
|
||||
var tile;
|
||||
tileCallback = function(t) {
|
||||
t.setProjection(proj);
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../../../../src/ol/Map.js';
|
||||
import TileState from '../../../../src/ol/TileState.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
import ImageLayer from '../../../../src/ol/layer/Image.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import Static from '../../../../src/ol/source/ImageStatic.js';
|
||||
import RasterSource from '../../../../src/ol/source/Raster.js';
|
||||
import Source from '../../../../src/ol/source/Source.js';
|
||||
@@ -62,7 +62,7 @@ where('Uint8ClampedArray').describe('ol.source.Raster', function() {
|
||||
target: target,
|
||||
view: new View({
|
||||
resolutions: [1],
|
||||
projection: new _ol_proj_Projection_({
|
||||
projection: new Projection({
|
||||
code: 'image',
|
||||
units: 'pixels',
|
||||
extent: extent
|
||||
|
||||
@@ -2,7 +2,7 @@ import {inherits} from '../../../../src/ol/index.js';
|
||||
import Tile from '../../../../src/ol/Tile.js';
|
||||
import TileRange from '../../../../src/ol/TileRange.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import Source from '../../../../src/ol/source/Source.js';
|
||||
import TileSource from '../../../../src/ol/source/Tile.js';
|
||||
import _ol_tilecoord_ from '../../../../src/ol/tilecoord.js';
|
||||
@@ -258,7 +258,7 @@ describe('ol.source.Tile', function() {
|
||||
|
||||
it('works with wrapX and custom projection without extent', function() {
|
||||
var tileSource = new TileSource({
|
||||
projection: new _ol_proj_Projection_({
|
||||
projection: new Projection({
|
||||
code: 'foo',
|
||||
global: true,
|
||||
units: 'm'
|
||||
|
||||
@@ -5,7 +5,7 @@ import _ol_events_ from '../../../../src/ol/events.js';
|
||||
import {addCommon, clearAllProjections, get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import {register} from '../../../../src/ol/proj/proj4.js';
|
||||
import _ol_proj_EPSG3857_ from '../../../../src/ol/proj/EPSG3857.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import ReprojTile from '../../../../src/ol/reproj/Tile.js';
|
||||
import TileImage from '../../../../src/ol/source/TileImage.js';
|
||||
import _ol_tilecoord_ from '../../../../src/ol/tilecoord.js';
|
||||
@@ -119,7 +119,7 @@ describe('ol.source.TileImage', function() {
|
||||
expect(tile3857).to.be.a(ImageTile);
|
||||
expect(tile3857).not.to.be.a(ReprojTile);
|
||||
|
||||
var projXXX = new _ol_proj_Projection_({
|
||||
var projXXX = new Projection({
|
||||
code: 'XXX',
|
||||
units: 'degrees'
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_format_WMTSCapabilities_ from '../../../../src/ol/format/WMTSCapabilities.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import WMTSTileGrid from '../../../../src/ol/tilegrid/WMTS.js';
|
||||
import WMTS from '../../../../src/ol/source/WMTS.js';
|
||||
|
||||
@@ -57,7 +57,7 @@ describe('ol.source.WMTS', function() {
|
||||
|
||||
expect(options.format).to.be.eql('image/jpeg');
|
||||
|
||||
expect(options.projection).to.be.a(_ol_proj_Projection_);
|
||||
expect(options.projection).to.be.a(Projection);
|
||||
expect(options.projection).to.be.eql(getProjection('EPSG:3857'));
|
||||
|
||||
expect(options.requestEncoding).to.be.eql('KVP');
|
||||
@@ -91,7 +91,7 @@ describe('ol.source.WMTS', function() {
|
||||
|
||||
expect(options.format).to.be.eql('image/png');
|
||||
|
||||
expect(options.projection).to.be.a(_ol_proj_Projection_);
|
||||
expect(options.projection).to.be.a(Projection);
|
||||
expect(options.projection).to.be.eql(getProjection('EPSG:3857'));
|
||||
|
||||
expect(options.requestEncoding).to.be.eql('REST');
|
||||
@@ -139,7 +139,7 @@ describe('ol.source.WMTS', function() {
|
||||
it('uses the projection of the default MatrixSet if the config\'s projection is not supported', function() {
|
||||
var options = WMTS.optionsFromCapabilities(capabilities, {
|
||||
layer: 'BlueMarbleNextGeneration',
|
||||
projection: new _ol_proj_Projection_({
|
||||
projection: new Projection({
|
||||
code: 'EPSG:2056',
|
||||
units: 'm'
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {DEFAULT_TILE_SIZE} from '../../../../src/ol/tilegrid/common.js';
|
||||
import _ol_events_ from '../../../../src/ol/events.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import Zoomify from '../../../../src/ol/source/Zoomify.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
@@ -11,7 +11,7 @@ describe('ol.source.Zoomify', function() {
|
||||
var size = [w, h];
|
||||
var zoomifyUrl = 'spec/ol/source/images/zoomify/{TileGroup}/{z}-{x}-{y}.jpg';
|
||||
var iipUrl = 'spec/ol/source/images/zoomify?JTL={z},{tileIndex}';
|
||||
var proj = new _ol_proj_Projection_({
|
||||
var proj = new Projection({
|
||||
code: 'ZOOMIFY',
|
||||
units: 'pixels',
|
||||
extent: [0, 0, w, h]
|
||||
|
||||
@@ -3,7 +3,7 @@ import TileRange from '../../../../src/ol/TileRange.js';
|
||||
import * as _ol_extent_ from '../../../../src/ol/extent.js';
|
||||
import {get as getProjection, METERS_PER_UNIT} from '../../../../src/ol/proj.js';
|
||||
import _ol_proj_EPSG3857_ from '../../../../src/ol/proj/EPSG3857.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../../src/ol/proj/Projection.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
@@ -335,7 +335,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
});
|
||||
|
||||
it('works for projections unknown to the client', function() {
|
||||
var projection = new _ol_proj_Projection_(
|
||||
var projection = new Projection(
|
||||
{code: 'EPSG:31287', units: 'm'});
|
||||
var grid = _ol_tilegrid_.createForProjection(projection);
|
||||
var resolutions = grid.getResolutions();
|
||||
|
||||
@@ -4,7 +4,7 @@ import VectorTile from '../../../src/ol/VectorTile.js';
|
||||
import _ol_events_ from '../../../src/ol/events.js';
|
||||
import TextFeature from '../../../src/ol/format/TextFeature.js';
|
||||
import {get as getProjection} from '../../../src/ol/proj.js';
|
||||
import _ol_proj_Projection_ from '../../../src/ol/proj/Projection.js';
|
||||
import Projection from '../../../src/ol/proj/Projection.js';
|
||||
|
||||
|
||||
describe('ol.VectorTile', function() {
|
||||
@@ -13,7 +13,7 @@ describe('ol.VectorTile', function() {
|
||||
// mock format that return a tile-pixels feature
|
||||
var format = new TextFeature();
|
||||
format.readProjection = function(source) {
|
||||
return new _ol_proj_Projection_({
|
||||
return new Projection({
|
||||
code: '',
|
||||
units: 'tile-pixels'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user