From 1c1f00823810c589a211348c51491a4f105de882 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 8 Jan 2018 09:59:44 -0700 Subject: [PATCH] Rename _ol_View_ to View --- examples/accessible.js | 4 +- examples/animation.js | 4 +- examples/arcgis-image.js | 4 +- examples/arcgis-tiled.js | 4 +- examples/attributions.js | 4 +- examples/bing-maps.js | 4 +- examples/blend-modes.js | 4 +- examples/box-selection.js | 4 +- examples/button-title.js | 4 +- examples/canvas-gradient-pattern.js | 4 +- examples/canvas-tiles.js | 4 +- examples/cartodb.js | 4 +- examples/center.js | 4 +- examples/cluster.js | 4 +- examples/color-manipulation.js | 4 +- examples/custom-controls.js | 4 +- examples/custom-interactions.js | 4 +- examples/d3.js | 4 +- examples/device-orientation.js | 4 +- examples/drag-and-drop-image-vector.js | 4 +- examples/drag-and-drop.js | 4 +- examples/drag-rotate-and-zoom.js | 4 +- examples/draw-and-modify-features.js | 4 +- examples/draw-features.js | 4 +- examples/draw-freehand.js | 4 +- examples/draw-shapes.js | 4 +- examples/dynamic-data.js | 4 +- examples/earthquake-clusters.js | 4 +- examples/earthquake-custom-symbol.js | 4 +- examples/epsg-4326.js | 4 +- examples/export-map.js | 4 +- examples/export-pdf.js | 4 +- examples/extent-interaction.js | 4 +- examples/feature-animation.js | 4 +- examples/feature-move-animation.js | 4 +- examples/flight-animation.js | 4 +- examples/fractal.js | 4 +- examples/full-screen-drag-rotate-and-zoom.js | 4 +- examples/full-screen-source.js | 4 +- examples/full-screen.js | 4 +- examples/geojson-vt.js | 4 +- examples/geojson.js | 4 +- examples/geolocation-orientation.js | 4 +- examples/geolocation.js | 4 +- examples/getfeatureinfo-image.js | 4 +- examples/getfeatureinfo-tile.js | 4 +- examples/gpx.js | 4 +- examples/graticule.js | 4 +- examples/heatmap-earthquakes.js | 4 +- examples/here-maps.js | 4 +- examples/hit-tolerance.js | 4 +- examples/icon-color.js | 4 +- examples/icon-negative.js | 4 +- examples/icon-sprite-webgl.js | 4 +- examples/icon.js | 4 +- examples/igc.js | 4 +- examples/image-filter.js | 4 +- examples/image-load-events.js | 4 +- examples/image-vector-layer.js | 4 +- examples/jsts.js | 4 +- examples/kml-earthquakes.js | 4 +- examples/kml-timezones.js | 4 +- examples/kml.js | 4 +- examples/layer-clipping-webgl.js | 4 +- examples/layer-clipping.js | 4 +- examples/layer-extent.js | 4 +- examples/layer-group.js | 4 +- examples/layer-spy.js | 4 +- examples/layer-swipe.js | 4 +- examples/layer-z-index.js | 4 +- examples/lazy-source.js | 4 +- examples/line-arrows.js | 4 +- examples/localized-openstreetmap.js | 4 +- examples/magnify.js | 4 +- examples/mapbox-vector-tiles-advanced.js | 4 +- examples/mapbox-vector-tiles.js | 4 +- examples/mapguide-untiled.js | 4 +- examples/measure.js | 4 +- examples/min-max-resolution.js | 4 +- examples/min-zoom.js | 4 +- examples/mobile-full-screen.js | 4 +- examples/modify-features.js | 4 +- examples/modify-test.js | 4 +- examples/mouse-position.js | 4 +- examples/mousewheel-zoom.js | 4 +- examples/moveend.js | 4 +- examples/navigation-controls.js | 4 +- examples/osm-vector-tiles.js | 4 +- examples/overlay.js | 4 +- examples/overviewmap-custom.js | 4 +- examples/overviewmap.js | 4 +- examples/permalink.js | 4 +- examples/pinch-zoom.js | 4 +- examples/polygon-styles.js | 4 +- examples/popup.js | 4 +- examples/preload.js | 4 +- examples/raster.js | 4 +- examples/region-growing.js | 4 +- examples/regularshape.js | 4 +- examples/reprojection-by-code.js | 8 +- examples/reprojection-image.js | 4 +- examples/reprojection-wgs84.js | 4 +- examples/reprojection.js | 6 +- examples/reusable-source.js | 4 +- examples/rotation.js | 4 +- examples/scale-line.js | 4 +- examples/scaleline-indiana-east.js | 4 +- examples/sea-level.js | 4 +- examples/select-features.js | 4 +- examples/semi-transparent-layer.js | 4 +- examples/shaded-relief.js | 4 +- examples/side-by-side.js | 4 +- examples/simple.js | 4 +- examples/snap.js | 4 +- examples/sphere-mollweide.js | 4 +- examples/stamen.js | 4 +- examples/static-image.js | 4 +- examples/street-labels.js | 4 +- examples/symbol-atlas-webgl.js | 4 +- examples/synthetic-lines.js | 4 +- examples/synthetic-points.js | 4 +- examples/teleport.js | 4 +- examples/tile-load-events.js | 4 +- examples/tile-transitions.js | 4 +- examples/tilejson.js | 4 +- examples/tileutfgrid.js | 4 +- examples/tissot.js | 6 +- examples/topojson.js | 4 +- examples/topolis.js | 4 +- examples/translate-features.js | 4 +- examples/turf.js | 4 +- examples/vector-esri-edit.js | 4 +- examples/vector-esri.js | 4 +- examples/vector-label-decluttering.js | 4 +- examples/vector-labels.js | 4 +- examples/vector-layer.js | 4 +- examples/vector-osm.js | 4 +- examples/vector-tile-info.js | 4 +- examples/vector-wfs-getfeature.js | 4 +- examples/vector-wfs.js | 4 +- examples/wkt.js | 4 +- examples/wms-custom-proj.js | 4 +- examples/wms-custom-tilegrid-512x256.js | 4 +- examples/wms-image-custom-proj.js | 4 +- examples/wms-image.js | 4 +- examples/wms-no-proj.js | 4 +- examples/wms-tiled-wrap-180.js | 4 +- examples/wms-tiled.js | 4 +- examples/wms-time.js | 4 +- examples/wmts-dimensions.js | 4 +- examples/wmts-hidpi.js | 4 +- examples/wmts-ign.js | 4 +- examples/wmts-layer-from-capabilities.js | 4 +- examples/wmts.js | 4 +- examples/xyz-esri-4326-512.js | 4 +- examples/xyz-esri.js | 4 +- examples/xyz-retina.js | 4 +- examples/xyz.js | 4 +- examples/zoom-constrained.js | 4 +- examples/zoomify.js | 4 +- examples/zoomslider.js | 4 +- src/ol/PluggableMap.js | 4 +- src/ol/View.js | 108 +++++++-------- test/rendering/ol/layer/clip.test.js | 4 +- test/rendering/ol/layer/image.test.js | 4 +- test/rendering/ol/layer/tile.test.js | 4 +- test/rendering/ol/layer/vector.test.js | 8 +- test/rendering/ol/layer/vectortile.test.js | 4 +- test/rendering/ol/map.test.js | 4 +- test/rendering/ol/source/raster.test.js | 4 +- test/rendering/ol/source/tilewms.test.js | 4 +- test/rendering/ol/style/circle.test.js | 4 +- test/rendering/ol/style/icon.test.js | 4 +- test/rendering/ol/style/linestring.test.js | 4 +- test/rendering/ol/style/polygon.test.js | 4 +- test/rendering/ol/style/regularshape.test.js | 4 +- test/rendering/ol/style/text.test.js | 4 +- test/spec/ol/control/attribution.test.js | 4 +- test/spec/ol/control/overviewmap.test.js | 8 +- test/spec/ol/control/scaleline.test.js | 28 ++-- test/spec/ol/control/zoomslider.test.js | 4 +- test/spec/ol/interaction/draganddrop.test.js | 4 +- .../ol/interaction/dragrotateandzoom.test.js | 6 +- test/spec/ol/interaction/dragzoom.test.js | 4 +- test/spec/ol/interaction/draw.test.js | 4 +- test/spec/ol/interaction/extent.test.js | 4 +- test/spec/ol/interaction/interaction.test.js | 8 +- test/spec/ol/interaction/keyboardpan.test.js | 4 +- test/spec/ol/interaction/keyboardzoom.test.js | 4 +- test/spec/ol/interaction/modify.test.js | 4 +- .../ol/interaction/mousewheelzoom.test.js | 4 +- test/spec/ol/interaction/select.test.js | 4 +- test/spec/ol/interaction/snap.test.js | 4 +- test/spec/ol/interaction/translate.test.js | 4 +- test/spec/ol/map.test.js | 12 +- test/spec/ol/overlay.test.js | 4 +- test/spec/ol/render/box.test.js | 4 +- .../ol/renderer/canvas/imagelayer.test.js | 4 +- test/spec/ol/renderer/canvas/map.test.js | 4 +- .../spec/ol/renderer/canvas/tilelayer.test.js | 4 +- .../ol/renderer/canvas/vectorlayer.test.js | 10 +- .../renderer/canvas/vectortilelayer.test.js | 6 +- test/spec/ol/renderer/layer.test.js | 4 +- test/spec/ol/source/raster.test.js | 6 +- test/spec/ol/source/vector.test.js | 4 +- test/spec/ol/source/vectortile.test.js | 4 +- test/spec/ol/view.test.js | 126 +++++++++--------- 207 files changed, 559 insertions(+), 559 deletions(-) diff --git a/examples/accessible.js b/examples/accessible.js index b46f865156..9cbe45699a 100644 --- a/examples/accessible.js +++ b/examples/accessible.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -17,7 +17,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/animation.js b/examples/animation.js index d5a4752a26..e6e27bb235 100644 --- a/examples/animation.js +++ b/examples/animation.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {easeIn, easeOut} from '../src/ol/easing.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; @@ -11,7 +11,7 @@ var istanbul = fromLonLat([28.9744, 41.0128]); var rome = fromLonLat([12.5, 41.9]); var bern = fromLonLat([7.4458, 46.95]); -var view = new _ol_View_({ +var view = new View({ center: istanbul, zoom: 6 }); diff --git a/examples/arcgis-image.js b/examples/arcgis-image.js index eddfc20c59..ce991d8489 100644 --- a/examples/arcgis-image.js +++ b/examples/arcgis-image.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -23,7 +23,7 @@ var layers = [ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [-10997148, 4569099], zoom: 4 }) diff --git a/examples/arcgis-tiled.js b/examples/arcgis-tiled.js index 4c49b65bfb..9196d18353 100644 --- a/examples/arcgis-tiled.js +++ b/examples/arcgis-tiled.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_TileArcGISRest_ from '../src/ol/source/TileArcGISRest.js'; @@ -21,7 +21,7 @@ var layers = [ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [-10997148, 4569099], zoom: 4 }) diff --git a/examples/attributions.js b/examples/attributions.js index 11f51535f7..9ed9dfcfe1 100644 --- a/examples/attributions.js +++ b/examples/attributions.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import Attribution from '../src/ol/control/Attribution.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -16,7 +16,7 @@ var map = new Map({ ], controls: defaultControls({attribution: false}).extend([attribution]), target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/bing-maps.js b/examples/bing-maps.js index 97405c2f0e..981b806b88 100644 --- a/examples/bing-maps.js +++ b/examples/bing-maps.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; @@ -33,7 +33,7 @@ var map = new Map({ // zooming choppy on mobile or slow devices. loadTilesWhileInteracting: true, target: 'map', - view: new _ol_View_({ + view: new View({ center: [-6655.5402445057125, 6709968.258934638], zoom: 13 }) diff --git a/examples/blend-modes.js b/examples/blend-modes.js index f3951d124b..f5b736dd19 100644 --- a/examples/blend-modes.js +++ b/examples/blend-modes.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -76,7 +76,7 @@ var map = new Map({ blueLayer ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [250, 220], extent: [0, 0, 500, 500], resolution: 4, diff --git a/examples/box-selection.js b/examples/box-selection.js index 39fe91581c..6c60c3886a 100644 --- a/examples/box-selection.js +++ b/examples/box-selection.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_events_condition_ from '../src/ol/events/condition.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import DragBox from '../src/ol/interaction/DragBox.js'; @@ -26,7 +26,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/button-title.js b/examples/button-title.js index 9f0356d15d..7c0b659743 100644 --- a/examples/button-title.js +++ b/examples/button-title.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -10,7 +10,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-8730000, 5930000], rotation: Math.PI / 5, zoom: 8 diff --git a/examples/canvas-gradient-pattern.js b/examples/canvas-gradient-pattern.js index 5ee1c17c49..db9122fd18 100644 --- a/examples/canvas-gradient-pattern.js +++ b/examples/canvas-gradient-pattern.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_has_ from '../src/ol/has.js'; @@ -95,7 +95,7 @@ var map = new Map({ vectorLayer ], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([7, 52]), zoom: 3 }) diff --git a/examples/canvas-tiles.js b/examples/canvas-tiles.js index f6830225be..4e00cc97ab 100644 --- a/examples/canvas-tiles.js +++ b/examples/canvas-tiles.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; @@ -26,7 +26,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: fromLonLat([-0.1275, 51.507222]), zoom: 10 }) diff --git a/examples/cartodb.js b/examples/cartodb.js index 55fbb392be..b198f01ab7 100644 --- a/examples/cartodb.js +++ b/examples/cartodb.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_CartoDB_ from '../src/ol/source/CartoDB.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -30,7 +30,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/center.js b/examples/center.js index d73760d4b7..44fa61e3d0 100644 --- a/examples/center.js +++ b/examples/center.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -38,7 +38,7 @@ var vectorLayer = new _ol_layer_Vector_({ source: source, style: style }); -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 1 }); diff --git a/examples/cluster.js b/examples/cluster.js index 9e0b6a492d..dc017c1ee7 100644 --- a/examples/cluster.js +++ b/examples/cluster.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -70,7 +70,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, clusters], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/color-manipulation.js b/examples/color-manipulation.js index 045018a426..bcdef65ac4 100644 --- a/examples/color-manipulation.js +++ b/examples/color-manipulation.js @@ -1,6 +1,6 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import RasterSource from '../src/ol/source/Raster.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; @@ -155,7 +155,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 2500000], zoom: 2, maxZoom: 18 diff --git a/examples/custom-controls.js b/examples/custom-controls.js index 6d7868bbec..61f326348c 100644 --- a/examples/custom-controls.js +++ b/examples/custom-controls.js @@ -1,6 +1,6 @@ import {inherits} from '../src/ol/index.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import Control from '../src/ol/control/Control.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -71,7 +71,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 3, rotation: 1 diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js index d1a2a647fa..fec48f2ed9 100644 --- a/examples/custom-interactions.js +++ b/examples/custom-interactions.js @@ -1,7 +1,7 @@ import {inherits} from '../src/ol/index.js'; import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; import Point from '../src/ol/geom/Point.js'; import Polygon from '../src/ol/geom/Polygon.js'; @@ -175,7 +175,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/d3.js b/examples/d3.js index 2caca226e3..364c6eae51 100644 --- a/examples/d3.js +++ b/examples/d3.js @@ -1,6 +1,6 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {getWidth, getCenter} from '../src/ol/extent.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -18,7 +18,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([-97, 38]), zoom: 4 }) diff --git a/examples/device-orientation.js b/examples/device-orientation.js index ea8ed3ee76..f194091a7a 100644 --- a/examples/device-orientation.js +++ b/examples/device-orientation.js @@ -1,12 +1,12 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {toRadians} from '../src/ol/math.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 2 }); diff --git a/examples/drag-and-drop-image-vector.js b/examples/drag-and-drop-image-vector.js index 3921612aa8..c1d08a6159 100644 --- a/examples/drag-and-drop-image-vector.js +++ b/examples/drag-and-drop-image-vector.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GPX from '../src/ol/format/GPX.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import IGC from '../src/ol/format/IGC.js'; @@ -104,7 +104,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/drag-and-drop.js b/examples/drag-and-drop.js index 15b56c27a5..5826085c92 100644 --- a/examples/drag-and-drop.js +++ b/examples/drag-and-drop.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GPX from '../src/ol/format/GPX.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import IGC from '../src/ol/format/IGC.js'; @@ -104,7 +104,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/drag-rotate-and-zoom.js b/examples/drag-rotate-and-zoom.js index f9baf924f1..2f9f4625ec 100644 --- a/examples/drag-rotate-and-zoom.js +++ b/examples/drag-rotate-and-zoom.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import DragRotateAndZoom from '../src/ol/interaction/DragRotateAndZoom.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -16,7 +16,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/draw-and-modify-features.js b/examples/draw-and-modify-features.js index a39f91854a..096540c6e6 100644 --- a/examples/draw-and-modify-features.js +++ b/examples/draw-and-modify-features.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Draw from '../src/ol/interaction/Draw.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js'; @@ -39,7 +39,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 4 }) diff --git a/examples/draw-features.js b/examples/draw-features.js index 8b99e6d685..a58dbb1feb 100644 --- a/examples/draw-features.js +++ b/examples/draw-features.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Draw from '../src/ol/interaction/Draw.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -19,7 +19,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 4 }) diff --git a/examples/draw-freehand.js b/examples/draw-freehand.js index b570a63b14..55e763386c 100644 --- a/examples/draw-freehand.js +++ b/examples/draw-freehand.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Draw from '../src/ol/interaction/Draw.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -19,7 +19,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 4 }) diff --git a/examples/draw-shapes.js b/examples/draw-shapes.js index a82ce47e82..1cd126a1cf 100644 --- a/examples/draw-shapes.js +++ b/examples/draw-shapes.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Polygon from '../src/ol/geom/Polygon.js'; import Draw from '../src/ol/interaction/Draw.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -20,7 +20,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 4 }) diff --git a/examples/dynamic-data.js b/examples/dynamic-data.js index 86cc8fca60..aea7ce36b7 100644 --- a/examples/dynamic-data.js +++ b/examples/dynamic-data.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import MultiPoint from '../src/ol/geom/MultiPoint.js'; import Point from '../src/ol/geom/Point.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -17,7 +17,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/earthquake-clusters.js b/examples/earthquake-clusters.js index 7411111705..c74d2adcdf 100644 --- a/examples/earthquake-clusters.js +++ b/examples/earthquake-clusters.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import KML from '../src/ol/format/KML.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; @@ -150,7 +150,7 @@ var map = new Map({ style: selectStyleFunction })]), target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/earthquake-custom-symbol.js b/examples/earthquake-custom-symbol.js index 4f4e9953b0..4309055d07 100644 --- a/examples/earthquake-custom-symbol.js +++ b/examples/earthquake-custom-symbol.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; import Polygon from '../src/ol/geom/Polygon.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -71,7 +71,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/epsg-4326.js b/examples/epsg-4326.js index 242cbbb52d..c21c83acd9 100644 --- a/examples/epsg-4326.js +++ b/examples/epsg-4326.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; 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'; @@ -26,7 +26,7 @@ var map = new Map({ ]), layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], zoom: 2 diff --git a/examples/export-map.js b/examples/export-map.js index b5ddd68043..c7f605352f 100644 --- a/examples/export-map.js +++ b/examples/export-map.js @@ -1,7 +1,7 @@ // NOCOMPILE // this example uses FileSaver.js for which we don't have an externs file. import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -27,7 +27,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/export-pdf.js b/examples/export-pdf.js index c52dbfceb0..49a24b5c90 100644 --- a/examples/export-pdf.js +++ b/examples/export-pdf.js @@ -1,6 +1,6 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import WKT from '../src/ol/format/WKT.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -34,7 +34,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/extent-interaction.js b/examples/extent-interaction.js index eef97204cf..06b3348066 100644 --- a/examples/extent-interaction.js +++ b/examples/extent-interaction.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_events_condition_ from '../src/ol/events/condition.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_interaction_Extent_ from '../src/ol/interaction/Extent.js'; @@ -23,7 +23,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/feature-animation.js b/examples/feature-animation.js index 9fabcbdb94..230ac28982 100644 --- a/examples/feature-animation.js +++ b/examples/feature-animation.js @@ -1,7 +1,7 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; import _ol_Observable_ from '../src/ol/Observable.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import {easeOut} from '../src/ol/easing.js'; import Point from '../src/ol/geom/Point.js'; @@ -29,7 +29,7 @@ var map = new Map({ } }), target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/feature-move-animation.js b/examples/feature-move-animation.js index 4d70a96258..5c5a65f7ad 100644 --- a/examples/feature-move-animation.js +++ b/examples/feature-move-animation.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Polyline from '../src/ol/format/Polyline.js'; import Point from '../src/ol/geom/Point.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -130,7 +130,7 @@ var center = [-5639523.95, -3501274.52]; var map = new Map({ target: document.getElementById('map'), loadTilesWhileAnimating: true, - view: new _ol_View_({ + view: new View({ center: center, zoom: 10, minZoom: 2, diff --git a/examples/flight-animation.js b/examples/flight-animation.js index 670520a15f..dab7af7b6a 100644 --- a/examples/flight-animation.js +++ b/examples/flight-animation.js @@ -1,7 +1,7 @@ // NOCOMPILE import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -19,7 +19,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/fractal.js b/examples/fractal.js index cf56636992..bd1a20ee33 100644 --- a/examples/fractal.js +++ b/examples/fractal.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -26,7 +26,7 @@ var layer = new _ol_layer_Vector_({ var map = new Map({ layers: [layer], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/full-screen-drag-rotate-and-zoom.js b/examples/full-screen-drag-rotate-and-zoom.js index 5df99c2132..eb99c43789 100644 --- a/examples/full-screen-drag-rotate-and-zoom.js +++ b/examples/full-screen-drag-rotate-and-zoom.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import FullScreen from '../src/ol/control/FullScreen.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; @@ -25,7 +25,7 @@ var map = new Map({ ], // Use the canvas renderer because it's currently the fastest target: 'map', - view: new _ol_View_({ + view: new View({ center: [-33519607, 5616436], rotation: -Math.PI / 8, zoom: 8 diff --git a/examples/full-screen-source.js b/examples/full-screen-source.js index e5d94aaf9f..d2d55fbe16 100644 --- a/examples/full-screen-source.js +++ b/examples/full-screen-source.js @@ -1,12 +1,12 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import FullScreen from '../src/ol/control/FullScreen.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; -var view = new _ol_View_({ +var view = new View({ center: [-9101767, 2822912], zoom: 14 }); diff --git a/examples/full-screen.js b/examples/full-screen.js index 869ba66d68..aafad399b4 100644 --- a/examples/full-screen.js +++ b/examples/full-screen.js @@ -1,12 +1,12 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import FullScreen from '../src/ol/control/FullScreen.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; -var view = new _ol_View_({ +var view = new View({ center: [-9101767, 2822912], zoom: 14 }); diff --git a/examples/geojson-vt.js b/examples/geojson-vt.js index dd1d6b10d0..00e8020c6a 100644 --- a/examples/geojson-vt.js +++ b/examples/geojson-vt.js @@ -1,6 +1,6 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_VectorTile_ from '../src/ol/source/VectorTile.js'; @@ -60,7 +60,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/geojson.js b/examples/geojson.js index 82f5e1c83b..0d1000934e 100644 --- a/examples/geojson.js +++ b/examples/geojson.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import Circle from '../src/ol/geom/Circle.js'; @@ -184,7 +184,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/geolocation-orientation.js b/examples/geolocation-orientation.js index 335c0ecf11..8e9e5771a7 100644 --- a/examples/geolocation-orientation.js +++ b/examples/geolocation-orientation.js @@ -1,7 +1,7 @@ import Geolocation from '../src/ol/Geolocation.js'; import Map from '../src/ol/Map.js'; import _ol_Overlay_ from '../src/ol/Overlay.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import LineString from '../src/ol/geom/LineString.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -9,7 +9,7 @@ import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; // creating the view -var view = new _ol_View_({ +var view = new View({ center: fromLonLat([5.8713, 45.6452]), zoom: 19 }); diff --git a/examples/geolocation.js b/examples/geolocation.js index 5f408c8f0d..68ef9bccb6 100644 --- a/examples/geolocation.js +++ b/examples/geolocation.js @@ -1,7 +1,7 @@ import Feature from '../src/ol/Feature.js'; import Geolocation from '../src/ol/Geolocation.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import Point from '../src/ol/geom/Point.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -13,7 +13,7 @@ import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Style_ from '../src/ol/style/Style.js'; -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 2 }); diff --git a/examples/getfeatureinfo-image.js b/examples/getfeatureinfo-image.js index 647ac359b0..dca6ccc1c7 100644 --- a/examples/getfeatureinfo-image.js +++ b/examples/getfeatureinfo-image.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import _ol_source_ImageWMS_ from '../src/ol/source/ImageWMS.js'; @@ -15,7 +15,7 @@ var wmsLayer = new _ol_layer_Image_({ source: wmsSource }); -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 1 }); diff --git a/examples/getfeatureinfo-tile.js b/examples/getfeatureinfo-tile.js index 0ec94b4b51..fd8692b0be 100644 --- a/examples/getfeatureinfo-tile.js +++ b/examples/getfeatureinfo-tile.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js'; @@ -15,7 +15,7 @@ var wmsLayer = new TileLayer({ source: wmsSource }); -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 1 }); diff --git a/examples/gpx.js b/examples/gpx.js index b5d1529a25..9aafbcfa40 100644 --- a/examples/gpx.js +++ b/examples/gpx.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GPX from '../src/ol/format/GPX.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -57,7 +57,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [-7916041.528716288, 5228379.045749711], zoom: 12 }) diff --git a/examples/graticule.js b/examples/graticule.js index cd88513b44..07e7c5d5b7 100644 --- a/examples/graticule.js +++ b/examples/graticule.js @@ -1,6 +1,6 @@ import Graticule from '../src/ol/Graticule.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -16,7 +16,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([4.8, 47.75]), zoom: 5 }) diff --git a/examples/heatmap-earthquakes.js b/examples/heatmap-earthquakes.js index 09fcfad319..6bf883c8ff 100644 --- a/examples/heatmap-earthquakes.js +++ b/examples/heatmap-earthquakes.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; import HeatmapLayer from '../src/ol/layer/Heatmap.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -38,7 +38,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/here-maps.js b/examples/here-maps.js index feb994b014..52257d7a07 100644 --- a/examples/here-maps.js +++ b/examples/here-maps.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_XYZ_ from '../src/ol/source/XYZ.js'; @@ -73,7 +73,7 @@ var map = new Map({ // zooming choppy on mobile or slow devices. loadTilesWhileInteracting: true, target: 'map', - view: new _ol_View_({ + view: new View({ center: [921371.9389, 6358337.7609], zoom: 10 }) diff --git a/examples/hit-tolerance.js b/examples/hit-tolerance.js index a8a0be3cbd..6d6371bb84 100644 --- a/examples/hit-tolerance.js +++ b/examples/hit-tolerance.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -32,7 +32,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/icon-color.js b/examples/icon-color.js index 2000518854..ca341181f5 100644 --- a/examples/icon-color.js +++ b/examples/icon-color.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -66,7 +66,7 @@ var rasterLayer = new TileLayer({ var map = new Map({ layers: [rasterLayer, vectorLayer], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: fromLonLat([2.896372, 44.60240]), zoom: 3 }) diff --git a/examples/icon-negative.js b/examples/icon-negative.js index 97e64ef806..75a6dfb5b9 100644 --- a/examples/icon-negative.js +++ b/examples/icon-negative.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -39,7 +39,7 @@ var map = new Map({ }) ], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 3 }) diff --git a/examples/icon-sprite-webgl.js b/examples/icon-sprite-webgl.js index 8d92b83f9f..dd1896e480 100644 --- a/examples/icon-sprite-webgl.js +++ b/examples/icon-sprite-webgl.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -83,7 +83,7 @@ var map = new Map({ renderer: /** @type {Array} */ (['webgl', 'canvas']), layers: [vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 5 }) diff --git a/examples/icon.js b/examples/icon.js index f84ad14b84..1a862f6814 100644 --- a/examples/icon.js +++ b/examples/icon.js @@ -1,7 +1,7 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; import _ol_Overlay_ from '../src/ol/Overlay.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -47,7 +47,7 @@ var rasterLayer = new TileLayer({ var map = new Map({ layers: [rasterLayer, vectorLayer], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 3 }) diff --git a/examples/igc.js b/examples/igc.js index 016438306e..28adc5c144 100644 --- a/examples/igc.js +++ b/examples/igc.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import IGC from '../src/ol/format/IGC.js'; import LineString from '../src/ol/geom/LineString.js'; @@ -103,7 +103,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [703365.7089403362, 5714629.865071137], zoom: 9 }) diff --git a/examples/image-filter.js b/examples/image-filter.js index dcdc05680d..0ec1d28726 100644 --- a/examples/image-filter.js +++ b/examples/image-filter.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; @@ -13,7 +13,7 @@ var imagery = new TileLayer({ var map = new Map({ layers: [imagery], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([-120, 50]), zoom: 6 }) diff --git a/examples/image-load-events.js b/examples/image-load-events.js index 84e91d5bcd..0a52b88953 100644 --- a/examples/image-load-events.js +++ b/examples/image-load-events.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import _ol_source_ImageWMS_ from '../src/ol/source/ImageWMS.js'; @@ -99,7 +99,7 @@ var map = new Map({ new _ol_layer_Image_({source: source}) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-10997148, 4569099], zoom: 4 }) diff --git a/examples/image-vector-layer.js b/examples/image-vector-layer.js index 49b73b1495..20224623ba 100644 --- a/examples/image-vector-layer.js +++ b/examples/image-vector-layer.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -35,7 +35,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/jsts.js b/examples/jsts.js index fcfd01bad6..9ce1eaab48 100644 --- a/examples/jsts.js +++ b/examples/jsts.js @@ -1,7 +1,7 @@ // NOCOMPILE // this example uses JSTS for which we don't have an externs file. import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -44,7 +44,7 @@ var rasterLayer = new TileLayer({ var map = new Map({ layers: [rasterLayer, vectorLayer], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: fromLonLat([126.979293, 37.528787]), zoom: 15 }) diff --git a/examples/kml-earthquakes.js b/examples/kml-earthquakes.js index 82d19ea1e5..efcd74a7c7 100644 --- a/examples/kml-earthquakes.js +++ b/examples/kml-earthquakes.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -57,7 +57,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/kml-timezones.js b/examples/kml-timezones.js index 23db827d56..e6c1cbbbf1 100644 --- a/examples/kml-timezones.js +++ b/examples/kml-timezones.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -64,7 +64,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/kml.js b/examples/kml.js index 1e78383f78..3ccda3368e 100644 --- a/examples/kml.js +++ b/examples/kml.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -23,7 +23,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [876970.8463461736, 5859807.853963373], projection: 'EPSG:3857', zoom: 10 diff --git a/examples/layer-clipping-webgl.js b/examples/layer-clipping-webgl.js index 1ed0abeff2..c571e1facc 100644 --- a/examples/layer-clipping-webgl.js +++ b/examples/layer-clipping-webgl.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import _ol_has_ from '../src/ol/has.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -26,7 +26,7 @@ if (!_ol_has_.WEBGL) { collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/layer-clipping.js b/examples/layer-clipping.js index 6396f18e9f..11cc870cbb 100644 --- a/examples/layer-clipping.js +++ b/examples/layer-clipping.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -16,7 +16,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/layer-extent.js b/examples/layer-extent.js index 5a14be36fa..b6a634d181 100644 --- a/examples/layer-extent.js +++ b/examples/layer-extent.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {transformExtent} from '../src/ol/proj.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; @@ -33,7 +33,7 @@ var overlay = new TileLayer({ var map = new Map({ layers: [base, overlay], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/layer-group.js b/examples/layer-group.js index 72a5c7dec6..c824cbaa46 100644 --- a/examples/layer-group.js +++ b/examples/layer-group.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Group_ from '../src/ol/layer/Group.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; @@ -28,7 +28,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([37.40570, 8.81566]), zoom: 4 }) diff --git a/examples/layer-spy.js b/examples/layer-spy.js index 10c6eff9ef..971f42fd6e 100644 --- a/examples/layer-spy.js +++ b/examples/layer-spy.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; @@ -19,7 +19,7 @@ var container = document.getElementById('map'); var map = new Map({ layers: [roads, imagery], target: container, - view: new _ol_View_({ + view: new View({ center: fromLonLat([-109, 46.5]), zoom: 6 }) diff --git a/examples/layer-swipe.js b/examples/layer-swipe.js index da1b0a0012..7267846b67 100644 --- a/examples/layer-swipe.js +++ b/examples/layer-swipe.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; @@ -23,7 +23,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/layer-z-index.js b/examples/layer-z-index.js index 987f9f159c..337a9017e7 100644 --- a/examples/layer-z-index.js +++ b/examples/layer-z-index.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -72,7 +72,7 @@ layers.push(layer2); var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 18 }) diff --git a/examples/lazy-source.js b/examples/lazy-source.js index 93a16954d1..82a6bdf748 100644 --- a/examples/lazy-source.js +++ b/examples/lazy-source.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -10,7 +10,7 @@ var layer = new TileLayer(); var map = new Map({ layers: [layer], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/line-arrows.js b/examples/line-arrows.js index bb970d6d1f..c698dfd5d1 100644 --- a/examples/line-arrows.js +++ b/examples/line-arrows.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import Draw from '../src/ol/interaction/Draw.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -54,7 +54,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 4 }) diff --git a/examples/localized-openstreetmap.js b/examples/localized-openstreetmap.js index 5ad4e9459a..9f4822534f 100644 --- a/examples/localized-openstreetmap.js +++ b/examples/localized-openstreetmap.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -39,7 +39,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ maxZoom: 18, center: [-244780.24508882355, 5986452.183179816], zoom: 15 diff --git a/examples/magnify.js b/examples/magnify.js index 2f60d5333e..8dbf493cd5 100644 --- a/examples/magnify.js +++ b/examples/magnify.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; @@ -15,7 +15,7 @@ var container = document.getElementById('map'); var map = new Map({ layers: [imagery], target: container, - view: new _ol_View_({ + view: new View({ center: fromLonLat([-109, 46.5]), zoom: 6 }) diff --git a/examples/mapbox-vector-tiles-advanced.js b/examples/mapbox-vector-tiles-advanced.js index 941523b8af..b24f69a8bc 100644 --- a/examples/mapbox-vector-tiles-advanced.js +++ b/examples/mapbox-vector-tiles-advanced.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; import _ol_layer_VectorTile_ from '../src/ol/layer/VectorTile.js'; import {get as getProjection} from '../src/ol/proj.js'; @@ -49,7 +49,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], minZoom: 1, zoom: 2 diff --git a/examples/mapbox-vector-tiles.js b/examples/mapbox-vector-tiles.js index 16677950aa..ea1df8acb1 100644 --- a/examples/mapbox-vector-tiles.js +++ b/examples/mapbox-vector-tiles.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; import _ol_layer_VectorTile_ from '../src/ol/layer/VectorTile.js'; import _ol_source_VectorTile_ from '../src/ol/source/VectorTile.js'; @@ -28,7 +28,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/mapguide-untiled.js b/examples/mapguide-untiled.js index afc000dad6..33bf82ec18 100644 --- a/examples/mapguide-untiled.js +++ b/examples/mapguide-untiled.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import _ol_source_ImageMapGuide_ from '../src/ol/source/ImageMapGuide.js'; @@ -32,7 +32,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-87.7302542509315, 43.744459064634], projection: 'EPSG:4326', zoom: 12 diff --git a/examples/measure.js b/examples/measure.js index 4a73e8842a..2203ccbd6a 100644 --- a/examples/measure.js +++ b/examples/measure.js @@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js'; import _ol_Observable_ from '../src/ol/Observable.js'; import _ol_Overlay_ from '../src/ol/Overlay.js'; import {getArea, getLength} from '../src/ol/sphere.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; import Polygon from '../src/ol/geom/Polygon.js'; import Draw from '../src/ol/interaction/Draw.js'; @@ -121,7 +121,7 @@ var pointerMoveHandler = function(evt) { var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 15 }) diff --git a/examples/min-max-resolution.js b/examples/min-max-resolution.js index d191d7f5b7..eb445982a4 100644 --- a/examples/min-max-resolution.js +++ b/examples/min-max-resolution.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -31,7 +31,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [653600, 5723680], zoom: 5 }) diff --git a/examples/min-zoom.js b/examples/min-zoom.js index 366629504f..dec2c8e2f1 100644 --- a/examples/min-zoom.js +++ b/examples/min-zoom.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -12,7 +12,7 @@ function getMinZoom() { var initialZoom = getMinZoom(); -var view = new _ol_View_({ +var view = new View({ center: [0, 0], minZoom: initialZoom, zoom: initialZoom diff --git a/examples/mobile-full-screen.js b/examples/mobile-full-screen.js index 20ae22f86c..a1abaf193b 100644 --- a/examples/mobile-full-screen.js +++ b/examples/mobile-full-screen.js @@ -1,11 +1,11 @@ import Geolocation from '../src/ol/Geolocation.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 2 }); diff --git a/examples/modify-features.js b/examples/modify-features.js index 997be2d727..f9999f1df6 100644 --- a/examples/modify-features.js +++ b/examples/modify-features.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; @@ -34,7 +34,7 @@ var map = new Map({ interactions: defaultInteractions().extend([select, modify]), layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/modify-test.js b/examples/modify-test.js index d886c6228d..6fe438724a 100644 --- a/examples/modify-test.js +++ b/examples/modify-test.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; @@ -235,7 +235,7 @@ var map = new Map({ interactions: defaultInteractions().extend([select, modify]), layers: [layer], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 1000000], zoom: 2 }) diff --git a/examples/mouse-position.js b/examples/mouse-position.js index ef0d22fd37..40e2c41c9f 100644 --- a/examples/mouse-position.js +++ b/examples/mouse-position.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import MousePosition from '../src/ol/control/MousePosition.js'; import _ol_coordinate_ from '../src/ol/coordinate.js'; @@ -28,7 +28,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/mousewheel-zoom.js b/examples/mousewheel-zoom.js index 2a794e859a..1b239fe39c 100644 --- a/examples/mousewheel-zoom.js +++ b/examples/mousewheel-zoom.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import MouseWheelZoom from '../src/ol/interaction/MouseWheelZoom.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -18,7 +18,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/moveend.js b/examples/moveend.js index fd3ee25d63..fc1ca6a146 100644 --- a/examples/moveend.js +++ b/examples/moveend.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -19,7 +19,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/navigation-controls.js b/examples/navigation-controls.js index f578dc1ff7..4df4f2b8c3 100644 --- a/examples/navigation-controls.js +++ b/examples/navigation-controls.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import ZoomToExtent from '../src/ol/control/ZoomToExtent.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -25,7 +25,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/osm-vector-tiles.js b/examples/osm-vector-tiles.js index 2be32d7518..1d34df6df3 100644 --- a/examples/osm-vector-tiles.js +++ b/examples/osm-vector-tiles.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TopoJSON from '../src/ol/format/TopoJSON.js'; import _ol_layer_VectorTile_ from '../src/ol/layer/VectorTile.js'; import {fromLonLat} from '../src/ol/proj.js'; @@ -82,7 +82,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([-74.0064, 40.7142]), maxZoom: 19, zoom: 15 diff --git a/examples/overlay.js b/examples/overlay.js index 2caccaea2b..f6400954dd 100644 --- a/examples/overlay.js +++ b/examples/overlay.js @@ -1,6 +1,6 @@ import Map from '../src/ol/Map.js'; import _ol_Overlay_ from '../src/ol/Overlay.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_coordinate_ from '../src/ol/coordinate.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat, toLonLat} from '../src/ol/proj.js'; @@ -14,7 +14,7 @@ var layer = new TileLayer({ var map = new Map({ layers: [layer], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/overviewmap-custom.js b/examples/overviewmap-custom.js index 3854633c9b..903a93f74e 100644 --- a/examples/overviewmap-custom.js +++ b/examples/overviewmap-custom.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import OverviewMap from '../src/ol/control/OverviewMap.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; @@ -37,7 +37,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [500000, 6000000], zoom: 7 }) diff --git a/examples/overviewmap.js b/examples/overviewmap.js index fc9ad0928f..7c0deeb849 100644 --- a/examples/overviewmap.js +++ b/examples/overviewmap.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import OverviewMap from '../src/ol/control/OverviewMap.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -15,7 +15,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [500000, 6000000], zoom: 7 }) diff --git a/examples/permalink.js b/examples/permalink.js index ea2f796be2..0dda004909 100644 --- a/examples/permalink.js +++ b/examples/permalink.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -35,7 +35,7 @@ var map = new Map({ } }), target: 'map', - view: new _ol_View_({ + view: new View({ center: center, zoom: zoom, rotation: rotation diff --git a/examples/pinch-zoom.js b/examples/pinch-zoom.js index 02422fcd2a..41a6b6df24 100644 --- a/examples/pinch-zoom.js +++ b/examples/pinch-zoom.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import _ol_interaction_PinchZoom_ from '../src/ol/interaction/PinchZoom.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -18,7 +18,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/polygon-styles.js b/examples/polygon-styles.js index 0eee5c0647..b5c8fb2147 100644 --- a/examples/polygon-styles.js +++ b/examples/polygon-styles.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import MultiPoint from '../src/ol/geom/MultiPoint.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -92,7 +92,7 @@ var layer = new _ol_layer_Vector_({ var map = new Map({ layers: [layer], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 3000000], zoom: 2 }) diff --git a/examples/popup.js b/examples/popup.js index f82abbbee0..415a1e20eb 100644 --- a/examples/popup.js +++ b/examples/popup.js @@ -1,6 +1,6 @@ import Map from '../src/ol/Map.js'; import _ol_Overlay_ from '../src/ol/Overlay.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_coordinate_ from '../src/ol/coordinate.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {toLonLat} from '../src/ol/proj.js'; @@ -52,7 +52,7 @@ var map = new Map({ ], overlays: [overlay], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/preload.js b/examples/preload.js index a904f7c7cd..c2ac1b8640 100644 --- a/examples/preload.js +++ b/examples/preload.js @@ -1,10 +1,10 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; -var view = new _ol_View_({ +var view = new View({ center: [-4808600, -2620936], zoom: 8 }); diff --git a/examples/raster.js b/examples/raster.js index 01292f2ad2..d4dd55f096 100644 --- a/examples/raster.js +++ b/examples/raster.js @@ -1,7 +1,7 @@ // NOCOMPILE // this example uses d3 for which we don't have an externs file. import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; @@ -120,7 +120,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-9651695, 4937351], zoom: 13, minZoom: 12, diff --git a/examples/region-growing.js b/examples/region-growing.js index bf14ca45ed..a038a74261 100644 --- a/examples/region-growing.js +++ b/examples/region-growing.js @@ -1,6 +1,6 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; @@ -97,7 +97,7 @@ var rasterImage = new _ol_layer_Image_({ var map = new Map({ layers: [imagery, rasterImage], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([-119.07, 47.65]), zoom: 11 }) diff --git a/examples/regularshape.js b/examples/regularshape.js index 55a2d7be52..306115287c 100644 --- a/examples/regularshape.js +++ b/examples/regularshape.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -89,7 +89,7 @@ var map = new Map({ vectorLayer ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/reprojection-by-code.js b/examples/reprojection-by-code.js index 6546d2bf92..4c97136501 100644 --- a/examples/reprojection-by-code.js +++ b/examples/reprojection-by-code.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {get as getProjection, getTransform} from '../src/ol/proj.js'; @@ -16,7 +16,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ projection: 'EPSG:3857', center: [0, 0], zoom: 1 @@ -32,7 +32,7 @@ var renderEdgesCheckbox = document.getElementById('render-edges'); function setProjection(code, name, proj4def, bbox) { if (code === null || name === null || proj4def === null || bbox === null) { resultSpan.innerHTML = 'Nothing usable found, using EPSG:3857...'; - map.setView(new _ol_View_({ + map.setView(new View({ projection: 'EPSG:3857', center: [0, 0], zoom: 1 @@ -52,7 +52,7 @@ function setProjection(code, name, proj4def, bbox) { var extent = _ol_extent_.applyTransform( [bbox[1], bbox[2], bbox[3], bbox[0]], fromLonLat); newProj.setExtent(extent); - var newView = new _ol_View_({ + var newView = new View({ projection: newProj }); map.setView(newView); diff --git a/examples/reprojection-image.js b/examples/reprojection-image.js index 5b0634bedd..9089e7ca44 100644 --- a/examples/reprojection-image.js +++ b/examples/reprojection-image.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {getCenter} from '../src/ol/extent.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -33,7 +33,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: transform(getCenter(imageExtent), 'EPSG:27700', 'EPSG:3857'), zoom: 4 }) diff --git a/examples/reprojection-wgs84.js b/examples/reprojection-wgs84.js index 0e25eb8b14..e27270cd79 100644 --- a/examples/reprojection-wgs84.js +++ b/examples/reprojection-wgs84.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -10,7 +10,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], zoom: 2 diff --git a/examples/reprojection.js b/examples/reprojection.js index b81c302ace..d95db4b4f7 100644 --- a/examples/reprojection.js +++ b/examples/reprojection.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import _ol_format_WMTSCapabilities_ from '../src/ol/format/WMTSCapabilities.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -156,7 +156,7 @@ var map = new Map({ layers['bng'] ], target: 'map', - view: new _ol_View_({ + view: new View({ projection: 'EPSG:3857', center: [0, 0], zoom: 2 @@ -173,7 +173,7 @@ var renderEdges = false; function updateViewProjection() { var newProj = getProjection(viewProjSelect.value); var newProjExtent = newProj.getExtent(); - var newView = new _ol_View_({ + var newView = new View({ projection: newProj, center: _ol_extent_.getCenter(newProjExtent || [0, 0, 0, 0]), zoom: 0, diff --git a/examples/reusable-source.js b/examples/reusable-source.js index edd1f279f3..6a4bc42112 100644 --- a/examples/reusable-source.js +++ b/examples/reusable-source.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_XYZ_ from '../src/ol/source/XYZ.js'; @@ -19,7 +19,7 @@ var map = new Map({ source: source }) ], - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/rotation.js b/examples/rotation.js index 39c3998be7..36ae565de7 100644 --- a/examples/rotation.js +++ b/examples/rotation.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -17,7 +17,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [14200000, 4130000], rotation: Math.PI / 6, zoom: 10 diff --git a/examples/scale-line.js b/examples/scale-line.js index d0ed61ea0e..b7003d3346 100644 --- a/examples/scale-line.js +++ b/examples/scale-line.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; 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'; @@ -22,7 +22,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/scaleline-indiana-east.js b/examples/scaleline-indiana-east.js index 90d720988e..e5d9bba6ca 100644 --- a/examples/scaleline-indiana-east.js +++ b/examples/scaleline-indiana-east.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import ScaleLine from '../src/ol/control/ScaleLine.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat, transformExtent} from '../src/ol/proj.js'; @@ -25,7 +25,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ projection: 'Indiana-East', center: fromLonLat([-85.685, 39.891], 'Indiana-East'), zoom: 7, diff --git a/examples/sea-level.js b/examples/sea-level.js index 7f53e4c6d7..ff7b844e9d 100644 --- a/examples/sea-level.js +++ b/examples/sea-level.js @@ -1,6 +1,6 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; @@ -48,7 +48,7 @@ var map = new Map({ source: raster }) ], - view: new _ol_View_({ + view: new View({ center: fromLonLat([-122.3267, 37.8377]), zoom: 11 }) diff --git a/examples/select-features.js b/examples/select-features.js index 4bd97da826..c49adeb6e8 100644 --- a/examples/select-features.js +++ b/examples/select-features.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_events_condition_ from '../src/ol/events/condition.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; @@ -22,7 +22,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/semi-transparent-layer.js b/examples/semi-transparent-layer.js index 001ae812fa..c5dded9ec6 100644 --- a/examples/semi-transparent-layer.js +++ b/examples/semi-transparent-layer.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -19,7 +19,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([-77.93255, 37.9555]), zoom: 7 }) diff --git a/examples/shaded-relief.js b/examples/shaded-relief.js index 33b1f3f18e..9589748374 100644 --- a/examples/shaded-relief.js +++ b/examples/shaded-relief.js @@ -1,6 +1,6 @@ // NOCOMPILE import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -125,7 +125,7 @@ var map = new Map({ source: raster }) ], - view: new _ol_View_({ + view: new View({ extent: [-13675026, 4439648, -13580856, 4580292], center: [-13615645, 4497969], minZoom: 10, diff --git a/examples/side-by-side.js b/examples/side-by-side.js index 51f28def41..c346ef84fc 100644 --- a/examples/side-by-side.js +++ b/examples/side-by-side.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_has_ from '../src/ol/has.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -8,7 +8,7 @@ var layer = new TileLayer({ source: new _ol_source_OSM_() }); -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 1 }); diff --git a/examples/simple.js b/examples/simple.js index 4f83c069b6..d231e29a60 100644 --- a/examples/simple.js +++ b/examples/simple.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -11,7 +11,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/snap.js b/examples/snap.js index d80e5fcb65..fa535aef44 100644 --- a/examples/snap.js +++ b/examples/snap.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Draw from '../src/ol/interaction/Draw.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; @@ -39,7 +39,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 4 }) diff --git a/examples/sphere-mollweide.js b/examples/sphere-mollweide.js index 3c01d6c753..6e9b741647 100644 --- a/examples/sphere-mollweide.js +++ b/examples/sphere-mollweide.js @@ -1,6 +1,6 @@ import Graticule from '../src/ol/Graticule.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_proj_Projection_ from '../src/ol/proj/Projection.js'; @@ -33,7 +33,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], projection: sphereMollweideProjection, resolutions: [65536, 32768, 16384, 8192, 4096, 2048], diff --git a/examples/stamen.js b/examples/stamen.js index 77fa88d3fc..4015de5623 100644 --- a/examples/stamen.js +++ b/examples/stamen.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; @@ -19,7 +19,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: fromLonLat([-122.416667, 37.783333]), zoom: 12 }) diff --git a/examples/static-image.js b/examples/static-image.js index 27e24ccf32..8514da9ce9 100644 --- a/examples/static-image.js +++ b/examples/static-image.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import _ol_proj_Projection_ from '../src/ol/proj/Projection.js'; @@ -28,7 +28,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ projection: projection, center: _ol_extent_.getCenter(extent), zoom: 2, diff --git a/examples/street-labels.js b/examples/street-labels.js index 0d0d516856..766599a4e4 100644 --- a/examples/street-labels.js +++ b/examples/street-labels.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -39,7 +39,7 @@ var map = new Map({ } })], target: 'map', - view: new _ol_View_({ + view: new View({ extent: viewExtent, center: _ol_extent_.getCenter(viewExtent), zoom: 17, diff --git a/examples/symbol-atlas-webgl.js b/examples/symbol-atlas-webgl.js index fd65c7f9c1..fc07ae1bc6 100644 --- a/examples/symbol-atlas-webgl.js +++ b/examples/symbol-atlas-webgl.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -110,7 +110,7 @@ var map = new Map({ renderer: /** @type {Array} */ (['webgl', 'canvas']), layers: [vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 4 }) diff --git a/examples/synthetic-lines.js b/examples/synthetic-lines.js index 60d1775e84..0e7d9cc436 100644 --- a/examples/synthetic-lines.js +++ b/examples/synthetic-lines.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -49,7 +49,7 @@ var vector = new _ol_layer_Vector_({ }) }); -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 0 }); diff --git a/examples/synthetic-points.js b/examples/synthetic-points.js index 1d8841a491..9def020bb6 100644 --- a/examples/synthetic-points.js +++ b/examples/synthetic-points.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; import Point from '../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -54,7 +54,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/teleport.js b/examples/teleport.js index 2f295e9220..1b05f4f1be 100644 --- a/examples/teleport.js +++ b/examples/teleport.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -16,7 +16,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/tile-load-events.js b/examples/tile-load-events.js index eca8c96a9d..c4eb9eb0ce 100644 --- a/examples/tile-load-events.js +++ b/examples/tile-load-events.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; @@ -98,7 +98,7 @@ var map = new Map({ new TileLayer({source: source}) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/tile-transitions.js b/examples/tile-transitions.js index 63f06d4a31..be74646943 100644 --- a/examples/tile-transitions.js +++ b/examples/tile-transitions.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_XYZ_ from '../src/ol/source/XYZ.js'; @@ -17,7 +17,7 @@ var withoutTransition = new TileLayer({ var map = new Map({ layers: [withTransition, withoutTransition], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2, maxZoom: 11 diff --git a/examples/tilejson.js b/examples/tilejson.js index 2c0bb5dc80..6a3f5ed6e4 100644 --- a/examples/tilejson.js +++ b/examples/tilejson.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; @@ -14,7 +14,7 @@ var map = new Map({ }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/tileutfgrid.js b/examples/tileutfgrid.js index dd10accc1e..1612dfff49 100644 --- a/examples/tileutfgrid.js +++ b/examples/tileutfgrid.js @@ -1,6 +1,6 @@ import Map from '../src/ol/Map.js'; import _ol_Overlay_ from '../src/ol/Overlay.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; import _ol_source_TileUTFGrid_ from '../src/ol/source/TileUTFGrid.js'; @@ -20,7 +20,7 @@ var gridSource = new _ol_source_TileUTFGrid_({ var gridLayer = new TileLayer({source: gridSource}); -var view = new _ol_View_({ +var view = new View({ center: [0, 0], zoom: 1 }); diff --git a/examples/tissot.js b/examples/tissot.js index aa0627aff9..ab981ac3fe 100644 --- a/examples/tissot.js +++ b/examples/tissot.js @@ -1,6 +1,6 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {circular as circularPolygon} from '../src/ol/geom/Polygon.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -29,7 +29,7 @@ var map4326 = new Map({ vectorLayer4326 ], target: 'map4326', - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], zoom: 2 @@ -50,7 +50,7 @@ var map3857 = new Map({ vectorLayer3857 ], target: 'map3857', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/topojson.js b/examples/topojson.js index 2f032c2227..50688c3ba7 100644 --- a/examples/topojson.js +++ b/examples/topojson.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TopoJSON from '../src/ol/format/TopoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -42,7 +42,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/topolis.js b/examples/topolis.js index cf32a66267..ebf3b92268 100644 --- a/examples/topolis.js +++ b/examples/topolis.js @@ -3,7 +3,7 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import LineString from '../src/ol/geom/LineString.js'; import Polygon from '../src/ol/geom/Polygon.js'; @@ -98,7 +98,7 @@ var facesLayer = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, facesLayer, edgesLayer, nodesLayer], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-11000000, 4600000], zoom: 16 }) diff --git a/examples/translate-features.js b/examples/translate-features.js index ad160edb2f..c96af706d6 100644 --- a/examples/translate-features.js +++ b/examples/translate-features.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; @@ -31,7 +31,7 @@ var map = new Map({ interactions: defaultInteractions().extend([select, translate]), layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/examples/turf.js b/examples/turf.js index 367d56799d..259c608bb8 100644 --- a/examples/turf.js +++ b/examples/turf.js @@ -1,7 +1,7 @@ // NOCOMPILE // this example uses turf.js for which we don't have an externs file. import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -49,7 +49,7 @@ var rasterLayer = new TileLayer({ var map = new Map({ layers: [rasterLayer, vectorLayer], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: fromLonLat([126.980366, 37.526540]), zoom: 15 }) diff --git a/examples/vector-esri-edit.js b/examples/vector-esri-edit.js index 4bf81e81a8..9c76588381 100644 --- a/examples/vector-esri-edit.js +++ b/examples/vector-esri-edit.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import EsriJSON from '../src/ol/format/EsriJSON.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import Draw from '../src/ol/interaction/Draw.js'; @@ -80,7 +80,7 @@ var map = new Map({ interactions: defaultInteractions().extend([draw, select, modify]), layers: [raster, vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: fromLonLat([-122.619, 45.512]), zoom: 12 }) diff --git a/examples/vector-esri.js b/examples/vector-esri.js index 9527dcb48b..e99c868dee 100644 --- a/examples/vector-esri.js +++ b/examples/vector-esri.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import EsriJSON from '../src/ol/format/EsriJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -107,7 +107,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: fromLonLat([-97.6114, 38.8403]), zoom: 7 }) diff --git a/examples/vector-label-decluttering.js b/examples/vector-label-decluttering.js index a07cf3cbb0..87fae48081 100644 --- a/examples/vector-label-decluttering.js +++ b/examples/vector-label-decluttering.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -11,7 +11,7 @@ import _ol_style_Text_ from '../src/ol/style/Text.js'; var map = new Map({ target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/vector-labels.js b/examples/vector-labels.js index 7be75285db..c8fc5e4575 100644 --- a/examples/vector-labels.js +++ b/examples/vector-labels.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -199,7 +199,7 @@ var map = new Map({ vectorPoints ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [-8161939, 6095025], zoom: 8 }) diff --git a/examples/vector-layer.js b/examples/vector-layer.js index 8ee3e64083..238418af65 100644 --- a/examples/vector-layer.js +++ b/examples/vector-layer.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js'; @@ -43,7 +43,7 @@ var vectorLayer = new _ol_layer_Vector_({ var map = new Map({ layers: [vectorLayer], target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/vector-osm.js b/examples/vector-osm.js index 546a9d32d0..ed661558b3 100644 --- a/examples/vector-osm.js +++ b/examples/vector-osm.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import OSMXML from '../src/ol/format/OSMXML.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -130,7 +130,7 @@ map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [739218, 5906096], maxZoom: 19, zoom: 17 diff --git a/examples/vector-tile-info.js b/examples/vector-tile-info.js index 4f2f81f789..987e9363a0 100644 --- a/examples/vector-tile-info.js +++ b/examples/vector-tile-info.js @@ -1,12 +1,12 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; import _ol_layer_VectorTile_ from '../src/ol/layer/VectorTile.js'; import _ol_source_VectorTile_ from '../src/ol/source/VectorTile.js'; var map = new Map({ target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }), diff --git a/examples/vector-wfs-getfeature.js b/examples/vector-wfs-getfeature.js index 9374bac482..b77d5fcd5b 100644 --- a/examples/vector-wfs-getfeature.js +++ b/examples/vector-wfs-getfeature.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_format_filter_ from '../src/ol/format/filter.js'; import WFS from '../src/ol/format/WFS.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; @@ -32,7 +32,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [-8908887.277395891, 5381918.072437216], maxZoom: 19, zoom: 12 diff --git a/examples/vector-wfs.js b/examples/vector-wfs.js index 7cb0f376b1..eb62663647 100644 --- a/examples/vector-wfs.js +++ b/examples/vector-wfs.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -42,7 +42,7 @@ var raster = new TileLayer({ var map = new Map({ layers: [raster, vector], target: document.getElementById('map'), - view: new _ol_View_({ + view: new View({ center: [-8908887.277395891, 5381918.072437216], maxZoom: 19, zoom: 12 diff --git a/examples/wkt.js b/examples/wkt.js index 6b633535eb..49286bb622 100644 --- a/examples/wkt.js +++ b/examples/wkt.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import WKT from '../src/ol/format/WKT.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; @@ -30,7 +30,7 @@ var vector = new _ol_layer_Vector_({ var map = new Map({ layers: [raster, vector], target: 'map', - view: new _ol_View_({ + view: new View({ center: [2952104.0199, -3277504.823], zoom: 4 }) diff --git a/examples/wms-custom-proj.js b/examples/wms-custom-proj.js index b7db20a68e..f624f3241a 100644 --- a/examples/wms-custom-proj.js +++ b/examples/wms-custom-proj.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; 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'; @@ -77,7 +77,7 @@ var map = new Map({ ]), layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ projection: projection, center: transform([8.23, 46.86], 'EPSG:4326', 'EPSG:21781'), extent: extent, diff --git a/examples/wms-custom-tilegrid-512x256.js b/examples/wms-custom-tilegrid-512x256.js index b2584a75d9..18f32d668e 100644 --- a/examples/wms-custom-tilegrid-512x256.js +++ b/examples/wms-custom-tilegrid-512x256.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {get as getProjection} from '../src/ol/proj.js'; @@ -36,7 +36,7 @@ var layers = [ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [-10997148, 4569099], zoom: 4 }) diff --git a/examples/wms-image-custom-proj.js b/examples/wms-image-custom-proj.js index c989059f4e..39fe23f7ca 100644 --- a/examples/wms-image-custom-proj.js +++ b/examples/wms-image-custom-proj.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import ScaleLine from '../src/ol/control/ScaleLine.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; @@ -69,7 +69,7 @@ var map = new Map({ ]), layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ projection: projection, center: fromLonLat([8.23, 46.86], projection), extent: extent, diff --git a/examples/wms-image.js b/examples/wms-image.js index 0acba5342f..fb888764c3 100644 --- a/examples/wms-image.js +++ b/examples/wms-image.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_ImageWMS_ from '../src/ol/source/ImageWMS.js'; @@ -23,7 +23,7 @@ var layers = [ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [-10997148, 4569099], zoom: 4 }) diff --git a/examples/wms-no-proj.js b/examples/wms-no-proj.js index a304a1cca7..141747720a 100644 --- a/examples/wms-no-proj.js +++ b/examples/wms-no-proj.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_layer_Image_ from '../src/ol/layer/Image.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_proj_Projection_ from '../src/ol/proj/Projection.js'; @@ -45,7 +45,7 @@ var projection = new _ol_proj_Projection_({ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [660000, 190000], projection: projection, zoom: 9 diff --git a/examples/wms-tiled-wrap-180.js b/examples/wms-tiled-wrap-180.js index d6955ecf0d..59c615e95b 100644 --- a/examples/wms-tiled-wrap-180.js +++ b/examples/wms-tiled-wrap-180.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js'; @@ -20,7 +20,7 @@ var layers = [ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }) diff --git a/examples/wms-tiled.js b/examples/wms-tiled.js index 767fe2c61a..1a56f78873 100644 --- a/examples/wms-tiled.js +++ b/examples/wms-tiled.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js'; @@ -23,7 +23,7 @@ var layers = [ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: [-10997148, 4569099], zoom: 4 }) diff --git a/examples/wms-time.js b/examples/wms-time.js index e253c1c64e..56552a0bde 100644 --- a/examples/wms-time.js +++ b/examples/wms-time.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {transformExtent} from '../src/ol/proj.js'; @@ -33,7 +33,7 @@ var layers = [ var map = new Map({ layers: layers, target: 'map', - view: new _ol_View_({ + view: new View({ center: _ol_extent_.getCenter(extent), zoom: 4 }) diff --git a/examples/wmts-dimensions.js b/examples/wmts-dimensions.js index 6004e66d8f..b60b5163cc 100644 --- a/examples/wmts-dimensions.js +++ b/examples/wmts-dimensions.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {get as getProjection} from '../src/ol/proj.js'; @@ -45,7 +45,7 @@ var wmtsSource = new _ol_source_WMTS_({ var map = new Map({ target: 'map', - view: new _ol_View_({ + view: new View({ projection: projection, center: [-9871995, 3566245], zoom: 6 diff --git a/examples/wmts-hidpi.js b/examples/wmts-hidpi.js index db0b689f98..7e6f36f87c 100644 --- a/examples/wmts-hidpi.js +++ b/examples/wmts-hidpi.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_format_WMTSCapabilities_ from '../src/ol/format/WMTSCapabilities.js'; import _ol_has_ from '../src/ol/has.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -17,7 +17,7 @@ var tilePixelRatio = hiDPI ? 2 : 1; var map = new Map({ target: 'map', - view: new _ol_View_({ + view: new View({ center: [1823849, 6143760], zoom: 11 }) diff --git a/examples/wmts-ign.js b/examples/wmts-ign.js index 3ce1ab5ef6..f34b7d3225 100644 --- a/examples/wmts-ign.js +++ b/examples/wmts-ign.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -15,7 +15,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ zoom: 5, center: fromLonLat([5, 45]) }) diff --git a/examples/wmts-layer-from-capabilities.js b/examples/wmts-layer-from-capabilities.js index e316a9fdcb..96166034d9 100644 --- a/examples/wmts-layer-from-capabilities.js +++ b/examples/wmts-layer-from-capabilities.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import _ol_format_WMTSCapabilities_ from '../src/ol/format/WMTSCapabilities.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -29,7 +29,7 @@ fetch('data/WMTSCapabilities.xml').then(function(response) { }) ], target: 'map', - view: new _ol_View_({ + view: new View({ center: [19412406.33, -5050500.21], zoom: 5 }) diff --git a/examples/wmts.js b/examples/wmts.js index 4a6adfe0a9..c5d0da9f33 100644 --- a/examples/wmts.js +++ b/examples/wmts.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import {defaults as defaultControls} from '../src/ol/control.js'; import * as _ol_extent_ from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; @@ -53,7 +53,7 @@ var map = new Map({ collapsible: false } }), - view: new _ol_View_({ + view: new View({ center: [-11158582, 4813697], zoom: 4 }) diff --git a/examples/xyz-esri-4326-512.js b/examples/xyz-esri-4326-512.js index 57be2af393..1faef89d35 100644 --- a/examples/xyz-esri-4326-512.js +++ b/examples/xyz-esri-4326-512.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_XYZ_ from '../src/ol/source/XYZ.js'; @@ -27,7 +27,7 @@ var map = new Map({ }) }) ], - view: new _ol_View_({ + view: new View({ center: [0, 0], projection: 'EPSG:4326', zoom: 2, diff --git a/examples/xyz-esri.js b/examples/xyz-esri.js index 4405a7db4c..45e4d96032 100644 --- a/examples/xyz-esri.js +++ b/examples/xyz-esri.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {fromLonLat} from '../src/ol/proj.js'; import _ol_source_XYZ_ from '../src/ol/source/XYZ.js'; @@ -17,7 +17,7 @@ var map = new Map({ }) }) ], - view: new _ol_View_({ + view: new View({ center: fromLonLat([-121.1, 47.5]), zoom: 7 }) diff --git a/examples/xyz-retina.js b/examples/xyz-retina.js index 8130aa79f6..c93476b325 100644 --- a/examples/xyz-retina.js +++ b/examples/xyz-retina.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import {transform, transformExtent} from '../src/ol/proj.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -27,7 +27,7 @@ var map = new Map({ }) }) ], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:3857', center: transform([-112.18688965, 36.057944835], 'EPSG:4326', 'EPSG:3857'), diff --git a/examples/xyz.js b/examples/xyz.js index 3ead7f102f..f61e474aad 100644 --- a/examples/xyz.js +++ b/examples/xyz.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_XYZ_ from '../src/ol/source/XYZ.js'; @@ -14,7 +14,7 @@ var map = new Map({ }) }) ], - view: new _ol_View_({ + view: new View({ center: [-472202, 7530279], zoom: 12 }) diff --git a/examples/zoom-constrained.js b/examples/zoom-constrained.js index cba1f2ef63..4e3da82951 100644 --- a/examples/zoom-constrained.js +++ b/examples/zoom-constrained.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; @@ -14,7 +14,7 @@ var map = new Map({ }) }) ], - view: new _ol_View_({ + view: new View({ center: [-13553864, 5918250], zoom: 11, minZoom: 9, diff --git a/examples/zoomify.js b/examples/zoomify.js index 9424b58ed0..3dffeadac0 100644 --- a/examples/zoomify.js +++ b/examples/zoomify.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_Zoomify_ from '../src/ol/source/Zoomify.js'; @@ -23,7 +23,7 @@ var extent = [0, -imgHeight, imgWidth, 0]; var map = new Map({ layers: [layer], target: 'map', - view: new _ol_View_({ + view: new View({ // adjust zoom levels to those provided by the source resolutions: layer.getSource().getTileGrid().getResolutions(), // constrain the center: center cannot be set outside this extent diff --git a/examples/zoomslider.js b/examples/zoomslider.js index 3b571e2cad..c9603f5bfe 100644 --- a/examples/zoomslider.js +++ b/examples/zoomslider.js @@ -1,5 +1,5 @@ import Map from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; +import View from '../src/ol/View.js'; import ZoomSlider from '../src/ol/control/ZoomSlider.js'; import TileLayer from '../src/ol/layer/Tile.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js'; @@ -21,7 +21,7 @@ var createMap = function(divId) { map = new Map({ layers: [layer], target: divId, - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 2 }) diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index a7022c6997..94373030e3 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -13,7 +13,7 @@ import _ol_MapProperty_ from './MapProperty.js'; import _ol_Object_ from './Object.js'; import ObjectEventType from './ObjectEventType.js'; import TileQueue from './TileQueue.js'; -import _ol_View_ from './View.js'; +import View from './View.js'; import ViewHint from './ViewHint.js'; import {assert} from './asserts.js'; import {removeNode} from './dom.js'; @@ -1411,7 +1411,7 @@ function createOptionsInternal(options) { values[_ol_MapProperty_.TARGET] = options.target; values[_ol_MapProperty_.VIEW] = options.view !== undefined ? - options.view : new _ol_View_(); + options.view : new View(); /** * @type {Array.} diff --git a/src/ol/View.js b/src/ol/View.js index 99ae5c3500..879f204741 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -86,7 +86,7 @@ var DEFAULT_MIN_ZOOM = 0; * @param {olx.ViewOptions=} opt_options View options. * @api */ -var _ol_View_ = function(opt_options) { +var View = function(opt_options) { _ol_Object_.call(this); var options = _ol_obj_.assign({}, opt_options); @@ -121,14 +121,14 @@ var _ol_View_ = function(opt_options) { this.applyOptions_(options); }; -inherits(_ol_View_, _ol_Object_); +inherits(View, _ol_Object_); /** * Set up the view with the given options. * @param {olx.ViewOptions} options View options. */ -_ol_View_.prototype.applyOptions_ = function(options) { +View.prototype.applyOptions_ = function(options) { /** * @type {Object.} @@ -137,7 +137,7 @@ _ol_View_.prototype.applyOptions_ = function(options) { properties[ViewProperty.CENTER] = options.center !== undefined ? options.center : null; - var resolutionConstraintInfo = _ol_View_.createResolutionConstraint_( + var resolutionConstraintInfo = View.createResolutionConstraint_( options); /** @@ -170,9 +170,9 @@ _ol_View_.prototype.applyOptions_ = function(options) { */ this.minZoom_ = resolutionConstraintInfo.minZoom; - var centerConstraint = _ol_View_.createCenterConstraint_(options); + var centerConstraint = View.createCenterConstraint_(options); var resolutionConstraint = resolutionConstraintInfo.constraint; - var rotationConstraint = _ol_View_.createRotationConstraint_(options); + var rotationConstraint = View.createRotationConstraint_(options); /** * @private @@ -216,7 +216,7 @@ _ol_View_.prototype.applyOptions_ = function(options) { * @param {olx.ViewOptions} newOptions New options to be applied. * @return {olx.ViewOptions} New options updated with the current view state. */ -_ol_View_.prototype.getUpdatedOptions_ = function(newOptions) { +View.prototype.getUpdatedOptions_ = function(newOptions) { var options = _ol_obj_.assign({}, this.options_); // preserve resolution (or zoom) @@ -269,7 +269,7 @@ _ol_View_.prototype.getUpdatedOptions_ = function(newOptions) { * the animation completed without being cancelled. * @api */ -_ol_View_.prototype.animate = function(var_args) { +View.prototype.animate = function(var_args) { var animationCount = arguments.length; var callback; if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') { @@ -336,7 +336,7 @@ _ol_View_.prototype.animate = function(var_args) { animation.callback = callback; // check if animation is a no-op - if (_ol_View_.isNoopAnimation(animation)) { + if (View.isNoopAnimation(animation)) { animation.complete = true; // we still push it onto the series for callback handling } else { @@ -355,7 +355,7 @@ _ol_View_.prototype.animate = function(var_args) { * @return {boolean} The view is being animated. * @api */ -_ol_View_.prototype.getAnimating = function() { +View.prototype.getAnimating = function() { return this.hints_[ViewHint.ANIMATING] > 0; }; @@ -365,7 +365,7 @@ _ol_View_.prototype.getAnimating = function() { * @return {boolean} The view is being interacted with. * @api */ -_ol_View_.prototype.getInteracting = function() { +View.prototype.getInteracting = function() { return this.hints_[ViewHint.INTERACTING] > 0; }; @@ -374,7 +374,7 @@ _ol_View_.prototype.getInteracting = function() { * Cancel any ongoing animations. * @api */ -_ol_View_.prototype.cancelAnimations = function() { +View.prototype.cancelAnimations = function() { this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]); for (var i = 0, ii = this.animations_.length; i < ii; ++i) { var series = this.animations_[i]; @@ -388,7 +388,7 @@ _ol_View_.prototype.cancelAnimations = function() { /** * Update all animations. */ -_ol_View_.prototype.updateAnimations_ = function() { +View.prototype.updateAnimations_ = function() { if (this.updateAnimationKey_ !== undefined) { cancelAnimationFrame(this.updateAnimationKey_); this.updateAnimationKey_ = undefined; @@ -470,7 +470,7 @@ _ol_View_.prototype.updateAnimations_ = function() { * @param {ol.Coordinate} anchor Rotation anchor. * @return {ol.Coordinate|undefined} Center for rotation and anchor. */ -_ol_View_.prototype.calculateCenterRotate = function(rotation, anchor) { +View.prototype.calculateCenterRotate = function(rotation, anchor) { var center; var currentCenter = this.getCenter(); if (currentCenter !== undefined) { @@ -487,7 +487,7 @@ _ol_View_.prototype.calculateCenterRotate = function(rotation, anchor) { * @param {ol.Coordinate} anchor Zoom anchor. * @return {ol.Coordinate|undefined} Center for resolution and anchor. */ -_ol_View_.prototype.calculateCenterZoom = function(resolution, anchor) { +View.prototype.calculateCenterZoom = function(resolution, anchor) { var center; var currentCenter = this.getCenter(); var currentResolution = this.getResolution(); @@ -506,7 +506,7 @@ _ol_View_.prototype.calculateCenterZoom = function(resolution, anchor) { * @private * @return {ol.Size} Viewport size or `[100, 100]` when no viewport is found. */ -_ol_View_.prototype.getSizeFromViewport_ = function() { +View.prototype.getSizeFromViewport_ = function() { var size = [100, 100]; var selector = '.ol-viewport[data-view="' + getUid(this) + '"]'; var element = document.querySelector(selector); @@ -525,7 +525,7 @@ _ol_View_.prototype.getSizeFromViewport_ = function() { * @return {ol.Coordinate|undefined} Constrained center. * @api */ -_ol_View_.prototype.constrainCenter = function(center) { +View.prototype.constrainCenter = function(center) { return this.constraints_.center(center); }; @@ -538,7 +538,7 @@ _ol_View_.prototype.constrainCenter = function(center) { * @return {number|undefined} Constrained resolution. * @api */ -_ol_View_.prototype.constrainResolution = function( +View.prototype.constrainResolution = function( resolution, opt_delta, opt_direction) { var delta = opt_delta || 0; var direction = opt_direction || 0; @@ -553,7 +553,7 @@ _ol_View_.prototype.constrainResolution = function( * @return {number|undefined} Constrained rotation. * @api */ -_ol_View_.prototype.constrainRotation = function(rotation, opt_delta) { +View.prototype.constrainRotation = function(rotation, opt_delta) { var delta = opt_delta || 0; return this.constraints_.rotation(rotation, delta); }; @@ -565,7 +565,7 @@ _ol_View_.prototype.constrainRotation = function(rotation, opt_delta) { * @observable * @api */ -_ol_View_.prototype.getCenter = function() { +View.prototype.getCenter = function() { return ( /** @type {ol.Coordinate|undefined} */ this.get(ViewProperty.CENTER) ); @@ -575,7 +575,7 @@ _ol_View_.prototype.getCenter = function() { /** * @return {ol.Constraints} Constraints. */ -_ol_View_.prototype.getConstraints = function() { +View.prototype.getConstraints = function() { return this.constraints_; }; @@ -584,7 +584,7 @@ _ol_View_.prototype.getConstraints = function() { * @param {Array.=} opt_hints Destination array. * @return {Array.} Hint. */ -_ol_View_.prototype.getHints = function(opt_hints) { +View.prototype.getHints = function(opt_hints) { if (opt_hints !== undefined) { opt_hints[0] = this.hints_[0]; opt_hints[1] = this.hints_[1]; @@ -605,7 +605,7 @@ _ol_View_.prototype.getHints = function(opt_hints) { * @return {ol.Extent} Extent. * @api */ -_ol_View_.prototype.calculateExtent = function(opt_size) { +View.prototype.calculateExtent = function(opt_size) { var size = opt_size || this.getSizeFromViewport_(); var center = /** @type {!ol.Coordinate} */ (this.getCenter()); assert(center, 1); // The view center is not defined @@ -623,7 +623,7 @@ _ol_View_.prototype.calculateExtent = function(opt_size) { * @return {number} The maximum resolution of the view. * @api */ -_ol_View_.prototype.getMaxResolution = function() { +View.prototype.getMaxResolution = function() { return this.maxResolution_; }; @@ -633,7 +633,7 @@ _ol_View_.prototype.getMaxResolution = function() { * @return {number} The minimum resolution of the view. * @api */ -_ol_View_.prototype.getMinResolution = function() { +View.prototype.getMinResolution = function() { return this.minResolution_; }; @@ -643,7 +643,7 @@ _ol_View_.prototype.getMinResolution = function() { * @return {number} The maximum zoom level. * @api */ -_ol_View_.prototype.getMaxZoom = function() { +View.prototype.getMaxZoom = function() { return /** @type {number} */ (this.getZoomForResolution(this.minResolution_)); }; @@ -653,7 +653,7 @@ _ol_View_.prototype.getMaxZoom = function() { * @param {number} zoom The maximum zoom level. * @api */ -_ol_View_.prototype.setMaxZoom = function(zoom) { +View.prototype.setMaxZoom = function(zoom) { this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom})); }; @@ -663,7 +663,7 @@ _ol_View_.prototype.setMaxZoom = function(zoom) { * @return {number} The minimum zoom level. * @api */ -_ol_View_.prototype.getMinZoom = function() { +View.prototype.getMinZoom = function() { return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_)); }; @@ -673,7 +673,7 @@ _ol_View_.prototype.getMinZoom = function() { * @param {number} zoom The minimum zoom level. * @api */ -_ol_View_.prototype.setMinZoom = function(zoom) { +View.prototype.setMinZoom = function(zoom) { this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom})); }; @@ -683,7 +683,7 @@ _ol_View_.prototype.setMinZoom = function(zoom) { * @return {ol.proj.Projection} The projection of the view. * @api */ -_ol_View_.prototype.getProjection = function() { +View.prototype.getProjection = function() { return this.projection_; }; @@ -694,7 +694,7 @@ _ol_View_.prototype.getProjection = function() { * @observable * @api */ -_ol_View_.prototype.getResolution = function() { +View.prototype.getResolution = function() { return ( /** @type {number|undefined} */ this.get(ViewProperty.RESOLUTION) ); @@ -707,7 +707,7 @@ _ol_View_.prototype.getResolution = function() { * @return {Array.|undefined} The resolutions of the view. * @api */ -_ol_View_.prototype.getResolutions = function() { +View.prototype.getResolutions = function() { return this.resolutions_; }; @@ -720,7 +720,7 @@ _ol_View_.prototype.getResolutions = function() { * the given size. * @api */ -_ol_View_.prototype.getResolutionForExtent = function(extent, opt_size) { +View.prototype.getResolutionForExtent = function(extent, opt_size) { var size = opt_size || this.getSizeFromViewport_(); var xResolution = getWidth(extent) / size[0]; var yResolution = getHeight(extent) / size[1]; @@ -734,7 +734,7 @@ _ol_View_.prototype.getResolutionForExtent = function(extent, opt_size) { * @param {number=} opt_power Power. * @return {function(number): number} Resolution for value function. */ -_ol_View_.prototype.getResolutionForValueFunction = function(opt_power) { +View.prototype.getResolutionForValueFunction = function(opt_power) { var power = opt_power || 2; var maxResolution = this.maxResolution_; var minResolution = this.minResolution_; @@ -757,7 +757,7 @@ _ol_View_.prototype.getResolutionForValueFunction = function(opt_power) { * @observable * @api */ -_ol_View_.prototype.getRotation = function() { +View.prototype.getRotation = function() { return ( /** @type {number} */ this.get(ViewProperty.ROTATION) ); @@ -770,7 +770,7 @@ _ol_View_.prototype.getRotation = function() { * @param {number=} opt_power Power. * @return {function(number): number} Value for resolution function. */ -_ol_View_.prototype.getValueForResolutionFunction = function(opt_power) { +View.prototype.getValueForResolutionFunction = function(opt_power) { var power = opt_power || 2; var maxResolution = this.maxResolution_; var minResolution = this.minResolution_; @@ -791,7 +791,7 @@ _ol_View_.prototype.getValueForResolutionFunction = function(opt_power) { /** * @return {olx.ViewState} View state. */ -_ol_View_.prototype.getState = function() { +View.prototype.getState = function() { var center = /** @type {ol.Coordinate} */ (this.getCenter()); var projection = this.getProjection(); var resolution = /** @type {number} */ (this.getResolution()); @@ -813,7 +813,7 @@ _ol_View_.prototype.getState = function() { * @return {number|undefined} Zoom. * @api */ -_ol_View_.prototype.getZoom = function() { +View.prototype.getZoom = function() { var zoom; var resolution = this.getResolution(); if (resolution !== undefined) { @@ -829,7 +829,7 @@ _ol_View_.prototype.getZoom = function() { * @return {number|undefined} The zoom level for the provided resolution. * @api */ -_ol_View_.prototype.getZoomForResolution = function(resolution) { +View.prototype.getZoomForResolution = function(resolution) { var offset = this.minZoom_ || 0; var max, zoomFactor; if (this.resolutions_) { @@ -855,7 +855,7 @@ _ol_View_.prototype.getZoomForResolution = function(resolution) { * @return {number} The view resolution for the provided zoom level. * @api */ -_ol_View_.prototype.getResolutionForZoom = function(zoom) { +View.prototype.getResolutionForZoom = function(zoom) { return /** @type {number} */ (this.constrainResolution( this.maxResolution_, zoom - this.minZoom_, 0)); }; @@ -871,7 +871,7 @@ _ol_View_.prototype.getResolutionForZoom = function(zoom) { * @param {olx.view.FitOptions=} opt_options Options. * @api */ -_ol_View_.prototype.fit = function(geometryOrExtent, opt_options) { +View.prototype.fit = function(geometryOrExtent, opt_options) { var options = opt_options || {}; var size = options.size; if (!size) { @@ -974,7 +974,7 @@ _ol_View_.prototype.fit = function(geometryOrExtent, opt_options) { * @param {ol.Pixel} position Position on the view to center on. * @api */ -_ol_View_.prototype.centerOn = function(coordinate, size, position) { +View.prototype.centerOn = function(coordinate, size, position) { // calculate rotated position var rotation = this.getRotation(); var cosAngle = Math.cos(-rotation); @@ -997,7 +997,7 @@ _ol_View_.prototype.centerOn = function(coordinate, size, position) { /** * @return {boolean} Is defined. */ -_ol_View_.prototype.isDef = function() { +View.prototype.isDef = function() { return !!this.getCenter() && this.getResolution() !== undefined; }; @@ -1008,7 +1008,7 @@ _ol_View_.prototype.isDef = function() { * @param {ol.Coordinate=} opt_anchor The rotation center. * @api */ -_ol_View_.prototype.rotate = function(rotation, opt_anchor) { +View.prototype.rotate = function(rotation, opt_anchor) { if (opt_anchor !== undefined) { var center = this.calculateCenterRotate(rotation, opt_anchor); this.setCenter(center); @@ -1023,7 +1023,7 @@ _ol_View_.prototype.rotate = function(rotation, opt_anchor) { * @observable * @api */ -_ol_View_.prototype.setCenter = function(center) { +View.prototype.setCenter = function(center) { this.set(ViewProperty.CENTER, center); if (this.getAnimating()) { this.cancelAnimations(); @@ -1036,7 +1036,7 @@ _ol_View_.prototype.setCenter = function(center) { * @param {number} delta Delta. * @return {number} New value. */ -_ol_View_.prototype.setHint = function(hint, delta) { +View.prototype.setHint = function(hint, delta) { this.hints_[hint] += delta; this.changed(); return this.hints_[hint]; @@ -1049,7 +1049,7 @@ _ol_View_.prototype.setHint = function(hint, delta) { * @observable * @api */ -_ol_View_.prototype.setResolution = function(resolution) { +View.prototype.setResolution = function(resolution) { this.set(ViewProperty.RESOLUTION, resolution); if (this.getAnimating()) { this.cancelAnimations(); @@ -1063,7 +1063,7 @@ _ol_View_.prototype.setResolution = function(resolution) { * @observable * @api */ -_ol_View_.prototype.setRotation = function(rotation) { +View.prototype.setRotation = function(rotation) { this.set(ViewProperty.ROTATION, rotation); if (this.getAnimating()) { this.cancelAnimations(); @@ -1076,7 +1076,7 @@ _ol_View_.prototype.setRotation = function(rotation) { * @param {number} zoom Zoom level. * @api */ -_ol_View_.prototype.setZoom = function(zoom) { +View.prototype.setZoom = function(zoom) { this.setResolution(this.getResolutionForZoom(zoom)); }; @@ -1086,7 +1086,7 @@ _ol_View_.prototype.setZoom = function(zoom) { * @private * @return {ol.CenterConstraintType} The constraint. */ -_ol_View_.createCenterConstraint_ = function(options) { +View.createCenterConstraint_ = function(options) { if (options.extent !== undefined) { return CenterConstraint.createExtent(options.extent); } else { @@ -1101,7 +1101,7 @@ _ol_View_.createCenterConstraint_ = function(options) { * @return {{constraint: ol.ResolutionConstraintType, maxResolution: number, * minResolution: number, zoomFactor: number}} The constraint. */ -_ol_View_.createResolutionConstraint_ = function(options) { +View.createResolutionConstraint_ = function(options) { var resolutionConstraint; var maxResolution; var minResolution; @@ -1183,7 +1183,7 @@ _ol_View_.createResolutionConstraint_ = function(options) { * @param {olx.ViewOptions} options View options. * @return {ol.RotationConstraintType} Rotation constraint. */ -_ol_View_.createRotationConstraint_ = function(options) { +View.createRotationConstraint_ = function(options) { var enableRotation = options.enableRotation !== undefined ? options.enableRotation : true; if (enableRotation) { @@ -1208,7 +1208,7 @@ _ol_View_.createRotationConstraint_ = function(options) { * @param {ol.ViewAnimation} animation The animation. * @return {boolean} The animation involves no view change. */ -_ol_View_.isNoopAnimation = function(animation) { +View.isNoopAnimation = function(animation) { if (animation.sourceCenter && animation.targetCenter) { if (!_ol_coordinate_.equals(animation.sourceCenter, animation.targetCenter)) { return false; @@ -1222,4 +1222,4 @@ _ol_View_.isNoopAnimation = function(animation) { } return true; }; -export default _ol_View_; +export default View; diff --git a/test/rendering/ol/layer/clip.test.js b/test/rendering/ol/layer/clip.test.js index 72756f80f4..18ae355727 100644 --- a/test/rendering/ol/layer/clip.test.js +++ b/test/rendering/ol/layer/clip.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js'; import TileLayer from '../../../../src/ol/layer/Tile.js'; import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js'; @@ -41,7 +41,7 @@ describe('layer clipping', function() { map = new Map({ pixelRatio: 1, target: createMapDiv(256, 256), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }) diff --git a/test/rendering/ol/layer/image.test.js b/test/rendering/ol/layer/image.test.js index 1d44b466ae..94598343d6 100644 --- a/test/rendering/ol/layer/image.test.js +++ b/test/rendering/ol/layer/image.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import _ol_layer_Image_ from '../../../../src/ol/layer/Image.js'; import _ol_obj_ from '../../../../src/ol/obj.js'; import {get as getProjection, transform, transformExtent} from '../../../../src/ol/proj.js'; @@ -16,7 +16,7 @@ describe('ol.rendering.layer.Image', function() { pixelRatio: 1, target: createMapDiv(50, 50), renderer: renderer, - view: new _ol_View_({ + view: new View({ center: transform( [-122.416667, 37.783333], 'EPSG:4326', 'EPSG:3857'), zoom: 5 diff --git a/test/rendering/ol/layer/tile.test.js b/test/rendering/ol/layer/tile.test.js index 937b6eeaa5..237a5cb395 100644 --- a/test/rendering/ol/layer/tile.test.js +++ b/test/rendering/ol/layer/tile.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import * as _ol_extent_ from '../../../../src/ol/extent.js'; import Point from '../../../../src/ol/geom/Point.js'; import TileLayer from '../../../../src/ol/layer/Tile.js'; @@ -24,7 +24,7 @@ describe('ol.rendering.layer.Tile', function() { pixelRatio: opt_pixelRatio || 1, target: createMapDiv(size[0], size[1]), renderer: renderer, - view: new _ol_View_({ + view: new View({ center: opt_center !== undefined ? opt_center : transform( [-122.416667, 37.783333], 'EPSG:4326', 'EPSG:3857'), resolutions: opt_resolutions, diff --git a/test/rendering/ol/layer/vector.test.js b/test/rendering/ol/layer/vector.test.js index e4c0651027..b98f9a10f4 100644 --- a/test/rendering/ol/layer/vector.test.js +++ b/test/rendering/ol/layer/vector.test.js @@ -1,6 +1,6 @@ import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import GeoJSON from '../../../../src/ol/format/GeoJSON.js'; import Circle from '../../../../src/ol/geom/Circle.js'; import LineString from '../../../../src/ol/geom/LineString.js'; @@ -25,7 +25,7 @@ describe('ol.rendering.layer.Vector', function() { pixelRatio: 1, target: createMapDiv(80, 80), renderer: renderer, - view: new _ol_View_({ + view: new View({ center: center, zoom: 13 }) @@ -434,7 +434,7 @@ describe('ol.rendering.layer.Vector', function() { map2 = new Map({ pixelRatio: 1, target: createMapDiv(128, 128), - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }) @@ -514,7 +514,7 @@ describe('ol.rendering.layer.Vector', function() { renderBuffer: 0, source: src }); - var view = new _ol_View_({ + var view = new View({ center: [-9.5, 78], zoom: 2, projection: 'EPSG:4326' diff --git a/test/rendering/ol/layer/vectortile.test.js b/test/rendering/ol/layer/vectortile.test.js index 2dfbe7f6ec..9e0f2d1dde 100644 --- a/test/rendering/ol/layer/vectortile.test.js +++ b/test/rendering/ol/layer/vectortile.test.js @@ -1,6 +1,6 @@ import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import MVT from '../../../../src/ol/format/MVT.js'; import Point from '../../../../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; @@ -25,7 +25,7 @@ describe('ol.rendering.layer.VectorTile', function() { pixelRatio: opt_pixelRatio || 1, target: createMapDiv(size, size), renderer: renderer, - view: new _ol_View_({ + view: new View({ center: [1825927.7316762917, 6143091.089223046], zoom: 14 }) diff --git a/test/rendering/ol/map.test.js b/test/rendering/ol/map.test.js index af982fc4ab..e87fae31b9 100644 --- a/test/rendering/ol/map.test.js +++ b/test/rendering/ol/map.test.js @@ -1,7 +1,7 @@ import Feature from '../../../src/ol/Feature.js'; import Point from '../../../src/ol/geom/Point.js'; import Map from '../../../src/ol/Map.js'; -import _ol_View_ from '../../../src/ol/View.js'; +import 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'; @@ -23,7 +23,7 @@ describe('ol.rendering.Map', function() { target: createMapDiv(50, 50), renderer: renderer, layers: [vectorLayer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/rendering/ol/source/raster.test.js b/test/rendering/ol/source/raster.test.js index f5cf437b14..e429d6d847 100644 --- a/test/rendering/ol/source/raster.test.js +++ b/test/rendering/ol/source/raster.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import _ol_layer_Image_ from '../../../../src/ol/layer/Image.js'; import RasterSource from '../../../../src/ol/source/Raster.js'; import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js'; @@ -32,7 +32,7 @@ where('Uint8ClampedArray').describe('ol.rendering.source.Raster', function() { target: createMapDiv(200, 200), pixelRatio: pixelRatio, renderer: renderer, - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }) diff --git a/test/rendering/ol/source/tilewms.test.js b/test/rendering/ol/source/tilewms.test.js index d23e4a8600..ed655cea70 100644 --- a/test/rendering/ol/source/tilewms.test.js +++ b/test/rendering/ol/source/tilewms.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import TileLayer from '../../../../src/ol/layer/Tile.js'; import _ol_source_TileWMS_ from '../../../../src/ol/source/TileWMS.js'; @@ -29,7 +29,7 @@ describe('ol.rendering.source.TileWMS', function() { target: createMapDiv(200, 200), pixelRatio: pixelRatio, renderer: renderer, - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 5 }) diff --git a/test/rendering/ol/style/circle.test.js b/test/rendering/ol/style/circle.test.js index c707113026..1d205521b5 100644 --- a/test/rendering/ol/style/circle.test.js +++ b/test/rendering/ol/style/circle.test.js @@ -2,7 +2,7 @@ import Feature from '../../../../src/ol/Feature.js'; import Point from '../../../../src/ol/geom/Point.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; @@ -26,7 +26,7 @@ describe('ol.rendering.style.Circle', function() { target: createMapDiv(50, 50), renderer: renderer, layers: [vectorLayer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/rendering/ol/style/icon.test.js b/test/rendering/ol/style/icon.test.js index 1ae10b6066..0032b3d0a9 100644 --- a/test/rendering/ol/style/icon.test.js +++ b/test/rendering/ol/style/icon.test.js @@ -1,7 +1,7 @@ import Feature from '../../../../src/ol/Feature.js'; import Point from '../../../../src/ol/geom/Point.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js'; @@ -32,7 +32,7 @@ describe('ol.rendering.style.Icon', function() { target: createMapDiv(width ? width : 50, height ? height : 50), renderer: renderer, layers: [vectorLayer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/rendering/ol/style/linestring.test.js b/test/rendering/ol/style/linestring.test.js index 89557eff5d..0c29242005 100644 --- a/test/rendering/ol/style/linestring.test.js +++ b/test/rendering/ol/style/linestring.test.js @@ -1,7 +1,7 @@ import Feature from '../../../../src/ol/Feature.js'; import LineString from '../../../../src/ol/geom/LineString.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import _ol_style_Style_ from '../../../../src/ol/style/Style.js'; @@ -23,7 +23,7 @@ describe('ol.rendering.style.LineString', function() { target: createMapDiv(50, 50), renderer: renderer, layers: [vectorLayer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/rendering/ol/style/polygon.test.js b/test/rendering/ol/style/polygon.test.js index adbb930a7a..c042abfd07 100644 --- a/test/rendering/ol/style/polygon.test.js +++ b/test/rendering/ol/style/polygon.test.js @@ -1,7 +1,7 @@ import Feature from '../../../../src/ol/Feature.js'; import Polygon from '../../../../src/ol/geom/Polygon.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; @@ -26,7 +26,7 @@ describe('ol.rendering.style.Polygon', function() { target: createMapDiv(size, size), renderer: renderer, layers: [vectorLayer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/rendering/ol/style/regularshape.test.js b/test/rendering/ol/style/regularshape.test.js index 1809bc7e89..02094b3dca 100644 --- a/test/rendering/ol/style/regularshape.test.js +++ b/test/rendering/ol/style/regularshape.test.js @@ -1,7 +1,7 @@ import Feature from '../../../../src/ol/Feature.js'; import Point from '../../../../src/ol/geom/Point.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; @@ -25,7 +25,7 @@ describe('ol.rendering.style.RegularShape', function() { target: createMapDiv(50, 50), renderer: renderer, layers: [vectorLayer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/rendering/ol/style/text.test.js b/test/rendering/ol/style/text.test.js index 484f4aa4b2..a9819f90d1 100644 --- a/test/rendering/ol/style/text.test.js +++ b/test/rendering/ol/style/text.test.js @@ -5,7 +5,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 Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import _ol_style_Text_ from '../../../../src/ol/style/Text.js'; @@ -29,7 +29,7 @@ describe('ol.rendering.style.Text', function() { target: createMapDiv(200 / pixelRatio, 200 / pixelRatio), renderer: renderer, layers: [vectorLayer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/control/attribution.test.js b/test/spec/ol/control/attribution.test.js index 58adf01584..33ac587be7 100644 --- a/test/spec/ol/control/attribution.test.js +++ b/test/spec/ol/control/attribution.test.js @@ -1,6 +1,6 @@ import Map from '../../../../src/ol/Map.js'; import _ol_Tile_ from '../../../../src/ol/Tile.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Attribution from '../../../../src/ol/control/Attribution.js'; import TileLayer from '../../../../src/ol/layer/Tile.js'; import _ol_source_Tile_ from '../../../../src/ol/source/Tile.js'; @@ -42,7 +42,7 @@ describe('ol.control.Attribution', function() { }) }) ], - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }) diff --git a/test/spec/ol/control/overviewmap.test.js b/test/spec/ol/control/overviewmap.test.js index b88c13c256..8dd21efb02 100644 --- a/test/spec/ol/control/overviewmap.test.js +++ b/test/spec/ol/control/overviewmap.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Control from '../../../../src/ol/control/Control.js'; import OverviewMap from '../../../../src/ol/control/OverviewMap.js'; @@ -32,7 +32,7 @@ describe('ol.control.OverviewMap', function() { describe('setMap()', function() { it('keeps ovmap view rotation in sync with map view rotation', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: 0 @@ -54,7 +54,7 @@ describe('ol.control.OverviewMap', function() { var ovView = control.ovmap_.getView(); expect(ovView.getRotation()).to.be(0); - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: 0 @@ -68,7 +68,7 @@ describe('ol.control.OverviewMap', function() { var control = new OverviewMap(); var ovView = control.ovmap_.getView(); - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: 0 diff --git a/test/spec/ol/control/scaleline.test.js b/test/spec/ol/control/scaleline.test.js index 09bcef16b2..46e91db67e 100644 --- a/test/spec/ol/control/scaleline.test.js +++ b/test/spec/ol/control/scaleline.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.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'; @@ -91,7 +91,7 @@ describe('ol.control.ScaleLine', function() { expect(renderSpy.called).to.be(false); ctrl.setMap(map); expect(renderSpy.called).to.be(false); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0 })); @@ -108,7 +108,7 @@ describe('ol.control.ScaleLine', function() { render: renderSpy }); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0 })); @@ -125,7 +125,7 @@ describe('ol.control.ScaleLine', function() { render: renderSpy }); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0 })); @@ -143,7 +143,7 @@ describe('ol.control.ScaleLine', function() { var ctrl = new ScaleLine(); expect(ctrl.element.innerText).to.be(''); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0 })); @@ -173,7 +173,7 @@ describe('ol.control.ScaleLine', function() { describe('#setUnits', function() { it('triggers rerendering', function() { var ctrl = new ScaleLine(); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0 })); @@ -198,7 +198,7 @@ describe('ol.control.ScaleLine', function() { beforeEach(function(done) { ctrl = new ScaleLine(); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0 })); @@ -248,14 +248,14 @@ describe('ol.control.ScaleLine', function() { it('is rendered differently for different projections', function() { var ctrl = new ScaleLine(); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: fromLonLat([7, 52]), zoom: 2, projection: 'EPSG:3857' })); map.renderSync(); var innerHtml3857 = ctrl.element_.innerHTML; - map.setView(new _ol_View_({ + map.setView(new View({ center: [7, 52], zoom: 2, projection: 'EPSG:4326' @@ -268,7 +268,7 @@ describe('ol.control.ScaleLine', function() { it('Projection\'s metersPerUnit affect scale for non-degree units', function() { var ctrl = new ScaleLine(); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0, resolutions: [1], @@ -282,7 +282,7 @@ describe('ol.control.ScaleLine', function() { })); map.renderSync(); expect(ctrl.element_.innerText).to.be('100 m'); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: 0, resolutions: [1], @@ -305,7 +305,7 @@ describe('ol.control.ScaleLine', function() { it('is rendered differently at different latitudes for metric', function() { var ctrl = new ScaleLine(); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: fromLonLat([7, 0]), zoom: 2, projection: 'EPSG:4326' @@ -323,7 +323,7 @@ describe('ol.control.ScaleLine', function() { units: 'degrees' }); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: fromLonLat([7, 0]), zoom: 2, projection: 'EPSG:4326' @@ -363,7 +363,7 @@ describe('ol.control.ScaleLine', function() { minWidth: 10 }); ctrl.setMap(map); - map.setView(new _ol_View_({ + map.setView(new View({ center: [0, 0], zoom: currentZoom, maxZoom: currentZoom diff --git a/test/spec/ol/control/zoomslider.test.js b/test/spec/ol/control/zoomslider.test.js index 6ac48ccc17..37c45a5ab0 100644 --- a/test/spec/ol/control/zoomslider.test.js +++ b/test/spec/ol/control/zoomslider.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import ZoomSlider from '../../../../src/ol/control/ZoomSlider.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; @@ -91,7 +91,7 @@ describe('ol.control.ZoomSlider', function() { beforeEach(function() { map = new Map({ target: createMapDiv(500, 100), - view: new _ol_View_({ + view: new View({ center: [0, 0], resolutions: [16, 8, 4, 2, 1, 0.5, 0.25, 0.125, 0.0625] }) diff --git a/test/spec/ol/interaction/draganddrop.test.js b/test/spec/ol/interaction/draganddrop.test.js index ffd6d51be6..69858d0594 100644 --- a/test/spec/ol/interaction/draganddrop.test.js +++ b/test/spec/ol/interaction/draganddrop.test.js @@ -1,5 +1,5 @@ import {inherits} from '../../../../src/ol/index.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Event from '../../../../src/ol/events/Event.js'; import EventTarget from '../../../../src/ol/events/EventTarget.js'; import GeoJSON from '../../../../src/ol/format/GeoJSON.js'; @@ -16,7 +16,7 @@ where('FileReader').describe('ol.interaction.DragAndDrop', function() { return viewport; }, getView: function() { - return new _ol_View_(); + return new View(); } }; interaction = new DragAndDrop({ diff --git a/test/spec/ol/interaction/dragrotateandzoom.test.js b/test/spec/ol/interaction/dragrotateandzoom.test.js index b122b80066..246f4139fc 100644 --- a/test/spec/ol/interaction/dragrotateandzoom.test.js +++ b/test/spec/ol/interaction/dragrotateandzoom.test.js @@ -1,6 +1,6 @@ import Map from '../../../../src/ol/Map.js'; import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import DragRotateAndZoom from '../../../../src/ol/interaction/DragRotateAndZoom.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js'; import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; @@ -41,7 +41,7 @@ describe('ol.interaction.DragRotateAndZoom', function() { target: target, layers: [layer], interactions: [interaction], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 @@ -66,7 +66,7 @@ describe('ol.interaction.DragRotateAndZoom', function() { interaction.handleDragEvent_(event); expect(spy.callCount).to.be(1); expect(interaction.lastAngle_).to.be(-0.8308214428190254); - map.setView(new _ol_View_({ + map.setView(new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1, diff --git a/test/spec/ol/interaction/dragzoom.test.js b/test/spec/ol/interaction/dragzoom.test.js index 435824d9c7..17bc6b682b 100644 --- a/test/spec/ol/interaction/dragzoom.test.js +++ b/test/spec/ol/interaction/dragzoom.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import DragZoom from '../../../../src/ol/interaction/DragZoom.js'; @@ -29,7 +29,7 @@ describe('ol.interaction.DragZoom', function() { map = new Map({ target: target, layers: [layer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/interaction/draw.test.js b/test/spec/ol/interaction/draw.test.js index 828ca6920d..337115373a 100644 --- a/test/spec/ol/interaction/draw.test.js +++ b/test/spec/ol/interaction/draw.test.js @@ -1,7 +1,7 @@ import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import {equals} from '../../../../src/ol/array.js'; import _ol_events_ from '../../../../src/ol/events.js'; import _ol_events_condition_ from '../../../../src/ol/events/condition.js'; @@ -39,7 +39,7 @@ describe('ol.interaction.Draw', function() { map = new Map({ target: target, layers: [layer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/interaction/extent.test.js b/test/spec/ol/interaction/extent.test.js index dfdb6b8d81..31c9278223 100644 --- a/test/spec/ol/interaction/extent.test.js +++ b/test/spec/ol/interaction/extent.test.js @@ -1,6 +1,6 @@ import Map from '../../../../src/ol/Map.js'; import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import _ol_interaction_Extent_ from '../../../../src/ol/interaction/Extent.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; @@ -16,7 +16,7 @@ describe('ol.interaction.Extent', function() { map = new Map({ target: target, layers: [], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/interaction/interaction.test.js b/test/spec/ol/interaction/interaction.test.js index 743d2f65bf..e04cc5ac54 100644 --- a/test/spec/ol/interaction/interaction.test.js +++ b/test/spec/ol/interaction/interaction.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import EventTarget from '../../../../src/ol/events/EventTarget.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js'; @@ -59,7 +59,7 @@ describe('ol.interaction.Interaction', function() { describe('zoomByDelta()', function() { it('changes view resolution', function() { - var view = new _ol_View_({ + var view = new View({ resolution: 1, resolutions: [4, 2, 1, 0.5, 0.25] }); @@ -78,7 +78,7 @@ describe('ol.interaction.Interaction', function() { }); it('changes view resolution and center relative to the anchor', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], resolution: 1, resolutions: [4, 2, 1, 0.5, 0.25] @@ -98,7 +98,7 @@ describe('ol.interaction.Interaction', function() { }); it('changes view resolution and center relative to the anchor, while respecting the extent', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], extent: [-2.5, -2.5, 2.5, 2.5], resolution: 1, diff --git a/test/spec/ol/interaction/keyboardpan.test.js b/test/spec/ol/interaction/keyboardpan.test.js index 2250cb94be..8ff5bb24dd 100644 --- a/test/spec/ol/interaction/keyboardpan.test.js +++ b/test/spec/ol/interaction/keyboardpan.test.js @@ -1,6 +1,6 @@ import Map from '../../../../src/ol/Map.js'; import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Event from '../../../../src/ol/events/Event.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js'; @@ -10,7 +10,7 @@ describe('ol.interaction.KeyboardPan', function() { beforeEach(function() { map = new Map({ target: createMapDiv(100, 100), - view: new _ol_View_({ + view: new View({ center: [0, 0], resolutions: [1], zoom: 0 diff --git a/test/spec/ol/interaction/keyboardzoom.test.js b/test/spec/ol/interaction/keyboardzoom.test.js index 23c9b67f1c..02fcfde877 100644 --- a/test/spec/ol/interaction/keyboardzoom.test.js +++ b/test/spec/ol/interaction/keyboardzoom.test.js @@ -1,6 +1,6 @@ import Map from '../../../../src/ol/Map.js'; import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Event from '../../../../src/ol/events/Event.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js'; @@ -10,7 +10,7 @@ describe('ol.interaction.KeyboardZoom', function() { beforeEach(function() { map = new Map({ target: createMapDiv(100, 100), - view: new _ol_View_({ + view: new View({ center: [0, 0], resolutions: [1], zoom: 0 diff --git a/test/spec/ol/interaction/modify.test.js b/test/spec/ol/interaction/modify.test.js index cafa389469..167a94bc05 100644 --- a/test/spec/ol/interaction/modify.test.js +++ b/test/spec/ol/interaction/modify.test.js @@ -2,7 +2,7 @@ import _ol_Collection_ from '../../../../src/ol/Collection.js'; import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import _ol_events_ from '../../../../src/ol/events.js'; import _ol_events_condition_ from '../../../../src/ol/events/condition.js'; import Circle from '../../../../src/ol/geom/Circle.js'; @@ -50,7 +50,7 @@ describe('ol.interaction.Modify', function() { map = new Map({ target: target, layers: [layer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/interaction/mousewheelzoom.test.js b/test/spec/ol/interaction/mousewheelzoom.test.js index 2f401b17d1..07caf65ad6 100644 --- a/test/spec/ol/interaction/mousewheelzoom.test.js +++ b/test/spec/ol/interaction/mousewheelzoom.test.js @@ -1,6 +1,6 @@ import Map from '../../../../src/ol/Map.js'; import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Event from '../../../../src/ol/events/Event.js'; import _ol_has_ from '../../../../src/ol/has.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js'; @@ -15,7 +15,7 @@ describe('ol.interaction.MouseWheelZoom', function() { map = new Map({ target: createMapDiv(100, 100), interactions: [interaction], - view: new _ol_View_({ + view: new View({ center: [0, 0], resolutions: [2, 1, 0.5], zoom: 1 diff --git a/test/spec/ol/interaction/select.test.js b/test/spec/ol/interaction/select.test.js index 0836b17cda..4fa928061b 100644 --- a/test/spec/ol/interaction/select.test.js +++ b/test/spec/ol/interaction/select.test.js @@ -3,7 +3,7 @@ import Feature from '../../../../src/ol/Feature.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'; +import View from '../../../../src/ol/View.js'; import Polygon from '../../../../src/ol/geom/Polygon.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js'; import _ol_interaction_Select_ from '../../../../src/ol/interaction/Select.js'; @@ -62,7 +62,7 @@ describe('ol.interaction.Select', function() { map = new Map({ target: target, layers: [layer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/interaction/snap.test.js b/test/spec/ol/interaction/snap.test.js index 42dc1b0332..f8b5b48a35 100644 --- a/test/spec/ol/interaction/snap.test.js +++ b/test/spec/ol/interaction/snap.test.js @@ -1,7 +1,7 @@ import _ol_Collection_ from '../../../../src/ol/Collection.js'; import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Circle from '../../../../src/ol/geom/Circle.js'; import Point from '../../../../src/ol/geom/Point.js'; import LineString from '../../../../src/ol/geom/LineString.js'; @@ -38,7 +38,7 @@ describe('ol.interaction.Snap', function() { map = new Map({ target: target, - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/interaction/translate.test.js b/test/spec/ol/interaction/translate.test.js index 6cf9cdd8e6..e8d43cc775 100644 --- a/test/spec/ol/interaction/translate.test.js +++ b/test/spec/ol/interaction/translate.test.js @@ -2,7 +2,7 @@ import _ol_Collection_ from '../../../../src/ol/Collection.js'; import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Point from '../../../../src/ol/geom/Point.js'; import _ol_interaction_Translate_ from '../../../../src/ol/interaction/Translate.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js'; @@ -37,7 +37,7 @@ describe('ol.interaction.Translate', function() { map = new Map({ target: target, layers: [layer], - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/map.test.js b/test/spec/ol/map.test.js index 870ea45ff4..cb6596de88 100644 --- a/test/spec/ol/map.test.js +++ b/test/spec/ol/map.test.js @@ -2,7 +2,7 @@ import Feature from '../../../src/ol/Feature.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'; +import View from '../../../src/ol/View.js'; import LineString from '../../../src/ol/geom/LineString.js'; import _ol_has_ from '../../../src/ol/has.js'; import {defaults as defaultInteractions} from '../../../src/ol/interaction.js'; @@ -117,7 +117,7 @@ describe('ol.Map', function() { style.height = '180px'; document.body.appendChild(target); - view = new _ol_View_({ + view = new View({ projection: 'EPSG:4326' }); map = new Map({ @@ -200,7 +200,7 @@ describe('ol.Map', function() { features: [new Feature(new LineString([[-50, 0], [50, 0]]))] }) })], - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 17 }) @@ -273,7 +273,7 @@ describe('ol.Map', function() { map = new Map({ target: target, - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 1 }), @@ -328,7 +328,7 @@ describe('ol.Map', function() { document.body.appendChild(target); map = new Map({ target: target, - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 @@ -608,7 +608,7 @@ describe('ol.Map', function() { document.body.appendChild(target); map = new Map({ target: target, - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/overlay.test.js b/test/spec/ol/overlay.test.js index 9c8bd619c0..1663c45a33 100644 --- a/test/spec/ol/overlay.test.js +++ b/test/spec/ol/overlay.test.js @@ -1,6 +1,6 @@ import Map from '../../../src/ol/Map.js'; import Overlay from '../../../src/ol/Overlay.js'; -import _ol_View_ from '../../../src/ol/View.js'; +import View from '../../../src/ol/View.js'; describe('ol.Overlay', function() { @@ -22,7 +22,7 @@ describe('ol.Overlay', function() { map = new Map({ target: target, - view: new _ol_View_({ + view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 diff --git a/test/spec/ol/render/box.test.js b/test/spec/ol/render/box.test.js index 291aca824e..1206a2a9d9 100644 --- a/test/spec/ol/render/box.test.js +++ b/test/spec/ol/render/box.test.js @@ -1,6 +1,6 @@ import Disposable from '../../../../src/ol/Disposable.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Polygon from '../../../../src/ol/geom/Polygon.js'; import _ol_render_Box_ from '../../../../src/ol/render/Box.js'; @@ -17,7 +17,7 @@ describe('ol.render.Box', function() { map = new Map({ target: target, - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }) diff --git a/test/spec/ol/renderer/canvas/imagelayer.test.js b/test/spec/ol/renderer/canvas/imagelayer.test.js index 17bd6e6ec1..60cd740e0e 100644 --- a/test/spec/ol/renderer/canvas/imagelayer.test.js +++ b/test/spec/ol/renderer/canvas/imagelayer.test.js @@ -1,5 +1,5 @@ import Map from '../../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../../src/ol/View.js'; +import 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'; import _ol_source_ImageStatic_ from '../../../../../src/ol/source/ImageStatic.js'; @@ -31,7 +31,7 @@ describe('ol.renderer.canvas.ImageLayer', function() { layers: [new _ol_layer_Image_({ source: source })], - view: new _ol_View_({ + view: new View({ projection: projection, center: [10, 10], zoom: 2, diff --git a/test/spec/ol/renderer/canvas/map.test.js b/test/spec/ol/renderer/canvas/map.test.js index a07fb5b7b3..9c97a95bc1 100644 --- a/test/spec/ol/renderer/canvas/map.test.js +++ b/test/spec/ol/renderer/canvas/map.test.js @@ -1,7 +1,7 @@ import {getUid} from '../../../../../src/ol/index.js'; import Feature from '../../../../../src/ol/Feature.js'; import Map from '../../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../../src/ol/View.js'; +import View from '../../../../../src/ol/View.js'; import Point from '../../../../../src/ol/geom/Point.js'; import TileLayer from '../../../../../src/ol/layer/Tile.js'; import _ol_layer_Vector_ from '../../../../../src/ol/layer/Vector.js'; @@ -37,7 +37,7 @@ describe('ol.renderer.canvas.Map', function() { map = new Map({ pixelRatio: 1, target: target, - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }) diff --git a/test/spec/ol/renderer/canvas/tilelayer.test.js b/test/spec/ol/renderer/canvas/tilelayer.test.js index 07f167eff3..48d36689ab 100644 --- a/test/spec/ol/renderer/canvas/tilelayer.test.js +++ b/test/spec/ol/renderer/canvas/tilelayer.test.js @@ -1,5 +1,5 @@ import Map from '../../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../../src/ol/View.js'; +import View from '../../../../../src/ol/View.js'; import TileLayer from '../../../../../src/ol/layer/Tile.js'; import {get as getProjection} from '../../../../../src/ol/proj.js'; import _ol_renderer_Map_ from '../../../../../src/ol/renderer/Map.js'; @@ -32,7 +32,7 @@ describe('ol.renderer.canvas.TileLayer', function() { layers: [new TileLayer({ source: source })], - view: new _ol_View_({ + view: new View({ zoom: 0, center: [0, 0] }) diff --git a/test/spec/ol/renderer/canvas/vectorlayer.test.js b/test/spec/ol/renderer/canvas/vectorlayer.test.js index c64dbe0f83..62f87ad664 100644 --- a/test/spec/ol/renderer/canvas/vectorlayer.test.js +++ b/test/spec/ol/renderer/canvas/vectorlayer.test.js @@ -1,7 +1,7 @@ import {getUid} from '../../../../../src/ol/index.js'; import Feature from '../../../../../src/ol/Feature.js'; import Map from '../../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../../src/ol/View.js'; +import View from '../../../../../src/ol/View.js'; import * as _ol_extent_ from '../../../../../src/ol/extent.js'; import Point from '../../../../../src/ol/geom/Point.js'; import _ol_layer_Vector_ from '../../../../../src/ol/layer/Vector.js'; @@ -50,7 +50,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { target.style.height = '256px'; document.body.appendChild(target); var map = new Map({ - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }), @@ -87,7 +87,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 Map({ - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }), @@ -118,7 +118,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 Map({ - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }), @@ -150,7 +150,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { _ol_obj_.clear(_ol_render_canvas_.checkedFonts_); head.appendChild(font); var map = new Map({ - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }), diff --git a/test/spec/ol/renderer/canvas/vectortilelayer.test.js b/test/spec/ol/renderer/canvas/vectortilelayer.test.js index ddfc38dafb..d9ccd4a973 100644 --- a/test/spec/ol/renderer/canvas/vectortilelayer.test.js +++ b/test/spec/ol/renderer/canvas/vectortilelayer.test.js @@ -5,7 +5,7 @@ import Map from '../../../../../src/ol/Map.js'; import TileState from '../../../../../src/ol/TileState.js'; import VectorImageTile from '../../../../../src/ol/VectorImageTile.js'; import VectorTile from '../../../../../src/ol/VectorTile.js'; -import _ol_View_ from '../../../../../src/ol/View.js'; +import View from '../../../../../src/ol/View.js'; import * as _ol_extent_ from '../../../../../src/ol/extent.js'; import MVT from '../../../../../src/ol/format/MVT.js'; import Point from '../../../../../src/ol/geom/Point.js'; @@ -39,7 +39,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() { target.style.height = '256px'; document.body.appendChild(target); map = new Map({ - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }), @@ -363,7 +363,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() { source: source }) ], - view: new _ol_View_({ + view: new View({ center: _ol_extent_.getCenter(extent), zoom: 19 }) diff --git a/test/spec/ol/renderer/layer.test.js b/test/spec/ol/renderer/layer.test.js index 3a9a936850..81d12fa9c0 100644 --- a/test/spec/ol/renderer/layer.test.js +++ b/test/spec/ol/renderer/layer.test.js @@ -1,6 +1,6 @@ import _ol_Image_ from '../../../../src/ol/Image.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import _ol_layer_Layer_ from '../../../../src/ol/layer/Layer.js'; import TileLayer from '../../../../src/ol/layer/Tile.js'; import _ol_renderer_Layer_ from '../../../../src/ol/renderer/Layer.js'; @@ -98,7 +98,7 @@ describe('ol.renderer.Layer', function() { }); document.body.appendChild(target); - view = new _ol_View_({ + view = new View({ center: [0, 0], zoom: 0 }); diff --git a/test/spec/ol/source/raster.test.js b/test/spec/ol/source/raster.test.js index 4e5da06f77..bb1525b921 100644 --- a/test/spec/ol/source/raster.test.js +++ b/test/spec/ol/source/raster.test.js @@ -1,6 +1,6 @@ import Map from '../../../../src/ol/Map.js'; import TileState from '../../../../src/ol/TileState.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import 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'; import _ol_source_ImageStatic_ from '../../../../src/ol/source/ImageStatic.js'; @@ -60,7 +60,7 @@ where('Uint8ClampedArray').describe('ol.source.Raster', function() { map = new Map({ target: target, - view: new _ol_View_({ + view: new View({ resolutions: [1], projection: new _ol_proj_Projection_({ code: 'image', @@ -325,7 +325,7 @@ where('Uint8ClampedArray').describe('ol.source.Raster', function() { map2 = new Map({ target: target, - view: new _ol_View_({ + view: new View({ center: [0, 0], zoom: 0 }), diff --git a/test/spec/ol/source/vector.test.js b/test/spec/ol/source/vector.test.js index 3cc9656bbb..2dde702af9 100644 --- a/test/spec/ol/source/vector.test.js +++ b/test/spec/ol/source/vector.test.js @@ -2,7 +2,7 @@ import _ol_events_ from '../../../../src/ol/events.js'; import _ol_Collection_ from '../../../../src/ol/Collection.js'; import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import Point from '../../../../src/ol/geom/Point.js'; import LineString from '../../../../src/ol/geom/LineString.js'; import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; @@ -445,7 +445,7 @@ describe('ol.source.Vector', function() { source: source }) ], - view: new _ol_View_({ + view: new View({ center: fromLonLat(center), zoom: 7 }) diff --git a/test/spec/ol/source/vectortile.test.js b/test/spec/ol/source/vectortile.test.js index efd38bfab6..9ab209658b 100644 --- a/test/spec/ol/source/vectortile.test.js +++ b/test/spec/ol/source/vectortile.test.js @@ -1,5 +1,5 @@ import Map from '../../../../src/ol/Map.js'; -import _ol_View_ from '../../../../src/ol/View.js'; +import View from '../../../../src/ol/View.js'; import VectorImageTile from '../../../../src/ol/VectorImageTile.js'; import VectorTile from '../../../../src/ol/VectorTile.js'; import MVT from '../../../../src/ol/format/MVT.js'; @@ -117,7 +117,7 @@ describe('ol.source.VectorTile', function() { }) ], target: target, - view: new _ol_View_({ + view: new View({ zoom: 11, center: [666373.1624999996, 7034265.3572] }) diff --git a/test/spec/ol/view.test.js b/test/spec/ol/view.test.js index a66cedf9f2..f179e89b5c 100644 --- a/test/spec/ol/view.test.js +++ b/test/spec/ol/view.test.js @@ -1,5 +1,5 @@ import Map from '../../../src/ol/Map.js'; -import _ol_View_ from '../../../src/ol/View.js'; +import View from '../../../src/ol/View.js'; import ViewHint from '../../../src/ol/ViewHint.js'; import * as _ol_extent_ from '../../../src/ol/extent.js'; import Circle from '../../../src/ol/geom/Circle.js'; @@ -12,11 +12,11 @@ describe('ol.View', function() { var view; beforeEach(function() { - view = new _ol_View_(); + view = new View(); }); it('creates an instance', function() { - expect(view).to.be.a(_ol_View_); + expect(view).to.be.a(View); }); it('provides default rotation', function() { @@ -32,7 +32,7 @@ describe('ol.View', function() { describe('with no options', function() { it('gives a correct center constraint function', function() { var options = {}; - var fn = _ol_View_.createCenterConstraint_(options); + var fn = View.createCenterConstraint_(options); expect(fn([0, 0])).to.eql([0, 0]); expect(fn(undefined)).to.eql(undefined); expect(fn([42, -100])).to.eql([42, -100]); @@ -44,7 +44,7 @@ describe('ol.View', function() { var options = { extent: [0, 0, 1, 1] }; - var fn = _ol_View_.createCenterConstraint_(options); + var fn = View.createCenterConstraint_(options); expect(fn([0, 0])).to.eql([0, 0]); expect(fn([-10, 0])).to.eql([0, 0]); expect(fn([100, 100])).to.eql([1, 1]); @@ -58,7 +58,7 @@ describe('ol.View', function() { describe('with no options', function() { it('gives a correct resolution constraint function', function() { var options = {}; - var fn = _ol_View_.createResolutionConstraint_(options).constraint; + var fn = View.createResolutionConstraint_(options).constraint; expect(fn(156543.03392804097, 0, 0)) .to.roughlyEqual(156543.03392804097, 1e-9); expect(fn(78271.51696402048, 0, 0)) @@ -74,7 +74,7 @@ describe('ol.View', function() { maxZoom: 3, zoomFactor: 3 }; - var info = _ol_View_.createResolutionConstraint_(options); + var info = View.createResolutionConstraint_(options); var maxResolution = info.maxResolution; expect(maxResolution).to.eql(81); var minResolution = info.minResolution; @@ -94,7 +94,7 @@ describe('ol.View', function() { var options = { resolutions: [97, 76, 65, 54, 0.45] }; - var info = _ol_View_.createResolutionConstraint_(options); + var info = View.createResolutionConstraint_(options); var maxResolution = info.maxResolution; expect(maxResolution).to.eql(97); var minResolution = info.minResolution; @@ -112,7 +112,7 @@ describe('ol.View', function() { var defaultMaxRes = 156543.03392804097; function getConstraint(options) { - return _ol_View_.createResolutionConstraint_(options).constraint; + return View.createResolutionConstraint_(options).constraint; } it('works with only maxZoom', function() { @@ -179,7 +179,7 @@ describe('ol.View', function() { var defaultMaxRes = 156543.03392804097; function getConstraint(options) { - return _ol_View_.createResolutionConstraint_(options).constraint; + return View.createResolutionConstraint_(options).constraint; } it('works with only maxResolution', function() { @@ -248,7 +248,7 @@ describe('ol.View', function() { var defaultMaxRes = 156543.03392804097; function getConstraint(options) { - return _ol_View_.createResolutionConstraint_(options).constraint; + return View.createResolutionConstraint_(options).constraint; } it('respects maxResolution over minZoom', function() { @@ -292,7 +292,7 @@ describe('ol.View', function() { describe('create rotation constraint', function() { it('gives a correct rotation constraint function', function() { var options = {}; - var fn = _ol_View_.createRotationConstraint_(options); + var fn = View.createRotationConstraint_(options); expect(fn(0.01, 0)).to.eql(0); expect(fn(0.15, 0)).to.eql(0.15); }); @@ -303,7 +303,7 @@ describe('ol.View', function() { describe('#setHint()', function() { it('changes a view hint', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -317,7 +317,7 @@ describe('ol.View', function() { }); it('triggers the change event', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -335,7 +335,7 @@ describe('ol.View', function() { describe('#getUpdatedOptions_()', function() { it('applies minZoom to constructor options', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], minZoom: 2, zoom: 10 @@ -348,7 +348,7 @@ describe('ol.View', function() { }); it('applies the current zoom', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 10 }); @@ -360,7 +360,7 @@ describe('ol.View', function() { }); it('applies the current resolution if resolution was originally supplied', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], resolution: 1000 }); @@ -372,7 +372,7 @@ describe('ol.View', function() { }); it('applies the current center', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 10 }); @@ -384,7 +384,7 @@ describe('ol.View', function() { }); it('applies the current rotation', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 10 }); @@ -418,7 +418,7 @@ describe('ol.View', function() { }); it('can be called to animate view properties', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 5 }); @@ -438,7 +438,7 @@ describe('ol.View', function() { }); it('allows duration to be zero', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 5 }); @@ -457,7 +457,7 @@ describe('ol.View', function() { }); it('immediately completes for no-op animations', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 5 }); @@ -471,7 +471,7 @@ describe('ol.View', function() { }); it('immediately completes if view is not defined before', function() { - var view = new _ol_View_(); + var view = new View(); var center = [1, 2]; var zoom = 3; var rotation = 0.4; @@ -489,7 +489,7 @@ describe('ol.View', function() { }); it('sets final animation state if view is not defined before', function() { - var view = new _ol_View_(); + var view = new View(); var center = [1, 2]; var zoom = 3; @@ -514,7 +514,7 @@ describe('ol.View', function() { }); it('prefers zoom over resolution', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 5 }); @@ -532,7 +532,7 @@ describe('ol.View', function() { it('avoids going under minResolution', function(done) { var maxZoom = 14; - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, maxZoom: maxZoom @@ -551,7 +551,7 @@ describe('ol.View', function() { }); it('takes the shortest arc to the target rotation', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: Math.PI / 180 * 1 @@ -566,7 +566,7 @@ describe('ol.View', function() { }); it('normalizes rotation to angles between -180 and 180 degrees after the anmiation', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: Math.PI / 180 * 1 @@ -581,7 +581,7 @@ describe('ol.View', function() { }); it('calls a callback when animation completes', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -596,7 +596,7 @@ describe('ol.View', function() { }); it('calls callback with false when animation is interrupted', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -613,7 +613,7 @@ describe('ol.View', function() { }); it('calls a callback even if animation is a no-op', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -628,7 +628,7 @@ describe('ol.View', function() { }); it('calls a callback if view is not defined before', function(done) { - var view = new _ol_View_(); + var view = new View(); view.animate({ zoom: 10, @@ -641,7 +641,7 @@ describe('ol.View', function() { }); it('can run multiple animations in series', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -670,7 +670,7 @@ describe('ol.View', function() { }); it('properly sets the ANIMATING hint', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: 0 @@ -705,7 +705,7 @@ describe('ol.View', function() { }); it('clears the ANIMATING hint when animations are cancelled', function() { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: 0 @@ -737,7 +737,7 @@ describe('ol.View', function() { it('completes multiple staggered animations run in parallel', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -770,7 +770,7 @@ describe('ol.View', function() { it('completes complex animation using resolution', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], resolution: 2 }); @@ -841,7 +841,7 @@ describe('ol.View', function() { }); it('cancels a currently running animation', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: 0 @@ -863,7 +863,7 @@ describe('ol.View', function() { }); it('cancels a multiple animations', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0, rotation: 0 @@ -893,7 +893,7 @@ describe('ol.View', function() { }); it('calls callbacks with false to indicate animations did not complete', function(done) { - var view = new _ol_View_({ + var view = new View({ center: [0, 0], zoom: 0 }); @@ -920,14 +920,14 @@ describe('ol.View', function() { var resolutions = [512, 256, 128, 64, 32, 16]; it('returns correct resolutions', function() { - view = new _ol_View_({ + view = new View({ resolutions: resolutions }); expect(view.getResolutions()).to.be(resolutions); }); it('returns resolutions as undefined', function() { - view = new _ol_View_(); + view = new View(); expect(view.getResolutions()).to.be(undefined); }); }); @@ -935,7 +935,7 @@ describe('ol.View', function() { describe('#getZoom', function() { var view; beforeEach(function() { - view = new _ol_View_({ + view = new View({ resolutions: [512, 256, 128, 64, 32, 16] }); }); @@ -967,7 +967,7 @@ describe('ol.View', function() { }); it('works for resolution arrays with variable zoom factors', function() { - var view = new _ol_View_({ + var view = new View({ resolutions: [10, 5, 2, 1] }); @@ -991,7 +991,7 @@ describe('ol.View', function() { describe('#getZoom() - constrained', function() { it('returns correct zoom levels', function() { - var view = new _ol_View_({ + var view = new View({ minZoom: 10, maxZoom: 20 }); @@ -1020,7 +1020,7 @@ describe('ol.View', function() { it('gives maxResolution precedence over minZoom', function() { - var view = new _ol_View_({ + var view = new View({ maxResolution: 100, minZoom: 2 // this should get ignored }); @@ -1036,7 +1036,7 @@ describe('ol.View', function() { describe('#getZoomForResolution', function() { it('returns correct zoom levels', function() { - var view = new _ol_View_(); + var view = new View(); var max = view.getMaxResolution(); expect(view.getZoomForResolution(max)).to.be(0); @@ -1049,7 +1049,7 @@ describe('ol.View', function() { }); it('returns correct zoom levels for specifically configured resolutions', function() { - var view = new _ol_View_({ + var view = new View({ resolutions: [10, 8, 6, 4, 2] }); @@ -1069,7 +1069,7 @@ describe('ol.View', function() { describe('#getResolutionForZoom', function() { it('returns correct zoom resolution', function() { - var view = new _ol_View_(); + var view = new View(); var max = view.getMaxZoom(); var min = view.getMinZoom(); @@ -1078,7 +1078,7 @@ describe('ol.View', function() { }); it('returns correct zoom levels for specifically configured resolutions', function() { - var view = new _ol_View_({ + var view = new View({ resolutions: [10, 8, 6, 4, 2] }); @@ -1094,12 +1094,12 @@ describe('ol.View', function() { describe('#getMaxZoom', function() { it('returns the zoom level for the min resolution', function() { - var view = new _ol_View_(); + var view = new View(); expect(view.getMaxZoom()).to.be(view.getZoomForResolution(view.getMinResolution())); }); it('works for a view configured with a maxZoom', function() { - var view = new _ol_View_({ + var view = new View({ maxZoom: 10 }); expect(view.getMaxZoom()).to.be(10); @@ -1110,12 +1110,12 @@ describe('ol.View', function() { describe('#getMinZoom', function() { it('returns the zoom level for the max resolution', function() { - var view = new _ol_View_(); + var view = new View(); expect(view.getMinZoom()).to.be(view.getZoomForResolution(view.getMaxResolution())); }); it('works for views configured with a minZoom', function() { - var view = new _ol_View_({ + var view = new View({ minZoom: 3 }); expect(view.getMinZoom()).to.be(3); @@ -1126,7 +1126,7 @@ describe('ol.View', function() { describe('#setMaxZoom', function() { describe('with resolutions property in view', function() { it('changes the zoom level when the level is over max zoom', function() { - var view = new _ol_View_({ + var view = new View({ resolutions: [100000, 50000, 25000, 12500, 6250, 3125], zoom: 4 }); @@ -1138,7 +1138,7 @@ describe('ol.View', function() { describe('with no resolutions property in view', function() { it('changes the zoom level when the level is over max zoom', function() { - var view = new _ol_View_({ + var view = new View({ zoom: 4 }); @@ -1151,7 +1151,7 @@ describe('ol.View', function() { describe('#setMinZoom', function() { describe('with resolutions property in view', function() { it('changes the zoom level when the level is under min zoom', function() { - var view = new _ol_View_({ + var view = new View({ resolutions: [100000, 50000, 25000, 12500, 6250, 3125], zoom: 4 }); @@ -1163,7 +1163,7 @@ describe('ol.View', function() { describe('with no resolutions property in view', function() { it('changes the zoom level when the level is under min zoom', function() { - var view = new _ol_View_({ + var view = new View({ zoom: 4 }); @@ -1175,7 +1175,7 @@ describe('ol.View', function() { describe('#calculateExtent', function() { it('returns the expected extent', function() { - var view = new _ol_View_({ + var view = new View({ resolutions: [512], zoom: 0, center: [0, 0] @@ -1188,7 +1188,7 @@ describe('ol.View', function() { expect(extent[3]).to.be(51200); }); it('returns the expected extent with rotation', function() { - var view = new _ol_View_({ + var view = new View({ resolutions: [512], zoom: 0, center: [0, 0], @@ -1244,7 +1244,7 @@ describe('ol.View', function() { var view; beforeEach(function() { - view = new _ol_View_({ + view = new View({ center: [0, 0], resolutions: [200, 100, 50, 20, 10, 5, 2, 1], zoom: 5 @@ -1370,7 +1370,7 @@ describe('ol.View', function() { describe('centerOn', function() { var view; beforeEach(function() { - view = new _ol_View_({ + view = new View({ resolutions: [200, 100, 50, 20, 10, 5, 2, 1] }); }); @@ -1460,7 +1460,7 @@ describe('ol.View.isNoopAnimation()', function() { cases.forEach(function(c, i) { it('works for case ' + i, function() { - var noop = _ol_View_.isNoopAnimation(c.animation); + var noop = View.isNoopAnimation(c.animation); expect(noop).to.equal(c.noop); }); });