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,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_Tile_ from '../../../../src/ol/Tile.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Attribution from '../../../../src/ol/control/Attribution.js';
|
||||
@@ -13,7 +13,7 @@ describe('ol.control.Attribution', function() {
|
||||
var target = document.createElement('div');
|
||||
target.style.width = target.style.height = '100px';
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
controls: [new Attribution({
|
||||
collapsed: false,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import Control from '../../../../src/ol/control/Control.js';
|
||||
|
||||
describe('ol.control.Control', function() {
|
||||
var map, control;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: document.createElement('div')
|
||||
});
|
||||
var element = document.createElement('DIV');
|
||||
|
||||
@@ -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 Control from '../../../../src/ol/control/Control.js';
|
||||
import OverviewMap from '../../../../src/ol/control/OverviewMap.js';
|
||||
@@ -9,7 +9,7 @@ describe('ol.control.OverviewMap', function() {
|
||||
beforeEach(function() {
|
||||
target = document.createElement('div');
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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 ScaleLine from '../../../../src/ol/control/ScaleLine.js';
|
||||
import {fromLonLat} from '../../../../src/ol/proj.js';
|
||||
@@ -9,7 +9,7 @@ describe('ol.control.ScaleLine', function() {
|
||||
beforeEach(function() {
|
||||
var target = document.createElement('div');
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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 ZoomSlider from '../../../../src/ol/control/ZoomSlider.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
@@ -10,7 +10,7 @@ describe('ol.control.ZoomSlider', function() {
|
||||
target = document.createElement('div');
|
||||
document.body.appendChild(target);
|
||||
zoomslider = new ZoomSlider();
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
controls: [zoomslider]
|
||||
});
|
||||
@@ -89,7 +89,7 @@ describe('ol.control.ZoomSlider', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(500, 100),
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Graticule from '../../../src/ol/Graticule.js';
|
||||
import _ol_Map_ from '../../../src/ol/Map.js';
|
||||
import Map from '../../../src/ol/Map.js';
|
||||
import {get as getProjection} from '../../../src/ol/proj.js';
|
||||
import _ol_style_Stroke_ from '../../../src/ol/style/Stroke.js';
|
||||
import _ol_style_Text_ from '../../../src/ol/style/Text.js';
|
||||
@@ -9,7 +9,7 @@ describe('ol.Graticule', function() {
|
||||
|
||||
function createGraticule() {
|
||||
graticule = new Graticule({
|
||||
map: new _ol_Map_({})
|
||||
map: new Map({})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ describe('ol.Graticule', function() {
|
||||
|
||||
it('creates a graticule with labels', function() {
|
||||
graticule = new Graticule({
|
||||
map: new _ol_Map_({}),
|
||||
map: new Map({}),
|
||||
showLabels: true
|
||||
});
|
||||
var extent = [-25614353.926475704, -7827151.696402049,
|
||||
@@ -63,7 +63,7 @@ describe('ol.Graticule', function() {
|
||||
color: 'rebeccapurple'
|
||||
});
|
||||
var styledGraticule = new Graticule({
|
||||
map: new _ol_Map_({}),
|
||||
map: new Map({}),
|
||||
strokeStyle: customStrokeStyle
|
||||
});
|
||||
var actualStyle = styledGraticule.strokeStyle_;
|
||||
@@ -76,7 +76,7 @@ describe('ol.Graticule', function() {
|
||||
var latLabelStyle = new _ol_style_Text_();
|
||||
var lonLabelStyle = new _ol_style_Text_();
|
||||
graticule = new Graticule({
|
||||
map: new _ol_Map_({}),
|
||||
map: new Map({}),
|
||||
showLabels: true,
|
||||
lonLabelFormatter: function(lon) {
|
||||
return 'lon: ' + lon.toString();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import DragRotateAndZoom from '../../../../src/ol/interaction/DragRotateAndZoom.js';
|
||||
@@ -37,7 +37,7 @@ describe('ol.interaction.DragRotateAndZoom', function() {
|
||||
var source = new _ol_source_Vector_();
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
interaction = new DragRotateAndZoom();
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
interactions: [interaction],
|
||||
|
||||
@@ -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 {fromExtent as polygonFromExtent} from '../../../../src/ol/geom/Polygon.js';
|
||||
@@ -26,7 +26,7 @@ describe('ol.interaction.DragZoom', function() {
|
||||
document.body.appendChild(target);
|
||||
source = new _ol_source_Vector_();
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -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 MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import {equals} from '../../../../src/ol/array.js';
|
||||
@@ -36,7 +36,7 @@ describe('ol.interaction.Draw', function() {
|
||||
document.body.appendChild(target);
|
||||
source = new _ol_source_Vector_();
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_interaction_Extent_ from '../../../../src/ol/interaction/Extent.js';
|
||||
@@ -13,7 +13,7 @@ describe('ol.interaction.Extent', function() {
|
||||
beforeEach(function() {
|
||||
var target = createMapDiv(width, height);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [],
|
||||
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 EventTarget from '../../../../src/ol/events/EventTarget.js';
|
||||
import Interaction from '../../../../src/ol/interaction/Interaction.js';
|
||||
@@ -26,7 +26,7 @@ describe('ol.interaction.Interaction', function() {
|
||||
describe('#getMap()', function() {
|
||||
|
||||
it('retrieves the associated map', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var interaction = new Interaction({});
|
||||
interaction.setMap(map);
|
||||
expect(interaction.getMap()).to.be(map);
|
||||
@@ -42,7 +42,7 @@ describe('ol.interaction.Interaction', function() {
|
||||
describe('#setMap()', function() {
|
||||
|
||||
it('allows a map to be set', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var interaction = new Interaction({});
|
||||
interaction.setMap(map);
|
||||
expect(interaction.getMap()).to.be(map);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
@@ -8,7 +8,7 @@ describe('ol.interaction.KeyboardPan', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(100, 100),
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
@@ -8,7 +8,7 @@ describe('ol.interaction.KeyboardZoom', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(100, 100),
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_events_ from '../../../../src/ol/events.js';
|
||||
@@ -47,7 +47,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
@@ -12,7 +12,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
interaction = new _ol_interaction_MouseWheelZoom_();
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: createMapDiv(100, 100),
|
||||
interactions: [interaction],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEventType from '../../../../src/ol/MapBrowserEventType.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
@@ -59,7 +59,7 @@ describe('ol.interaction.Select', function() {
|
||||
|
||||
layer = new _ol_layer_Vector_({source: source});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
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 Circle from '../../../../src/ol/geom/Circle.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
@@ -36,7 +36,7 @@ describe('ol.interaction.Snap', function() {
|
||||
style.height = height + 'px';
|
||||
document.body.appendChild(target);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
projection: 'EPSG:4326',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
@@ -34,7 +34,7 @@ describe('ol.interaction.Translate', function() {
|
||||
})];
|
||||
source.addFeatures(features);
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [layer],
|
||||
view: new _ol_View_({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {getUid} from '../../../../src/ol/index.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_layer_Layer_ from '../../../../src/ol/layer/Layer.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import _ol_render_Event_ from '../../../../src/ol/render/Event.js';
|
||||
@@ -387,7 +387,7 @@ describe('ol.layer.Layer', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({});
|
||||
map = new Map({});
|
||||
});
|
||||
|
||||
describe('with map in constructor options', function() {
|
||||
|
||||
@@ -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 MapEvent from '../../../src/ol/MapEvent.js';
|
||||
import Overlay from '../../../src/ol/Overlay.js';
|
||||
import _ol_View_ from '../../../src/ol/View.js';
|
||||
@@ -20,12 +20,12 @@ describe('ol.Map', function() {
|
||||
|
||||
describe('constructor', function() {
|
||||
it('creates a new map', function() {
|
||||
var map = new _ol_Map_({});
|
||||
expect(map).to.be.a(_ol_Map_);
|
||||
var map = new Map({});
|
||||
expect(map).to.be.a(Map);
|
||||
});
|
||||
|
||||
it('creates a set of default interactions', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var interactions = map.getInteractions();
|
||||
var length = interactions.getLength();
|
||||
expect(length).to.be.greaterThan(0);
|
||||
@@ -36,14 +36,14 @@ describe('ol.Map', function() {
|
||||
});
|
||||
|
||||
it('creates the viewport', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var viewport = map.getViewport();
|
||||
var className = 'ol-viewport' + (_ol_has_.TOUCH ? ' ol-touch' : '');
|
||||
expect(viewport.className).to.be(className);
|
||||
});
|
||||
|
||||
it('creates the overlay containers', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var container = map.getOverlayContainer();
|
||||
expect(container.className).to.be('ol-overlaycontainer');
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('ol.Map', function() {
|
||||
|
||||
describe('#addLayer()', function() {
|
||||
it('adds a layer to the map', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var layer = new TileLayer();
|
||||
map.addLayer(layer);
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('ol.Map', function() {
|
||||
});
|
||||
|
||||
it('throws if a layer is added twice', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var layer = new TileLayer();
|
||||
map.addLayer(layer);
|
||||
|
||||
@@ -76,7 +76,7 @@ describe('ol.Map', function() {
|
||||
|
||||
describe('#addInteraction()', function() {
|
||||
it('adds an interaction to the map', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var interaction = new Interaction({});
|
||||
|
||||
var before = map.getInteractions().getLength();
|
||||
@@ -89,7 +89,7 @@ describe('ol.Map', function() {
|
||||
|
||||
describe('#removeInteraction()', function() {
|
||||
it('removes an interaction from the map', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var interaction = new Interaction({});
|
||||
|
||||
var before = map.getInteractions().getLength();
|
||||
@@ -120,7 +120,7 @@ describe('ol.Map', function() {
|
||||
view = new _ol_View_({
|
||||
projection: 'EPSG:4326'
|
||||
});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: view,
|
||||
layers: [
|
||||
@@ -193,7 +193,7 @@ describe('ol.Map', function() {
|
||||
target = document.createElement('div');
|
||||
target.style.width = target.style.height = '100px';
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [new _ol_layer_Vector_({
|
||||
source: new _ol_source_Vector_({
|
||||
@@ -257,7 +257,7 @@ describe('ol.Map', function() {
|
||||
style.height = '180px';
|
||||
document.body.appendChild(target);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
@@ -312,7 +312,7 @@ describe('ol.Map', function() {
|
||||
style.width = '360px';
|
||||
style.height = '180px';
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
projection: 'EPSG:4326',
|
||||
@@ -417,7 +417,7 @@ describe('ol.Map', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: document.createElement('div')
|
||||
});
|
||||
});
|
||||
@@ -437,7 +437,7 @@ describe('ol.Map', function() {
|
||||
var map;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: document.createElement('div')
|
||||
});
|
||||
expect(map.handleResize_).to.be.ok();
|
||||
@@ -560,7 +560,7 @@ describe('ol.Map', function() {
|
||||
|
||||
it('works with touchend events', function() {
|
||||
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
target: target
|
||||
});
|
||||
|
||||
@@ -592,7 +592,7 @@ describe('ol.Map', function() {
|
||||
style.width = '360px';
|
||||
style.height = '180px';
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
projection: 'EPSG:4326',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../src/ol/Map.js';
|
||||
import Map from '../../../src/ol/Map.js';
|
||||
import MapBrowserEventHandler from '../../../src/ol/MapBrowserEventHandler.js';
|
||||
import _ol_events_ from '../../../src/ol/events.js';
|
||||
import _ol_has_ from '../../../src/ol/has.js';
|
||||
@@ -16,7 +16,7 @@ describe('ol.MapBrowserEventHandler', function() {
|
||||
beforeEach(function() {
|
||||
clock = sinon.useFakeTimers();
|
||||
target = document.createElement('DIV');
|
||||
handler = new MapBrowserEventHandler(new _ol_Map_({
|
||||
handler = new MapBrowserEventHandler(new Map({
|
||||
target: target
|
||||
}));
|
||||
|
||||
@@ -99,7 +99,7 @@ describe('ol.MapBrowserEventHandler', function() {
|
||||
|
||||
var handler;
|
||||
beforeEach(function() {
|
||||
handler = new MapBrowserEventHandler(new _ol_Map_({}));
|
||||
handler = new MapBrowserEventHandler(new Map({}));
|
||||
});
|
||||
|
||||
it('is null if no "down" type event has been handled', function() {
|
||||
@@ -119,8 +119,8 @@ describe('ol.MapBrowserEventHandler', function() {
|
||||
var moveToleranceHandler;
|
||||
var pointerdownAt0;
|
||||
beforeEach(function() {
|
||||
defaultHandler = new MapBrowserEventHandler(new _ol_Map_({}));
|
||||
moveToleranceHandler = new MapBrowserEventHandler(new _ol_Map_({}), 8);
|
||||
defaultHandler = new MapBrowserEventHandler(new Map({}));
|
||||
moveToleranceHandler = new MapBrowserEventHandler(new Map({}), 8);
|
||||
pointerdownAt0 = new _ol_pointer_PointerEvent_('pointerdown', {}, {
|
||||
clientX: 0,
|
||||
clientY: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../src/ol/Map.js';
|
||||
import Map from '../../../src/ol/Map.js';
|
||||
import Overlay from '../../../src/ol/Overlay.js';
|
||||
import _ol_View_ from '../../../src/ol/View.js';
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('ol.Overlay', function() {
|
||||
style.height = height + 'px';
|
||||
document.body.appendChild(target);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
projection: 'EPSG:4326',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_Disposable_ from '../../../../src/ol/Disposable.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 Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_render_Box_ from '../../../../src/ol/render/Box.js';
|
||||
@@ -15,7 +15,7 @@ describe('ol.render.Box', function() {
|
||||
target = document.createElement('div');
|
||||
document.body.appendChild(target);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -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_proj_Projection_ from '../../../../../src/ol/proj/Projection.js';
|
||||
@@ -25,7 +25,7 @@ describe('ol.renderer.canvas.ImageLayer', function() {
|
||||
projection: projection,
|
||||
imageExtent: [0, 0, 20, 20]
|
||||
});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: target,
|
||||
layers: [new _ol_layer_Image_({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {getUid} from '../../../../../src/ol/index.js';
|
||||
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 Point from '../../../../../src/ol/geom/Point.js';
|
||||
import TileLayer from '../../../../../src/ol/layer/Tile.js';
|
||||
@@ -16,7 +16,7 @@ describe('ol.renderer.canvas.Map', function() {
|
||||
describe('constructor', function() {
|
||||
|
||||
it('creates a new instance', function() {
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
target: document.createElement('div')
|
||||
});
|
||||
var renderer = new _ol_renderer_canvas_Map_(map.viewport_, map);
|
||||
@@ -34,7 +34,7 @@ describe('ol.renderer.canvas.Map', function() {
|
||||
target.style.width = '100px';
|
||||
target.style.height = '100px';
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
pixelRatio: 1,
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
@@ -167,7 +167,7 @@ describe('ol.renderer.canvas.Map', function() {
|
||||
var layer, map, renderer;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({});
|
||||
map = new Map({});
|
||||
map.on('postcompose', function() {});
|
||||
layer = new _ol_layer_Vector_({
|
||||
source: new _ol_source_Vector_({wrapX: true})
|
||||
|
||||
@@ -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 {get as getProjection} from '../../../../../src/ol/proj.js';
|
||||
@@ -27,7 +27,7 @@ describe('ol.renderer.canvas.TileLayer', function() {
|
||||
tile = e.tile;
|
||||
done();
|
||||
});
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
layers: [new TileLayer({
|
||||
source: source
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {getUid} from '../../../../../src/ol/index.js';
|
||||
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 * as _ol_extent_ from '../../../../../src/ol/extent.js';
|
||||
import Point from '../../../../../src/ol/geom/Point.js';
|
||||
@@ -49,7 +49,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
|
||||
target.style.width = '256px';
|
||||
target.style.height = '256px';
|
||||
document.body.appendChild(target);
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
zoom: 0
|
||||
@@ -86,7 +86,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
|
||||
|
||||
it('does not re-render for unavailable fonts', function(done) {
|
||||
_ol_obj_.clear(_ol_render_canvas_.checkedFonts_);
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
zoom: 0
|
||||
@@ -117,7 +117,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
|
||||
|
||||
it('does not re-render for available fonts', function(done) {
|
||||
_ol_obj_.clear(_ol_render_canvas_.checkedFonts_);
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
zoom: 0
|
||||
@@ -149,7 +149,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
|
||||
it('re-renders for fonts that become available', function(done) {
|
||||
_ol_obj_.clear(_ol_render_canvas_.checkedFonts_);
|
||||
head.appendChild(font);
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
zoom: 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {getUid, inherits} from '../../../../../src/ol/index.js';
|
||||
import _ol_obj_ from '../../../../../src/ol/obj.js';
|
||||
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_TileState_ from '../../../../../src/ol/TileState.js';
|
||||
import _ol_VectorImageTile_ from '../../../../../src/ol/VectorImageTile.js';
|
||||
import _ol_VectorTile_ from '../../../../../src/ol/VectorTile.js';
|
||||
@@ -38,7 +38,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
target.style.width = '256px';
|
||||
target.style.height = '256px';
|
||||
document.body.appendChild(target);
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
zoom: 0
|
||||
@@ -355,7 +355,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
minZoom: 14,
|
||||
maxZoom: 14
|
||||
});
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
target: target,
|
||||
layers: [
|
||||
new _ol_layer_VectorTile_({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_Image_ from '../../../../src/ol/Image.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_Layer_ from '../../../../src/ol/layer/Layer.js';
|
||||
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||
@@ -107,7 +107,7 @@ describe('ol.renderer.Layer', function() {
|
||||
url: '#{x}/{y}/{z}'
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: view,
|
||||
layers: [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_Disposable_ from '../../../../src/ol/Disposable.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_renderer_Map_ from '../../../../src/ol/renderer/Map.js';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ describe('ol.renderer.Map', function() {
|
||||
describe('constructor', function() {
|
||||
|
||||
it('createst an instance', function() {
|
||||
var map = new _ol_Map_({});
|
||||
var map = new Map({});
|
||||
var renderer = new _ol_renderer_Map_(null, map);
|
||||
expect(renderer).to.be.a(_ol_renderer_Map_);
|
||||
expect(renderer).to.be.a(_ol_Disposable_);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_transform_ from '../../../../../src/ol/transform.js';
|
||||
import _ol_Map_ from '../../../../../src/ol/Map.js';
|
||||
import Map from '../../../../../src/ol/Map.js';
|
||||
import _ol_layer_Image_ from '../../../../../src/ol/layer/Image.js';
|
||||
import _ol_source_Image_ from '../../../../../src/ol/source/Image.js';
|
||||
import _ol_renderer_webgl_ImageLayer_ from '../../../../../src/ol/renderer/webgl/ImageLayer.js';
|
||||
@@ -18,7 +18,7 @@ describe('ol.renderer.webgl.ImageLayer', function() {
|
||||
var imageExtent;
|
||||
|
||||
beforeEach(function() {
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: document.createElement('div')
|
||||
});
|
||||
var layer = new _ol_layer_Image_({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_TileState_ from '../../../../src/ol/TileState.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Image_ from '../../../../src/ol/layer/Image.js';
|
||||
@@ -58,7 +58,7 @@ where('Uint8ClampedArray').describe('ol.source.Raster', function() {
|
||||
}
|
||||
});
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
resolutions: [1],
|
||||
@@ -323,7 +323,7 @@ where('Uint8ClampedArray').describe('ol.source.Raster', function() {
|
||||
}
|
||||
});
|
||||
|
||||
map2 = new _ol_Map_({
|
||||
map2 = new Map({
|
||||
target: target,
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ol_events_ from '../../../../src/ol/events.js';
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
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 Point from '../../../../src/ol/geom/Point.js';
|
||||
import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
@@ -438,7 +438,7 @@ describe('ol.source.Vector', function() {
|
||||
var div = document.createElement('div');
|
||||
div.style.width = div.style.height = '100px';
|
||||
document.body.appendChild(div);
|
||||
var map = new _ol_Map_({
|
||||
var map = new Map({
|
||||
target: div,
|
||||
layers: [
|
||||
new _ol_layer_Vector_({
|
||||
|
||||
@@ -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_VectorImageTile_ from '../../../../src/ol/VectorImageTile.js';
|
||||
import _ol_VectorTile_ from '../../../../src/ol/VectorTile.js';
|
||||
@@ -109,7 +109,7 @@ describe('ol.source.VectorTile', function() {
|
||||
target.style.width = target.style.height = '100px';
|
||||
document.body.appendChild(target);
|
||||
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
layers: [
|
||||
new _ol_layer_VectorTile_({
|
||||
extent: extent,
|
||||
|
||||
@@ -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_ViewHint_ from '../../../src/ol/ViewHint.js';
|
||||
import * as _ol_extent_ from '../../../src/ol/extent.js';
|
||||
@@ -1208,7 +1208,7 @@ describe('ol.View', function() {
|
||||
target = document.createElement('div');
|
||||
target.style.width = '200px';
|
||||
target.style.height = '150px';
|
||||
map = new _ol_Map_({
|
||||
map = new Map({
|
||||
target: target
|
||||
});
|
||||
document.body.appendChild(target);
|
||||
|
||||
Reference in New Issue
Block a user