rename map in tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||
@@ -38,7 +38,7 @@ describe('layer clipping', function() {
|
||||
|
||||
var map = null;
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(256, 256),
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Image_ from '../../../../src/ol/layer/Image.js';
|
||||
import _ol_obj_ from '../../../../src/ol/obj.js';
|
||||
@@ -12,7 +12,7 @@ describe('ol.rendering.layer.Image', function() {
|
||||
var map;
|
||||
|
||||
function createMap(renderer) {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(50, 50),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import * as _ol_extent_ from '../../../../src/ol/extent.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
@@ -20,7 +20,7 @@ describe('ol.rendering.layer.Tile', function() {
|
||||
function createMap(renderer, opt_center, opt_size, opt_pixelRatio, opt_resolutions) {
|
||||
var size = opt_size !== undefined ? opt_size : [50, 50];
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: opt_pixelRatio || 1,
|
||||
target: createMapDiv(size[0], size[1]),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import GeoJSON from '../../../../src/ol/format/GeoJSON.js';
|
||||
import Circle from '../../../../src/ol/geom/Circle.js';
|
||||
@@ -21,7 +21,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
|
||||
var map;
|
||||
function createMap(renderer) {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(80, 80),
|
||||
renderer: renderer,
|
||||
@@ -431,7 +431,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
|
||||
var map2;
|
||||
beforeEach(function() {
|
||||
map2 = new _ol_Map_({
|
||||
map2 = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(128, 128),
|
||||
view: new _ol_View_({
|
||||
@@ -520,7 +520,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
projection: 'EPSG:4326'
|
||||
});
|
||||
|
||||
map3 = new _ol_Map_({
|
||||
map3 = new Map({
|
||||
pixelRatio: 1,
|
||||
layers: [layer],
|
||||
target: createMapDiv(100, 100),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import MVT from '../../../../src/ol/format/MVT.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
@@ -21,7 +21,7 @@ describe('ol.rendering.layer.VectorTile', function() {
|
||||
|
||||
function createMap(renderer, opt_pixelRatio, opt_size) {
|
||||
var size = opt_size || 50;
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: opt_pixelRatio || 1,
|
||||
target: createMapDiv(size, size),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Feature_ from '../../../src/ol/Feature.js';
|
||||
import Point from '../../../src/ol/geom/Point.js';
|
||||
import _ol_Map_ from '../../../src/ol/Map.js';
|
||||
import Map from '../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../src/ol/source/Vector.js';
|
||||
@@ -18,7 +18,7 @@ describe('ol.rendering.Map', function() {
|
||||
})
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(50, 50),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Image_ from '../../../../src/ol/layer/Image.js';
|
||||
import _ol_source_Raster_ from '../../../../src/ol/source/Raster.js';
|
||||
@@ -28,7 +28,7 @@ where('Uint8ClampedArray').describe('ol.rendering.source.Raster', function() {
|
||||
|
||||
var map;
|
||||
function createMap(renderer, pixelRatio) {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(200, 200),
|
||||
pixelRatio: pixelRatio,
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||
import _ol_source_TileWMS_ from '../../../../src/ol/source/TileWMS.js';
|
||||
@@ -25,7 +25,7 @@ describe('ol.rendering.source.TileWMS', function() {
|
||||
|
||||
var map;
|
||||
function createMap(renderer, pixelRatio) {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(200, 200),
|
||||
pixelRatio: pixelRatio,
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
|
||||
@@ -21,7 +21,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
source: vectorSource
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(50, 50),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
|
||||
@@ -27,7 +27,7 @@ describe('ol.rendering.style.Icon', function() {
|
||||
source: vectorSource
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(width ? width : 50, height ? height : 50),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
|
||||
@@ -18,7 +18,7 @@ describe('ol.rendering.style.LineString', function() {
|
||||
source: vectorSource
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: opt_pixelRatio || 1,
|
||||
target: createMapDiv(50, 50),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
|
||||
@@ -21,7 +21,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
source: vectorSource
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(size, size),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
|
||||
@@ -20,7 +20,7 @@ describe('ol.rendering.style.RegularShape', function() {
|
||||
source: vectorSource
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: createMapDiv(50, 50),
|
||||
renderer: renderer,
|
||||
|
||||
@@ -4,7 +4,7 @@ import MultiLineString from '../../../../src/ol/geom/MultiLineString.js';
|
||||
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 _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
|
||||
@@ -24,7 +24,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
source: vectorSource
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: pixelRatio,
|
||||
target: createMapDiv(200 / pixelRatio, 200 / pixelRatio),
|
||||
renderer: renderer,
|
||||
|
||||
Reference in New Issue
Block a user