From 9d8609dd08c0992a321c5793c5b4b307e7e439a8 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 26 Nov 2019 10:25:50 +0000 Subject: [PATCH 001/636] Modify and snap to circle in user coordinates Correct modify interaction at center and at drawn circle circumference Correct snap interaction at drawn circle circumference Test circle geometry in a user projection --- src/ol/interaction/Modify.js | 47 +++++++-- src/ol/interaction/Snap.js | 22 +++- test/spec/ol/interaction/modify.test.js | 128 +++++++++++++++++++++++- test/spec/ol/interaction/snap.test.js | 27 ++++- 4 files changed, 210 insertions(+), 14 deletions(-) diff --git a/src/ol/interaction/Modify.js b/src/ol/interaction/Modify.js index fe81a771ee..dffdf8e707 100644 --- a/src/ol/interaction/Modify.js +++ b/src/ol/interaction/Modify.js @@ -14,13 +14,14 @@ import {always, primaryAction, altKeyOnly, singleClick} from '../events/conditio import {boundingExtent, buffer as bufferExtent, createOrUpdateFromCoordinate as createExtent} from '../extent.js'; import GeometryType from '../geom/GeometryType.js'; import Point from '../geom/Point.js'; +import {fromCircle} from '../geom/Polygon.js'; import PointerInteraction from './Pointer.js'; import VectorLayer from '../layer/Vector.js'; import VectorSource from '../source/Vector.js'; import VectorEventType from '../source/VectorEventType.js'; import RBush from '../structs/RBush.js'; import {createEditingStyle} from '../style/Style.js'; -import {fromUserExtent, toUserExtent, fromUserCoordinate, toUserCoordinate} from '../proj.js'; +import {getUserProjection, fromUserExtent, toUserExtent, fromUserCoordinate, toUserCoordinate} from '../proj.js'; /** @@ -657,7 +658,14 @@ class Modify extends PointerInteraction { centerSegmentData.featureSegments = featureSegments; circumferenceSegmentData.featureSegments = featureSegments; this.rBush_.insert(createExtent(coordinates), centerSegmentData); - this.rBush_.insert(geometry.getExtent(), circumferenceSegmentData); + let circleGeometry = /** @type {import("../geom/Geometry.js").default} */ (geometry); + const userProjection = getUserProjection(); + if (userProjection && this.getMap()) { + const projection = this.getMap().getView().getProjection(); + circleGeometry = circleGeometry.clone().transform(userProjection, projection); + circleGeometry = fromCircle(/** @type {import("../geom/Circle.js").default} */ (circleGeometry)).transform(projection, userProjection); + } + this.rBush_.insert(circleGeometry.getExtent(), circumferenceSegmentData); } /** @@ -785,7 +793,16 @@ class Modify extends PointerInteraction { this.changingFeature_ = false; } else { // We're dragging the circle's circumference: this.changingFeature_ = true; - geometry.setRadius(coordinateDistance(geometry.getCenter(), vertex)); + const projection = evt.map.getView().getProjection(); + let radius = coordinateDistance(fromUserCoordinate(geometry.getCenter(), projection), + fromUserCoordinate(vertex, projection)); + const userProjection = getUserProjection(); + if (userProjection) { + const circleGeometry = geometry.clone().transform(userProjection, projection); + circleGeometry.setRadius(radius); + radius = circleGeometry.transform(projection, userProjection).getRadius(); + } + geometry.setRadius(radius); this.changingFeature_ = false; } break; @@ -898,7 +915,14 @@ class Modify extends PointerInteraction { circumferenceSegmentData.segment[0] = coordinates; circumferenceSegmentData.segment[1] = coordinates; this.rBush_.update(createExtent(coordinates), centerSegmentData); - this.rBush_.update(geometry.getExtent(), circumferenceSegmentData); + let circleGeometry = geometry; + const userProjection = getUserProjection(); + if (userProjection) { + const projection = evt.map.getView().getProjection(); + circleGeometry = circleGeometry.clone().transform(userProjection, projection); + circleGeometry = fromCircle(circleGeometry).transform(projection, userProjection); + } + this.rBush_.update(circleGeometry.getExtent(), circumferenceSegmentData); } else { this.rBush_.update(boundingExtent(segmentData.segment), segmentData); } @@ -1249,11 +1273,15 @@ function projectedDistanceToSegmentDataSquared(pointCoordinates, segmentData, pr const geometry = segmentData.geometry; if (geometry.getType() === GeometryType.CIRCLE) { - const circleGeometry = /** @type {import("../geom/Circle.js").default} */ (geometry); + let circleGeometry = /** @type {import("../geom/Circle.js").default} */ (geometry); if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) { + const userProjection = getUserProjection(); + if (userProjection) { + circleGeometry = /** @type {import("../geom/Circle.js").default} */ (circleGeometry.clone().transform(userProjection, projection)); + } const distanceToCenterSquared = - squaredCoordinateDistance(circleGeometry.getCenter(), pointCoordinates); + squaredCoordinateDistance(circleGeometry.getCenter(), fromUserCoordinate(pointCoordinates, projection)); const distanceToCircumference = Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius(); return distanceToCircumference * distanceToCircumference; @@ -1280,7 +1308,12 @@ function closestOnSegmentData(pointCoordinates, segmentData, projection) { const geometry = segmentData.geometry; if (geometry.getType() === GeometryType.CIRCLE && segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) { - return geometry.getClosestPoint(pointCoordinates); + let circleGeometry = /** @type {import("../geom/Circle.js").default} */ (geometry); + const userProjection = getUserProjection(); + if (userProjection) { + circleGeometry = /** @type {import("../geom/Circle.js").default} */ (circleGeometry.clone().transform(userProjection, projection)); + } + return toUserCoordinate(circleGeometry.getClosestPoint(fromUserCoordinate(pointCoordinates, projection)), projection); } const coordinate = fromUserCoordinate(pointCoordinates, projection); tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection); diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index 8cf720768a..61a5a1c6de 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -14,7 +14,7 @@ import PointerInteraction from './Pointer.js'; import {getValues} from '../obj.js'; import VectorEventType from '../source/VectorEventType.js'; import RBush from '../structs/RBush.js'; -import {fromUserCoordinate, toUserCoordinate} from '../proj.js'; +import {getUserProjection, fromUserCoordinate, toUserCoordinate} from '../proj.js'; /** @@ -431,8 +431,13 @@ class Snap extends PointerInteraction { } else if (this.edge_) { const isCircle = closestSegmentData.feature.getGeometry().getType() === GeometryType.CIRCLE; if (isCircle) { - vertex = closestOnCircle(pixelCoordinate, - /** @type {import("../geom/Circle.js").default} */ (closestSegmentData.feature.getGeometry())); + let circleGeometry = closestSegmentData.feature.getGeometry(); + const userProjection = getUserProjection(); + if (userProjection) { + circleGeometry = circleGeometry.clone().transform(userProjection, projection); + } + vertex = toUserCoordinate(closestOnCircle(projectedCoordinate, + /** @type {import("../geom/Circle.js").default} */ (circleGeometry)), projection); } else { tempSegment[0] = fromUserCoordinate(closestSegment[0], projection); tempSegment[1] = fromUserCoordinate(closestSegment[1], projection); @@ -482,7 +487,16 @@ class Snap extends PointerInteraction { * @private */ writeCircleGeometry_(feature, geometry) { - const polygon = fromCircle(geometry); + const projection = this.getMap().getView().getProjection(); + let circleGeometry = geometry; + const userProjection = getUserProjection(); + if (userProjection) { + circleGeometry = /** @type {import("../geom/Circle.js").default} */ (circleGeometry.clone().transform(userProjection, projection)); + } + const polygon = fromCircle(circleGeometry); + if (userProjection) { + polygon.transform(projection, userProjection); + } const coordinates = polygon.getCoordinates()[0]; for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) { const segment = coordinates.slice(i, i + 2); diff --git a/test/spec/ol/interaction/modify.test.js b/test/spec/ol/interaction/modify.test.js index 7deae8d5d7..d8b8cccfb0 100644 --- a/test/spec/ol/interaction/modify.test.js +++ b/test/spec/ol/interaction/modify.test.js @@ -14,6 +14,7 @@ import VectorLayer from '../../../../src/ol/layer/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js'; import Event from '../../../../src/ol/events/Event.js'; import {getValues} from '../../../../src/ol/obj.js'; +import {clearUserProjection, setUserProjection} from '../../../../src/ol/proj.js'; describe('ol.interaction.Modify', function() { @@ -66,6 +67,7 @@ describe('ol.interaction.Modify', function() { afterEach(function() { map.dispose(); document.body.removeChild(target); + clearUserProjection(); }); /** @@ -401,7 +403,7 @@ describe('ol.interaction.Modify', function() { expect(circleFeature.getGeometry().getRadius()).to.equal(20); expect(circleFeature.getGeometry().getCenter()).to.eql([5, 5]); - // Increase radius + // Increase radius along x axis simulateEvent('pointermove', 25, -4, null, 0); simulateEvent('pointerdown', 25, -4, null, 0); simulateEvent('pointermove', 30, -5, null, 0); @@ -410,6 +412,64 @@ describe('ol.interaction.Modify', function() { expect(circleFeature.getGeometry().getRadius()).to.equal(25); expect(circleFeature.getGeometry().getCenter()).to.eql([5, 5]); + + // Increase radius along y axis + simulateEvent('pointermove', 4, -30, null, 0); + simulateEvent('pointerdown', 4, -30, null, 0); + simulateEvent('pointermove', 5, -35, null, 0); + simulateEvent('pointerdrag', 5, -35, null, 0); + simulateEvent('pointerup', 5, -35, null, 0); + + expect(circleFeature.getGeometry().getRadius()).to.equal(30); + expect(circleFeature.getGeometry().getCenter()).to.eql([5, 5]); + }); + + it('changes the circle radius and center in a user projection', function() { + const userProjection = 'EPSG:3857'; + setUserProjection(userProjection); + const viewProjection = map.getView().getProjection(); + + const circleFeature = new Feature(new Circle([10, 10], 20).transform(viewProjection, userProjection)); + features.length = 0; + features.push(circleFeature); + + const modify = new Modify({ + features: new Collection(features) + }); + map.addInteraction(modify); + + // Change center + simulateEvent('pointermove', 10, -10, null, 0); + simulateEvent('pointerdown', 10, -10, null, 0); + simulateEvent('pointermove', 5, -5, null, 0); + simulateEvent('pointerdrag', 5, -5, null, 0); + simulateEvent('pointerup', 5, -5, null, 0); + + const geometry1 = circleFeature.getGeometry().clone().transform(userProjection, viewProjection); + expect(geometry1.getRadius()).to.roughlyEqual(20, 1e-9); + expect(geometry1.getCenter()).to.eql([5, 5]); + + // Increase radius along x axis + simulateEvent('pointermove', 25, -4, null, 0); + simulateEvent('pointerdown', 25, -4, null, 0); + simulateEvent('pointermove', 30, -5, null, 0); + simulateEvent('pointerdrag', 30, -5, null, 0); + simulateEvent('pointerup', 30, -5, null, 0); + + const geometry2 = circleFeature.getGeometry().clone().transform(userProjection, viewProjection); + expect(geometry2.getRadius()).to.roughlyEqual(25, 1e-9); + expect(geometry2.getCenter()).to.eql([5, 5]); + + // Increase radius along y axis + simulateEvent('pointermove', 4, -30, null, 0); + simulateEvent('pointerdown', 4, -30, null, 0); + simulateEvent('pointermove', 5, -35, null, 0); + simulateEvent('pointerdrag', 5, -35, null, 0); + simulateEvent('pointerup', 5, -35, null, 0); + + const geometry3 = circleFeature.getGeometry().clone().transform(userProjection, viewProjection); + expect(geometry3.getRadius()).to.roughlyEqual(30, 1e-9); + expect(geometry3.getCenter()).to.eql([5, 5]); }); }); @@ -765,7 +825,7 @@ describe('ol.interaction.Modify', function() { expect(circleFeature.getGeometry().getRadius()).to.equal(20); expect(circleFeature.getGeometry().getCenter()).to.eql([5, 5]); - // Increase radius + // Increase radius along x axis simulateEvent('pointermove', 25, -4, null, 0); simulateEvent('pointerdown', 25, -4, null, 0); simulateEvent('pointermove', 30, -5, null, 0); @@ -774,6 +834,70 @@ describe('ol.interaction.Modify', function() { expect(circleFeature.getGeometry().getRadius()).to.equal(25); expect(circleFeature.getGeometry().getCenter()).to.eql([5, 5]); + + // Increase radius along y axis + simulateEvent('pointermove', 4, -30, null, 0); + simulateEvent('pointerdown', 4, -30, null, 0); + simulateEvent('pointermove', 5, -35, null, 0); + simulateEvent('pointerdrag', 5, -35, null, 0); + simulateEvent('pointerup', 5, -35, null, 0); + + expect(circleFeature.getGeometry().getRadius()).to.equal(30); + expect(circleFeature.getGeometry().getCenter()).to.eql([5, 5]); + }); + + it('changes the circle radius and center in a user projection', function() { + const userProjection = 'EPSG:3857'; + setUserProjection(userProjection); + const viewProjection = map.getView().getProjection(); + + const circleFeature = new Feature(new Circle([10, 10], 20).transform(viewProjection, userProjection)); + features.length = 0; + features.push(circleFeature); + + const modify = new Modify({ + features: new Collection(features) + }); + map.addInteraction(modify); + + const snap = new Snap({ + features: new Collection(features), + pixelTolerance: 1 + }); + map.addInteraction(snap); + + // Change center + simulateEvent('pointermove', 10, -10, null, 0); + simulateEvent('pointerdown', 10, -10, null, 0); + simulateEvent('pointermove', 5, -5, null, 0); + simulateEvent('pointerdrag', 5, -5, null, 0); + simulateEvent('pointerup', 5, -5, null, 0); + + const geometry1 = circleFeature.getGeometry().clone().transform(userProjection, viewProjection); + expect(geometry1.getRadius()).to.roughlyEqual(20, 1e-9); + expect(geometry1.getCenter()).to.eql([5, 5]); + + // Increase radius along x axis + simulateEvent('pointermove', 25, -4, null, 0); + simulateEvent('pointerdown', 25, -4, null, 0); + simulateEvent('pointermove', 30, -5, null, 0); + simulateEvent('pointerdrag', 30, -5, null, 0); + simulateEvent('pointerup', 30, -5, null, 0); + + const geometry2 = circleFeature.getGeometry().clone().transform(userProjection, viewProjection); + expect(geometry2.getRadius()).to.roughlyEqual(25, 1e-9); + expect(geometry2.getCenter()).to.eql([5, 5]); + + // Increase radius along y axis + simulateEvent('pointermove', 4, -30, null, 0); + simulateEvent('pointerdown', 4, -30, null, 0); + simulateEvent('pointermove', 5, -35, null, 0); + simulateEvent('pointerdrag', 5, -35, null, 0); + simulateEvent('pointerup', 5, -35, null, 0); + + const geometry3 = circleFeature.getGeometry().clone().transform(userProjection, viewProjection); + expect(geometry3.getRadius()).to.roughlyEqual(30, 1e-9); + expect(geometry3.getCenter()).to.eql([5, 5]); }); }); diff --git a/test/spec/ol/interaction/snap.test.js b/test/spec/ol/interaction/snap.test.js index 329cd08172..7db59f177b 100644 --- a/test/spec/ol/interaction/snap.test.js +++ b/test/spec/ol/interaction/snap.test.js @@ -6,7 +6,7 @@ import Circle from '../../../../src/ol/geom/Circle.js'; import Point from '../../../../src/ol/geom/Point.js'; import LineString from '../../../../src/ol/geom/LineString.js'; import Snap from '../../../../src/ol/interaction/Snap.js'; -import {useGeographic, clearUserProjection} from '../../../../src/ol/proj.js'; +import {useGeographic, clearUserProjection, setUserProjection, transform} from '../../../../src/ol/proj.js'; import {overrideRAF} from '../../util.js'; @@ -55,6 +55,7 @@ describe('ol.interaction.Snap', function() { afterEach(function() { map.dispose(); document.body.removeChild(target); + clearUserProjection(); }); it('can handle XYZ coordinates', function() { @@ -129,6 +130,30 @@ describe('ol.interaction.Snap', function() { expect(event.coordinate[1]).to.roughlyEqual(Math.sin(Math.PI / 4) * 10, 1e-10); }); + it('snaps to circle in a user projection', function() { + const userProjection = 'EPSG:3857'; + setUserProjection(userProjection); + const viewProjection = map.getView().getProjection(); + + const circle = new Feature(new Circle([0, 0], 10).transform(viewProjection, userProjection)); + const snapInteraction = new Snap({ + features: new Collection([circle]), + pixelTolerance: 5 + }); + snapInteraction.setMap(map); + + const event = { + pixel: [5 + width / 2, height / 2 - 5], + coordinate: transform([5, 5], viewProjection, userProjection), + map: map + }; + snapInteraction.handleEvent(event); + + const coordinate = transform([Math.sin(Math.PI / 4) * 10, Math.sin(Math.PI / 4) * 10], viewProjection, userProjection); + expect(event.coordinate[0]).to.roughlyEqual(coordinate[0], 1e-10); + expect(event.coordinate[1]).to.roughlyEqual(coordinate[1], 1e-10); + }); + it('handle feature without geometry', function() { const feature = new Feature(); const snapInteraction = new Snap({ From 560931e9763cf990cae16083e6707b1ef8b35aec Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sun, 15 Dec 2019 23:24:07 +0000 Subject: [PATCH 002/636] Set reprojection canvas context options Add example of disabling image smoothing Add test for reprojection context options --- examples/disable-image-smoothing.css | 15 +++ examples/disable-image-smoothing.html | 47 +++++++ examples/disable-image-smoothing.js | 115 ++++++++++++++++++ .../expected.png | Bin 0 -> 2404 bytes .../reproj-tile-disable-smoothing/main.js | 39 ++++++ src/ol/reproj.js | 6 +- src/ol/reproj/Tile.js | 14 ++- src/ol/source/BingMaps.js | 3 + src/ol/source/IIIF.js | 3 + src/ol/source/OSM.js | 5 +- src/ol/source/Stamen.js | 3 + src/ol/source/TileArcGISRest.js | 3 + src/ol/source/TileImage.js | 10 +- src/ol/source/TileJSON.js | 3 + src/ol/source/TileWMS.js | 3 + src/ol/source/WMTS.js | 3 + src/ol/source/XYZ.js | 3 + src/ol/source/Zoomify.js | 3 + 18 files changed, 272 insertions(+), 6 deletions(-) create mode 100644 examples/disable-image-smoothing.css create mode 100644 examples/disable-image-smoothing.html create mode 100644 examples/disable-image-smoothing.js create mode 100644 rendering/cases/reproj-tile-disable-smoothing/expected.png create mode 100644 rendering/cases/reproj-tile-disable-smoothing/main.js diff --git a/examples/disable-image-smoothing.css b/examples/disable-image-smoothing.css new file mode 100644 index 0000000000..db58102d58 --- /dev/null +++ b/examples/disable-image-smoothing.css @@ -0,0 +1,15 @@ +@media (min-width: 800px) { + .wrapper { + display: flex; + } + .half { + padding: 0 10px; + width: 50%; + float: left; + } +} +#opacity { + display: inline-block; + width: 150px; + vertical-align: text-bottom; +} diff --git a/examples/disable-image-smoothing.html b/examples/disable-image-smoothing.html new file mode 100644 index 0000000000..3d67e435fb --- /dev/null +++ b/examples/disable-image-smoothing.html @@ -0,0 +1,47 @@ +--- +layout: example.html +title: Disable Image Smoothing +shortdesc: Example of disabling image smoothing +docs: > + Example of disabling image smoothing when using raster DEM (digital elevation model) data. + The imageSmoothingEnabled (or for Internet Explorer msImageSmoothingEnabled) canvas + context property is set to false at the layer's prerender event. Additionally for a + reprojected source those properties must also be also be specified for the canvas contexts used in + the reprojection via the source's reprojectionContextOptions option. Elevation data is + calculated from the pixel value returned by forEachLayerAtPixel. For comparison a second map + with smoothing enabled returns inaccuate elevations which are very noticeable close to 3107 meters + due to how elevation is calculated from the pixel value. +tags: "disable image smoothing, xyz, maptiler, reprojection" +cloak: + - key: get_your_own_D6rA4zTHduk6KOKTXzGB + value: Get your own API key at https://www.maptiler.com/cloud/ +--- +
+
+

Smoothing Disabled

+
+
+ +
+
+ +
+
+
+

Uncorrected Comparison

+
+
+ +
+
+
diff --git a/examples/disable-image-smoothing.js b/examples/disable-image-smoothing.js new file mode 100644 index 0000000000..52ab34265b --- /dev/null +++ b/examples/disable-image-smoothing.js @@ -0,0 +1,115 @@ +import Map from '../src/ol/Map.js'; +import View from '../src/ol/View.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import XYZ from '../src/ol/source/XYZ.js'; + +const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; +const attributions = '© MapTiler ' + + '© OpenStreetMap contributors'; + +const disabledLayer = new TileLayer({ + // specify className so forEachLayerAtPixel can distinguish layers + className: 'ol-layer-dem', + source: new XYZ({ + attributions: attributions, + url: 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, + maxZoom: 10, + crossOrigin: '', + reprojectionContextOptions: {imageSmoothingEnabled: false, msImageSmoothingEnabled: false} + }) +}); + +const imagery = new TileLayer({ + className: 'ol-layer-imagery', + source: new XYZ({ + attributions: attributions, + url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20, + crossOrigin: '' + }) +}); + +const enabledLayer = new TileLayer({ + source: new XYZ({ + attributions: attributions, + url: 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, + maxZoom: 10, + crossOrigin: '' + }) +}); + +disabledLayer.on('prerender', function(evt) { + evt.context.imageSmoothingEnabled = false; + evt.context.msImageSmoothingEnabled = false; +}); + +imagery.on('prerender', function(evt) { + // use opaque background to conceal DEM while fully opaque imagery renders + if (imagery.getOpacity() === 1) { + evt.context.fillStyle = 'white'; + evt.context.fillRect(0, 0, evt.context.canvas.width, evt.context.canvas.height); + } +}); + +const control = document.getElementById('opacity'); +const output = document.getElementById('output'); +control.addEventListener('input', function() { + output.innerText = control.value; + imagery.setOpacity(control.value / 100); +}); +output.innerText = control.value; +imagery.setOpacity(control.value / 100); + +const view = new View({ + center: [6.893, 45.8295], + zoom: 16, + projection: 'EPSG:4326' +}); + +const map1 = new Map({ + target: 'map1', + layers: [disabledLayer, imagery], + view: view +}); + +const map2 = new Map({ + target: 'map2', + layers: [enabledLayer], + view: view +}); + +const info1 = document.getElementById('info1'); +const info2 = document.getElementById('info2'); + +const showElevations = function(evt) { + if (evt.dragging) { + return; + } + map1.forEachLayerAtPixel( + evt.pixel, + function(layer, pixel) { + const height = -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1; + info1.innerText = height.toFixed(1); + }, + { + layerFilter: function(layer) { + return layer === disabledLayer; + } + } + ); + map2.forEachLayerAtPixel( + evt.pixel, + function(layer, pixel) { + const height = -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1; + info2.innerText = height.toFixed(1); + }, + { + layerFilter: function(layer) { + return layer === enabledLayer; + } + } + ); +}; + +map1.on('pointermove', showElevations); +map2.on('pointermove', showElevations); diff --git a/rendering/cases/reproj-tile-disable-smoothing/expected.png b/rendering/cases/reproj-tile-disable-smoothing/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..6c51884467687ebd9265be2ea10c1571fb0504ad GIT binary patch literal 2404 zcmdT_ZAepL6h7CvO=nI)L21s3e`ZB4BGB^d7M2ccN(6?OTSTEzIYOL?ZC5jAAs8lU zXgWe%Kg4NTh?#d}VkNbuV5Im-Ii}8S4rfm9y}kR<|9%9`Kksv1-t&Gu?>Xl=4{~G~ z!My!E00@?5rk@AEkcmM62SNVr7uNs+4@uKcUMMTD&GuezQbmm}CS26URxPo^OOzjC z!>joPZ(C$SVKwhyZ)0_19$nOOX6T_w**0f%rW_}=#e+ZAJR3{vk+glpdd0Ju%M|Fh zCDCpA?RPVrF91Yo)xAzXY2anZHLz$f=5&<5#*F)&S2yoFq%q!Kb$w;0F=8(?O)-A{>i1o`86WRQ_< z=7+*fCLSX2K^!_Z-}thVrj;h847=E%Ip>n6sGlwyw5*r{#5zY73Ric=7XJ`SgI(TU zBKB7iY1flfA2p6=YjzLV7CurLMQS0R@Q6b#EC7|0GpY?nUjYFkh0ts0)b}r^A|xEx z)K~AqN^ayb^7MTNMx_#TipF+GO_r-Yt?bG2w?+DB4i#4GLW&WA?*@#QdHMVds_XMg z$ou-9IxfPTVPm2Ip|3kQ*HrR(eekc5n5GEG6c3;vx-E7I>lJ0vvvkh@Rjp+bGs^(g zrOOJ1Vjx~K+a=H+2KWq9aRR0TL1)vX3c=w|Zq%L`Ka<} [resolutions] Supported resolutions as given in IIIF 'scaleFactors' * @property {import("../size.js").Size} size Size of the image [width, height]. * @property {Array} [sizes] Supported scaled image sizes. @@ -274,6 +276,7 @@ class IIIF extends TileImage { crossOrigin: options.crossOrigin, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, state: options.state, tileClass: IiifTileClass, tileGrid: tileGrid, diff --git a/src/ol/source/OSM.js b/src/ol/source/OSM.js index f95f4589a6..d2f52a6d07 100644 --- a/src/ol/source/OSM.js +++ b/src/ol/source/OSM.js @@ -26,8 +26,10 @@ export const ATTRIBUTION = '© ' + * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. * @property {number} [maxZoom=19] Max zoom. * @property {boolean} [opaque=true] Whether the layer is opaque. - * @property {number} [reprojectionErrorThreshold=1.5] Maximum allowed reprojection error (in pixels). + * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is * ```js * function(imageTile, src) { @@ -73,6 +75,7 @@ class OSM extends XYZ { opaque: options.opaque !== undefined ? options.opaque : true, maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, tileLoadFunction: options.tileLoadFunction, url: url, wrapX: options.wrapX, diff --git a/src/ol/source/Stamen.js b/src/ol/source/Stamen.js index d3f768a426..cc8c2ce594 100644 --- a/src/ol/source/Stamen.js +++ b/src/ol/source/Stamen.js @@ -96,6 +96,8 @@ const ProviderConfig = { * @property {number} [maxZoom] Maximum zoom. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] * Optional function to load a tile given a URL. The default is * ```js @@ -138,6 +140,7 @@ class Stamen extends XYZ { minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom, opaque: layerConfig.opaque, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, tileLoadFunction: options.tileLoadFunction, transition: options.transition, url: url, diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index 5e81b927d6..8576b7d2d0 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -34,6 +34,8 @@ import {appendParams} from '../uri.js'; * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. * The default is * ```js @@ -74,6 +76,7 @@ class TileArcGISRest extends TileImage { crossOrigin: options.crossOrigin, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, tileGrid: options.tileGrid, tileLoadFunction: options.tileLoadFunction, tileUrlFunction: tileUrlFunction, diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index ac4ccf709e..887a23fc3b 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -25,6 +25,8 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js'; * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("./State.js").default} [state] Source state. * @property {typeof import("../ImageTile.js").default} [tileClass] Class used to instantiate image tiles. * Default is {@link module:ol/ImageTile~ImageTile}. @@ -123,6 +125,12 @@ class TileImage extends UrlTile { */ this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold; + /** + * @private + * @type {object|undefined} + */ + this.reprojectionContextOptions_ = options.reprojectionContextOptions; + /** * @private * @type {boolean} @@ -296,7 +304,7 @@ class TileImage extends UrlTile { function(z, x, y, pixelRatio) { return this.getTileInternal(z, x, y, pixelRatio, sourceProjection); }.bind(this), this.reprojectionErrorThreshold_, - this.renderReprojectionEdges_); + this.renderReprojectionEdges_, this.reprojectionContextOptions_); newTile.key = key; if (tile) { diff --git a/src/ol/source/TileJSON.js b/src/ol/source/TileJSON.js index 6fe4877095..5233766869 100644 --- a/src/ol/source/TileJSON.js +++ b/src/ol/source/TileJSON.js @@ -47,6 +47,8 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * Useful when the server does not support CORS.. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {Config} [tileJSON] TileJSON configuration for this source. * If not provided, `url` must be configured. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is @@ -80,6 +82,7 @@ class TileJSON extends TileImage { crossOrigin: options.crossOrigin, projection: getProjection('EPSG:3857'), reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, state: SourceState.LOADING, tileLoadFunction: options.tileLoadFunction, wrapX: options.wrapX !== undefined ? options.wrapX : true, diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index 513e7ae132..f7b1ec5467 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -42,6 +42,8 @@ import {appendParams} from '../uri.js'; * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {typeof import("../ImageTile.js").default} [tileClass] Class used to instantiate image tiles. * Default is {@link module:ol/ImageTile~ImageTile}. * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid. Base this on the resolutions, @@ -94,6 +96,7 @@ class TileWMS extends TileImage { opaque: !transparent, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, tileClass: options.tileClass, tileGrid: options.tileGrid, tileLoadFunction: options.tileLoadFunction, diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index 603bc78e80..9de0f9a2e2 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -23,6 +23,8 @@ import {appendParams} from '../uri.js'; * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("./WMTSRequestEncoding.js").default|string} [requestEncoding='KVP'] Request encoding. * @property {string} layer Layer name as advertised in the WMTS capabilities. * @property {string} style Style name as advertised in the WMTS capabilities. @@ -87,6 +89,7 @@ class WMTS extends TileImage { crossOrigin: options.crossOrigin, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, tileClass: options.tileClass, tileGrid: tileGrid, tileLoadFunction: options.tileLoadFunction, diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js index 6c550057a5..1195286c37 100644 --- a/src/ol/source/XYZ.js +++ b/src/ol/source/XYZ.js @@ -17,6 +17,8 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {number} [maxZoom=18] Optional max zoom level. * @property {number} [minZoom=0] Optional min zoom level. * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid. @@ -90,6 +92,7 @@ class XYZ extends TileImage { opaque: options.opaque, projection: projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, tileGrid: tileGrid, tileLoadFunction: options.tileLoadFunction, tilePixelRatio: options.tilePixelRatio, diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index 5a5bd2efa1..401c788129 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -93,6 +93,8 @@ export class CustomTile extends ImageTile { * @property {number} [tilePixelRatio] The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then `tilePixelRatio` should be set to `2` * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. + * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used + * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {string} [url] URL template or base URL of the Zoomify service. * A base URL is the fixed part * of the URL, excluding the tile group, z, x, and y folder structure, e.g. @@ -255,6 +257,7 @@ class Zoomify extends TileImage { projection: options.projection, tilePixelRatio: tilePixelRatio, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + reprojectionContextOptions: options.reprojectionContextOptions, tileClass: ZoomifyTileClass, tileGrid: tileGrid, tileUrlFunction: tileUrlFunction, From b71b87d7bbf4ab1c397af77a1a34f09be5c54179 Mon Sep 17 00:00:00 2001 From: philip Date: Sat, 28 Dec 2019 03:40:10 +0000 Subject: [PATCH 003/636] Fix issue with reprojection and double drawing pixels. --- src/ol/reproj.js | 31 +++++-------------------------- src/ol/reproj/Triangulation.js | 2 +- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index 7593c6bc3b..bb54d07f01 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -53,24 +53,6 @@ export function calculateSourceResolution(sourceProj, targetProj, } -/** - * Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap - * in order to mask gaps caused by antialiasing. - * - * @param {number} centroidX Centroid of the triangle (x coordinate in pixels). - * @param {number} centroidY Centroid of the triangle (y coordinate in pixels). - * @param {number} x X coordinate of the point (in pixels). - * @param {number} y Y coordinate of the point (in pixels). - * @return {import("./coordinate.js").Coordinate} New point 1 px farther from the centroid. - */ -function enlargeClipPoint(centroidX, centroidY, x, y) { - const dX = x - centroidX; - const dY = y - centroidY; - const distance = Math.sqrt(dX * dX + dY * dY); - return [Math.round(x + dX / distance), Math.round(y + dY / distance)]; -} - - /** * Renders the source data into new canvas based on the triangulation. * @@ -103,6 +85,8 @@ export function render(width, height, pixelRatio, context.scale(pixelRatio, pixelRatio); + context.globalCompositeOperation = 'lighter'; + const sourceDataExtent = createEmpty(); sources.forEach(function(src, i, arr) { extend(sourceDataExtent, src.extent); @@ -190,15 +174,10 @@ export function render(width, height, pixelRatio, context.save(); context.beginPath(); - const centroidX = (u0 + u1 + u2) / 3; - const centroidY = (v0 + v1 + v2) / 3; - const p0 = enlargeClipPoint(centroidX, centroidY, u0, v0); - const p1 = enlargeClipPoint(centroidX, centroidY, u1, v1); - const p2 = enlargeClipPoint(centroidX, centroidY, u2, v2); - context.moveTo(p1[0], p1[1]); - context.lineTo(p0[0], p0[1]); - context.lineTo(p2[0], p2[1]); + context.moveTo(u1, v1); + context.lineTo(u0, v0); + context.lineTo(u2, v2); context.clip(); context.transform( diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index ebdab668da..9fe7270abd 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -321,7 +321,7 @@ class Triangulation { } this.addTriangle_(a, c, d, aSrc, cSrc, dSrc); - this.addTriangle_(a, b, c, aSrc, bSrc, cSrc); + this.addTriangle_(a, c, b, aSrc, cSrc, bSrc); } /** From a6b1df3574bb8f5ea520200a942fbdd7d0caba50 Mon Sep 17 00:00:00 2001 From: philip Date: Sat, 28 Dec 2019 17:47:53 +0000 Subject: [PATCH 004/636] Fix missing corners of the world --- src/ol/reproj.js | 31 ++++++++++++++++++++++++++++++- src/ol/reproj/Tile.js | 9 ++++----- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index bb54d07f01..e669a4ec82 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -2,7 +2,7 @@ * @module ol/reproj */ import {createCanvasContext2D} from './dom.js'; -import {containsCoordinate, createEmpty, extend, getHeight, getTopLeft, getWidth} from './extent.js'; +import {containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth} from './extent.js'; import {solveLinearSystem} from './math.js'; import {getPointResolution, transform} from './proj.js'; @@ -53,6 +53,35 @@ export function calculateSourceResolution(sourceProj, targetProj, } +/** + * Calculates ideal resolution to use from the source in order to achieve + * pixel mapping as close as possible to 1:1 during reprojection. + * The resolution is calculated regardless of what resolutions + * are actually available in the dataset (TileGrid, Image, ...). + * + * @param {import("./proj/Projection.js").default} sourceProj Source projection. + * @param {import("./proj/Projection.js").default} targetProj Target projection. + * @param {import("./extent.js").Extent} targetExtent Target extent + * @param {number} targetResolution Target resolution. + * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0. + */ +export function calculateSourceExtentResolution(sourceProj, targetProj, + targetExtent, targetResolution) { + + const targetCenter = getCenter(targetExtent); + let sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution); + + if (!isFinite(sourceResolution) || sourceResolution <= 0) { + forEachCorner(targetExtent, function(corner) { + sourceResolution = calculateSourceResolution(sourceProj, targetProj, corner, targetResolution); + return isFinite(sourceResolution) && sourceResolution > 0; + }); + } + + return sourceResolution; +} + + /** * Renders the source data into new canvas based on the triangulation. * diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index 909b125e7e..648431ac7f 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -7,9 +7,9 @@ import Tile from '../Tile.js'; import TileState from '../TileState.js'; import {listen, unlistenByKey} from '../events.js'; import EventType from '../events/EventType.js'; -import {getArea, getCenter, getIntersection} from '../extent.js'; +import {getArea, getIntersection} from '../extent.js'; import {clamp} from '../math.js'; -import {calculateSourceResolution, render as renderReprojected} from '../reproj.js'; +import {calculateSourceExtentResolution, render as renderReprojected} from '../reproj.js'; import Triangulation from './Triangulation.js'; @@ -140,9 +140,8 @@ class ReprojTile extends Tile { const targetResolution = targetTileGrid.getResolution( this.wrappedTileCoord_[0]); - const targetCenter = getCenter(limitedTargetExtent); - const sourceResolution = calculateSourceResolution( - sourceProj, targetProj, targetCenter, targetResolution); + const sourceResolution = calculateSourceExtentResolution( + sourceProj, targetProj, limitedTargetExtent, targetResolution); if (!isFinite(sourceResolution) || sourceResolution <= 0) { // invalid sourceResolution -> EMPTY From 4040d03ae6ef8054671fda169d239e4dba810b12 Mon Sep 17 00:00:00 2001 From: philip Date: Sat, 28 Dec 2019 18:09:07 +0000 Subject: [PATCH 005/636] Fix problem with zero size canvas drawing --- src/ol/reproj.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index e669a4ec82..32ded4f1a5 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -135,12 +135,15 @@ export function render(width, height, pixelRatio, const srcWidth = getWidth(src.extent); const srcHeight = getHeight(src.extent); - stitchContext.drawImage( - src.image, - gutter, gutter, - src.image.width - 2 * gutter, src.image.height - 2 * gutter, - xPos * stitchScale, yPos * stitchScale, - srcWidth * stitchScale, srcHeight * stitchScale); + // This test should never fail -- but it does. Need to find a fix the upstream condition + if (src.image.width > 0 && src.image.height > 0) { + stitchContext.drawImage( + src.image, + gutter, gutter, + src.image.width - 2 * gutter, src.image.height - 2 * gutter, + xPos * stitchScale, yPos * stitchScale, + srcWidth * stitchScale, srcHeight * stitchScale); + } }); const targetTopLeft = getTopLeft(targetExtent); From f457093baf8650edf638c577c6e0cbf033d095b5 Mon Sep 17 00:00:00 2001 From: philip Date: Sat, 28 Dec 2019 22:31:30 +0000 Subject: [PATCH 006/636] Handle the zoomed out case where the source extent is infinite. This does raise the question of whether an Infinite extent intersects a finite extent. It appears not to, but maybe it should. --- src/ol/reproj/Triangulation.js | 42 +++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index 9fe7270abd..d5c7580584 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -247,12 +247,19 @@ class Triangulation { } if (!needsSubdivision && this.maxSourceExtent_) { - if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) { - // whole quad outside source projection extent -> ignore - return; + if (isFinite(sourceQuadExtent[0]) && + isFinite(sourceQuadExtent[1]) && + isFinite(sourceQuadExtent[2]) && + isFinite(sourceQuadExtent[3])) { + if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) { + // whole quad outside source projection extent -> ignore + return; + } } } + let isNotFinite = 0; + if (!needsSubdivision) { if (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) || !isFinite(bSrc[0]) || !isFinite(bSrc[1]) || @@ -261,7 +268,16 @@ class Triangulation { if (maxSubdivision > 0) { needsSubdivision = true; } else { - return; + // It might be the case that only 1 of the points is infinite. In this case + // we can draw a single triangle with the other three points + isNotFinite = + (((!isFinite(aSrc[0]) || !isFinite(aSrc[1])) | 0) << 3) + + (((!isFinite(bSrc[0]) || !isFinite(bSrc[1])) | 0) << 2) + + (((!isFinite(cSrc[0]) || !isFinite(cSrc[1])) | 0) << 1) + + ((!isFinite(dSrc[0]) || !isFinite(dSrc[1])) | 0); + if (isNotFinite != 1 && isNotFinite != 2 && isNotFinite != 4 && isNotFinite != 8) { + return; + } } } } @@ -320,8 +336,22 @@ class Triangulation { this.wrapsXInSource_ = true; } - this.addTriangle_(a, c, d, aSrc, cSrc, dSrc); - this.addTriangle_(a, c, b, aSrc, cSrc, bSrc); + // Exactly zero or one of *Src is not finite + if ((isNotFinite & 0xb) == 0) { + this.addTriangle_(a, c, d, aSrc, cSrc, dSrc); + } + if ((isNotFinite & 0xe) == 0) { + this.addTriangle_(a, c, b, aSrc, cSrc, bSrc); + } + if (isNotFinite) { + // Try the other two triangles + if ((isNotFinite & 0xd) == 0) { + this.addTriangle_(b, d, a, bSrc, dSrc, aSrc); + } + if ((isNotFinite & 0x7) == 0) { + this.addTriangle_(b, d, c, bSrc, dSrc, cSrc); + } + } } /** From 89ed757273b596eff023552dd9e8723df09e9be0 Mon Sep 17 00:00:00 2001 From: philip Date: Mon, 30 Dec 2019 16:22:44 +0000 Subject: [PATCH 007/636] Fix indentation --- src/ol/reproj/Triangulation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index d5c7580584..bc3f24e522 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -251,10 +251,10 @@ class Triangulation { isFinite(sourceQuadExtent[1]) && isFinite(sourceQuadExtent[2]) && isFinite(sourceQuadExtent[3])) { - if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) { - // whole quad outside source projection extent -> ignore - return; - } + if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) { + // whole quad outside source projection extent -> ignore + return; + } } } From e35795c5a38d4d216128e633dbb2db5b84beef1d Mon Sep 17 00:00:00 2001 From: philip Date: Mon, 30 Dec 2019 16:46:20 +0000 Subject: [PATCH 008/636] Rework code to pass eslint --- src/ol/reproj/Triangulation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index bc3f24e522..1f56a7a82c 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -271,10 +271,10 @@ class Triangulation { // It might be the case that only 1 of the points is infinite. In this case // we can draw a single triangle with the other three points isNotFinite = - (((!isFinite(aSrc[0]) || !isFinite(aSrc[1])) | 0) << 3) + - (((!isFinite(bSrc[0]) || !isFinite(bSrc[1])) | 0) << 2) + - (((!isFinite(cSrc[0]) || !isFinite(cSrc[1])) | 0) << 1) + - ((!isFinite(dSrc[0]) || !isFinite(dSrc[1])) | 0); + ((!isFinite(aSrc[0]) || !isFinite(aSrc[1])) ? 8 : 0) + + ((!isFinite(bSrc[0]) || !isFinite(bSrc[1])) ? 4 : 0) + + ((!isFinite(cSrc[0]) || !isFinite(cSrc[1])) ? 2 : 0) + + ((!isFinite(dSrc[0]) || !isFinite(dSrc[1])) ? 1 : 0); if (isNotFinite != 1 && isNotFinite != 2 && isNotFinite != 4 && isNotFinite != 8) { return; } From 5b1df4438d89c18d162d775f0fdca91f6c782043 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Wed, 1 Jan 2020 22:04:10 +0000 Subject: [PATCH 009/636] Fix for undefined source in Image layer Prevent error if layer does not have a source. Also clear any existing image if source is set to null or undefined by setSource. --- src/ol/renderer/canvas/ImageLayer.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/ol/renderer/canvas/ImageLayer.js b/src/ol/renderer/canvas/ImageLayer.js index 5dc9895cd0..7403890219 100644 --- a/src/ol/renderer/canvas/ImageLayer.js +++ b/src/ol/renderer/canvas/ImageLayer.js @@ -55,16 +55,20 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer { } if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] && !isEmpty(renderedExtent)) { - let projection = viewState.projection; - if (!ENABLE_RASTER_REPROJECTION) { - const sourceProjection = imageSource.getProjection(); - if (sourceProjection) { - projection = sourceProjection; + if (imageSource) { + let projection = viewState.projection; + if (!ENABLE_RASTER_REPROJECTION) { + const sourceProjection = imageSource.getProjection(); + if (sourceProjection) { + projection = sourceProjection; + } } - } - const image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection); - if (image && this.loadImage(image)) { - this.image_ = image; + const image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection); + if (image && this.loadImage(image)) { + this.image_ = image; + } + } else { + this.image_ = null; } } From 902ed53999bb398e101c824029bee601bffdf7bb Mon Sep 17 00:00:00 2001 From: philip Date: Mon, 6 Jan 2020 02:23:58 +0000 Subject: [PATCH 010/636] Add detection of browsers which cannot render correctly with diagonal clipping regions. In this case, modify the shape of the clip region so that it has (a number) of horizontal and vertical edges. --- src/ol/TileCache.js | 3 +- src/ol/reproj.js | 95 ++++++++++++++++++++++++++++++++-- src/ol/reproj/Triangulation.js | 3 ++ 3 files changed, 97 insertions(+), 4 deletions(-) diff --git a/src/ol/TileCache.js b/src/ol/TileCache.js index e71cfd4bc3..5d02d2a2b0 100644 --- a/src/ol/TileCache.js +++ b/src/ol/TileCache.js @@ -24,7 +24,8 @@ class TileCache extends LRUCache { if (tile.getKey() in usedTiles) { break; } else { - this.pop().dispose(); + // This lets the GC clean up the object + this.pop(); } } } diff --git a/src/ol/reproj.js b/src/ol/reproj.js index 32ded4f1a5..2e3fd7f1ec 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -6,6 +6,68 @@ import {containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHe import {solveLinearSystem} from './math.js'; import {getPointResolution, transform} from './proj.js'; +let brokenDiagonalRendering_; + +/** + * This draws a small triangle into a canvas by setting the triangle as the clip region + * and then drawing a (too large) rectangle + * + * @param {CanvasRenderingContext2D} ctx The context in which to draw the triangle + * @param {number} u1 The x-coordinate of the second point. The first point is 0,0. + * @param {number} v1 The y-coordinate of the second point. + * @param {number} u2 The x-coordinate of the third point. + * @param {number} v2 The y-coordinate of the third point. + */ +function drawTestTriangle(ctx, u1, v1, u2, v2) { + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(u1, v1); + ctx.lineTo(u2, v2); + ctx.closePath(); + ctx.save(); + ctx.clip(); + ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2)); + ctx.restore(); +} + +/** + * Given the data from getImageData, see if the right values appear at the provided offset. + * Returns true if either the color or transparency is off + * + * @param {Uint8ClampedArray} data The data returned from getImageData + * @param {number} offset The pixel offset from the start of data. + * @return {boolean} true if the diagonal rendering is broken + */ +function verifyBrokenDiagonalRendering(data, offset) { + // the values ought to be close to the rgba(210, 0, 0, 0.75) + return Math.abs(data[offset * 4] - 210) > 2 || Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2; +} + +/** + * Determines if the current browser configuration can render triangular clip regions correctly. + * This value is cached so the function is only expensive the first time called. + * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976 + * IE also doesn't. Chrome works, and everything seems to work on OSX and Android. This function caches the + * result. I suppose that it is conceivably possible that a browser might flip modes while the app is + * running, but lets hope not. + * + * @return {boolean} true if the Diagonal Rendering is broken. + */ +function isBrokenDiagonalRendering() { + if (brokenDiagonalRendering_ === undefined) { + const ctx = document.createElement('canvas').getContext('2d'); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(210, 0, 0, 0.75)'; + drawTestTriangle(ctx, 4, 5, 4, 0); + drawTestTriangle(ctx, 4, 5, 0, 5); + const data = ctx.getImageData(0, 0, 3, 3).data; + brokenDiagonalRendering_ = verifyBrokenDiagonalRendering(data, 0) || + verifyBrokenDiagonalRendering(data, 4) || + verifyBrokenDiagonalRendering(data, 8); + } + + return brokenDiagonalRendering_; +} /** * Calculates ideal resolution to use from the source in order to achieve @@ -207,9 +269,36 @@ export function render(width, height, pixelRatio, context.save(); context.beginPath(); - context.moveTo(u1, v1); - context.lineTo(u0, v0); - context.lineTo(u2, v2); + if (isBrokenDiagonalRendering()) { + // Make sure that everything is on pixel boundaries + const u0r = Math.round(u0); + const v0r = Math.round(v0); + const u1r = Math.round(u1); + const v1r = Math.round(v1); + const u2r = Math.round(u2); + const v2r = Math.round(v2); + // Make sure that all lines are horizontal or vertical + context.moveTo(u1r, v1r); + // This is the diagonal line. Do it in 4 steps + const steps = 4; + const ud = u0r - u1r; + const vd = v0r - v1r; + for (let step = 0; step < steps; step++) { + // Go horizontally + context.lineTo(u1r + Math.round((step + 1) * ud / steps), v1r + Math.round(step * vd / (steps - 1))); + // Go vertically + if (step != (steps - 1)) { + context.lineTo(u1r + Math.round((step + 1) * ud / steps), v1r + Math.round((step + 1) * vd / (steps - 1))); + } + } + // We are almost at u0r, v0r + context.lineTo(u2r, v2r); + } else { + context.moveTo(u1, v1); + context.lineTo(u0, v0); + context.lineTo(u2, v2); + } + context.clip(); context.transform( diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index 1f56a7a82c..5375947ead 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -337,6 +337,9 @@ class Triangulation { } // Exactly zero or one of *Src is not finite + // The triangles must have the diagonal line as the first side + // This is to allow easy code in reproj.s to make it straight for broken + // browsers that can't handle diagonal clipping if ((isNotFinite & 0xb) == 0) { this.addTriangle_(a, c, d, aSrc, cSrc, dSrc); } From 852f6552c7dae58996893ba271c672d082f71fca Mon Sep 17 00:00:00 2001 From: philip Date: Sat, 11 Jan 2020 17:26:52 +0000 Subject: [PATCH 011/636] Fix pixel rounding --- src/ol/reproj.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index 2e3fd7f1ec..518e815572 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -176,6 +176,10 @@ export function render(width, height, pixelRatio, context.scale(pixelRatio, pixelRatio); + function pixelRound(value) { + return Math.round(value * pixelRatio) / pixelRatio; + } + context.globalCompositeOperation = 'lighter'; const sourceDataExtent = createEmpty(); @@ -271,12 +275,12 @@ export function render(width, height, pixelRatio, if (isBrokenDiagonalRendering()) { // Make sure that everything is on pixel boundaries - const u0r = Math.round(u0); - const v0r = Math.round(v0); - const u1r = Math.round(u1); - const v1r = Math.round(v1); - const u2r = Math.round(u2); - const v2r = Math.round(v2); + const u0r = pixelRound(u0); + const v0r = pixelRound(v0); + const u1r = pixelRound(u1); + const v1r = pixelRound(v1); + const u2r = pixelRound(u2); + const v2r = pixelRound(v2); // Make sure that all lines are horizontal or vertical context.moveTo(u1r, v1r); // This is the diagonal line. Do it in 4 steps @@ -285,10 +289,10 @@ export function render(width, height, pixelRatio, const vd = v0r - v1r; for (let step = 0; step < steps; step++) { // Go horizontally - context.lineTo(u1r + Math.round((step + 1) * ud / steps), v1r + Math.round(step * vd / (steps - 1))); + context.lineTo(u1r + pixelRound((step + 1) * ud / steps), v1r + pixelRound(step * vd / (steps - 1))); // Go vertically if (step != (steps - 1)) { - context.lineTo(u1r + Math.round((step + 1) * ud / steps), v1r + Math.round((step + 1) * vd / (steps - 1))); + context.lineTo(u1r + pixelRound((step + 1) * ud / steps), v1r + pixelRound((step + 1) * vd / (steps - 1))); } } // We are almost at u0r, v0r From 1772c8198b52f8d7576527ef267c7a7e234be542 Mon Sep 17 00:00:00 2001 From: philip Date: Sat, 11 Jan 2020 18:07:09 +0000 Subject: [PATCH 012/636] Added comment pointing to an area of improvement --- src/ol/reproj.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index 518e815572..cca5d98ffa 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -314,6 +314,10 @@ export function render(width, height, pixelRatio, context.scale(sourceResolution / pixelRatio, -sourceResolution / pixelRatio); + // This is rather inefficient as we draw the *entire* source canvas into the destination and + // rely on the clipping to eliminate nearly all the pixels. It seems smarter to only + // draw the relevant region of the source canvas. However, I'm having difficulty figuring + // out what the parameters ought to be. context.drawImage(stitchContext.canvas, 0, 0); context.restore(); }); From d2b05991772342cf1c9afbc8c6584f6b853a5223 Mon Sep 17 00:00:00 2001 From: philip Date: Tue, 14 Jan 2020 13:39:52 +0000 Subject: [PATCH 013/636] Dynamically chose the number of subdivisions based on the size of the Image. --- src/ol/reproj/Image.js | 2 +- src/ol/reproj/Tile.js | 2 +- src/ol/reproj/Triangulation.js | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index e08778002c..7a5cfd7240 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -47,7 +47,7 @@ class ReprojImage extends ImageBase { const triangulation = new Triangulation( sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, - sourceResolution * errorThresholdInPixels); + sourceResolution * errorThresholdInPixels, targetResolution); const sourceExtent = triangulation.calculateSourceExtent(); const sourceImage = getImageFunction(sourceExtent, sourceResolution, pixelRatio); diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index 73d508d203..7defc9e48b 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -160,7 +160,7 @@ class ReprojTile extends Tile { */ this.triangulation_ = new Triangulation( sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, - sourceResolution * errorThresholdInPixels); + sourceResolution * errorThresholdInPixels, targetResolution); if (this.triangulation_.getTriangles().length === 0) { // no valid triangles -> EMPTY diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index ebdab668da..fc75ce7a9c 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -1,7 +1,7 @@ /** * @module ol/reproj/Triangulation */ -import {boundingExtent, createEmpty, extendCoordinate, getBottomLeft, getBottomRight, +import {boundingExtent, createEmpty, extendCoordinate, getArea, getBottomLeft, getBottomRight, getTopLeft, getTopRight, getWidth, intersects} from '../extent.js'; import {modulo} from '../math.js'; import {getTransform} from '../proj.js'; @@ -49,8 +49,9 @@ class Triangulation { * @param {import("../extent.js").Extent} targetExtent Target extent to triangulate. * @param {import("../extent.js").Extent} maxSourceExtent Maximal source extent that can be used. * @param {number} errorThreshold Acceptable error (in source units). + * @param {number} destinationResolution The (optional) resolution of the destination. */ - constructor(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold) { + constructor(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, destinationResolution) { /** * @type {import("../proj/Projection.js").default} @@ -138,11 +139,15 @@ class Triangulation { const sourceBottomRight = this.transformInv_(destinationBottomRight); const sourceBottomLeft = this.transformInv_(destinationBottomLeft); + const maxSubdivision = MAX_SUBDIVISION + (destinationResolution ? + Math.max(0, Math.ceil(Math.log2(getArea(targetExtent) / (destinationResolution * destinationResolution * 256 * 256)))) + : 0); + this.addQuad_( destinationTopLeft, destinationTopRight, destinationBottomRight, destinationBottomLeft, sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft, - MAX_SUBDIVISION); + maxSubdivision); if (this.wrapsXInSource_) { let leftBound = Infinity; From ccf3532eb2d4a42e818930dc44e63091dfd369e4 Mon Sep 17 00:00:00 2001 From: philip Date: Tue, 14 Jan 2020 13:48:23 +0000 Subject: [PATCH 014/636] Fix the parameter name to have the opt_ prefix. --- src/ol/reproj/Triangulation.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index fc75ce7a9c..b6091d149f 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -49,9 +49,9 @@ class Triangulation { * @param {import("../extent.js").Extent} targetExtent Target extent to triangulate. * @param {import("../extent.js").Extent} maxSourceExtent Maximal source extent that can be used. * @param {number} errorThreshold Acceptable error (in source units). - * @param {number} destinationResolution The (optional) resolution of the destination. + * @param {?number} opt_destinationResolution The (optional) resolution of the destination. */ - constructor(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, destinationResolution) { + constructor(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, opt_destinationResolution) { /** * @type {import("../proj/Projection.js").default} @@ -139,8 +139,9 @@ class Triangulation { const sourceBottomRight = this.transformInv_(destinationBottomRight); const sourceBottomLeft = this.transformInv_(destinationBottomLeft); - const maxSubdivision = MAX_SUBDIVISION + (destinationResolution ? - Math.max(0, Math.ceil(Math.log2(getArea(targetExtent) / (destinationResolution * destinationResolution * 256 * 256)))) + const maxSubdivision = MAX_SUBDIVISION + (opt_destinationResolution ? + Math.max(0, Math.ceil(Math.log2(getArea(targetExtent) / + (opt_destinationResolution * opt_destinationResolution * 256 * 256)))) : 0); this.addQuad_( From 76b926420c2bc39ffe383b17fe583452963aedd2 Mon Sep 17 00:00:00 2001 From: philip Date: Tue, 14 Jan 2020 23:52:54 +0000 Subject: [PATCH 015/636] Only draw the piece of the source canvas that is required. I.e. take the clip region into account. --- src/ol/reproj.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index cca5d98ffa..e0420e7a8c 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -2,7 +2,7 @@ * @module ol/reproj */ import {createCanvasContext2D} from './dom.js'; -import {containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth} from './extent.js'; +import {boundingExtent, containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth} from './extent.js'; import {solveLinearSystem} from './math.js'; import {getPointResolution, transform} from './proj.js'; @@ -314,11 +314,13 @@ export function render(width, height, pixelRatio, context.scale(sourceResolution / pixelRatio, -sourceResolution / pixelRatio); - // This is rather inefficient as we draw the *entire* source canvas into the destination and - // rely on the clipping to eliminate nearly all the pixels. It seems smarter to only - // draw the relevant region of the source canvas. However, I'm having difficulty figuring - // out what the parameters ought to be. - context.drawImage(stitchContext.canvas, 0, 0); + const sourceTriangleExtent = boundingExtent(source); + const topLeftX = Math.floor((sourceTriangleExtent[0] - sourceDataExtent[0]) * stitchScale); + const topLeftY = Math.floor((sourceDataExtent[3] - sourceTriangleExtent[3]) * stitchScale); + const width = Math.ceil((sourceTriangleExtent[2] - sourceTriangleExtent[0]) * stitchScale) + 2; + const height = Math.ceil((sourceTriangleExtent[3] - sourceTriangleExtent[1]) * stitchScale) + 2; + + context.drawImage(stitchContext.canvas, topLeftX, topLeftY, width, height, topLeftX, topLeftY, width, height); context.restore(); }); From 0057144b52e285c8dbaae5a28896cb6298c74e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Fri, 7 Feb 2020 00:24:56 +0100 Subject: [PATCH 016/636] Add apidoc-debug task to debug the apidoc generation process --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 5c5dad91a3..a99e2855af 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "copy-css": "shx cp src/ol/ol.css build/ol/ol.css", "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && tsc --project config/tsconfig-build.json", "typecheck": "tsc --pretty", + "apidoc-debug": "shx rm -rf build/apidoc && node --inspect-brk=9229 ./node_modules/jsdoc/jsdoc.js -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc", "apidoc": "shx rm -rf build/apidoc && jsdoc -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc" }, "main": "index.js", From 7a77793d697fa5c8c07497cd1b9c78f20655bb45 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 11 Feb 2020 14:58:57 +0000 Subject: [PATCH 017/636] Write fill and outline in PolyStyle Write styles based on style objects appropriate for geometry. Write fill and outline in PolyStyle if false (i.e. non-default) Handle MultiLineString, MultiPoint and MultiPolygon within heterogenous MultiGeometry when writing features Add getGeometriesArrayRecursive method to ol/geom/GeometryCollection to allow for nested MultiGeometry Enhanced write GeometryCollection geometries test A more rigorous write GeometryCollection geometries test including nested collections (the output is simplified to a single MultiGeomtry) Add writeFeatures to outline and fill tests, setting geometry for geometry specific tests Add 0 and 0 to some existing tests --- src/ol/format/KML.js | 173 ++++++++++++++++++------- src/ol/geom/GeometryCollection.js | 17 +++ test/spec/ol/format/kml.test.js | 205 +++++++++++++++++++++++++++++- 3 files changed, 344 insertions(+), 51 deletions(-) diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index d94a4c473b..68506c466e 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -918,11 +918,7 @@ function createNameStyleFunction(foundStyle, name) { const nameStyle = new Style({ image: imageStyle, - text: textStyle, - // although nameStyle will be used only for Point geometries - // fill and stroke are included to assist writing of MultiGeometry styles - fill: foundStyle.getFill(), - stroke: foundStyle.getStroke() + text: textStyle }); return nameStyle; } @@ -953,7 +949,7 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, if (geometry) { const type = geometry.getType(); if (type === GeometryType.GEOMETRY_COLLECTION) { - multiGeometryPoints = geometry.getGeometriesArray().filter(function(geometry) { + multiGeometryPoints = geometry.getGeometriesArrayRecursive().filter(function(geometry) { const type = geometry.getType(); return type === GeometryType.POINT || type === GeometryType.MULTI_POINT; }); @@ -1806,7 +1802,7 @@ function readStyle(node, objectStack) { const type = geometry.getType(); if (type === GeometryType.GEOMETRY_COLLECTION) { return new GeometryCollection( - geometry.getGeometriesArray().filter(function(geometry) { + geometry.getGeometriesArrayRecursive().filter(function(geometry) { const type = geometry.getType(); return type !== GeometryType.POLYGON && type !== GeometryType.MULTI_POLYGON; }) @@ -1827,7 +1823,7 @@ function readStyle(node, objectStack) { const type = geometry.getType(); if (type === GeometryType.GEOMETRY_COLLECTION) { return new GeometryCollection( - geometry.getGeometriesArray().filter(function(geometry) { + geometry.getGeometriesArrayRecursive().filter(function(geometry) { const type = geometry.getType(); return type === GeometryType.POLYGON || type === GeometryType.MULTI_POLYGON; }) @@ -2703,20 +2699,35 @@ function writeMultiGeometry(node, geometry, objectStack) { const context = {node: node}; const type = geometry.getType(); /** @type {Array} */ - let geometries; + let geometries = []; /** @type {function(*, Array<*>, string=): (Node|undefined)} */ let factory; - if (type == GeometryType.GEOMETRY_COLLECTION) { - geometries = /** @type {GeometryCollection} */ (geometry).getGeometries(); + if (type === GeometryType.GEOMETRY_COLLECTION) { + /** @type {GeometryCollection} */ (geometry).getGeometriesArrayRecursive().forEach(function(geometry) { + const type = geometry.getType(); + if (type === GeometryType.MULTI_POINT) { + geometries = geometries.concat(/** @type {MultiPoint} */ (geometry).getPoints()); + } else if (type === GeometryType.MULTI_LINE_STRING) { + geometries = geometries.concat(/** @type {MultiLineString} */ (geometry).getLineStrings()); + } else if (type === GeometryType.MULTI_POLYGON) { + geometries = geometries.concat(/** @type {MultiPolygon} */ (geometry).getPolygons()); + } else if (type === GeometryType.POINT + || type === GeometryType.LINE_STRING + || type === GeometryType.POLYGON) { + geometries.push(geometry); + } else { + assert(false, 39); // Unknown geometry type + } + }); factory = GEOMETRY_NODE_FACTORY; - } else if (type == GeometryType.MULTI_POINT) { + } else if (type === GeometryType.MULTI_POINT) { geometries = /** @type {MultiPoint} */ (geometry).getPoints(); factory = POINT_NODE_FACTORY; - } else if (type == GeometryType.MULTI_LINE_STRING) { + } else if (type === GeometryType.MULTI_LINE_STRING) { geometries = (/** @type {MultiLineString} */ (geometry)).getLineStrings(); factory = LINE_STRING_NODE_FACTORY; - } else if (type == GeometryType.MULTI_POLYGON) { + } else if (type === GeometryType.MULTI_POLYGON) { geometries = (/** @type {MultiPolygon} */ (geometry)).getPolygons(); factory = POLYGON_NODE_FACTORY; @@ -2831,13 +2842,61 @@ function writePlacemark(node, feature, objectStack) { // resolution-independent here const styles = styleFunction(feature, 0); if (styles) { - const style = Array.isArray(styles) ? styles[0] : styles; - if (this.writeStyles_) { - properties['Style'] = style; + const styleArray = Array.isArray(styles) ? styles : [styles]; + let pointStyles = styleArray; + if (feature.getGeometry()) { + pointStyles = styleArray.filter(function(style) { + const geometry = style.getGeometryFunction()(feature); + if (geometry) { + const type = geometry.getType(); + if (type === GeometryType.GEOMETRY_COLLECTION) { + return /** @type {GeometryCollection} */ (geometry).getGeometriesArrayRecursive().filter(function(geometry) { + const type = geometry.getType(); + return type === GeometryType.POINT || type === GeometryType.MULTI_POINT; + }).length; + } + return type === GeometryType.POINT || type === GeometryType.MULTI_POINT; + } + }); } - const textStyle = style.getText(); - if (textStyle) { - properties['name'] = textStyle.getText(); + if (this.writeStyles_) { + let lineStyles = styleArray; + let polyStyles = styleArray; + if (feature.getGeometry()) { + lineStyles = styleArray.filter(function(style) { + const geometry = style.getGeometryFunction()(feature); + if (geometry) { + const type = geometry.getType(); + if (type === GeometryType.GEOMETRY_COLLECTION) { + return /** @type {GeometryCollection} */ (geometry).getGeometriesArrayRecursive().filter(function(geometry) { + const type = geometry.getType(); + return type === GeometryType.LINE_STRING || type === GeometryType.MULTI_LINE_STRING; + }).length; + } + return type === GeometryType.LINE_STRING || type === GeometryType.MULTI_LINE_STRING; + } + }); + polyStyles = styleArray.filter(function(style) { + const geometry = style.getGeometryFunction()(feature); + if (geometry) { + const type = geometry.getType(); + if (type === GeometryType.GEOMETRY_COLLECTION) { + return /** @type {GeometryCollection} */ (geometry).getGeometriesArrayRecursive().filter(function(geometry) { + const type = geometry.getType(); + return type === GeometryType.POLYGON || type === GeometryType.MULTI_POLYGON; + }).length; + } + return type === GeometryType.POLYGON || type === GeometryType.MULTI_POLYGON; + } + }); + } + properties['Style'] = {pointStyles: pointStyles, lineStyles: lineStyles, polyStyles: polyStyles}; + } + if (pointStyles.length && properties['name'] === undefined) { + const textStyle = pointStyles[0].getText(); + if (textStyle) { + properties['name'] = textStyle.getText(); + } } } } @@ -2913,6 +2972,17 @@ function writePrimitiveGeometry(node, geometry, objectStack) { } +/** + * @const + * @type {Object>} + */ +// @ts-ignore +const POLY_STYLE_SEQUENCE = makeStructureNS( + NAMESPACE_URIS, [ + 'color', 'fill', 'outline' + ]); + + /** * @const * @type {Object>} @@ -2972,27 +3042,31 @@ function writePolygon(node, polygon, objectStack) { // @ts-ignore const POLY_STYLE_SERIALIZERS = makeStructureNS( NAMESPACE_URIS, { - 'color': makeChildAppender(writeColorTextNode) + 'color': makeChildAppender(writeColorTextNode), + 'fill': makeChildAppender(writeBooleanTextNode), + 'outline': makeChildAppender(writeBooleanTextNode) }); -/** - * A factory for creating coordinates nodes. - * @const - * @type {function(*, Array<*>, string=): (Node|undefined)} - */ -const COLOR_NODE_FACTORY = makeSimpleNodeFactory('color'); - - /** * @param {Node} node Node. - * @param {Fill} style Style. + * @param {Style} style Style. * @param {Array<*>} objectStack Object stack. */ function writePolyStyle(node, style, objectStack) { const /** @type {import("../xml.js").NodeStackItem} */ context = {node: node}; + const fill = style.getFill(); + const stroke = style.getStroke(); + const properties = { + 'color': fill ? fill.getColor() : undefined, + 'fill': fill ? undefined : false, + 'outline': stroke ? undefined : false + }; + const parentNode = objectStack[objectStack.length - 1].node; + const orderedKeys = POLY_STYLE_SEQUENCE[parentNode.namespaceURI]; + const values = makeSequence(properties, orderedKeys); pushSerializeAndPop(context, POLY_STYLE_SERIALIZERS, - COLOR_NODE_FACTORY, [style.getColor()], objectStack); + OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys); } @@ -3034,27 +3108,34 @@ const STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Style} style Style. + * @param {Object>} styles Styles. * @param {Array<*>} objectStack Object stack. */ -function writeStyle(node, style, objectStack) { +function writeStyle(node, styles, objectStack) { const /** @type {import("../xml.js").NodeStackItem} */ context = {node: node}; const properties = {}; - const fillStyle = style.getFill(); - const strokeStyle = style.getStroke(); - const imageStyle = style.getImage(); - const textStyle = style.getText(); - if (imageStyle && typeof /** @type {?} */ (imageStyle).getSrc === 'function') { - properties['IconStyle'] = imageStyle; + if (styles.pointStyles.length) { + const textStyle = styles.pointStyles[0].getText(); + if (textStyle) { + properties['LabelStyle'] = textStyle; + } + const imageStyle = styles.pointStyles[0].getImage(); + if (imageStyle && typeof /** @type {?} */ (imageStyle).getSrc === 'function') { + properties['IconStyle'] = imageStyle; + } } - if (textStyle) { - properties['LabelStyle'] = textStyle; + if (styles.lineStyles.length) { + const strokeStyle = styles.lineStyles[0].getStroke(); + if (strokeStyle) { + properties['LineStyle'] = strokeStyle; + } } - if (strokeStyle) { - properties['LineStyle'] = strokeStyle; - } - if (fillStyle) { - properties['PolyStyle'] = fillStyle; + if (styles.polyStyles.length) { + const strokeStyle = styles.polyStyles[0].getStroke(); + if (strokeStyle && !properties['LineStyle']) { + properties['LineStyle'] = strokeStyle; + } + properties['PolyStyle'] = styles.polyStyles[0]; } const parentNode = objectStack[objectStack.length - 1].node; const orderedKeys = STYLE_SEQUENCE[parentNode.namespaceURI]; diff --git a/src/ol/geom/GeometryCollection.js b/src/ol/geom/GeometryCollection.js index e1b63d76dd..1d407f2fdc 100644 --- a/src/ol/geom/GeometryCollection.js +++ b/src/ol/geom/GeometryCollection.js @@ -126,6 +126,23 @@ class GeometryCollection extends Geometry { return this.geometries_; } + /** + * @return {Array} Geometries. + */ + getGeometriesArrayRecursive() { + /** @type {Array} */ + let geometriesArray = []; + const geometries = this.geometries_; + for (let i = 0, ii = geometries.length; i < ii; ++i) { + if (geometries[i].getType() === this.getType()) { + geometriesArray = geometriesArray.concat(/** @type {GeometryCollection} */ (geometries[i]).getGeometriesArrayRecursive()); + } else { + geometriesArray.push(geometries[i]); + } + } + return geometriesArray; + } + /** * @inheritDoc */ diff --git a/test/spec/ol/format/kml.test.js b/test/spec/ol/format/kml.test.js index e1a248bb75..60d235387f 100644 --- a/test/spec/ol/format/kml.test.js +++ b/test/spec/ol/format/kml.test.js @@ -1207,9 +1207,16 @@ describe('ol.format.KML', function() { it('can write GeometryCollection geometries', function() { const collection = new GeometryCollection([ - new Point([1, 2]), - new LineString([[1, 2], [3, 4]]), - new Polygon([[[1, 2], [3, 4], [3, 2], [1, 2]]]) + new GeometryCollection([ + new Point([1, 2]), + new LineString([[1, 2], [3, 4]]), + new Polygon([[[1, 2], [3, 4], [3, 2], [1, 2]]]) + ]), + new GeometryCollection([ + new MultiPoint([[5, 6], [9, 10]]), + new MultiLineString([[[5, 6], [7, 8]], [[9, 10], [11, 12]]]), + new MultiPolygon([[[[5, 6], [7, 8], [7, 6], [5, 6]]], [[[9, 10], [11, 12], [11, 10], [9, 10]]]]) + ]) ]); const features = [new Feature(collection)]; const node = format.writeFeaturesNode(features); @@ -1234,6 +1241,32 @@ describe('ol.format.KML', function() { ' ' + ' ' + ' ' + + ' ' + + ' 5,6' + + ' ' + + ' ' + + ' 9,10' + + ' ' + + ' ' + + ' 5,6 7,8' + + ' ' + + ' ' + + ' 9,10 11,12' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 5,6 7,8 7,6 5,6' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 9,10 11,12 11,10 9,10' + + ' ' + + ' ' + + ' ' + ' ' + ' ' + ''; @@ -1621,6 +1654,9 @@ describe('ol.format.KML', function() { ' ff332211' + ' 2' + ' ' + + ' ' + + ' 0' + + ' ' + ' ' + ' ' + ' ' + @@ -2164,6 +2200,43 @@ describe('ol.format.KML', function() { expect(strokeStyle.getWidth()).to.be(9); expect(style.getText()).to.be(getDefaultTextStyle()); expect(style.getZIndex()).to.be(undefined); + + const lineString = new LineString([[1, 2], [3, 4]]); + const polygon = new Polygon([[[0, 0], [0, 2], [2, 2], [2, 0], [0, 0]]]); + const collection = new GeometryCollection([lineString, polygon]); + f.setGeometry(collection); + const node = format.writeFeaturesNode(fs); + const text1 = + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1,2 3,4' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 0,0 0,2 2,2 2,0 0,0' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + expect(node).to.xmleql(parse(text1)); }); it('disables the stroke when outline is \'0\'', function() { @@ -2233,6 +2306,41 @@ describe('ol.format.KML', function() { expect(style1.getFill()).to.be(fillStyle); expect(style1.getStroke()).to.be(null); expect(style1.getZIndex()).to.be(undefined); + + f.setGeometry(collectionFeature.getGeometry()); + const node = format.writeFeaturesNode(fs); + const text1 = + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1,2 3,4' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 0,0 0,2 2,2 2,0 0,0' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + expect(node).to.xmleql(parse(text1)); }); it('disables both fill and stroke when fill and outline are \'0\'', @@ -2302,6 +2410,41 @@ describe('ol.format.KML', function() { expect(style1.getFill()).to.be(null); expect(style1.getStroke()).to.be(null); expect(style1.getZIndex()).to.be(undefined); + + f.setGeometry(collectionFeature.getGeometry()); + const node = format.writeFeaturesNode(fs); + const text1 = + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1,2 3,4' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 0,0 0,2 2,2 2,0 0,0' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + expect(node).to.xmleql(parse(text1)); }); it('can create text style for named point placemarks (including html character codes)', function() { @@ -2392,6 +2535,10 @@ describe('ol.format.KML', function() { ' ' + ' ' + + ' ' + + ' 0' + + ' 0' + + ' ' + ' ' + ' ' + ''; @@ -2440,6 +2587,10 @@ describe('ol.format.KML', function() { ' https://developers.google.com/kml/schema/kml22gx.xsd">' + ' ' + ' ' + ' ' + ''; @@ -2472,13 +2623,17 @@ describe('ol.format.KML', function() { ' ffdf220c' + ' 0.5' + ' ' + + ' ' + + ' 0' + + ' 0' + + ' ' + ' ' + ' ' + ''; expect(node).to.xmleql(parse(text)); }); - it('can write an feature\'s stroke style', function() { + it('can write an feature\'s stroke style without fill', function() { const style = new Style({ stroke: new Stroke({ color: '#112233', @@ -2500,13 +2655,16 @@ describe('ol.format.KML', function() { ' ff332211' + ' 2' + ' ' + + ' ' + + ' 0' + + ' ' + ' ' + ' ' + ''; expect(node).to.xmleql(parse(text)); }); - it('can write an feature\'s fill style', function() { + it('can write an feature\'s fill style without outline', function() { const style = new Style({ fill: new Fill({ color: 'rgba(12, 34, 223, 0.7)' @@ -2525,6 +2683,41 @@ describe('ol.format.KML', function() { ' ' + + ' ' + + ''; + expect(node).to.xmleql(parse(text)); + }); + + it('can write an feature\'s fill style and outline', function() { + const style = new Style({ + fill: new Fill({ + color: 'rgba(12, 34, 223, 0.7)' + }), + stroke: new Stroke({ + color: '#112233', + width: 2 + }) + }); + const feature = new Feature(); + feature.setStyle([style]); + const node = format.writeFeaturesNode([feature]); + const text = + '' + + ' ' + + ' ' + ' ' + @@ -2554,6 +2747,7 @@ describe('ol.format.KML', function() { ' ' + ' ' + @@ -2561,6 +2755,7 @@ describe('ol.format.KML', function() { ' ' + ' ' + From ea5c91e19e55d0f7054ebe365fb8a80f8689e61f Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Fri, 14 Feb 2020 11:46:57 +0100 Subject: [PATCH 018/636] Revert "Merge pull request #9565 from dbrnz/v6.0.0-beta.7-branch" This reverts commit 35569a84277854109281946b73d95ba1b0bff5d1, reversing changes made to 29a434314b770a596baa981793b336575a406a6a. --- src/ol/interaction/MouseWheelZoom.js | 85 ++++++++++--- .../ol/interaction/mousewheelzoom.test.js | 112 ++++++++---------- 2 files changed, 122 insertions(+), 75 deletions(-) diff --git a/src/ol/interaction/MouseWheelZoom.js b/src/ol/interaction/MouseWheelZoom.js index 37a4e4022f..1ed762bc17 100644 --- a/src/ol/interaction/MouseWheelZoom.js +++ b/src/ol/interaction/MouseWheelZoom.js @@ -4,7 +4,17 @@ import {always, focus} from '../events/condition.js'; import EventType from '../events/EventType.js'; import {DEVICE_PIXEL_RATIO, FIREFOX} from '../has.js'; -import Interaction from './Interaction.js'; +import Interaction, {zoomByDelta} from './Interaction.js'; +import {clamp} from '../math.js'; + + +/** + * @enum {string} + */ +export const Mode = { + TRACKPAD: 'trackpad', + WHEEL: 'wheel' +}; /** @@ -92,23 +102,35 @@ class MouseWheelZoom extends Interaction { this.startTime_ = undefined; /** - * Events separated by this delay will be considered separate + * @private + * @type {?} + */ + this.timeoutId_; + + /** + * @private + * @type {Mode|undefined} + */ + this.mode_ = undefined; + + /** + * Trackpad events separated by this delay will be considered separate * interactions. * @type {number} */ - this.eventGap_ = 400; + this.trackpadEventGap_ = 400; /** * @type {?} */ - this.timeoutId_; + this.trackpadTimeoutId_; /** * The number of delta values per zoom level * @private * @type {number} */ - this.deltaPerZoom_ = 300; + this.trackpadDeltaPerZoom_ = 300; } @@ -130,7 +152,7 @@ class MouseWheelZoom extends Interaction { * @private */ endInteraction_() { - this.timeoutId_ = undefined; + this.trackpadTimeoutId_ = undefined; const view = this.getMap().getView(); view.endInteraction(undefined, this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0, this.lastAnchor_); } @@ -184,18 +206,53 @@ class MouseWheelZoom extends Interaction { this.startTime_ = now; } - const view = map.getView(); - if (this.timeoutId_) { - clearTimeout(this.timeoutId_); - } else { - view.beginInteraction(); + if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) { + this.mode_ = Math.abs(delta) < 4 ? + Mode.TRACKPAD : + Mode.WHEEL; } - this.timeoutId_ = setTimeout(this.endInteraction_.bind(this), this.eventGap_); - view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_); - this.startTime_ = now; + + if (this.mode_ === Mode.TRACKPAD) { + const view = map.getView(); + if (this.trackpadTimeoutId_) { + clearTimeout(this.trackpadTimeoutId_); + } else { + view.beginInteraction(); + } + this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.trackpadEventGap_); + view.adjustZoom(-delta / this.trackpadDeltaPerZoom_, this.lastAnchor_); + this.startTime_ = now; + return false; + } + + this.totalDelta_ += delta; + + const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0); + + clearTimeout(this.timeoutId_); + this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft); + return false; } + /** + * @private + * @param {import("../PluggableMap.js").default} map Map. + */ + handleWheelZoom_(map) { + const view = map.getView(); + if (view.getAnimating()) { + view.cancelAnimations(); + } + const delta = clamp(this.totalDelta_, -this.maxDelta_, this.maxDelta_); + zoomByDelta(view, -delta, this.lastAnchor_, this.duration_); + this.mode_ = undefined; + this.totalDelta_ = 0; + this.lastAnchor_ = null; + this.startTime_ = undefined; + this.timeoutId_ = undefined; + } + /** * Enable or disable using the mouse's location as an anchor when zooming * @param {boolean} useAnchor true to zoom to the mouse's location, false diff --git a/test/spec/ol/interaction/mousewheelzoom.test.js b/test/spec/ol/interaction/mousewheelzoom.test.js index 8eea3ea3c3..ee1858bf5d 100644 --- a/test/spec/ol/interaction/mousewheelzoom.test.js +++ b/test/spec/ol/interaction/mousewheelzoom.test.js @@ -3,7 +3,7 @@ import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js'; import View from '../../../../src/ol/View.js'; import Event from '../../../../src/ol/events/Event.js'; import {DEVICE_PIXEL_RATIO, FIREFOX} from '../../../../src/ol/has.js'; -import MouseWheelZoom from '../../../../src/ol/interaction/MouseWheelZoom.js'; +import MouseWheelZoom, {Mode} from '../../../../src/ol/interaction/MouseWheelZoom.js'; describe('ol.interaction.MouseWheelZoom', function() { @@ -32,13 +32,13 @@ describe('ol.interaction.MouseWheelZoom', function() { describe('timeout duration', function() { let clock; beforeEach(function() { - sinon.spy(interaction, 'endInteraction_'); + sinon.spy(interaction, 'handleWheelZoom_'); clock = sinon.useFakeTimers(); }); afterEach(function() { clock.restore(); - interaction.endInteraction_.restore(); + interaction.handleWheelZoom_.restore(); }); it('works with the default value', function(done) { @@ -49,12 +49,12 @@ describe('ol.interaction.MouseWheelZoom', function() { }); map.handleMapBrowserEvent(event); - clock.tick(100); - // default timeout is 400 ms, not called yet - expect(interaction.endInteraction_.called).to.be(false); + clock.tick(50); + // default timeout is 80 ms, not called yet + expect(interaction.handleWheelZoom_.called).to.be(false); - clock.tick(300); - expect(interaction.endInteraction_.called).to.be(true); + clock.tick(30); + expect(interaction.handleWheelZoom_.called).to.be(true); done(); }); @@ -63,15 +63,10 @@ describe('ol.interaction.MouseWheelZoom', function() { describe('handleEvent()', function() { - let view; - beforeEach(function() { - view = map.getView(); - }); - if (FIREFOX) { it('works on Firefox in DOM_DELTA_PIXEL mode (trackpad)', function(done) { map.once('postrender', function() { - expect(interaction.lastDelta_).to.be(1); + expect(interaction.mode_).to.be(Mode.TRACKPAD); done(); }); const event = new MapBrowserEvent('wheel', map, { @@ -89,7 +84,7 @@ describe('ol.interaction.MouseWheelZoom', function() { if (!FIREFOX) { it('works in DOM_DELTA_PIXEL mode (trackpad)', function(done) { map.once('postrender', function() { - expect(interaction.lastDelta_).to.be(1); + expect(interaction.mode_).to.be(Mode.TRACKPAD); done(); }); const event = new MapBrowserEvent('wheel', map, { @@ -104,61 +99,56 @@ describe('ol.interaction.MouseWheelZoom', function() { }); } - - it('works in DOM_DELTA_LINE mode (wheel)', function(done) { - map.once('postrender', function() { - expect(view.getResolution()).to.be(2); - expect(view.getCenter()).to.eql([0, 0]); - done(); + describe('spying on view.animateInternal()', function() { + let view; + beforeEach(function() { + view = map.getView(); + sinon.spy(view, 'animateInternal'); }); - const event = new MapBrowserEvent('wheel', map, { - type: 'wheel', - deltaMode: WheelEvent.DOM_DELTA_LINE, - deltaY: 7.5, - target: map.getViewport(), - preventDefault: Event.prototype.preventDefault - }); - event.coordinate = [0, 0]; - - map.handleMapBrowserEvent(event); - }); - - it('works on all browsers (wheel)', function(done) { - map.once('postrender', function() { - expect(view.getResolution()).to.be(2); - expect(view.getCenter()).to.eql([0, 0]); - done(); + afterEach(function() { + view.animateInternal.restore(); }); - const event = new MapBrowserEvent('wheel', map, { - type: 'wheel', - deltaY: 300, // trackpadDeltaPerZoom_ - target: map.getViewport(), - preventDefault: Event.prototype.preventDefault - }); - event.coordinate = [0, 0]; + it('works in DOM_DELTA_LINE mode (wheel)', function(done) { + map.once('postrender', function() { + const call = view.animateInternal.getCall(0); + expect(call.args[0].resolution).to.be(2); + expect(call.args[0].anchor).to.eql([0, 0]); + done(); + }); - map.handleMapBrowserEvent(event); - }); + const event = new MapBrowserEvent('wheel', map, { + type: 'wheel', + deltaMode: WheelEvent.DOM_DELTA_LINE, + deltaY: 3.714599609375, + target: map.getViewport(), + preventDefault: Event.prototype.preventDefault + }); + event.coordinate = [0, 0]; - it('works in DOM_DELTA_LINE mode (wheel)', function(done) { - map.once('postrender', function() { - expect(view.getResolution()).to.be(2); - expect(view.getCenter()).to.eql([0, 0]); - done(); + map.handleMapBrowserEvent(event); }); - const event = new MapBrowserEvent('wheel', map, { - type: 'wheel', - deltaMode: WheelEvent.DOM_DELTA_LINE, - deltaY: 7.5, // trackpadDeltaPerZoom_ / 40 - target: map.getViewport(), - preventDefault: Event.prototype.preventDefault - }); - event.coordinate = [0, 0]; + it('works on all browsers (wheel)', function(done) { + map.once('postrender', function() { + const call = view.animateInternal.getCall(0); + expect(call.args[0].resolution).to.be(2); + expect(call.args[0].anchor).to.eql([0, 0]); + done(); + }); + + const event = new MapBrowserEvent('wheel', map, { + type: 'wheel', + deltaY: 120, + target: map.getViewport(), + preventDefault: Event.prototype.preventDefault + }); + event.coordinate = [0, 0]; + + map.handleMapBrowserEvent(event); + }); - map.handleMapBrowserEvent(event); }); }); From 8fe71bbbff95eb96f91ab8b046ffa09a6dbdb9cb Mon Sep 17 00:00:00 2001 From: John Leonard Date: Fri, 14 Feb 2020 11:39:54 +0000 Subject: [PATCH 019/636] perf: only do expensive reload when texture changes --- src/ol/webgl/Helper.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/webgl/Helper.js b/src/ol/webgl/Helper.js index cf2ceeab3a..ce97b33a01 100644 --- a/src/ol/webgl/Helper.js +++ b/src/ol/webgl/Helper.js @@ -558,6 +558,7 @@ class WebGLHelper extends Disposable { if (value instanceof HTMLCanvasElement || value instanceof HTMLImageElement || value instanceof ImageData) { // create a texture & put data if (!uniform.texture) { + uniform.prevValue = undefined; uniform.texture = gl.createTexture(); } gl.activeTexture(gl[`TEXTURE${textureSlot}`]); @@ -567,7 +568,8 @@ class WebGLHelper extends Disposable { gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); const imageReady = !(value instanceof HTMLImageElement) || /** @type {HTMLImageElement} */(value).complete; - if (imageReady) { + if (imageReady && uniform.prevValue !== value) { + uniform.prevValue = value; gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value); } From f3ce8e23b47cc98da0472303c62b2f3568b5a568 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Fri, 14 Feb 2020 13:49:08 +0100 Subject: [PATCH 020/636] Fractional zoom changes in WHEEL mode --- src/ol/interaction/MouseWheelZoom.js | 15 +++++++++++---- test/spec/ol/interaction/mousewheelzoom.test.js | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ol/interaction/MouseWheelZoom.js b/src/ol/interaction/MouseWheelZoom.js index 1ed762bc17..92c57b1ad7 100644 --- a/src/ol/interaction/MouseWheelZoom.js +++ b/src/ol/interaction/MouseWheelZoom.js @@ -130,7 +130,7 @@ class MouseWheelZoom extends Interaction { * @private * @type {number} */ - this.trackpadDeltaPerZoom_ = 300; + this.deltaPerZoom_ = 300; } @@ -220,7 +220,7 @@ class MouseWheelZoom extends Interaction { view.beginInteraction(); } this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.trackpadEventGap_); - view.adjustZoom(-delta / this.trackpadDeltaPerZoom_, this.lastAnchor_); + view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_); this.startTime_ = now; return false; } @@ -244,8 +244,15 @@ class MouseWheelZoom extends Interaction { if (view.getAnimating()) { view.cancelAnimations(); } - const delta = clamp(this.totalDelta_, -this.maxDelta_, this.maxDelta_); - zoomByDelta(view, -delta, this.lastAnchor_, this.duration_); + let delta = -clamp(this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_) / this.deltaPerZoom_; + const currentZoom = view.getZoom(); + const newZoom = view.getConstrainedZoom(currentZoom + delta); + if (currentZoom === newZoom) { + // view has a zoom constraint, zoom by 1 + delta = delta ? delta > 0 ? 1 : -1 : 0; + } + zoomByDelta(view, delta, this.lastAnchor_, this.duration_); + this.mode_ = undefined; this.totalDelta_ = 0; this.lastAnchor_ = null; diff --git a/test/spec/ol/interaction/mousewheelzoom.test.js b/test/spec/ol/interaction/mousewheelzoom.test.js index ee1858bf5d..8f0343446d 100644 --- a/test/spec/ol/interaction/mousewheelzoom.test.js +++ b/test/spec/ol/interaction/mousewheelzoom.test.js @@ -121,7 +121,7 @@ describe('ol.interaction.MouseWheelZoom', function() { const event = new MapBrowserEvent('wheel', map, { type: 'wheel', deltaMode: WheelEvent.DOM_DELTA_LINE, - deltaY: 3.714599609375, + deltaY: 20, target: map.getViewport(), preventDefault: Event.prototype.preventDefault }); @@ -140,7 +140,7 @@ describe('ol.interaction.MouseWheelZoom', function() { const event = new MapBrowserEvent('wheel', map, { type: 'wheel', - deltaY: 120, + deltaY: 300, target: map.getViewport(), preventDefault: Event.prototype.preventDefault }); From bed2b6e22291dad37e4028e4b33145b25cb97eda Mon Sep 17 00:00:00 2001 From: jipexu Date: Sat, 15 Feb 2020 22:10:41 +0100 Subject: [PATCH 021/636] typo --- examples/snap.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/snap.html b/examples/snap.html index c47b279255..409f09491d 100644 --- a/examples/snap.html +++ b/examples/snap.html @@ -10,7 +10,7 @@ docs: > tags: "draw, edit, modify, vector, snap" ---
-
+
+{{#if worker.source}} +
+ +
worker.js{{ worker.source }}
+
+{{/if}}
Copy @@ -167,7 +175,6 @@
package.json{{ pkgJson }}
- {{{ js.tag }}} diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js index 22a7867500..d25306b897 100644 --- a/examples/webpack/example-builder.js +++ b/examples/webpack/example-builder.js @@ -208,6 +208,10 @@ ExampleBuilder.prototype.render = async function(dir, chunk) { jsSource = jsSource.replace(new RegExp(entry.key, 'g'), entry.value); } } + // Remove worker loader import and modify `new Worker()` to add source + jsSource = jsSource.replace(/import Worker from 'worker-loader![^\n]*\n/g, ''); + jsSource = jsSource.replace('new Worker()', 'new Worker(\'./worker.js\')'); + data.js = { tag: ``, source: jsSource @@ -218,9 +222,33 @@ ExampleBuilder.prototype.render = async function(dir, chunk) { data.js.tag = prelude + data.js.tag; } + // check for worker js + const workerName = `${name}.worker.js`; + const workerPath = path.join(dir, workerName); + let workerSource; + try { + workerSource = await readFile(workerPath, readOptions); + } catch (err) { + // pass + } + if (workerSource) { + // remove "../src/" prefix and ".js" to have the same import syntax as the documentation + workerSource = workerSource.replace(/'\.\.\/src\//g, '\''); + workerSource = workerSource.replace(/\.js';/g, '\';'); + if (data.cloak) { + for (const entry of data.cloak) { + workerSource = workerSource.replace(new RegExp(entry.key, 'g'), entry.value); + } + } + data.worker = { + source: workerSource + }; + assets[workerName] = workerSource; + } + data.pkgJson = JSON.stringify({ name: name, - dependencies: getDependencies(jsSource), + dependencies: getDependencies(jsSource + workerSource ? `\n${workerSource}` : ''), devDependencies: { parcel: '1.11.0' }, From ade9ac8857685508edb3abf8d9cd517494a23e2f Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 22 Mar 2020 20:08:24 +0100 Subject: [PATCH 193/636] Make mapbox-style example fullscreen on demand --- examples/mapbox-style.html | 27 ++------------------------- examples/mapbox-style.js | 5 ++++- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/examples/mapbox-style.html b/examples/mapbox-style.html index 8285734955..1c88215464 100644 --- a/examples/mapbox-style.html +++ b/examples/mapbox-style.html @@ -1,5 +1,5 @@ --- -layout: example-verbatim.html +layout: example.html title: Vector tiles created from a Mapbox Style object shortdesc: Example of using ol-mapbox-style with tiles from maptiler.com. docs: > @@ -10,27 +10,4 @@ cloak: - key: get_your_own_D6rA4zTHduk6KOKTXzGB value: Get your own API key at https://www.maptiler.com/cloud/ --- - - - - - - - Mapbox Style objects with ol-mapbox-style - - - - - -
- - - - +
diff --git a/examples/mapbox-style.js b/examples/mapbox-style.js index 819177a69d..a774155526 100644 --- a/examples/mapbox-style.js +++ b/examples/mapbox-style.js @@ -1,3 +1,6 @@ import apply from 'ol-mapbox-style'; +import FullScreen from '../src/ol/control/FullScreen.js'; -apply('map', 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB'); +apply('map', 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB').then(function(map) { + map.addControl(new FullScreen()); +}); From 28f390828dac51b1f793e165356d846187c4178e Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 22 Mar 2020 20:11:07 +0100 Subject: [PATCH 194/636] Use same data as in mapbox-style example --- examples/mvtlayer.worker.js | 98 ----------- examples/offscreen-canvas-tiles.css | 2 +- examples/offscreen-canvas-tiles.js | 16 +- examples/offscreen-canvas-tiles.worker.js | 154 ++++++++++++++++++ examples/resources/mapbox-streets-v6-style.js | 38 +---- 5 files changed, 170 insertions(+), 138 deletions(-) delete mode 100644 examples/mvtlayer.worker.js create mode 100644 examples/offscreen-canvas-tiles.worker.js diff --git a/examples/mvtlayer.worker.js b/examples/mvtlayer.worker.js deleted file mode 100644 index 16a555e052..0000000000 --- a/examples/mvtlayer.worker.js +++ /dev/null @@ -1,98 +0,0 @@ -import VectorTileLayer from '../src/ol/layer/VectorTile.js'; -import VectorTileSource from '../src/ol/source/VectorTile.js'; -import MVT from '../src/ol/format/MVT.js'; -import {Projection} from '../src/ol/proj.js'; -import TileQueue from '../src/ol/TileQueue.js'; -import {getTilePriority as tilePriorityFunction} from '../src/ol/TileQueue.js'; -import {Style, Fill, Stroke, Icon, Text} from '../src/ol/style.js'; -import createMapboxStreetsV6Style from './resources/mapbox-streets-v6-style.js'; -import {renderDeclutterItems} from '../src/ol/render.js'; - -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; - -/** @type {any} */ -const worker = self; - -let frameState; -const canvas = new OffscreenCanvas(1, 1); - -function getCircularReplacer() { - const seen = new WeakSet(); - return function(key, value) { - if (typeof value === 'object' && value !== null) { - if (seen.has(value)) { - return '[circular]'; - } - seen.add(value); - } - return value; - }; -} - -function getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) { - return tilePriorityFunction(frameState, tile, tileSourceKey, tileCenter, tileResolution); -} - -const layer = new VectorTileLayer({ - declutter: true, - style: createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text), - source: new VectorTileSource({ - format: new MVT(), - url: 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + - '{z}/{x}/{y}.vector.pbf?access_token=' + key - }) -}); -const renderer = layer.getRenderer(); -const tileQueue = new TileQueue(getTilePriority, function() { - worker.postMessage({action: 'request-render'}); -}); -const maxTotalLoading = 8; -const maxNewLoads = 2; - -let rendererTransform, rendererOpacity; -renderer.useContainer = function(target, transform, opacity) { - target.style = {}; - this.canvas = target; - this.context = target.getContext('2d'); - this.container = { - firstElementChild: target - }; - rendererTransform = transform; - rendererOpacity = opacity; -}; - -let rendering = false; - -worker.addEventListener('message', function(event) { - if (event.data.action !== 'render') { - return; - } - if (rendering) { - // drop this frame - worker.postMessage({action: 'request-render'}); - return; - } - frameState = event.data.frameState; - frameState.tileQueue = tileQueue; - frameState.viewState.projection.__proto__ = Projection.prototype; - rendering = true; - requestAnimationFrame(function() { - renderer.renderFrame(frameState, canvas); - renderDeclutterItems(frameState, null); - if (tileQueue.getTilesLoading() < maxTotalLoading) { - tileQueue.reprioritize(); // FIXME only call if view has changed - tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads); - } - const imageData = canvas.transferToImageBitmap(); - worker.postMessage({ - action: 'rendered', - imageData: imageData, - transform: rendererTransform, - opacity: rendererOpacity, - frameState: JSON.parse(JSON.stringify(frameState, getCircularReplacer())) - }, [imageData]); - rendering = false; - }); -}); - -export let create; diff --git a/examples/offscreen-canvas-tiles.css b/examples/offscreen-canvas-tiles.css index 33e90f7301..9fde055492 100644 --- a/examples/offscreen-canvas-tiles.css +++ b/examples/offscreen-canvas-tiles.css @@ -1,3 +1,3 @@ .map { - background: #f8f4f0; + background: rgba(232, 230, 223, 1); } diff --git a/examples/offscreen-canvas-tiles.js b/examples/offscreen-canvas-tiles.js index 60ee70480c..29243c2d9d 100644 --- a/examples/offscreen-canvas-tiles.js +++ b/examples/offscreen-canvas-tiles.js @@ -1,11 +1,12 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import Layer from '../src/ol/layer/Layer.js'; -//eslint-disable-next-line -import Worker from 'worker-loader!./mvtlayer.worker.js'; +import Worker from 'worker-loader!./offscreen-canvas-tiles.worker.js'; //eslint-disable-line import {compose, create} from '../src/ol/transform.js'; import {createTransformString} from '../src/ol/render/canvas.js'; import {getFontParameters} from '../src/ol/css.js'; +import {createXYZ} from '../src/ol/tilegrid.js'; +import {FullScreen} from '../src/ol/control.js'; const mvtLayerWorker = new Worker(); @@ -14,7 +15,7 @@ mvtLayerWorker.addEventListener('message', event => { if (event.data.action === 'getFontParameters') { getFontParameters(event.data.font, font => { mvtLayerWorker.postMessage({ - action: 'getFontParameters', + action: 'gotFontParameters', font: font }); }); @@ -28,12 +29,12 @@ mvtLayerWorker.addEventListener('message', event => { mvtLayerWorker.postMessage({ action: 'imageLoaded', image: imageBitmap, - iconName: event.data.iconName + src: event.data.src }, [imageBitmap]); }); }); - image.src = 'https://unpkg.com/@mapbox/maki@4.0.0/icons/' + event.data.iconName + '-15.svg'; - loadingImages[event.data.iconName] = true; + image.src = event.data.src; + loadingImages[event.data.src] = true; } } }); @@ -112,10 +113,12 @@ const map = new Map({ ], target: 'map', view: new View({ + resolutions: createXYZ({tileSize: 512}).getResolutions89, center: [0, 0], zoom: 2 }) }); +map.addControl(new FullScreen()); mvtLayerWorker.addEventListener('message', function(message) { if (message.data.action === 'request-render') { map.render(); @@ -125,7 +128,6 @@ mvtLayerWorker.addEventListener('message', function(message) { canvas.width = imageData.width; canvas.height = imageData.height; canvas.getContext('2d').drawImage(imageData, 0, 0); - canvas.style.opacity = message.data.opacity; canvas.style.transform = message.data.transform; workerFrameState = message.data.frameState; updateContainerTransform(); diff --git a/examples/offscreen-canvas-tiles.worker.js b/examples/offscreen-canvas-tiles.worker.js new file mode 100644 index 0000000000..d801747de5 --- /dev/null +++ b/examples/offscreen-canvas-tiles.worker.js @@ -0,0 +1,154 @@ +import VectorTileLayer from '../src/ol/layer/VectorTile.js'; +import VectorTileSource from '../src/ol/source/VectorTile.js'; +import MVT from '../src/ol/format/MVT.js'; +import {Projection} from '../src/ol/proj.js'; +import TileQueue from '../src/ol/TileQueue.js'; +import {getTilePriority as tilePriorityFunction} from '../src/ol/TileQueue.js'; +import {renderDeclutterItems} from '../src/ol/render.js'; +import styleFunction from 'ol-mapbox-style/dist/stylefunction.js'; +import {inView} from '../src/ol/layer/Layer.js'; + +/** @type {any} */ +const worker = self; + +let frameState, pixelRatio; +const canvas = new OffscreenCanvas(1, 1); + +function getCircularReplacer() { + const seen = new WeakSet(); + return function(key, value) { + if (typeof value === 'object' && value !== null) { + if (seen.has(value)) { + return '[circular]'; + } + seen.add(value); + } + return value; + }; +} + +function getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) { + return tilePriorityFunction(frameState, tile, tileSourceKey, tileCenter, tileResolution); +} + +const landcover = new VectorTileLayer({ + visible: false, + declutter: true, + maxZoom: 9, + source: new VectorTileSource({ + maxZoom: 9, + format: new MVT(), + url: 'https://api.maptiler.com/tiles/landcover/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' + }) +}); +const contours = new VectorTileLayer({ + visible: false, + declutter: true, + minZoom: 9, + maxZoom: 14, + source: new VectorTileSource({ + minZoom: 9, + maxZoom: 14, + format: new MVT(), + url: 'https://api.maptiler.com/tiles/contours/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' + }) +}); +const openmaptiles = new VectorTileLayer({ + visible: false, + declutter: true, + source: new VectorTileSource({ + format: new MVT(), + maxZoom: 14, + url: 'https://api.maptiler.com/tiles/v3/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' + }) +}); + +const layers = [landcover, contours, openmaptiles]; +let rendererTransform; +layers.forEach(layer => { + layer.once('change', () => { + layer.setVisible(true); + worker.postMessage({action: 'request-render'}); + }); + layer.getRenderer().useContainer = function(target, transform) { + this.containerReused = this.getLayer() !== layers[0]; + target.style = {}; + this.canvas = target; + this.context = target.getContext('2d'); + this.container = { + firstElementChild: target + }; + rendererTransform = transform; + }; +}); + +function getFont(font) { + return font[0] + .replace('Noto Sans', 'serif') + .replace('Roboto', 'sans-serif'); +} + +function loadStyles() { + const styleUrl = 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB'; + fetch(styleUrl).then(data => data.json()).then(styleJson => { + const spriteUrl = styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.json'; + const spriteImageUrl = styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.png'; + fetch(spriteUrl).then(data => data.json()).then(spriteJson => { + styleFunction(landcover, styleJson, 'landcover', undefined, spriteJson, spriteImageUrl, getFont); + styleFunction(contours, styleJson, 'contours', undefined, spriteJson, spriteImageUrl, getFont); + styleFunction(openmaptiles, styleJson, 'openmaptiles', undefined, spriteJson, spriteImageUrl, getFont); + }); + }); +} + +const tileQueue = new TileQueue(getTilePriority, () => { + worker.postMessage({action: 'request-render'}); +}); +const maxTotalLoading = 8; +const maxNewLoads = 2; + +let rendering = false; + +worker.addEventListener('message', event => { + if (event.data.action !== 'render') { + return; + } + frameState = event.data.frameState; + if (!pixelRatio) { + pixelRatio = frameState.pixelRatio; + loadStyles(); + } + frameState.tileQueue = tileQueue; + frameState.viewState.projection.__proto__ = Projection.prototype; + if (rendering) { + return; + } + rendering = true; + requestAnimationFrame(function() { + let rendered = false; + layers.forEach(layer => { + if (inView(layer.getLayerState(), frameState.viewState)) { + rendered = true; + const renderer = layer.getRenderer(); + renderer.renderFrame(frameState, canvas); + } + }); + rendering = false; + if (!rendered) { + return; + } + renderDeclutterItems(frameState, null); + if (tileQueue.getTilesLoading() < maxTotalLoading) { + tileQueue.reprioritize(); // FIXME only call if view has changed + tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads); + } + const imageData = canvas.transferToImageBitmap(); + worker.postMessage({ + action: 'rendered', + imageData: imageData, + transform: rendererTransform, + frameState: JSON.parse(JSON.stringify(frameState, getCircularReplacer())) + }, [imageData]); + }); +}); + diff --git a/examples/resources/mapbox-streets-v6-style.js b/examples/resources/mapbox-streets-v6-style.js index e1f0197bf8..afc1d8605d 100644 --- a/examples/resources/mapbox-streets-v6-style.js +++ b/examples/resources/mapbox-streets-v6-style.js @@ -2,20 +2,6 @@ // http://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6.json function createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text) { - - let worker; - try { - worker = self.document ? null : self; - worker.addEventListener('message', message => { - if (message.data.type === 'imageLoaded') { - iconCache[message.data.iconName].setImage(new Icon({ - img: message.data.image, - imgSize: [15, 15] - })); - } - }); - } catch (e) {} - var fill = new Fill({color: ''}); var stroke = new Stroke({color: '', width: 1}); var polygon = new Style({fill: fill}); @@ -28,19 +14,11 @@ function createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text) { function getIcon(iconName) { var icon = iconCache[iconName]; if (!icon) { - if (!worker) { - icon = new Style({image: new Icon({ - src: 'https://unpkg.com/@mapbox/maki@4.0.0/icons/' + iconName + '-15.svg', - imgSize: [15, 15], - crossOrigin: 'anonymous' - })}); - } else { - icon = new Style({}); - worker.postMessage({ - type: 'loadImage', - iconName: iconName - }); - } + icon = new Style({image: new Icon({ + src: 'https://unpkg.com/@mapbox/maki@4.0.0/icons/' + iconName + '-15.svg', + imgSize: [15, 15], + crossOrigin: 'anonymous' + })}); iconCache[iconName] = icon; } return icon; @@ -331,8 +309,4 @@ function createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text) { styles.length = length; return styles; }; -} - -try { - module.exports = createMapboxStreetsV6Style; -} catch (e) {} +} \ No newline at end of file From 941df3b270aee8d8679999c09afdc1d5fdaf6079 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 22 Mar 2020 20:19:15 +0100 Subject: [PATCH 195/636] Fix issues with TypeScript's built-in webworker lib --- tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.json b/tsconfig.json index 3a208514a3..4a838e8614 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,7 @@ "lib": ["es2017", "dom", "webworker"], /* Specify library files to be included in the compilation. */ "allowJs": true, /* Allow javascript files to be compiled. */ "checkJs": true, /* Report errors in .js files. */ + "skipLibCheck": true, // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ // "declaration": true, /* Generates corresponding '.d.ts' file. */ // "sourceMap": true, /* Generates corresponding '.map' file. */ From 828becf68e70fa3b97b95adcdf8922489db3a3a9 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 22 Mar 2020 20:49:40 +0100 Subject: [PATCH 196/636] Position rotate control in the bottom left --- examples/mapbox-style.css | 6 ++++++ examples/offscreen-canvas-tiles.css | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 examples/mapbox-style.css diff --git a/examples/mapbox-style.css b/examples/mapbox-style.css new file mode 100644 index 0000000000..c79f84a2c1 --- /dev/null +++ b/examples/mapbox-style.css @@ -0,0 +1,6 @@ +.ol-rotate { + left: .5em; + bottom: .5em; + top: unset; + right: unset; +} \ No newline at end of file diff --git a/examples/offscreen-canvas-tiles.css b/examples/offscreen-canvas-tiles.css index 9fde055492..10bacb9a63 100644 --- a/examples/offscreen-canvas-tiles.css +++ b/examples/offscreen-canvas-tiles.css @@ -1,3 +1,9 @@ .map { background: rgba(232, 230, 223, 1); } +.ol-rotate { + left: .5em; + bottom: .5em; + top: unset; + right: unset; +} \ No newline at end of file From 0e1af6836ffbf195cb5715ad6f5edaacbfdb7584 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 23 Mar 2020 12:46:06 +0100 Subject: [PATCH 197/636] Example cleanup --- examples/offscreen-canvas-tiles.html | 1 + examples/offscreen-canvas-tiles.js | 126 +++++++++------------ examples/offscreen-canvas-tiles.worker.js | 129 ++++++++++------------ package.json | 1 + 4 files changed, 114 insertions(+), 143 deletions(-) diff --git a/examples/offscreen-canvas-tiles.html b/examples/offscreen-canvas-tiles.html index 231da2f14f..741d469e23 100644 --- a/examples/offscreen-canvas-tiles.html +++ b/examples/offscreen-canvas-tiles.html @@ -5,5 +5,6 @@ shortdesc: Example of a map that delegates rendering to a worker. docs: > The map in this example is rendered in a web worker, using `OffscreenCanvas`. **Note:** This is currently only supported in Chrome and Edge. tags: "worker, offscreencanvas, vector-tiles" +experimental: true ---
diff --git a/examples/offscreen-canvas-tiles.js b/examples/offscreen-canvas-tiles.js index 29243c2d9d..53696a7414 100644 --- a/examples/offscreen-canvas-tiles.js +++ b/examples/offscreen-canvas-tiles.js @@ -4,56 +4,16 @@ import Layer from '../src/ol/layer/Layer.js'; import Worker from 'worker-loader!./offscreen-canvas-tiles.worker.js'; //eslint-disable-line import {compose, create} from '../src/ol/transform.js'; import {createTransformString} from '../src/ol/render/canvas.js'; -import {getFontParameters} from '../src/ol/css.js'; import {createXYZ} from '../src/ol/tilegrid.js'; import {FullScreen} from '../src/ol/control.js'; +import stringify from 'json-stringify-safe'; -const mvtLayerWorker = new Worker(); - -const loadingImages = {}; -mvtLayerWorker.addEventListener('message', event => { - if (event.data.action === 'getFontParameters') { - getFontParameters(event.data.font, font => { - mvtLayerWorker.postMessage({ - action: 'gotFontParameters', - font: font - }); - }); - } else if (event.data.action === 'loadImage') { - if (!(event.data.src in loadingImages)) { - const image = new Image(); - image.crossOrigin = 'anonymous'; - image.addEventListener('load', function() { - createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => { - delete loadingImages[event.data.iconName]; - mvtLayerWorker.postMessage({ - action: 'imageLoaded', - image: imageBitmap, - src: event.data.src - }, [imageBitmap]); - }); - }); - image.src = event.data.src; - loadingImages[event.data.src] = true; - } - } -}); - -function getCircularReplacer() { - const seen = new WeakSet(); - return function(key, value) { - if (typeof value === 'object' && value !== null) { - if (seen.has(value)) { - return '[circular]'; - } - seen.add(value); - } - return value; - }; -} +const worker = new Worker(); let container, transformContainer, canvas, workerFrameState, mainThreadFrameState; +// Transform the container to account for the differnece between the (newer) +// main thread frameState and the (older) worker frameState function updateContainerTransform() { if (workerFrameState) { const viewState = mainThreadFrameState.viewState; @@ -65,6 +25,8 @@ function updateContainerTransform() { const renderedResolution = renderedViewState.resolution; const renderedRotation = renderedViewState.rotation; const transform = create(); + // Skip the extra transform for rotated views, because it will not work + // correctly in that case if (!rotation) { compose(transform, (renderedCenter[0] - center[0]) / resolution, @@ -75,40 +37,36 @@ function updateContainerTransform() { } transformContainer.style.transform = createTransformString(transform); } - -} - -function render(id, frameState) { - if (!container) { - container = document.createElement('div'); - container.style.position = 'absolute'; - container.style.width = '100%'; - container.style.height = '100%'; - transformContainer = document.createElement('div'); - transformContainer.style.position = 'absolute'; - transformContainer.style.width = '100%'; - transformContainer.style.height = '100%'; - container.appendChild(transformContainer); - canvas = document.createElement('canvas'); - canvas.style.position = 'absolute'; - canvas.style.left = '0'; - canvas.style.transformOrigin = 'top left'; - transformContainer.appendChild(canvas); - } - mainThreadFrameState = frameState; - updateContainerTransform(); - mvtLayerWorker.postMessage({ - action: 'render', - id: id, - frameState: JSON.parse(JSON.stringify(frameState, getCircularReplacer())) - }); - return container; } const map = new Map({ layers: [ new Layer({ - render: render.bind(undefined, 'mapbox') + render: function(frameState) { + if (!container) { + container = document.createElement('div'); + container.style.position = 'absolute'; + container.style.width = '100%'; + container.style.height = '100%'; + transformContainer = document.createElement('div'); + transformContainer.style.position = 'absolute'; + transformContainer.style.width = '100%'; + transformContainer.style.height = '100%'; + container.appendChild(transformContainer); + canvas = document.createElement('canvas'); + canvas.style.position = 'absolute'; + canvas.style.left = '0'; + canvas.style.transformOrigin = 'top left'; + transformContainer.appendChild(canvas); + } + mainThreadFrameState = frameState; + updateContainerTransform(); + worker.postMessage({ + action: 'render', + frameState: JSON.parse(stringify(frameState)) + }); + return container; + } }) ], target: 'map', @@ -119,10 +77,28 @@ const map = new Map({ }) }); map.addControl(new FullScreen()); -mvtLayerWorker.addEventListener('message', function(message) { - if (message.data.action === 'request-render') { + +// Worker messaging and actions +worker.addEventListener('message', message => { + if (message.data.action === 'loadImage') { + // Image loader for ol-mapbox-style + const image = new Image(); + image.crossOrigin = 'anonymous'; + image.addEventListener('load', function() { + createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => { + worker.postMessage({ + action: 'imageLoaded', + image: imageBitmap, + src: event.data.src + }, [imageBitmap]); + }); + }); + image.src = event.data.src; + } else if (message.data.action === 'request-render') { + // Worker requested a new render frame map.render(); } else if (canvas && message.data.action === 'rendered') { + // Worker provies a new render frame transformContainer.style.transform = ''; const imageData = message.data.imageData; canvas.width = imageData.width; diff --git a/examples/offscreen-canvas-tiles.worker.js b/examples/offscreen-canvas-tiles.worker.js index d801747de5..e80187e7af 100644 --- a/examples/offscreen-canvas-tiles.worker.js +++ b/examples/offscreen-canvas-tiles.worker.js @@ -7,81 +7,35 @@ import {getTilePriority as tilePriorityFunction} from '../src/ol/TileQueue.js'; import {renderDeclutterItems} from '../src/ol/render.js'; import styleFunction from 'ol-mapbox-style/dist/stylefunction.js'; import {inView} from '../src/ol/layer/Layer.js'; +import stringify from 'json-stringify-safe'; /** @type {any} */ const worker = self; -let frameState, pixelRatio; +let frameState, pixelRatio, rendererTransform; const canvas = new OffscreenCanvas(1, 1); -function getCircularReplacer() { - const seen = new WeakSet(); - return function(key, value) { - if (typeof value === 'object' && value !== null) { - if (seen.has(value)) { - return '[circular]'; - } - seen.add(value); - } - return value; - }; -} - -function getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) { - return tilePriorityFunction(frameState, tile, tileSourceKey, tileCenter, tileResolution); -} - -const landcover = new VectorTileLayer({ - visible: false, - declutter: true, - maxZoom: 9, - source: new VectorTileSource({ +const sources = { + landcover: new VectorTileSource({ maxZoom: 9, format: new MVT(), url: 'https://api.maptiler.com/tiles/landcover/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' - }) -}); -const contours = new VectorTileLayer({ - visible: false, - declutter: true, - minZoom: 9, - maxZoom: 14, - source: new VectorTileSource({ + }), + contours: new VectorTileSource({ minZoom: 9, maxZoom: 14, format: new MVT(), url: 'https://api.maptiler.com/tiles/contours/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' - }) -}); -const openmaptiles = new VectorTileLayer({ - visible: false, - declutter: true, - source: new VectorTileSource({ + }), + openmaptiles: new VectorTileSource({ format: new MVT(), maxZoom: 14, url: 'https://api.maptiler.com/tiles/v3/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' }) -}); - -const layers = [landcover, contours, openmaptiles]; -let rendererTransform; -layers.forEach(layer => { - layer.once('change', () => { - layer.setVisible(true); - worker.postMessage({action: 'request-render'}); - }); - layer.getRenderer().useContainer = function(target, transform) { - this.containerReused = this.getLayer() !== layers[0]; - target.style = {}; - this.canvas = target; - this.context = target.getContext('2d'); - this.container = { - firstElementChild: target - }; - rendererTransform = transform; - }; -}); +}; +const layers = []; +// Font replacement so we do not need to load web fonts in the worker function getFont(font) { return font[0] .replace('Noto Sans', 'serif') @@ -90,23 +44,63 @@ function getFont(font) { function loadStyles() { const styleUrl = 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB'; + fetch(styleUrl).then(data => data.json()).then(styleJson => { + const buckets = []; + let currentSource; + styleJson.layers.forEach(layer => { + if (!layer.source) { + return; + } + if (currentSource !== layer.source) { + currentSource = layer.source; + buckets.push({ + source: layer.source, + layers: [] + }); + } + buckets[buckets.length - 1].layers.push(layer.id); + }); + const spriteUrl = styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.json'; const spriteImageUrl = styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.png'; fetch(spriteUrl).then(data => data.json()).then(spriteJson => { - styleFunction(landcover, styleJson, 'landcover', undefined, spriteJson, spriteImageUrl, getFont); - styleFunction(contours, styleJson, 'contours', undefined, spriteJson, spriteImageUrl, getFont); - styleFunction(openmaptiles, styleJson, 'openmaptiles', undefined, spriteJson, spriteImageUrl, getFont); + buckets.forEach(bucket => { + const source = sources[bucket.source]; + if (!source) { + return; + } + const layer = new VectorTileLayer({ + declutter: true, + source, + minZoom: source.getTileGrid().getMinZoom() + }); + layer.getRenderer().useContainer = function(target, transform) { + this.containerReused = this.getLayer() !== layers[0]; + target.style = {}; + this.canvas = target; + this.context = target.getContext('2d'); + this.container = { + firstElementChild: target + }; + rendererTransform = transform; + }; + styleFunction(layer, styleJson, bucket.layers, undefined, spriteJson, spriteImageUrl, getFont); + layers.push(layer); + }); + worker.postMessage({action: 'request-render'}); }); }); } -const tileQueue = new TileQueue(getTilePriority, () => { - worker.postMessage({action: 'request-render'}); -}); +// Minimal map-like functionality for rendering + +const tileQueue = new TileQueue( + (tile, tileSourceKey, tileCenter, tileResolution) => tilePriorityFunction(frameState, tile, tileSourceKey, tileCenter, tileResolution), + () => worker.postMessage({action: 'request-render'})); + const maxTotalLoading = 8; const maxNewLoads = 2; - let rendering = false; worker.addEventListener('message', event => { @@ -124,7 +118,7 @@ worker.addEventListener('message', event => { return; } rendering = true; - requestAnimationFrame(function() { + requestAnimationFrame(() => { let rendered = false; layers.forEach(layer => { if (inView(layer.getLayerState(), frameState.viewState)) { @@ -139,7 +133,7 @@ worker.addEventListener('message', event => { } renderDeclutterItems(frameState, null); if (tileQueue.getTilesLoading() < maxTotalLoading) { - tileQueue.reprioritize(); // FIXME only call if view has changed + tileQueue.reprioritize(); tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads); } const imageData = canvas.transferToImageBitmap(); @@ -147,8 +141,7 @@ worker.addEventListener('message', event => { action: 'rendered', imageData: imageData, transform: rendererTransform, - frameState: JSON.parse(JSON.stringify(frameState, getCircularReplacer())) + frameState: JSON.parse(stringify(frameState)) }, [imageData]); }); }); - diff --git a/package.json b/package.json index 67d75abf99..2eca898191 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "jquery": "3.4.1", "jsdoc": "3.6.3", "jsdoc-plugin-typescript": "^2.0.5", + "json-stringify-safe": "^5.0.1", "karma": "^4.4.1", "karma-chrome-launcher": "3.1.0", "karma-coverage-istanbul-reporter": "^2.1.1", From 5113d7070149186ac9d1615da8fbd244dd7f1647 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 23 Mar 2020 12:58:41 +0100 Subject: [PATCH 198/636] Rename example --- examples/{offscreen-canvas-tiles.css => offscreen-canvas.css} | 0 .../{offscreen-canvas-tiles.html => offscreen-canvas.html} | 0 examples/{offscreen-canvas-tiles.js => offscreen-canvas.js} | 4 ++-- ...reen-canvas-tiles.worker.js => offscreen-canvas.worker.js} | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename examples/{offscreen-canvas-tiles.css => offscreen-canvas.css} (100%) rename examples/{offscreen-canvas-tiles.html => offscreen-canvas.html} (100%) rename examples/{offscreen-canvas-tiles.js => offscreen-canvas.js} (97%) rename examples/{offscreen-canvas-tiles.worker.js => offscreen-canvas.worker.js} (100%) diff --git a/examples/offscreen-canvas-tiles.css b/examples/offscreen-canvas.css similarity index 100% rename from examples/offscreen-canvas-tiles.css rename to examples/offscreen-canvas.css diff --git a/examples/offscreen-canvas-tiles.html b/examples/offscreen-canvas.html similarity index 100% rename from examples/offscreen-canvas-tiles.html rename to examples/offscreen-canvas.html diff --git a/examples/offscreen-canvas-tiles.js b/examples/offscreen-canvas.js similarity index 97% rename from examples/offscreen-canvas-tiles.js rename to examples/offscreen-canvas.js index 53696a7414..b51fceeea2 100644 --- a/examples/offscreen-canvas-tiles.js +++ b/examples/offscreen-canvas.js @@ -1,7 +1,7 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import Layer from '../src/ol/layer/Layer.js'; -import Worker from 'worker-loader!./offscreen-canvas-tiles.worker.js'; //eslint-disable-line +import Worker from 'worker-loader!./offscreen-canvas.worker.js'; //eslint-disable-line import {compose, create} from '../src/ol/transform.js'; import {createTransformString} from '../src/ol/render/canvas.js'; import {createXYZ} from '../src/ol/tilegrid.js'; @@ -89,7 +89,7 @@ worker.addEventListener('message', message => { worker.postMessage({ action: 'imageLoaded', image: imageBitmap, - src: event.data.src + src: message.data.src }, [imageBitmap]); }); }); diff --git a/examples/offscreen-canvas-tiles.worker.js b/examples/offscreen-canvas.worker.js similarity index 100% rename from examples/offscreen-canvas-tiles.worker.js rename to examples/offscreen-canvas.worker.js From 576f50331bff757132f12affd2fde139e2ccbe09 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 23 Mar 2020 19:44:31 +0100 Subject: [PATCH 199/636] Add attribution --- examples/offscreen-canvas.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/offscreen-canvas.js b/examples/offscreen-canvas.js index b51fceeea2..991b757300 100644 --- a/examples/offscreen-canvas.js +++ b/examples/offscreen-canvas.js @@ -7,6 +7,7 @@ import {createTransformString} from '../src/ol/render/canvas.js'; import {createXYZ} from '../src/ol/tilegrid.js'; import {FullScreen} from '../src/ol/control.js'; import stringify from 'json-stringify-safe'; +import Source from '../src/ol/source/Source.js'; const worker = new Worker(); @@ -66,7 +67,13 @@ const map = new Map({ frameState: JSON.parse(stringify(frameState)) }); return container; - } + }, + source: new Source({ + attributions: [ + '© MapTiler', + '© OpenStreetMap contributors' + ] + }) }) ], target: 'map', From d70b3aa3d5cc4d8e85f4f07990d42556fc641ac1 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 24 Mar 2020 10:32:37 +0100 Subject: [PATCH 200/636] Move catch-up logic to main thread This avoids requestAnimationFrame in the worker. --- examples/offscreen-canvas.js | 35 ++++++++++------- examples/offscreen-canvas.worker.js | 59 ++++++++++++----------------- 2 files changed, 45 insertions(+), 49 deletions(-) diff --git a/examples/offscreen-canvas.js b/examples/offscreen-canvas.js index 991b757300..180e5c990e 100644 --- a/examples/offscreen-canvas.js +++ b/examples/offscreen-canvas.js @@ -11,7 +11,7 @@ import Source from '../src/ol/source/Source.js'; const worker = new Worker(); -let container, transformContainer, canvas, workerFrameState, mainThreadFrameState; +let container, transformContainer, canvas, rendering, workerFrameState, mainThreadFrameState; // Transform the container to account for the differnece between the (newer) // main thread frameState and the (older) worker frameState @@ -62,10 +62,15 @@ const map = new Map({ } mainThreadFrameState = frameState; updateContainerTransform(); - worker.postMessage({ - action: 'render', - frameState: JSON.parse(stringify(frameState)) - }); + if (!rendering) { + rendering = true; + worker.postMessage({ + action: 'render', + frameState: JSON.parse(stringify(frameState)) + }); + } else { + frameState.animate = true; + } return container; }, source: new Source({ @@ -101,18 +106,20 @@ worker.addEventListener('message', message => { }); }); image.src = event.data.src; - } else if (message.data.action === 'request-render') { + } else if (message.data.action === 'requestRender') { // Worker requested a new render frame map.render(); } else if (canvas && message.data.action === 'rendered') { // Worker provies a new render frame - transformContainer.style.transform = ''; - const imageData = message.data.imageData; - canvas.width = imageData.width; - canvas.height = imageData.height; - canvas.getContext('2d').drawImage(imageData, 0, 0); - canvas.style.transform = message.data.transform; - workerFrameState = message.data.frameState; - updateContainerTransform(); + requestAnimationFrame(function() { + const imageData = message.data.imageData; + canvas.width = imageData.width; + canvas.height = imageData.height; + canvas.getContext('2d').drawImage(imageData, 0, 0); + canvas.style.transform = message.data.transform; + workerFrameState = message.data.frameState; + updateContainerTransform(); + }); + rendering = false; } }); diff --git a/examples/offscreen-canvas.worker.js b/examples/offscreen-canvas.worker.js index e80187e7af..b03f0be61d 100644 --- a/examples/offscreen-canvas.worker.js +++ b/examples/offscreen-canvas.worker.js @@ -14,6 +14,9 @@ const worker = self; let frameState, pixelRatio, rendererTransform; const canvas = new OffscreenCanvas(1, 1); +// OffscreenCanvas does not have a style, so we mock it +canvas.style = {}; +const context = canvas.getContext('2d'); const sources = { landcover: new VectorTileSource({ @@ -77,18 +80,17 @@ function loadStyles() { }); layer.getRenderer().useContainer = function(target, transform) { this.containerReused = this.getLayer() !== layers[0]; - target.style = {}; - this.canvas = target; - this.context = target.getContext('2d'); + this.canvas = canvas; + this.context = context; this.container = { - firstElementChild: target + firstElementChild: canvas }; rendererTransform = transform; }; styleFunction(layer, styleJson, bucket.layers, undefined, spriteJson, spriteImageUrl, getFont); layers.push(layer); }); - worker.postMessage({action: 'request-render'}); + worker.postMessage({action: 'requestRender'}); }); }); } @@ -97,11 +99,10 @@ function loadStyles() { const tileQueue = new TileQueue( (tile, tileSourceKey, tileCenter, tileResolution) => tilePriorityFunction(frameState, tile, tileSourceKey, tileCenter, tileResolution), - () => worker.postMessage({action: 'request-render'})); + () => worker.postMessage({action: 'requestRender'})); const maxTotalLoading = 8; const maxNewLoads = 2; -let rendering = false; worker.addEventListener('message', event => { if (event.data.action !== 'render') { @@ -114,34 +115,22 @@ worker.addEventListener('message', event => { } frameState.tileQueue = tileQueue; frameState.viewState.projection.__proto__ = Projection.prototype; - if (rendering) { - return; - } - rendering = true; - requestAnimationFrame(() => { - let rendered = false; - layers.forEach(layer => { - if (inView(layer.getLayerState(), frameState.viewState)) { - rendered = true; - const renderer = layer.getRenderer(); - renderer.renderFrame(frameState, canvas); - } - }); - rendering = false; - if (!rendered) { - return; + layers.forEach(layer => { + if (inView(layer.getLayerState(), frameState.viewState)) { + const renderer = layer.getRenderer(); + renderer.renderFrame(frameState, canvas); } - renderDeclutterItems(frameState, null); - if (tileQueue.getTilesLoading() < maxTotalLoading) { - tileQueue.reprioritize(); - tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads); - } - const imageData = canvas.transferToImageBitmap(); - worker.postMessage({ - action: 'rendered', - imageData: imageData, - transform: rendererTransform, - frameState: JSON.parse(stringify(frameState)) - }, [imageData]); }); + renderDeclutterItems(frameState, null); + if (tileQueue.getTilesLoading() < maxTotalLoading) { + tileQueue.reprioritize(); + tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads); + } + const imageData = canvas.transferToImageBitmap(); + worker.postMessage({ + action: 'rendered', + imageData: imageData, + transform: rendererTransform, + frameState: JSON.parse(stringify(frameState)) + }, [imageData]); }); From c3d9ac6265f7bb4816beb52a50e5d83fedd21567 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Wed, 25 Mar 2020 12:55:57 +0000 Subject: [PATCH 201/636] Fix description --- examples/earthquake-custom-symbol.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/earthquake-custom-symbol.html b/examples/earthquake-custom-symbol.html index 729d8eb3e7..34dd810d67 100644 --- a/examples/earthquake-custom-symbol.html +++ b/examples/earthquake-custom-symbol.html @@ -1,7 +1,7 @@ --- layout: example.html title: Earthquakes with custom symbols -shortdesc: Demonstrates the use of `toCanvas` to create custom icon symbols. +shortdesc: Demonstrates the use of `toContext` to create custom icon symbols. docs: > This example parses a KML file and renders the features as a vector layer. The layer is given a style that renders earthquake locations with a custom lightning symbol and a size relative to their magnitude. tags: "KML, vector, style, canvas, symbol" From 98e8bec3709364b5fd14dd71a4e4e72dcf4ae1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Mon, 21 Jan 2019 15:21:39 +0100 Subject: [PATCH 202/636] Calculate tile grid extent from extent of bottom-level tile matrix Prefers extent derived from the tile matrix set in the capabilities over default projection extent. --- src/ol/source/WMTS.js | 38 ++++++++++---------- test/spec/ol/format/wmts/ogcsample.xml | 28 ++++++++++++++- test/spec/ol/format/wmtscapabilities.test.js | 4 ++- test/spec/ol/source/wmts.test.js | 27 ++++++++++++++ 4 files changed, 77 insertions(+), 20 deletions(-) diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index c8b11c9c32..77663ad2a3 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -4,9 +4,8 @@ import {expandUrl, createFromTileUrlFunctions, nullTileUrlFunction} from '../tileurlfunction.js'; import {find, findIndex, includes} from '../array.js'; -import {containsExtent} from '../extent.js'; import {assign} from '../obj.js'; -import {get as getProjection, equivalent, transformExtent} from '../proj.js'; +import {get as getProjection, equivalent} from '../proj.js'; import TileImage from './TileImage.js'; import WMTSRequestEncoding from './WMTSRequestEncoding.js'; import {createFromCapabilitiesMatrixSet} from '../tilegrid/WMTS.js'; @@ -377,22 +376,25 @@ export function optionsFromCapabilities(wmtsCap, config) { } } - const wgs84BoundingBox = l['WGS84BoundingBox']; - let extent, wrapX; - if (wgs84BoundingBox !== undefined) { - const wgs84ProjectionExtent = getProjection('EPSG:4326').getExtent(); - wrapX = (wgs84BoundingBox[0] == wgs84ProjectionExtent[0] && - wgs84BoundingBox[2] == wgs84ProjectionExtent[2]); - extent = transformExtent( - wgs84BoundingBox, 'EPSG:4326', projection); - const projectionExtent = projection.getExtent(); - if (projectionExtent) { - // If possible, do a sanity check on the extent - it should never be - // bigger than the validity extent of the projection of a matrix set. - if (!containsExtent(projectionExtent, extent)) { - extent = undefined; - } - } + const wrapX = false; + + const matrix0 = matrixSetObj.TileMatrix[0]; + const resolution = matrix0.ScaleDenominator * 0.00028; // WMTS 1.0.0: standardized rendering pixel size + const origin = projection === getProjection('EPSG:4326') + ? [matrix0.TopLeftCorner[1], matrix0.TopLeftCorner[0]] + : matrix0.TopLeftCorner; + const tileSpanX = matrix0.TileWidth * resolution; + const tileSpanY = matrix0.TileHeight * resolution; + + const extent = [ + origin[0], + origin[1] - tileSpanY * matrix0.MatrixHeight, + origin[0] + tileSpanX * matrix0.MatrixWidth, + origin[1] + ]; + + if (projection.getExtent() === null) { + projection.setExtent(extent); } const tileGrid = createFromCapabilitiesMatrixSet(matrixSetObj, extent, matrixLimits); diff --git a/test/spec/ol/format/wmts/ogcsample.xml b/test/spec/ol/format/wmts/ogcsample.xml index fbf7b282b8..7eb006bf2b 100644 --- a/test/spec/ol/format/wmts/ogcsample.xml +++ b/test/spec/ol/format/wmts/ogcsample.xml @@ -92,6 +92,9 @@ access interface to some TileMatrixSets google3857 + + google3857subset + @@ -372,6 +375,29 @@ access interface to some TileMatrixSets 7000 - + + + google3857subset + urn:ogc:def:crs:EPSG:6.18:3:3857 + + 18 + 2132.72958385 + -10000000 10000000 + 256 + 256 + 1 + 1 + + + 18 + 1066.36479193 + -10000000 10000000 + 256 + 256 + 2 + 2 + + + diff --git a/test/spec/ol/format/wmtscapabilities.test.js b/test/spec/ol/format/wmtscapabilities.test.js index 72b907cb3f..5bcf881758 100644 --- a/test/spec/ol/format/wmtscapabilities.test.js +++ b/test/spec/ol/format/wmtscapabilities.test.js @@ -54,11 +54,13 @@ describe('ol.format.WMTSCapabilities', function() { expect(layer.Style[0].LegendURL[0].format).to.be.eql('image/png'); expect(layer.TileMatrixSetLink).to.be.an('array'); - expect(layer.TileMatrixSetLink).to.have.length(2); + expect(layer.TileMatrixSetLink).to.have.length(3); expect(layer.TileMatrixSetLink[0].TileMatrixSet).to.be .eql('BigWorldPixel'); expect(layer.TileMatrixSetLink[1].TileMatrixSet).to.be .eql('google3857'); + expect(layer.TileMatrixSetLink[2].TileMatrixSet).to.be + .eql('google3857subset'); const wgs84Bbox = layer.WGS84BoundingBox; expect(wgs84Bbox).to.be.an('array'); diff --git a/test/spec/ol/source/wmts.test.js b/test/spec/ol/source/wmts.test.js index b49d71e787..20cf5a41e1 100644 --- a/test/spec/ol/source/wmts.test.js +++ b/test/spec/ol/source/wmts.test.js @@ -1,4 +1,5 @@ import WMTSCapabilities from '../../../../src/ol/format/WMTSCapabilities.js'; +import {getBottomLeft, getTopRight} from '../../../../src/ol/extent.js'; import {get as getProjection} from '../../../../src/ol/proj.js'; import Projection from '../../../../src/ol/proj/Projection.js'; import WMTSTileGrid from '../../../../src/ol/tilegrid/WMTS.js'; @@ -149,6 +150,32 @@ describe('ol.source.WMTS', function() { expect(options.projection.getCode()).to.be.eql('urn:ogc:def:crs:OGC:1.3:CRS84'); }); + it('uses extent of tile matrix instead of projection extent', function() { + const options = optionsFromCapabilities(capabilities, + {layer: 'BlueMarbleNextGeneration', matrixSet: 'google3857subset'}); + + // Since google3857subset defines subset of space defined by the google3857 matrix set: + // - top left corner: -10000000, 10000000 + // - calculated grid extent: [-10000000, 9999694.25188686, -9999694.25188686, 10000000] + // then the tile grid extent is only a part of the full projection extent. + + const gridExtent = options.tileGrid.getExtent(); + const gridBottomLeft = getBottomLeft(gridExtent); + const gridTopRight = getTopRight(gridExtent); + expect(Math.round(gridBottomLeft[0])).to.be.eql(-10000000); + expect(Math.round(gridBottomLeft[1])).to.be.eql(9999847); + expect(Math.round(gridTopRight[0])).to.be.eql(-9999847); + expect(Math.round(gridTopRight[1])).to.be.eql(10000000); + + const projExtent = options.projection.getExtent(); + const projBottomLeft = getBottomLeft(projExtent); + const projTopRight = getTopRight(projExtent); + expect(Math.round(projBottomLeft[0])).to.be.eql(-20037508); + expect(Math.round(projBottomLeft[1])).to.be.eql(-20037508); + expect(Math.round(projTopRight[0])).to.be.eql(20037508); + expect(Math.round(projTopRight[1])).to.be.eql(20037508); + }); + it('doesn\'t fail if the GetCap doesn\'t contains Constraint tags', function() { const tmpXml = content.replace(//g, ''); const tmpCapabilities = parser.read(tmpXml); From fbe7b0bd78dc4c4a59b72219d6e5fce6cf6a21a0 Mon Sep 17 00:00:00 2001 From: Szabo Bogdan Date: Thu, 26 Mar 2020 19:00:13 +0100 Subject: [PATCH 203/636] Fix test typo --- test/spec/ol/layer/vector.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/ol/layer/vector.test.js b/test/spec/ol/layer/vector.test.js index e53523166c..65c6f2a163 100644 --- a/test/spec/ol/layer/vector.test.js +++ b/test/spec/ol/layer/vector.test.js @@ -141,7 +141,7 @@ describe('ol.layer.Vector', function() { }), new Feature({ geometry: new Point([1000000, 0]), - name: 'feture2' + name: 'feature2' }) ] }) From 6aa398cbecbe63d2b5bc3475ad9bdb62e99bee91 Mon Sep 17 00:00:00 2001 From: Szabo Bogdan Date: Thu, 26 Mar 2020 21:18:57 +0100 Subject: [PATCH 204/636] Fix hit detection for images with missing size --- src/ol/render/canvas/hitdetect.js | 4 +++ test/spec/ol/layer/vector.test.js | 48 +++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/src/ol/render/canvas/hitdetect.js b/src/ol/render/canvas/hitdetect.js index ef21f3d9e9..ced9974156 100644 --- a/src/ol/render/canvas/hitdetect.js +++ b/src/ol/render/canvas/hitdetect.js @@ -65,6 +65,10 @@ export function createHitDetectionImageData(size, transforms, features, styleFun const image = originalStyle.getImage(); if (image) { const imgSize = image.getImageSize(); + if (!imgSize) { + continue; + } + const canvas = document.createElement('canvas'); canvas.width = imgSize[0]; canvas.height = imgSize[1]; diff --git a/test/spec/ol/layer/vector.test.js b/test/spec/ol/layer/vector.test.js index 65c6f2a163..21e8ae4534 100644 --- a/test/spec/ol/layer/vector.test.js +++ b/test/spec/ol/layer/vector.test.js @@ -6,6 +6,7 @@ import Feature from '../../../../src/ol/Feature.js'; import Point from '../../../../src/ol/geom/Point.js'; import Map from '../../../../src/ol/Map.js'; import View from '../../../../src/ol/View.js'; +import ImageStyle from '../../../../src/ol/style/Image.js'; describe('ol.layer.Vector', function() { @@ -132,19 +133,41 @@ describe('ol.layer.Vector', function() { let map, layer; beforeEach(function() { + const source = new VectorSource({ + features: [ + new Feature({ + geometry: new Point([-1000000, 0]), + name: 'feature1' + }), + new Feature({ + geometry: new Point([1000000, 0]), + name: 'feature2' + }) + ] + }); + + const feature = new Feature({ + geometry: new Point([-1000000, 0]), + name: 'feature with no size' + }); + + const testImage = new ImageStyle({ + opacity: 1, + displacement: [] + }); + + testImage.getImageState = () => {}; + testImage.listenImageChange = () => {}; + testImage.getImageSize = () => {}; + + feature.setStyle([new Style({ + image: testImage + })]); + + source.addFeature(feature); + layer = new VectorLayer({ - source: new VectorSource({ - features: [ - new Feature({ - geometry: new Point([-1000000, 0]), - name: 'feature1' - }), - new Feature({ - geometry: new Point([1000000, 0]), - name: 'feature2' - }) - ] - }) + source }); const container = document.createElement('div'); container.style.width = '256px'; @@ -171,6 +194,7 @@ describe('ol.layer.Vector', function() { map.renderSync(); const pixel = map.getPixelFromCoordinate([-1000000, 0]); layer.getFeatures(pixel).then(function(features) { + expect(features.length).to.equal(1); expect(features[0].get('name')).to.be('feature1'); done(); }); From 83a5cd63c67beed1cc8b8c63ea082a33cd75dc32 Mon Sep 17 00:00:00 2001 From: horsenit Date: Fri, 27 Mar 2020 00:32:10 -0400 Subject: [PATCH 205/636] Speed up Overlay element positioning using CSS translate() --- src/ol/Overlay.js | 80 +++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 58 deletions(-) diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index fa71db0591..f1eab6c17f 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -158,17 +158,11 @@ class Overlay extends BaseObject { /** * @protected - * @type {{bottom_: string, - * left_: string, - * right_: string, - * top_: string, + * @type {{transform_: string, * visible: boolean}} */ this.rendered = { - bottom_: '', - left_: '', - right_: '', - top_: '', + transform_: '', visible: true }; @@ -506,63 +500,33 @@ class Overlay extends BaseObject { this.setVisible(true); - let offsetX = offset[0]; - let offsetY = offset[1]; + const x = Math.round(pixel[0] + offset[0]) + 'px'; + const y = Math.round(pixel[1] + offset[1]) + 'px'; + let posX = '0%'; + let posY = '0%'; if (positioning == OverlayPositioning.BOTTOM_RIGHT || positioning == OverlayPositioning.CENTER_RIGHT || positioning == OverlayPositioning.TOP_RIGHT) { - if (this.rendered.left_ !== '') { - this.rendered.left_ = ''; - style.left = ''; - } - const right = Math.round(mapSize[0] - pixel[0] - offsetX) + 'px'; - if (this.rendered.right_ != right) { - this.rendered.right_ = right; - style.right = right; - } - } else { - if (this.rendered.right_ !== '') { - this.rendered.right_ = ''; - style.right = ''; - } - if (positioning == OverlayPositioning.BOTTOM_CENTER || - positioning == OverlayPositioning.CENTER_CENTER || - positioning == OverlayPositioning.TOP_CENTER) { - offsetX -= this.element.offsetWidth / 2; - } - const left = Math.round(pixel[0] + offsetX) + 'px'; - if (this.rendered.left_ != left) { - this.rendered.left_ = left; - style.left = left; - } + posX = '-100%'; + } else if (positioning == OverlayPositioning.BOTTOM_CENTER || + positioning == OverlayPositioning.CENTER_CENTER || + positioning == OverlayPositioning.TOP_CENTER) { + posX = '-50%'; } if (positioning == OverlayPositioning.BOTTOM_LEFT || positioning == OverlayPositioning.BOTTOM_CENTER || positioning == OverlayPositioning.BOTTOM_RIGHT) { - if (this.rendered.top_ !== '') { - this.rendered.top_ = ''; - style.top = ''; - } - const bottom = Math.round(mapSize[1] - pixel[1] - offsetY) + 'px'; - if (this.rendered.bottom_ != bottom) { - this.rendered.bottom_ = bottom; - style.bottom = bottom; - } - } else { - if (this.rendered.bottom_ !== '') { - this.rendered.bottom_ = ''; - style.bottom = ''; - } - if (positioning == OverlayPositioning.CENTER_LEFT || - positioning == OverlayPositioning.CENTER_CENTER || - positioning == OverlayPositioning.CENTER_RIGHT) { - offsetY -= this.element.offsetHeight / 2; - } - const top = Math.round(pixel[1] + offsetY) + 'px'; - if (this.rendered.top_ != top) { - this.rendered.top_ = 'top'; - style.top = top; - } + posY = '-100%'; + } else if (positioning == OverlayPositioning.CENTER_LEFT || + positioning == OverlayPositioning.CENTER_CENTER || + positioning == OverlayPositioning.CENTER_RIGHT) { + posY = '-50%'; + } + const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`; + if (this.rendered.transform_ != transform) { + this.rendered.transform_ = transform; + style.transform = transform; + style.msTransform = transform; // IE9 } } From 03ea8911f6253e63bf8bf68757b454436e223b58 Mon Sep 17 00:00:00 2001 From: horsenit Date: Fri, 27 Mar 2020 03:03:21 -0400 Subject: [PATCH 206/636] Fix type checking for IE9 style.msTransform --- src/ol/Overlay.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index f1eab6c17f..3a91f63394 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -526,7 +526,8 @@ class Overlay extends BaseObject { if (this.rendered.transform_ != transform) { this.rendered.transform_ = transform; style.transform = transform; - style.msTransform = transform; // IE9 + // @ts-ignore IE9 + style.msTransform = transform; } } From 1020c384bbb601af764402a40b294fc6ccf46dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sat, 11 Jan 2020 23:46:52 +0100 Subject: [PATCH 207/636] Fix two missing apidoc links Add IconAnchorUnits and IconOrigin to the api. --- src/ol/style/IconAnchorUnits.js | 7 +++++++ src/ol/style/IconOrigin.js | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/ol/style/IconAnchorUnits.js b/src/ol/style/IconAnchorUnits.js index eaa549d3ce..95d9562bc2 100644 --- a/src/ol/style/IconAnchorUnits.js +++ b/src/ol/style/IconAnchorUnits.js @@ -5,8 +5,15 @@ /** * Icon anchor units. One of 'fraction', 'pixels'. * @enum {string} + * @api */ export default { + /** + * Anchor is a fraction + */ FRACTION: 'fraction', + /** + * Anchor is in pixels + */ PIXELS: 'pixels' }; diff --git a/src/ol/style/IconOrigin.js b/src/ol/style/IconOrigin.js index d1bad0bdf7..f756a5df2d 100644 --- a/src/ol/style/IconOrigin.js +++ b/src/ol/style/IconOrigin.js @@ -5,10 +5,23 @@ /** * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'. * @enum {string} + * @api */ export default { + /** + * Origin is at bottom left + */ BOTTOM_LEFT: 'bottom-left', + /** + * Origin is at bottom right + */ BOTTOM_RIGHT: 'bottom-right', + /** + * Origin is at top left + */ TOP_LEFT: 'top-left', + /** + * Origin is at top right + */ TOP_RIGHT: 'top-right' }; From a6a5b72c57d3a9cceaad2ab4dde45df177a861bb Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Fri, 27 Mar 2020 12:24:41 +0100 Subject: [PATCH 208/636] Only mark items as api, not enums --- src/ol/style/IconAnchorUnits.js | 3 ++- src/ol/style/IconOrigin.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ol/style/IconAnchorUnits.js b/src/ol/style/IconAnchorUnits.js index 95d9562bc2..af81e71ff2 100644 --- a/src/ol/style/IconAnchorUnits.js +++ b/src/ol/style/IconAnchorUnits.js @@ -5,15 +5,16 @@ /** * Icon anchor units. One of 'fraction', 'pixels'. * @enum {string} - * @api */ export default { /** * Anchor is a fraction + * @api */ FRACTION: 'fraction', /** * Anchor is in pixels + * @api */ PIXELS: 'pixels' }; diff --git a/src/ol/style/IconOrigin.js b/src/ol/style/IconOrigin.js index f756a5df2d..7ef62e96c8 100644 --- a/src/ol/style/IconOrigin.js +++ b/src/ol/style/IconOrigin.js @@ -5,23 +5,26 @@ /** * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'. * @enum {string} - * @api */ export default { /** * Origin is at bottom left + * @api */ BOTTOM_LEFT: 'bottom-left', /** * Origin is at bottom right + * @api */ BOTTOM_RIGHT: 'bottom-right', /** * Origin is at top left + * @api */ TOP_LEFT: 'top-left', /** * Origin is at top right + * @api */ TOP_RIGHT: 'top-right' }; From dd44ecf18516425516dbd58756a2c55a0f06c521 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 28 Mar 2020 10:51:25 +0100 Subject: [PATCH 209/636] Only document enums when they have API properties --- config/jsdoc/api/plugins/api.js | 12 +++++------- config/jsdoc/api/template/tmpl/method.tmpl | 11 ++++------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/config/jsdoc/api/plugins/api.js b/config/jsdoc/api/plugins/api.js index c384d86dad..53e0a8c174 100644 --- a/config/jsdoc/api/plugins/api.js +++ b/config/jsdoc/api/plugins/api.js @@ -73,9 +73,6 @@ function includeAugments(doclet) { }); } cls._hideConstructor = true; - if (!cls.undocumented) { - cls._documented = true; - } } } } @@ -182,13 +179,14 @@ exports.handlers = { doclet._hideConstructor = true; includeAugments(doclet); sortOtherMembers(doclet); - } else if (!doclet._hideConstructor - && !(doclet.longname in defaultExports && byLongname[doclet.longname].some(d => d.isEnum))) { + } else if (!doclet._hideConstructor) { // Remove all other undocumented symbols doclet.undocumented = true; } - if (doclet._documented) { - delete doclet.undocumented; + if (doclet.memberof && byLongname[doclet.memberof] && + byLongname[doclet.memberof][0].isEnum && + !byLongname[doclet.memberof][0].properties.some(p => p.stability)) { + byLongname[doclet.memberof][0].undocumented = true; } } }, diff --git a/config/jsdoc/api/template/tmpl/method.tmpl b/config/jsdoc/api/template/tmpl/method.tmpl index a5ddc77f5d..9ff68aa638 100644 --- a/config/jsdoc/api/template/tmpl/method.tmpl +++ b/config/jsdoc/api/template/tmpl/method.tmpl @@ -64,7 +64,7 @@ var self = this;
  • - - - () - + + + () - From b1b01cf94386817405482f3aa7f6a9fdc986bc7d Mon Sep 17 00:00:00 2001 From: Edward Nash Date: Mon, 30 Mar 2020 07:12:52 +0200 Subject: [PATCH 210/636] Allow pan options supplied as autoPan * Follow the suggestion from @ahocevar to use the existing autoPan constructor option instead of creating a new autoPanOptions option * Internally also store the autoPanOptions in autoPan --- src/ol/Overlay.js | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index 941aadda3d..dff3e1fe25 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -37,16 +37,18 @@ import {containsExtent} from './extent.js'; * container as that of the controls (see the `stopEvent` option) you will * probably set `insertFirst` to `true` so the overlay is displayed below the * controls. - * @property {boolean} [autoPan=false] If set to `true` the map is panned when - * calling `setPosition`, so that the overlay is entirely visible in the current - * viewport. + * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling + * `setPosition`, so that the overlay is entirely visible in the current viewport? + * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be + * used to determine the panning parameters; if an object is supplied then other + * parameters are ignored. * @property {PanOptions} [autoPanAnimation] The animation options used to pan * the overlay into view. This animation is only used when `autoPan` is enabled. * A `duration` and `easing` may be provided to customize the animation. - * Deprecated and ignored if `autoPanOptions` is supplied. + * Deprecated and ignored if `autoPan` is supplied as an object. * @property {number} [autoPanMargin=20] The margin (in pixels) between the * overlay and the borders of the map when autopanning. Deprecated and ignored - * if `autoPanOptions` is supplied. + * if `autoPan` is supplied as an object. * @property {PanIntoViewOptions} [autoPanOptions] The options to use for the * autoPan. This is only used when `autoPan` is enabled and has preference over * the individual `autoPanMargin` and `autoPanOptions`. @@ -147,20 +149,18 @@ class Overlay extends BaseObject { options.className : 'ol-overlay-container ' + CLASS_SELECTABLE; this.element.style.position = 'absolute'; + let autoPan = options.autoPan; + if (autoPan && ('object' !== typeof autoPan)) { + autoPan = { + animation: options.autoPanAnimation, + margin: options.autoPanMargin + }; + } /** * @protected - * @type {boolean} + * @type {PanIntoViewOptions|false} */ - this.autoPan = options.autoPan !== undefined ? options.autoPan : false; - - /** - * @protected - * @type {PanIntoViewOptions} - */ - this.autoPanOptions = options.autoPanOptions || { - animation: options.autoPanAnimation, - margin: options.autoPanMargin - }; + this.autoPan = /** @type {PanIntoViewOptions} */(autoPan) || false; /** * @protected @@ -389,7 +389,9 @@ class Overlay extends BaseObject { * @protected */ performAutoPan() { - this.panIntoView(this.autoPanOptions); + if (this.autoPan) { + this.panIntoView(this.autoPan); + } } /** From 2537da690af03614788afcf80c681de7c6183b0d Mon Sep 17 00:00:00 2001 From: Edward Nash Date: Mon, 30 Mar 2020 07:15:03 +0200 Subject: [PATCH 211/636] Add check that Position is set in panIntoView() * If panIntoView is an API method, it may now be called when the position of the overlay has not yet been set. * Adds a check for a set position to the panIntoView() method, and removes the now unneccessary check in handlePositionChanged() --- src/ol/Overlay.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index dff3e1fe25..7b82dfe5f4 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -328,9 +328,7 @@ class Overlay extends BaseObject { */ handlePositionChanged() { this.updatePixelPosition(); - if (this.get(Property.POSITION) && this.autoPan) { - this.performAutoPan(); - } + this.performAutoPan(); } /** @@ -403,7 +401,7 @@ class Overlay extends BaseObject { panIntoView(panIntoViewOptions) { const map = this.getMap(); - if (!map || !map.getTargetElement()) { + if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) { return; } From 8222118fb181bf4ebc01ca6469a212e8edfd69ab Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2020 08:55:08 +0000 Subject: [PATCH 212/636] Bump webpack from 4.42.0 to 4.42.1 Bumps [webpack](https://github.com/webpack/webpack) from 4.42.0 to 4.42.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v4.42.0...v4.42.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 232 ++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 121 insertions(+), 113 deletions(-) diff --git a/package-lock.json b/package-lock.json index 450a9667f9..046b8b0fd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1808,178 +1808,177 @@ } }, "@webassemblyjs/ast": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", - "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5" + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", - "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", - "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", - "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", "dev": true }, "@webassemblyjs/helper-code-frame": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", - "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.8.5" + "@webassemblyjs/wast-printer": "1.9.0" } }, "@webassemblyjs/helper-fsm": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", - "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", "dev": true }, "@webassemblyjs/helper-module-context": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", - "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "mamacro": "^0.0.3" + "@webassemblyjs/ast": "1.9.0" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", - "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", - "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" } }, "@webassemblyjs/ieee754": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", - "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", - "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", - "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", - "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/helper-wasm-section": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-opt": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "@webassemblyjs/wast-printer": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" } }, "@webassemblyjs/wasm-gen": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", - "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" } }, "@webassemblyjs/wasm-opt": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", - "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" } }, "@webassemblyjs/wasm-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", - "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" } }, "@webassemblyjs/wast-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", - "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/floating-point-hex-parser": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-code-frame": "1.8.5", - "@webassemblyjs/helper-fsm": "1.8.5", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/wast-printer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", - "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", "@xtuc/long": "4.2.2" } }, @@ -7989,12 +7988,6 @@ "semver": "^5.6.0" } }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", - "dev": true - }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -12246,12 +12239,12 @@ } }, "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz", + "integrity": "sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA==", "dev": true, "requires": { - "chokidar": "^2.0.2", + "chokidar": "^2.1.8", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0" } @@ -12272,15 +12265,15 @@ "dev": true }, "webpack": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.42.0.tgz", - "integrity": "sha512-EzJRHvwQyBiYrYqhyjW9AqM90dE4+s1/XtCfn7uWg6cS72zH+2VPFAlsnW0+W0cDi0XRjNKUMoJtpSi50+Ph6w==", + "version": "4.42.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.42.1.tgz", + "integrity": "sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/wasm-edit": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", "acorn": "^6.2.1", "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", @@ -12292,7 +12285,7 @@ "loader-utils": "^1.2.3", "memory-fs": "^0.4.1", "micromatch": "^3.1.10", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "neo-async": "^2.6.1", "node-libs-browser": "^2.2.1", "schema-utils": "^1.0.0", @@ -12326,6 +12319,21 @@ "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", "dev": true }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "neo-async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", diff --git a/package.json b/package.json index 2eca898191..932a509439 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "typescript": "3.5.3", "url-polyfill": "^1.1.5", "walk": "^2.3.9", - "webpack": "4.42.0", + "webpack": "4.42.1", "webpack-cli": "^3.3.2", "webpack-dev-middleware": "^3.6.2", "webpack-dev-server": "^3.3.1", From 6ca6c70aac879a2e8e0c335df7d40dbd01043d92 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2020 08:56:40 +0000 Subject: [PATCH 213/636] Bump buble from 0.19.8 to 0.20.0 Bumps [buble](https://github.com/bublejs/buble) from 0.19.8 to 0.20.0. - [Release notes](https://github.com/bublejs/buble/releases) - [Changelog](https://github.com/bublejs/buble/blob/master/CHANGELOG.md) - [Commits](https://github.com/bublejs/buble/compare/v0.19.8...v0.20.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 65 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 33 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 450a9667f9..84aaa30d67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2024,9 +2024,9 @@ "dev": true }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", "dev": true }, "after": { @@ -2951,29 +2951,34 @@ } }, "buble": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/buble/-/buble-0.19.8.tgz", - "integrity": "sha512-IoGZzrUTY5fKXVkgGHw3QeXFMUNBFv+9l8a4QJKG1JhG3nCMHTdEX1DCOg8568E2Q9qvAQIiSokv6Jsgx8p2cA==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/buble/-/buble-0.20.0.tgz", + "integrity": "sha512-/1gnaMQE8xvd5qsNBl+iTuyjJ9XxeaVxAMF86dQ4EyxFJOZtsgOS8Ra+7WHgZTam5IFDtt4BguN0sH0tVTKrOw==", "dev": true, "requires": { - "acorn": "^6.1.1", + "acorn": "^6.4.1", "acorn-dynamic-import": "^4.0.0", - "acorn-jsx": "^5.0.1", + "acorn-jsx": "^5.2.0", "chalk": "^2.4.2", - "magic-string": "^0.25.3", - "minimist": "^1.2.0", - "os-homedir": "^2.0.0", - "regexpu-core": "^4.5.4" + "magic-string": "^0.25.7", + "minimist": "^1.2.5", + "regexpu-core": "4.5.4" }, "dependencies": { "magic-string": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz", - "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==", + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", "dev": true, "requires": { "sourcemap-codec": "^1.4.4" } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true } } }, @@ -9108,12 +9113,6 @@ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", "dev": true }, - "os-homedir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-2.0.0.tgz", - "integrity": "sha512-saRNz0DSC5C/I++gFIaJTXoFJMRwiP5zHar5vV3xQ2TkgEw6hDCcU5F272JjUylpiVgBrZNQHnfjkLabTfb92Q==", - "dev": true - }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -9872,9 +9871,9 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz", - "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, "requires": { "regenerate": "^1.4.0" @@ -9936,15 +9935,15 @@ } }, "regjsgen": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", - "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", "dev": true }, "regjsparser": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", - "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -11976,9 +11975,9 @@ } }, "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, "unicode-property-aliases-ecmascript": { diff --git a/package.json b/package.json index 2eca898191..5008aa39f8 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@types/pbf": "^3.0.2", "@types/topojson-specification": "^1.0.1", "babel-loader": "^8.0.5", - "buble": "^0.19.7", + "buble": "^0.20.0", "buble-loader": "^0.5.1", "chaikin-smooth": "^1.0.4", "clean-css-cli": "4.3.0", From e583e0775ddbb2f868780aaa4a0a57bd90e3ac2d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2020 08:57:39 +0000 Subject: [PATCH 214/636] Bump ol-mapbox-style from 6.1.0 to 6.1.1 Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/openlayers/ol-mapbox-style/releases) - [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/master/CHANGELOG.md) - [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v6.1.0...v6.1.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 450a9667f9..8aaa829acb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1606,12 +1606,13 @@ "dev": true }, "@mapbox/mapbox-gl-style-spec": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.12.0.tgz", - "integrity": "sha512-tRSvlYUI73LOkvS1iQhVwnltoI/QC4ZaLOAS6NM6zx0NwJfsGUJDPucsaKif8l7Sce1ECLd8LYs1MRCyJjdo5Q==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.13.0.tgz", + "integrity": "sha512-PBXa/Bw2G87NZckBZqY3omI3THF5MYQQY5B1IZWVLI7Ujsy149cjC8Sm1Ub1BgAnyslepdjtwWVS43IOjVYmUw==", "dev": true, "requires": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", + "@mapbox/point-geometry": "^0.1.0", "@mapbox/unitbezier": "^0.0.0", "csscolorparser": "~1.0.2", "json-stringify-pretty-compact": "^2.0.0", @@ -1628,6 +1629,12 @@ } } }, + "@mapbox/point-geometry": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", + "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=", + "dev": true + }, "@mapbox/unitbezier": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", @@ -9003,12 +9010,12 @@ "dev": true }, "ol-mapbox-style": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.1.0.tgz", - "integrity": "sha512-52nrvbYi8+Zkn4+4EZ92ZJMCLW50RKCgtPm7LNXyZJkz/PCtRZJ440Jy4hPWMON7swV2O9Xjyg+HD8Xv00VFgw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.1.1.tgz", + "integrity": "sha512-0Hgz2BX2tWe1ZNPMLpJkLdm3XI6ILrFbgmJIvdrlDYRce2ul1mXLmkJmbyLFs2tozsBJDcPJmI55UsKbiKg6ow==", "dev": true, "requires": { - "@mapbox/mapbox-gl-style-spec": "^13.11.0", + "@mapbox/mapbox-gl-style-spec": "13.13.0", "mapbox-to-css-font": "^2.4.0", "webfont-matcher": "^1.1.0" } From c92f72ac3f16da7295701ffe83958bac3bdd0527 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2020 08:59:06 +0000 Subject: [PATCH 215/636] Bump rollup from 2.1.0 to 2.3.0 Bumps [rollup](https://github.com/rollup/rollup) from 2.1.0 to 2.3.0. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v2.1.0...v2.3.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 450a9667f9..3ed11bd1e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10163,9 +10163,9 @@ } }, "rollup": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.1.0.tgz", - "integrity": "sha512-gfE1455AEazVVTJoeQtcOq/U6GSxwoj4XPSWVsuWmgIxj7sBQNLDOSA82PbdMe+cP8ql8fR1jogPFe8Wg8g4SQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.3.0.tgz", + "integrity": "sha512-nIq2Z9YwNbEfqTlAXe/tVl8CwUsjX/8Q5Jxlx+JRoYCu5keKLc6k0zyt11sM6WtCDxhmmJEIosFy9y26ZFRx6w==", "dev": true, "requires": { "fsevents": "~2.1.2" From 772741cd0e3c059863f8c34ff81ebedff20b3887 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sat, 14 Mar 2020 10:14:28 +0000 Subject: [PATCH 216/636] Always load frameState extent for graticule layers do not call graticule loader with wrapped projection extent --- src/ol/renderer/canvas/VectorLayer.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index 591ea95f83..d9e5e308e2 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -363,6 +363,8 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { vectorLayerRenderBuffer * resolution); const projectionExtent = viewState.projection.getExtent(); + let loadExtent = extent.slice(); + if (vectorSource.getWrapX() && viewState.projection.canWrapX() && !containsExtent(projectionExtent, frameState.extent)) { // For the replay group, we need an extent that intersects the real world @@ -378,6 +380,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { center[0] -= (worldsAway * worldWidth); } + if (typeof /** @type {?} */ (vectorLayer).getMeridians !== 'function') { + loadExtent = extent; + } + if (!this.dirty_ && this.renderedResolution_ == resolution && this.renderedRevision_ == vectorLayerRevision && @@ -398,10 +404,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const userProjection = getUserProjection(); let userTransform; if (userProjection) { - vectorSource.loadFeatures(toUserExtent(extent, projection), resolution, userProjection); + vectorSource.loadFeatures(toUserExtent(loadExtent, projection), resolution, userProjection); userTransform = getTransformFromProjections(userProjection, projection); } else { - vectorSource.loadFeatures(extent, resolution, projection); + vectorSource.loadFeatures(loadExtent, resolution, projection); } const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio); From bad0ff38ca2a690b045e94c86fab9e449c8ed5a0 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sat, 14 Mar 2020 10:37:03 +0000 Subject: [PATCH 217/636] handle wrapX without calculating excess meridians avoid calculating more meridians or longer parallels than necessary when viewport extent includes a wrapped world --- src/ol/layer/Graticule.js | 112 ++++++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 36 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 6bc7360dfa..0e3f073eb1 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -717,6 +717,22 @@ class Graticule extends VectorLayer { return; } + let wrapX = false; + const projectionExtent = this.projection_.getExtent(); + const worldWidth = getWidth(projectionExtent); + if (this.getSource().getWrapX() && this.projection_.canWrapX() && !containsExtent(projectionExtent, extent)) { + if (getWidth(extent) >= worldWidth) { + extent[0] = projectionExtent[0]; + extent[2] = projectionExtent[2]; + } else { + const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); + center[0] -= (worldsAway * worldWidth); + extent[0] -= (worldsAway * worldWidth); + extent[2] -= (worldsAway * worldWidth); + wrapX = true; + } + } + // Constrain the center to fit into the extent available to the graticule const validCenterP = [ @@ -740,44 +756,56 @@ class Graticule extends VectorLayer { // Limit the extent to fit into the extent available to the graticule - const validExtentP = [ - clamp(extent[0], this.minX_, this.maxX_), - clamp(extent[1], this.minY_, this.maxY_), - clamp(extent[2], this.minX_, this.maxX_), - clamp(extent[3], this.minY_, this.maxY_) - ]; + let validExtentP = extent; + if (!wrapX) { + validExtentP = [ + clamp(extent[0], this.minX_, this.maxX_), + clamp(extent[1], this.minY_, this.maxY_), + clamp(extent[2], this.minX_, this.maxX_), + clamp(extent[3], this.minY_, this.maxY_) + ]; + } // Transform the extent to get the lon lat ranges for the edges of the extent const validExtent = applyTransform(validExtentP, this.toLonLatTransform_, undefined, 8); - // Check if extremities of the world extent lie inside the extent - // (for example the pole in a polar projection) - // and extend the extent as appropriate + let maxLat = validExtent[3]; + let maxLon = validExtent[2]; + let minLat = validExtent[1]; + let minLon = validExtent[0]; - if (containsCoordinate(validExtentP, this.bottomLeft_)) { - validExtent[0] = this.minLon_; - validExtent[1] = this.minLat_; - } - if (containsCoordinate(validExtentP, this.bottomRight_)) { - validExtent[2] = this.maxLon_; - validExtent[1] = this.minLat_; - } - if (containsCoordinate(validExtentP, this.topLeft_)) { - validExtent[0] = this.minLon_; - validExtent[3] = this.maxLat_; - } - if (containsCoordinate(validExtentP, this.topRight_)) { - validExtent[2] = this.maxLon_; - validExtent[3] = this.maxLat_; - } + if (!wrapX) { - // The transformed center may also extend the lon lat ranges used for rendering + // Check if extremities of the world extent lie inside the extent + // (for example the pole in a polar projection) + // and extend the extent as appropriate - const maxLat = clamp(validExtent[3], centerLat, this.maxLat_); - const maxLon = clamp(validExtent[2], centerLon, this.maxLon_); - const minLat = clamp(validExtent[1], this.minLat_, centerLat); - const minLon = clamp(validExtent[0], this.minLon_, centerLon); + if (containsCoordinate(validExtentP, this.bottomLeft_)) { + minLon = this.minLon_; + minLat = this.minLat_; + } + if (containsCoordinate(validExtentP, this.bottomRight_)) { + maxLon = this.maxLon_; + minLat = this.minLat_; + } + if (containsCoordinate(validExtentP, this.topLeft_)) { + minLon = this.minLon_; + maxLat = this.maxLat_; + } + if (containsCoordinate(validExtentP, this.topRight_)) { + maxLon = this.maxLon_; + maxLat = this.maxLat_; + } + + // The transformed center may also extend the lon lat ranges used for rendering + + maxLat = clamp(maxLat, centerLat, this.maxLat_); + maxLon = clamp(maxLon, centerLon, this.maxLon_); + minLat = clamp(minLat, this.minLat_, centerLat); + minLon = clamp(minLon, this.minLon_, centerLon); + + } // Create meridians @@ -787,17 +815,29 @@ class Graticule extends VectorLayer { idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0); cnt = 0; - while (lon != this.minLon_ && cnt++ < maxLines) { - lon = Math.max(lon - interval, this.minLon_); - idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx); + if (wrapX) { + while ((lon -= interval) >= minLon && cnt++ < maxLines) { + idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx); + } + } else { + while (lon != this.minLon_ && cnt++ < maxLines) { + lon = Math.max(lon - interval, this.minLon_); + idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx); + } } lon = clamp(centerLon, this.minLon_, this.maxLon_); cnt = 0; - while (lon != this.maxLon_ && cnt++ < maxLines) { - lon = Math.min(lon + interval, this.maxLon_); - idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx); + if (wrapX) { + while ((lon += interval) <= maxLon && cnt++ < maxLines) { + idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx); + } + } else { + while (lon != this.maxLon_ && cnt++ < maxLines) { + lon = Math.min(lon + interval, this.maxLon_); + idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx); + } } this.meridians_.length = idx; From 516a75ae226c8bbdcb418437e825601451175f0a Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sun, 15 Mar 2020 11:44:30 +0000 Subject: [PATCH 218/636] Always load frameState extent for graticule layers reorder and comment --- src/ol/renderer/canvas/VectorLayer.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index d9e5e308e2..3429f64106 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -361,9 +361,8 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const center = viewState.center.slice(); const extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution); - const projectionExtent = viewState.projection.getExtent(); - let loadExtent = extent.slice(); + const projectionExtent = viewState.projection.getExtent(); if (vectorSource.getWrapX() && viewState.projection.canWrapX() && !containsExtent(projectionExtent, frameState.extent)) { @@ -376,14 +375,14 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const gutter = Math.max(getWidth(extent) / 2, worldWidth); extent[0] = projectionExtent[0] - gutter; extent[2] = projectionExtent[2] + gutter; + // Except for Graticule use this for loading features + if (typeof /** @type {?} */ (vectorLayer).getMeridians !== 'function') { + loadExtent = extent; + } const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); center[0] -= (worldsAway * worldWidth); } - if (typeof /** @type {?} */ (vectorLayer).getMeridians !== 'function') { - loadExtent = extent; - } - if (!this.dirty_ && this.renderedResolution_ == resolution && this.renderedRevision_ == vectorLayerRevision && From f6ede1a9c0895bfa946e636d6566427a5e5b473c Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Wed, 18 Mar 2020 13:28:21 +0000 Subject: [PATCH 219/636] handle wrapX without calculating excess meridians override extent validation only if the extent includes parts of two worlds --- src/ol/layer/Graticule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 0e3f073eb1..15ba7cd2a1 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -729,7 +729,7 @@ class Graticule extends VectorLayer { center[0] -= (worldsAway * worldWidth); extent[0] -= (worldsAway * worldWidth); extent[2] -= (worldsAway * worldWidth); - wrapX = true; + wrapX = !containsExtent(projectionExtent, extent); } } From f6bbf414a8de864801d31c136ab8c3816c07fe7d Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sat, 28 Mar 2020 20:59:23 +0000 Subject: [PATCH 220/636] Add loadWrapX option and getter --- src/ol/source/Vector.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index 49ac34296b..edf1c4e25d 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -146,6 +146,10 @@ export class VectorSourceEvent extends Event { * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the * -180° and 180° meridians to work properly, this should be set to `false`. The * resulting geometry coordinates will then exceed the world bounds. + * @property {boolean} [loadWrapX=true] Call the loader with one world width either side + * of the projection extent when the world is wrapped horizontally. This allows features + * to be loaded in a single request, but may be inefficient. If `false` only the viewport + * extent is used and the loader must determine the appropriate real world requests. */ @@ -190,7 +194,13 @@ class VectorSource extends Source { * @private * @type {boolean} */ - this.overlaps_ = options.overlaps == undefined ? true : options.overlaps; + this.loadWrapX_ = options.loadWrapX === undefined ? true : options.loadWrapX; + + /** + * @private + * @type {boolean} + */ + this.overlaps_ = options.overlaps === undefined ? true : options.overlaps; /** * @private @@ -801,6 +811,14 @@ class VectorSource extends Source { } + /** + * @return {boolean} The loadWrapX option used to construct the source. + */ + getLoadWrapX() { + return this.loadWrapX_; + } + + /** * @return {boolean} The source can have overlapping geometries. */ From b560dab513bd60020df510d70ff32975de031ae8 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sat, 28 Mar 2020 21:02:32 +0000 Subject: [PATCH 221/636] Set loadWrapX: false in source --- src/ol/layer/Graticule.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 15ba7cd2a1..aa13cd8fee 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -437,7 +437,8 @@ class Graticule extends VectorLayer { features: new Collection(), overlaps: false, useSpatialIndex: false, - wrapX: options.wrapX + wrapX: options.wrapX, + loadWrapX: false }) ); From 3b760dc3083965f77ebcd2473974ef5361ce4fc0 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sat, 28 Mar 2020 21:10:41 +0000 Subject: [PATCH 222/636] Use getLoadWrapX() to determine extent to load --- src/ol/renderer/canvas/VectorLayer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index 3429f64106..bdfe6c2e5b 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -375,8 +375,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const gutter = Math.max(getWidth(extent) / 2, worldWidth); extent[0] = projectionExtent[0] - gutter; extent[2] = projectionExtent[2] + gutter; - // Except for Graticule use this for loading features - if (typeof /** @type {?} */ (vectorLayer).getMeridians !== 'function') { + if (vectorSource.getLoadWrapX()) { loadExtent = extent; } const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); From 67c37c2163af4bb573b0106962c31ddc5e74b800 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sun, 29 Mar 2020 16:54:10 +0100 Subject: [PATCH 223/636] Test extents passed to loader --- .../ol/renderer/canvas/vectorlayer.test.js | 102 +++++++++++++++++- 1 file changed, 99 insertions(+), 3 deletions(-) diff --git a/test/spec/ol/renderer/canvas/vectorlayer.test.js b/test/spec/ol/renderer/canvas/vectorlayer.test.js index a766fdb767..575d7c11a8 100644 --- a/test/spec/ol/renderer/canvas/vectorlayer.test.js +++ b/test/spec/ol/renderer/canvas/vectorlayer.test.js @@ -6,6 +6,7 @@ import Circle from '../../../../../src/ol/geom/Circle.js'; import Point from '../../../../../src/ol/geom/Point.js'; import {fromExtent} from '../../../../../src/ol/geom/Polygon.js'; import VectorLayer from '../../../../../src/ol/layer/Vector.js'; +import {bbox as bboxStrategy} from '../../../../../src/ol/loadingstrategy.js'; import {get as getProjection} from '../../../../../src/ol/proj.js'; import {checkedFonts} from '../../../../../src/ol/render/canvas.js'; import CanvasVectorLayerRenderer from '../../../../../src/ol/renderer/canvas/VectorLayer.js'; @@ -220,17 +221,25 @@ describe('ol.renderer.canvas.VectorLayer', function() { }); describe('#prepareFrame and #compose', function() { - let frameState, projExtent, renderer, worldWidth, buffer; + let frameState, projExtent, renderer, worldWidth, buffer, loadExtent; + const loader = function(extent) { + loadExtent = extent; + } beforeEach(function() { const layer = new VectorLayer({ - source: new VectorSource({wrapX: true}) + source: new VectorSource({ + wrapX: true, + loader: loader, + strategy: bboxStrategy + }) }); renderer = new CanvasVectorLayerRenderer(layer); const projection = getProjection('EPSG:3857'); projExtent = projection.getExtent(); worldWidth = getWidth(projExtent); buffer = layer.getRenderBuffer(); + loadExtent = undefined; frameState = { viewHints: [], viewState: { @@ -251,7 +260,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); - + expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); }); it('sets correct extent for viewport less than 1 world wide', function() { @@ -263,6 +272,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); + expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); }); it('sets correct extent for viewport more than 1 world wide', function() { @@ -274,6 +284,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); + expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); }); it('sets correct extent for viewport more than 2 worlds wide', function() { @@ -287,6 +298,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - 2 * worldWidth - 10000, -10000, projExtent[2] + 2 * worldWidth + 10000, 10000 ], buffer)); + expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); }); it('sets replayGroupChanged correctly', function() { @@ -319,6 +331,90 @@ describe('ol.renderer.canvas.VectorLayer', function() { }); + describe('#prepareFrame with a loadWrapX: false source', function() { + let frameState, projExtent, renderer, worldWidth, buffer, loadExtent; + const loader = function(extent) { + loadExtent = extent; + } + + beforeEach(function() { + const layer = new VectorLayer({ + source: new VectorSource({ + wrapX: true, + loadWrapX: false, + loader: loader, + strategy: bboxStrategy + }) + }); + renderer = new CanvasVectorLayerRenderer(layer); + const projection = getProjection('EPSG:3857'); + projExtent = projection.getExtent(); + worldWidth = getWidth(projExtent); + buffer = layer.getRenderBuffer(); + loadExtent = undefined; + frameState = { + viewHints: [], + viewState: { + center: [0, 0], + projection: projection, + resolution: 1, + rotation: 0 + } + }; + }); + + it('loads correct extent for small viewport near dateline', function() { + + frameState.extent = + [projExtent[0] - 10000, -10000, projExtent[0] + 10000, 10000]; + renderer.prepareFrame(frameState); + expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ + projExtent[0] - worldWidth + buffer, + -10000, projExtent[2] + worldWidth - buffer, 10000 + ], buffer)); + expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); + }); + + it('loads correct extent for viewport less than 1 world wide', function() { + + frameState.extent = + [projExtent[0] - 10000, -10000, projExtent[1] - 10000, 10000]; + renderer.prepareFrame(frameState); + expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ + projExtent[0] - worldWidth + buffer, + -10000, projExtent[2] + worldWidth - buffer, 10000 + ], buffer)); + expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); + }); + + it('loads correct extent for viewport more than 1 world wide', function() { + + frameState.extent = + [2 * projExtent[0] - 10000, -10000, 2 * projExtent[1] + 10000, 10000]; + renderer.prepareFrame(frameState); + expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ + projExtent[0] - worldWidth + buffer, + -10000, projExtent[2] + worldWidth - buffer, 10000 + ], buffer)); + expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); + }); + + it('loads correct extent for viewport more than 2 worlds wide', function() { + + frameState.extent = [ + projExtent[0] - 2 * worldWidth - 10000, + -10000, projExtent[1] + 2 * worldWidth + 10000, 10000 + ]; + renderer.prepareFrame(frameState); + expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ + projExtent[0] - 2 * worldWidth - 10000, + -10000, projExtent[2] + 2 * worldWidth + 10000, 10000 + ], buffer)); + expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); + }); + + }); + describe('hit detection', function() { it('with no fill and transparent fill', function() { From 0c9324f398df0150d1afe5f83d8a98c9fa5a0025 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sun, 29 Mar 2020 16:58:57 +0100 Subject: [PATCH 224/636] Test extents passed to loader --- test/spec/ol/renderer/canvas/vectorlayer.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/ol/renderer/canvas/vectorlayer.test.js b/test/spec/ol/renderer/canvas/vectorlayer.test.js index 575d7c11a8..f163a6b4cf 100644 --- a/test/spec/ol/renderer/canvas/vectorlayer.test.js +++ b/test/spec/ol/renderer/canvas/vectorlayer.test.js @@ -224,7 +224,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { let frameState, projExtent, renderer, worldWidth, buffer, loadExtent; const loader = function(extent) { loadExtent = extent; - } + }; beforeEach(function() { const layer = new VectorLayer({ @@ -335,7 +335,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { let frameState, projExtent, renderer, worldWidth, buffer, loadExtent; const loader = function(extent) { loadExtent = extent; - } + }; beforeEach(function() { const layer = new VectorLayer({ From 190cd202a177b18c31e29acf69e41c0e3dc1ac46 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 29 Mar 2020 18:14:31 +0200 Subject: [PATCH 225/636] Always use load extent with real world center --- src/ol/layer/Graticule.js | 3 +- src/ol/renderer/canvas/VectorLayer.js | 7 ++- src/ol/source/Vector.js | 18 ------- .../ol/renderer/canvas/vectorlayer.test.js | 49 ++++++++++++------- 4 files changed, 35 insertions(+), 42 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index aa13cd8fee..15ba7cd2a1 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -437,8 +437,7 @@ class Graticule extends VectorLayer { features: new Collection(), overlaps: false, useSpatialIndex: false, - wrapX: options.wrapX, - loadWrapX: false + wrapX: options.wrapX }) ); diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index bdfe6c2e5b..beef39b2f3 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -361,7 +361,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const center = viewState.center.slice(); const extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution); - let loadExtent = extent.slice(); + const loadExtent = extent.slice(); const projectionExtent = viewState.projection.getExtent(); if (vectorSource.getWrapX() && viewState.projection.canWrapX() && @@ -375,11 +375,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const gutter = Math.max(getWidth(extent) / 2, worldWidth); extent[0] = projectionExtent[0] - gutter; extent[2] = projectionExtent[2] + gutter; - if (vectorSource.getLoadWrapX()) { - loadExtent = extent; - } const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); center[0] -= (worldsAway * worldWidth); + loadExtent[0] -= (worldsAway * worldWidth); + loadExtent[2] -= (worldsAway * worldWidth); } if (!this.dirty_ && diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index edf1c4e25d..607f0d3b67 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -146,10 +146,6 @@ export class VectorSourceEvent extends Event { * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the * -180° and 180° meridians to work properly, this should be set to `false`. The * resulting geometry coordinates will then exceed the world bounds. - * @property {boolean} [loadWrapX=true] Call the loader with one world width either side - * of the projection extent when the world is wrapped horizontally. This allows features - * to be loaded in a single request, but may be inefficient. If `false` only the viewport - * extent is used and the loader must determine the appropriate real world requests. */ @@ -190,12 +186,6 @@ class VectorSource extends Source { */ this.format_ = options.format; - /** - * @private - * @type {boolean} - */ - this.loadWrapX_ = options.loadWrapX === undefined ? true : options.loadWrapX; - /** * @private * @type {boolean} @@ -811,14 +801,6 @@ class VectorSource extends Source { } - /** - * @return {boolean} The loadWrapX option used to construct the source. - */ - getLoadWrapX() { - return this.loadWrapX_; - } - - /** * @return {boolean} The source can have overlapping geometries. */ diff --git a/test/spec/ol/renderer/canvas/vectorlayer.test.js b/test/spec/ol/renderer/canvas/vectorlayer.test.js index f163a6b4cf..05e7c011b6 100644 --- a/test/spec/ol/renderer/canvas/vectorlayer.test.js +++ b/test/spec/ol/renderer/canvas/vectorlayer.test.js @@ -1,7 +1,7 @@ import Feature from '../../../../../src/ol/Feature.js'; import Map from '../../../../../src/ol/Map.js'; import View from '../../../../../src/ol/View.js'; -import {buffer as bufferExtent, getWidth} from '../../../../../src/ol/extent.js'; +import {buffer as bufferExtent, getWidth, getCenter} from '../../../../../src/ol/extent.js'; import Circle from '../../../../../src/ol/geom/Circle.js'; import Point from '../../../../../src/ol/geom/Point.js'; import {fromExtent} from '../../../../../src/ol/geom/Polygon.js'; @@ -243,7 +243,6 @@ describe('ol.renderer.canvas.VectorLayer', function() { frameState = { viewHints: [], viewState: { - center: [0, 0], projection: projection, resolution: 1, rotation: 0 @@ -251,58 +250,72 @@ describe('ol.renderer.canvas.VectorLayer', function() { }; }); + function setExtent(extent) { + frameState.extent = extent; + frameState.viewState.center = getCenter(extent); + } + it('sets correct extent for small viewport near dateline', function() { - frameState.extent = - [projExtent[0] - 10000, -10000, projExtent[0] + 10000, 10000]; + setExtent([projExtent[0] - 10000, -10000, projExtent[0] + 10000, 10000]); renderer.prepareFrame(frameState); expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); - expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); + expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); }); it('sets correct extent for viewport less than 1 world wide', function() { - frameState.extent = - [projExtent[0] - 10000, -10000, projExtent[1] - 10000, 10000]; + setExtent([projExtent[0] - 10000, -10000, projExtent[2] - 10000, 10000]); renderer.prepareFrame(frameState); expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); - expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); + expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); }); it('sets correct extent for viewport more than 1 world wide', function() { - frameState.extent = - [2 * projExtent[0] - 10000, -10000, 2 * projExtent[1] + 10000, 10000]; + setExtent([2 * projExtent[0] + 10000, -10000, 2 * projExtent[2] - 10000, 10000]); renderer.prepareFrame(frameState); expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); - expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); + expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); }); - it('sets correct extent for viewport more than 2 worlds wide', function() { + it('sets correct extent for viewport more than 2 worlds wide, one world away', function() { - frameState.extent = [ - projExtent[0] - 2 * worldWidth - 10000, - -10000, projExtent[1] + 2 * worldWidth + 10000, 10000 - ]; + setExtent([projExtent[0] - 2 * worldWidth - 10000, + -10000, projExtent[0] + 2 * worldWidth + 10000, 10000 + ]); renderer.prepareFrame(frameState); expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ projExtent[0] - 2 * worldWidth - 10000, -10000, projExtent[2] + 2 * worldWidth + 10000, 10000 ], buffer)); - expect(loadExtent).to.eql(renderer.replayGroup_.maxExtent_); + const normalizedExtent = [projExtent[0] - 2 * worldWidth + worldWidth - 10000, -10000, projExtent[0] + 2 * worldWidth + worldWidth + 10000, 10000]; + expect(loadExtent).to.eql(bufferExtent(normalizedExtent, buffer)); + }); + + it('sets correct extent for small viewport near dateline, one world away', function() { + + setExtent([-worldWidth - 10000, -10000, -worldWidth + 10000, 10000]); + renderer.prepareFrame(frameState); + expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ + projExtent[0] - worldWidth + buffer, + -10000, projExtent[2] + worldWidth - buffer, 10000 + ], buffer)); + const normalizedExtent = [-10000, -10000, 10000, 10000]; + expect(loadExtent).to.eql(bufferExtent(normalizedExtent, buffer)); }); it('sets replayGroupChanged correctly', function() { - frameState.extent = [-10000, -10000, 10000, 10000]; + setExtent([-10000, -10000, 10000, 10000]); renderer.prepareFrame(frameState); expect(renderer.replayGroupChanged).to.be(true); renderer.prepareFrame(frameState); From 3d8495742bc03775c6d1e4bede168947d9a1f02b Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sun, 29 Mar 2020 19:50:35 +0100 Subject: [PATCH 226/636] Simplify following renderer changes --- src/ol/layer/Graticule.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 15ba7cd2a1..e16cc7d955 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -725,11 +725,7 @@ class Graticule extends VectorLayer { extent[0] = projectionExtent[0]; extent[2] = projectionExtent[2]; } else { - const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); - center[0] -= (worldsAway * worldWidth); - extent[0] -= (worldsAway * worldWidth); - extent[2] -= (worldsAway * worldWidth); - wrapX = !containsExtent(projectionExtent, extent); + wrapX = true; } } From a35794ae973869ea5144c3d822e0a5b3f5642b30 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 30 Mar 2020 12:58:50 +0200 Subject: [PATCH 227/636] Load two extents for views that cross the date line --- src/ol/renderer/canvas/VectorLayer.js | 17 ++- .../ol/renderer/canvas/vectorlayer.test.js | 116 ++++-------------- 2 files changed, 35 insertions(+), 98 deletions(-) diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index beef39b2f3..472333c8c9 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -361,7 +361,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const center = viewState.center.slice(); const extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution); - const loadExtent = extent.slice(); + const loadExtents = [extent.slice()]; const projectionExtent = viewState.projection.getExtent(); if (vectorSource.getWrapX() && viewState.projection.canWrapX() && @@ -377,8 +377,15 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { extent[2] = projectionExtent[2] + gutter; const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); center[0] -= (worldsAway * worldWidth); + const loadExtent = loadExtents[0]; loadExtent[0] -= (worldsAway * worldWidth); loadExtent[2] -= (worldsAway * worldWidth); + // If the extent crosses the date line, we load data for both edges of the worlds + if (loadExtent[0] < projectionExtent[0] && loadExtent[2] < projectionExtent[2]) { + loadExtents.push([loadExtent[0] + worldWidth, loadExtent[1], loadExtent[2] + worldWidth, loadExtent[3]]); + } else if (loadExtent[0] > projectionExtent[0] && loadExtent[2] > projectionExtent[2]) { + loadExtents.push([loadExtent[0] - worldWidth, loadExtent[1], loadExtent[2] - worldWidth, loadExtent[3]]); + } } if (!this.dirty_ && @@ -401,10 +408,14 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const userProjection = getUserProjection(); let userTransform; if (userProjection) { - vectorSource.loadFeatures(toUserExtent(loadExtent, projection), resolution, userProjection); + for (let i = 0, ii = loadExtents.length; i < ii; ++i) { + vectorSource.loadFeatures(toUserExtent(loadExtents[i], projection), resolution, userProjection); + } userTransform = getTransformFromProjections(userProjection, projection); } else { - vectorSource.loadFeatures(loadExtent, resolution, projection); + for (let i = 0, ii = loadExtents.length; i < ii; ++i) { + vectorSource.loadFeatures(loadExtents[i], resolution, projection); + } } const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio); diff --git a/test/spec/ol/renderer/canvas/vectorlayer.test.js b/test/spec/ol/renderer/canvas/vectorlayer.test.js index 05e7c011b6..f2fabaddd8 100644 --- a/test/spec/ol/renderer/canvas/vectorlayer.test.js +++ b/test/spec/ol/renderer/canvas/vectorlayer.test.js @@ -221,10 +221,11 @@ describe('ol.renderer.canvas.VectorLayer', function() { }); describe('#prepareFrame and #compose', function() { - let frameState, projExtent, renderer, worldWidth, buffer, loadExtent; - const loader = function(extent) { - loadExtent = extent; - }; + let frameState, projExtent, renderer, worldWidth, buffer, loadExtents; + + function loader(extent) { + loadExtents.push(extent); + } beforeEach(function() { const layer = new VectorLayer({ @@ -239,7 +240,7 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent = projection.getExtent(); worldWidth = getWidth(projExtent); buffer = layer.getRenderBuffer(); - loadExtent = undefined; + loadExtents = []; frameState = { viewHints: [], viewState: { @@ -263,7 +264,10 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); - expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); + expect(loadExtents.length).to.be(2); + expect(loadExtents[0]).to.eql(bufferExtent(frameState.extent, buffer)); + const otherExtent = [projExtent[2] - 10000, -10000, projExtent[2] + 10000, 10000]; + expect(loadExtents[1]).to.eql(bufferExtent(otherExtent, buffer)); }); it('sets correct extent for viewport less than 1 world wide', function() { @@ -274,7 +278,10 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); - expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); + expect(loadExtents.length).to.be(2); + expect(loadExtents[0]).to.eql(bufferExtent(frameState.extent, buffer)); + const otherExtent = [projExtent[0] - 10000 + worldWidth, -10000, projExtent[2] - 10000 + worldWidth, 10000]; + expect(loadExtents[1]).to.eql(bufferExtent(otherExtent, buffer)); }); it('sets correct extent for viewport more than 1 world wide', function() { @@ -285,7 +292,8 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); - expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); + expect(loadExtents.length).to.be(1); + expect(loadExtents[0]).to.eql(bufferExtent(frameState.extent, buffer)); }); it('sets correct extent for viewport more than 2 worlds wide, one world away', function() { @@ -298,11 +306,12 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - 2 * worldWidth - 10000, -10000, projExtent[2] + 2 * worldWidth + 10000, 10000 ], buffer)); + expect(loadExtents.length).to.be(1); const normalizedExtent = [projExtent[0] - 2 * worldWidth + worldWidth - 10000, -10000, projExtent[0] + 2 * worldWidth + worldWidth + 10000, 10000]; - expect(loadExtent).to.eql(bufferExtent(normalizedExtent, buffer)); + expect(loadExtents[0]).to.eql(bufferExtent(normalizedExtent, buffer)); }); - it('sets correct extent for small viewport near dateline, one world away', function() { + it('sets correct extent for small viewport, one world away', function() { setExtent([-worldWidth - 10000, -10000, -worldWidth + 10000, 10000]); renderer.prepareFrame(frameState); @@ -310,8 +319,9 @@ describe('ol.renderer.canvas.VectorLayer', function() { projExtent[0] - worldWidth + buffer, -10000, projExtent[2] + worldWidth - buffer, 10000 ], buffer)); + expect(loadExtents.length).to.be(1); const normalizedExtent = [-10000, -10000, 10000, 10000]; - expect(loadExtent).to.eql(bufferExtent(normalizedExtent, buffer)); + expect(loadExtents[0]).to.eql(bufferExtent(normalizedExtent, buffer)); }); it('sets replayGroupChanged correctly', function() { @@ -344,90 +354,6 @@ describe('ol.renderer.canvas.VectorLayer', function() { }); - describe('#prepareFrame with a loadWrapX: false source', function() { - let frameState, projExtent, renderer, worldWidth, buffer, loadExtent; - const loader = function(extent) { - loadExtent = extent; - }; - - beforeEach(function() { - const layer = new VectorLayer({ - source: new VectorSource({ - wrapX: true, - loadWrapX: false, - loader: loader, - strategy: bboxStrategy - }) - }); - renderer = new CanvasVectorLayerRenderer(layer); - const projection = getProjection('EPSG:3857'); - projExtent = projection.getExtent(); - worldWidth = getWidth(projExtent); - buffer = layer.getRenderBuffer(); - loadExtent = undefined; - frameState = { - viewHints: [], - viewState: { - center: [0, 0], - projection: projection, - resolution: 1, - rotation: 0 - } - }; - }); - - it('loads correct extent for small viewport near dateline', function() { - - frameState.extent = - [projExtent[0] - 10000, -10000, projExtent[0] + 10000, 10000]; - renderer.prepareFrame(frameState); - expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ - projExtent[0] - worldWidth + buffer, - -10000, projExtent[2] + worldWidth - buffer, 10000 - ], buffer)); - expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); - }); - - it('loads correct extent for viewport less than 1 world wide', function() { - - frameState.extent = - [projExtent[0] - 10000, -10000, projExtent[1] - 10000, 10000]; - renderer.prepareFrame(frameState); - expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ - projExtent[0] - worldWidth + buffer, - -10000, projExtent[2] + worldWidth - buffer, 10000 - ], buffer)); - expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); - }); - - it('loads correct extent for viewport more than 1 world wide', function() { - - frameState.extent = - [2 * projExtent[0] - 10000, -10000, 2 * projExtent[1] + 10000, 10000]; - renderer.prepareFrame(frameState); - expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ - projExtent[0] - worldWidth + buffer, - -10000, projExtent[2] + worldWidth - buffer, 10000 - ], buffer)); - expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); - }); - - it('loads correct extent for viewport more than 2 worlds wide', function() { - - frameState.extent = [ - projExtent[0] - 2 * worldWidth - 10000, - -10000, projExtent[1] + 2 * worldWidth + 10000, 10000 - ]; - renderer.prepareFrame(frameState); - expect(renderer.replayGroup_.maxExtent_).to.eql(bufferExtent([ - projExtent[0] - 2 * worldWidth - 10000, - -10000, projExtent[2] + 2 * worldWidth + 10000, 10000 - ], buffer)); - expect(loadExtent).to.eql(bufferExtent(frameState.extent, buffer)); - }); - - }); - describe('hit detection', function() { it('with no fill and transparent fill', function() { From 48b79cf7d1c369d39959c561a61915bc3408e1de Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Mon, 30 Mar 2020 14:51:27 +0100 Subject: [PATCH 228/636] only use one extent if two are passed --- src/ol/layer/Graticule.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index e16cc7d955..7a991858dc 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -479,11 +479,25 @@ class Graticule extends VectorLayer { * @return {Array} Extents. */ strategyFunction(extent, resolution) { - if (this.loadedExtent_ && !equals(this.loadedExtent_, extent)) { + // extents may be passed in different worlds, to avoid endless loop we use only one + const realExtent = extent.slice(); + if (this.projection_) { + const center = getCenter(extent); + const projectionExtent = this.projection_.getExtent(); + const worldWidth = getWidth(projectionExtent); + if (this.getSource().getWrapX() && this.projection_.canWrapX() && !containsExtent(projectionExtent, extent)) { + const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); + realExtent[0] -= (worldsAway * worldWidth); + realExtent[2] -= (worldsAway * worldWidth); + } + realExtent[0] = Math.round(realExtent[0] * 1e6) / 1e6; + realExtent[2] = Math.round(realExtent[2] * 1e6) / 1e6; + } + if (this.loadedExtent_ && !equals(this.loadedExtent_, realExtent)) { // we should not keep track of loaded extents this.getSource().removeLoadedExtent(this.loadedExtent_); } - return [extent]; + return [realExtent]; } /** From 098885a006244d0c42a4f6683e665a4a07e99ee6 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 30 Mar 2020 19:26:26 +0200 Subject: [PATCH 229/636] New wrapX functions for coordinate and extent --- src/ol/coordinate.js | 20 +++++++++++++ src/ol/extent.js | 22 ++++++++++++++ src/ol/layer/Graticule.js | 19 ++++-------- src/ol/renderer/Map.js | 14 +++------ src/ol/renderer/canvas/VectorLayer.js | 13 ++++----- src/ol/renderer/canvas/VectorTileLayer.js | 5 ++-- test/spec/ol/coordinate.test.js | 28 +++++++++++++++++- test/spec/ol/extent.test.js | 35 ++++++++++++++++++++++- 8 files changed, 121 insertions(+), 35 deletions(-) diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index 177c8bce55..fb375162b9 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -3,6 +3,7 @@ */ import {modulo} from './math.js'; import {padNumber} from './string.js'; +import {getWidth} from './extent.js'; /** @@ -402,3 +403,22 @@ export function toStringHDMS(coordinate, opt_fractionDigits) { export function toStringXY(coordinate, opt_fractionDigits) { return format(coordinate, '{x}, {y}', opt_fractionDigits); } + + +/** + * Modifies the provided coordinate in-place to be within the real world + * extent. + * + * @param {Coordinate} coordinate Coordinate. + * @param {import("./proj/Projection.js").default} projection Projection + * @return {Coordinate} The coordinate within the real world extent. + */ +export function wrapX(coordinate, projection) { + const projectionExtent = projection.getExtent(); + if (projection.canWrapX() && (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) { + const worldWidth = getWidth(projectionExtent); + const worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / worldWidth); + coordinate[0] -= (worldsAway * worldWidth); + } + return coordinate; +} diff --git a/src/ol/extent.js b/src/ol/extent.js index 94eb9cb249..ef969a196a 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -813,3 +813,25 @@ export function applyTransform(extent, transformFn, opt_extent, opt_stops) { } return _boundingExtentXYs(xs, ys, opt_extent); } + + +/** + * Modifies the provided extent in-place to be within the real world + * extent. + * + * @param {Extent} extent Extent. + * @param {import("./proj/Projection.js").default} projection Projection + * @return {Extent} The extent within the real world extent. + */ +export function wrapX(extent, projection) { + const projectionExtent = projection.getExtent(); + const center = getCenter(extent); + if (projection.canWrapX() && (center[0] < projectionExtent[0] || center[0] > projectionExtent[2])) { + const worldWidth = getWidth(projectionExtent); + const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); + const offset = (worldsAway * worldWidth); + extent[0] -= offset; + extent[2] -= offset; + } + return extent; +} diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 7a991858dc..4e4023fd68 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -24,7 +24,9 @@ import { getIntersection, getWidth, intersects, - isEmpty + isEmpty, + buffer as bufferExtent, + wrapX } from '../extent.js'; import {clamp} from '../math.js'; import Style from '../style/Style.js'; @@ -481,19 +483,10 @@ class Graticule extends VectorLayer { strategyFunction(extent, resolution) { // extents may be passed in different worlds, to avoid endless loop we use only one const realExtent = extent.slice(); - if (this.projection_) { - const center = getCenter(extent); - const projectionExtent = this.projection_.getExtent(); - const worldWidth = getWidth(projectionExtent); - if (this.getSource().getWrapX() && this.projection_.canWrapX() && !containsExtent(projectionExtent, extent)) { - const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); - realExtent[0] -= (worldsAway * worldWidth); - realExtent[2] -= (worldsAway * worldWidth); - } - realExtent[0] = Math.round(realExtent[0] * 1e6) / 1e6; - realExtent[2] = Math.round(realExtent[2] * 1e6) / 1e6; + if (this.projection_ && this.getSource().getWrapX()) { + wrapX(realExtent, this.projection_); } - if (this.loadedExtent_ && !equals(this.loadedExtent_, realExtent)) { + if (this.loadedExtent_ && !containsExtent(bufferExtent(this.loadedExtent_, resolution / 2), realExtent)) { // we should not keep track of loaded extents this.getSource().removeLoadedExtent(this.loadedExtent_); } diff --git a/src/ol/renderer/Map.js b/src/ol/renderer/Map.js index 591e96534f..86ee999a81 100644 --- a/src/ol/renderer/Map.js +++ b/src/ol/renderer/Map.js @@ -9,6 +9,7 @@ import {inView} from '../layer/Layer.js'; import {shared as iconImageCache} from '../style/IconImageCache.js'; import {compose as composeTransform, makeInverse} from '../transform.js'; import {renderDeclutterItems} from '../render.js'; +import {wrapX} from '../coordinate.js'; /** * @abstract @@ -102,19 +103,12 @@ class MapRenderer extends Disposable { const projection = viewState.projection; - let translatedCoordinate = coordinate; + const translatedCoordinate = wrapX(coordinate.slice(), projection); const offsets = [[0, 0]]; - if (projection.canWrapX()) { + if (projection.canWrapX() && checkWrapped) { const projectionExtent = projection.getExtent(); const worldWidth = getWidth(projectionExtent); - const x = coordinate[0]; - if (x < projectionExtent[0] || x > projectionExtent[2]) { - const worldsAway = Math.ceil((projectionExtent[0] - x) / worldWidth); - translatedCoordinate = [x + worldWidth * worldsAway, coordinate[1]]; - } - if (checkWrapped) { - offsets.push([-worldWidth, 0], [worldWidth, 0]); - } + offsets.push([-worldWidth, 0], [worldWidth, 0]); } const layerStates = frameState.layerStatesArray; diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index 472333c8c9..0e2bebf908 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -3,7 +3,8 @@ */ import {getUid} from '../../util.js'; import ViewHint from '../../ViewHint.js'; -import {buffer, createEmpty, containsExtent, getWidth, intersects as intersectsExtent} from '../../extent.js'; +import {buffer, createEmpty, containsExtent, getWidth, intersects as intersectsExtent, wrapX as wrapExtentX} from '../../extent.js'; +import {wrapX as wrapCoordinateX} from '../../coordinate.js'; import {fromUserExtent, toUserExtent, getUserProjection, getTransformFromProjections} from '../../proj.js'; import CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js'; import ExecutorGroup, {replayDeclutter} from '../../render/canvas/ExecutorGroup.js'; @@ -364,7 +365,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const loadExtents = [extent.slice()]; const projectionExtent = viewState.projection.getExtent(); - if (vectorSource.getWrapX() && viewState.projection.canWrapX() && + if (vectorSource.getWrapX() && projection.canWrapX() && !containsExtent(projectionExtent, frameState.extent)) { // For the replay group, we need an extent that intersects the real world // (-180° to +180°). To support geometries in a coordinate range from -540° @@ -375,11 +376,9 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const gutter = Math.max(getWidth(extent) / 2, worldWidth); extent[0] = projectionExtent[0] - gutter; extent[2] = projectionExtent[2] + gutter; - const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); - center[0] -= (worldsAway * worldWidth); - const loadExtent = loadExtents[0]; - loadExtent[0] -= (worldsAway * worldWidth); - loadExtent[2] -= (worldsAway * worldWidth); + wrapCoordinateX(center, projection); + const loadExtent = wrapExtentX(loadExtents[0], projection); + wrapExtentX(loadExtent, projection); // If the extent crosses the date line, we load data for both edges of the worlds if (loadExtent[0] < projectionExtent[0] && loadExtent[2] < projectionExtent[2]) { loadExtents.push([loadExtent[0] + worldWidth, loadExtent[1], loadExtent[2] + worldWidth, loadExtent[3]]); diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index 9c0974fa91..acdd1198d6 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -25,6 +25,7 @@ import { import CanvasExecutorGroup, {replayDeclutter} from '../../render/canvas/ExecutorGroup.js'; import {clear} from '../../obj.js'; import {createHitDetectionImageData, hitDetect} from '../../render/canvas/hitdetect.js'; +import {wrapX} from '../../coordinate.js'; /** @@ -353,9 +354,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { if (tile.getState() === TileState.LOADED && tile.hifi) { const extent = tileGrid.getTileCoordExtent(tile.tileCoord); if (source.getWrapX() && projection.canWrapX() && !containsExtent(projectionExtent, extent)) { - const worldWidth = getWidth(projectionExtent); - const worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / worldWidth); - coordinate[0] -= (worldsAway * worldWidth); + wrapX(coordinate, projection); } break; } diff --git a/test/spec/ol/coordinate.test.js b/test/spec/ol/coordinate.test.js index 23d18509fc..90b6858718 100644 --- a/test/spec/ol/coordinate.test.js +++ b/test/spec/ol/coordinate.test.js @@ -1,5 +1,6 @@ -import {add as addCoordinate, scale as scaleCoordinate, rotate as rotateCoordinate, equals as coordinatesEqual, format as formatCoordinate, closestOnCircle, closestOnSegment, createStringXY, squaredDistanceToSegment, toStringXY, toStringHDMS} from '../../../src/ol/coordinate.js'; +import {add as addCoordinate, scale as scaleCoordinate, rotate as rotateCoordinate, equals as coordinatesEqual, format as formatCoordinate, closestOnCircle, closestOnSegment, createStringXY, squaredDistanceToSegment, toStringXY, toStringHDMS, wrapX} from '../../../src/ol/coordinate.js'; import Circle from '../../../src/ol/geom/Circle.js'; +import {get} from '../../../src/ol/proj.js'; describe('ol.coordinate', function() { @@ -235,4 +236,29 @@ describe('ol.coordinate', function() { }); }); + describe('wrapX()', function() { + const projection = get('EPSG:4326'); + + it('leaves real world coordinate untouched', function() { + expect(wrapX([16, 48], projection)).to.eql([16, 48]); + }); + + it('moves left world coordinate to real world', function() { + expect(wrapX([-344, 48], projection)).to.eql([16, 48]); + }); + + it('moves right world coordinate to real world', function() { + expect(wrapX([376, 48], projection)).to.eql([16, 48]); + }); + + it('moves far off left coordinate to real world', function() { + expect(wrapX([-1064, 48], projection)).to.eql([16, 48]); + }); + + it('moves far off right coordinate to real world', function() { + expect(wrapX([1096, 48], projection)).to.eql([16, 48]); + }); + + }); + }); diff --git a/test/spec/ol/extent.test.js b/test/spec/ol/extent.test.js index 3e12639d19..2bad7e640a 100644 --- a/test/spec/ol/extent.test.js +++ b/test/spec/ol/extent.test.js @@ -1,5 +1,5 @@ import * as _ol_extent_ from '../../../src/ol/extent.js'; -import {getTransform} from '../../../src/ol/proj.js'; +import {getTransform, get} from '../../../src/ol/proj.js'; import {register} from '../../../src/ol/proj/proj4.js'; @@ -818,4 +818,37 @@ describe('ol.extent', function() { }); + describe('wrapX()', function() { + const projection = get('EPSG:4326'); + + it('leaves real world extent untouched', function() { + expect(_ol_extent_.wrapX([16, 48, 18, 49], projection)).to.eql([16, 48, 18, 49]); + }); + + it('moves left world extent to real world', function() { + expect(_ol_extent_.wrapX([-344, 48, -342, 49], projection)).to.eql([16, 48, 18, 49]); + }); + + it('moves right world extent to real world', function() { + expect(_ol_extent_.wrapX([376, 48, 378, 49], projection)).to.eql([16, 48, 18, 49]); + }); + + it('moves far off left extent to real world', function() { + expect(_ol_extent_.wrapX([-1064, 48, -1062, 49], projection)).to.eql([16, 48, 18, 49]); + }); + + it('moves far off right extent to real world', function() { + expect(_ol_extent_.wrapX([1096, 48, 1098, 49], projection)).to.eql([16, 48, 18, 49]); + }); + + it('leaves -180 crossing extent with real world center untouched', function() { + expect(_ol_extent_.wrapX([-184, 48, 16, 49], projection)).to.eql([-184, 48, 16, 49]); + }); + + it('moves +180 crossing extent with off-world center to the real world', function() { + expect(_ol_extent_.wrapX([300, 48, 376, 49], projection)).to.eql([-60, 48, 16, 49]); + }); + + }); + }); From 660845f5b85a47c4546abe8c2cf54d2be95be912 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Mon, 30 Mar 2020 23:17:52 +0100 Subject: [PATCH 230/636] Include center at right edge in calculations --- src/ol/extent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/extent.js b/src/ol/extent.js index ef969a196a..c68f9c9ff9 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -826,7 +826,7 @@ export function applyTransform(extent, transformFn, opt_extent, opt_stops) { export function wrapX(extent, projection) { const projectionExtent = projection.getExtent(); const center = getCenter(extent); - if (projection.canWrapX() && (center[0] < projectionExtent[0] || center[0] > projectionExtent[2])) { + if (projection.canWrapX() && (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])) { const worldWidth = getWidth(projectionExtent); const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); const offset = (worldsAway * worldWidth); From e3ad05f805d06d37df95437337280898b3093d26 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Mon, 30 Mar 2020 23:18:52 +0100 Subject: [PATCH 231/636] Include center at right edge in calculations --- src/ol/coordinate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index fb375162b9..79d196a911 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -415,7 +415,7 @@ export function toStringXY(coordinate, opt_fractionDigits) { */ export function wrapX(coordinate, projection) { const projectionExtent = projection.getExtent(); - if (projection.canWrapX() && (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) { + if (projection.canWrapX() && (coordinate[0] < projectionExtent[0] || coordinate[0] >= projectionExtent[2])) { const worldWidth = getWidth(projectionExtent); const worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / worldWidth); coordinate[0] -= (worldsAway * worldWidth); From 99a1641afe7296a81d9f86f70cc88e75c4d7cc50 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Mon, 30 Mar 2020 23:31:30 +0100 Subject: [PATCH 232/636] remove duplication --- src/ol/renderer/canvas/VectorLayer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index 0e2bebf908..0d7af8e81b 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -363,7 +363,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution); const loadExtents = [extent.slice()]; - const projectionExtent = viewState.projection.getExtent(); + const projectionExtent = projection.getExtent(); if (vectorSource.getWrapX() && projection.canWrapX() && !containsExtent(projectionExtent, frameState.extent)) { @@ -378,7 +378,6 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { extent[2] = projectionExtent[2] + gutter; wrapCoordinateX(center, projection); const loadExtent = wrapExtentX(loadExtents[0], projection); - wrapExtentX(loadExtent, projection); // If the extent crosses the date line, we load data for both edges of the worlds if (loadExtent[0] < projectionExtent[0] && loadExtent[2] < projectionExtent[2]) { loadExtents.push([loadExtent[0] + worldWidth, loadExtent[1], loadExtent[2] + worldWidth, loadExtent[3]]); From 6013763480a60af8144915559856653ddb7493a2 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Mon, 30 Mar 2020 23:43:26 +0100 Subject: [PATCH 233/636] replace containsExtent with equals in strategy --- src/ol/layer/Graticule.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 4e4023fd68..f66cf5732d 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -25,8 +25,7 @@ import { getWidth, intersects, isEmpty, - buffer as bufferExtent, - wrapX + wrapX as wrapExtentX } from '../extent.js'; import {clamp} from '../math.js'; import Style from '../style/Style.js'; @@ -484,9 +483,11 @@ class Graticule extends VectorLayer { // extents may be passed in different worlds, to avoid endless loop we use only one const realExtent = extent.slice(); if (this.projection_ && this.getSource().getWrapX()) { - wrapX(realExtent, this.projection_); + wrapExtentX(realExtent, this.projection_); } - if (this.loadedExtent_ && !containsExtent(bufferExtent(this.loadedExtent_, resolution / 2), realExtent)) { + realExtent[0] = Math.round(realExtent[0] * 1e8) / 1e8; + realExtent[2] = Math.round(realExtent[2] * 1e8) / 1e8; + if (this.loadedExtent_ && !equals(this.loadedExtent_, realExtent)) { // we should not keep track of loaded extents this.getSource().removeLoadedExtent(this.loadedExtent_); } From 2c7f58dbed352f3025deec869272561b73da974b Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Mon, 30 Mar 2020 23:51:06 +0100 Subject: [PATCH 234/636] remove unused import --- src/ol/renderer/canvas/VectorTileLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index acdd1198d6..a3520f9caa 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -6,7 +6,7 @@ import TileState from '../../TileState.js'; import ViewHint from '../../ViewHint.js'; import {listen, unlistenByKey} from '../../events.js'; import EventType from '../../events/EventType.js'; -import {buffer, containsCoordinate, equals, getIntersection, intersects, containsExtent, getWidth, getTopLeft} from '../../extent.js'; +import {buffer, containsCoordinate, equals, getIntersection, intersects, containsExtent, getTopLeft} from '../../extent.js'; import VectorTileRenderType from '../../layer/VectorTileRenderType.js'; import ReplayType from '../../render/canvas/BuilderType.js'; import CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js'; From cdafc4fa05515ceddf0e87d7969c0ff7635f21fe Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 31 Mar 2020 14:52:02 +0200 Subject: [PATCH 235/636] Add approximatelyEquals function for comparing extents --- src/ol/extent.js | 12 ++++++++++++ src/ol/layer/Graticule.js | 14 ++++++-------- test/spec/ol/extent.test.js | 9 +++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/ol/extent.js b/src/ol/extent.js index c68f9c9ff9..4679d49820 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -295,6 +295,18 @@ export function equals(extent1, extent2) { extent1[1] == extent2[1] && extent1[3] == extent2[3]; } +/** + * Determine if two extents are approximately equivalent. + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent 2. + * @param {number} tolerance Tolerance in extent coordinate units. + * @return {boolean} The two extents differ by less than the tolerance. + */ +export function approximatelyEquals(extent1, extent2, tolerance) { + return Math.abs(extent1[0] - extent2[0]) < tolerance && Math.abs(extent1[2] - extent2[2]) < tolerance && + Math.abs(extent1[1] - extent2[1]) < tolerance && Math.abs(extent1[3] - extent2[3]) < tolerance; +} + /** * Modify an extent to include another extent. diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index f66cf5732d..6fc590283d 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -18,7 +18,7 @@ import { applyTransform, containsCoordinate, containsExtent, - equals, + approximatelyEquals, getCenter, getHeight, getIntersection, @@ -481,17 +481,15 @@ class Graticule extends VectorLayer { */ strategyFunction(extent, resolution) { // extents may be passed in different worlds, to avoid endless loop we use only one - const realExtent = extent.slice(); + const realWorldExtent = extent.slice(); if (this.projection_ && this.getSource().getWrapX()) { - wrapExtentX(realExtent, this.projection_); + wrapExtentX(realWorldExtent, this.projection_); } - realExtent[0] = Math.round(realExtent[0] * 1e8) / 1e8; - realExtent[2] = Math.round(realExtent[2] * 1e8) / 1e8; - if (this.loadedExtent_ && !equals(this.loadedExtent_, realExtent)) { + if (this.loadedExtent_ && !approximatelyEquals(this.loadedExtent_, realWorldExtent, resolution)) { // we should not keep track of loaded extents this.getSource().removeLoadedExtent(this.loadedExtent_); } - return [realExtent]; + return [realWorldExtent]; } /** @@ -508,7 +506,7 @@ class Graticule extends VectorLayer { const layerExtent = this.getExtent() || [-Infinity, -Infinity, Infinity, Infinity]; const renderExtent = getIntersection(layerExtent, extent); - if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent)) { + if (this.renderedExtent_ && approximatelyEquals(this.renderedExtent_, renderExtent, resolution)) { return; } this.renderedExtent_ = renderExtent; diff --git a/test/spec/ol/extent.test.js b/test/spec/ol/extent.test.js index 2bad7e640a..ba971781da 100644 --- a/test/spec/ol/extent.test.js +++ b/test/spec/ol/extent.test.js @@ -851,4 +851,13 @@ describe('ol.extent', function() { }); + describe('approximatelyEquals', function() { + it('returns true when within tolerance', function() { + expect(_ol_extent_.approximatelyEquals([16, 48, 17, 49], [16.09, 48, 17, 49], 0.1)).to.be(true); + }); + it('returns false when not within tolerance', function() { + expect(_ol_extent_.approximatelyEquals([16, 48, 17, 49], [16.11, 48, 17, 49], 0.1)).to.be(false); + }); + }); + }); From 9af1e223afc38a8bc0c93b0f48c42afcb1cc2406 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 31 Mar 2020 15:52:29 +0200 Subject: [PATCH 236/636] More tests and docs for extent and coordinate wrapX --- src/ol/coordinate.js | 3 ++- test/spec/ol/extent.test.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index 79d196a911..563ff1bf64 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -407,7 +407,8 @@ export function toStringXY(coordinate, opt_fractionDigits) { /** * Modifies the provided coordinate in-place to be within the real world - * extent. + * extent. The lower projection extent boundary is inclusive, the upper one + * exclusive. * * @param {Coordinate} coordinate Coordinate. * @param {import("./proj/Projection.js").default} projection Projection diff --git a/test/spec/ol/extent.test.js b/test/spec/ol/extent.test.js index ba971781da..cc9011175a 100644 --- a/test/spec/ol/extent.test.js +++ b/test/spec/ol/extent.test.js @@ -849,6 +849,12 @@ describe('ol.extent', function() { expect(_ol_extent_.wrapX([300, 48, 376, 49], projection)).to.eql([-60, 48, 16, 49]); }); + it('produces the same real world extent for shifted extents with center at +/-180', function() { + expect(_ol_extent_.wrapX([360, -90, 720, 90], projection)).to.eql([-360, -90, 0, 90]); + expect(_ol_extent_.wrapX([0, -90, 360, 90], projection)).to.eql([-360, -90, 0, 90]); + expect(_ol_extent_.wrapX([-360, -90, 0, 90], projection)).to.eql([-360, -90, 0, 90]); + }); + }); describe('approximatelyEquals', function() { From 149ca7efad89d185344e876a0bc485e65e5c1b33 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 31 Mar 2020 16:26:30 +0100 Subject: [PATCH 237/636] return previous extent if extents are approx equal --- src/ol/layer/Graticule.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 6fc590283d..3994cd11a1 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -481,13 +481,18 @@ class Graticule extends VectorLayer { */ strategyFunction(extent, resolution) { // extents may be passed in different worlds, to avoid endless loop we use only one - const realWorldExtent = extent.slice(); + let realWorldExtent = extent.slice(); if (this.projection_ && this.getSource().getWrapX()) { wrapExtentX(realWorldExtent, this.projection_); } - if (this.loadedExtent_ && !approximatelyEquals(this.loadedExtent_, realWorldExtent, resolution)) { - // we should not keep track of loaded extents - this.getSource().removeLoadedExtent(this.loadedExtent_); + if (this.loadedExtent_) { + if (approximatelyEquals(this.loadedExtent_, realWorldExtent, resolution)) { + // make sure result is exactly equal to previous extent + realWorldExtent = this.loadedExtent_.slice(); + } else { + // we should not keep track of loaded extents + this.getSource().removeLoadedExtent(this.loadedExtent_); + } } return [realWorldExtent]; } From 929b9f4068ee576e0902a794053c94cae19b818f Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 31 Mar 2020 16:55:23 +0100 Subject: [PATCH 238/636] change loader check back to equal extents --- src/ol/layer/Graticule.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 3994cd11a1..691637b6ae 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -18,6 +18,7 @@ import { applyTransform, containsCoordinate, containsExtent, + equals, approximatelyEquals, getCenter, getHeight, @@ -511,7 +512,7 @@ class Graticule extends VectorLayer { const layerExtent = this.getExtent() || [-Infinity, -Infinity, Infinity, Infinity]; const renderExtent = getIntersection(layerExtent, extent); - if (this.renderedExtent_ && approximatelyEquals(this.renderedExtent_, renderExtent, resolution)) { + if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent, resolution)) { return; } this.renderedExtent_ = renderExtent; From bfca3cf713e50ab3784f7889209daefe2865e711 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 31 Mar 2020 17:00:12 +0100 Subject: [PATCH 239/636] change loader check back to equal extents --- src/ol/layer/Graticule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 691637b6ae..6051a608aa 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -512,7 +512,7 @@ class Graticule extends VectorLayer { const layerExtent = this.getExtent() || [-Infinity, -Infinity, Infinity, Infinity]; const renderExtent = getIntersection(layerExtent, extent); - if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent, resolution)) { + if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent)) { return; } this.renderedExtent_ = renderExtent; From 3c0ff154145a9e54b3d0470d50d696184eec949c Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 31 Mar 2020 22:32:02 +0100 Subject: [PATCH 240/636] Cap Longitudes and replace Bing with MapTiler --- examples/vector-osm.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/vector-osm.js b/examples/vector-osm.js index 83d504b7d6..96cd3dde4a 100644 --- a/examples/vector-osm.js +++ b/examples/vector-osm.js @@ -85,8 +85,8 @@ const vectorSource = new VectorSource({ vectorSource.addFeatures(features); }); const query = '(node(' + - epsg4326Extent[1] + ',' + epsg4326Extent[0] + ',' + - epsg4326Extent[3] + ',' + epsg4326Extent[2] + + epsg4326Extent[1] + ',' + Math.max(epsg4326Extent[0], -180) + ',' + + epsg4326Extent[3] + ',' + Math.min(epsg4326Extent[2], 180) + ');rel(bn)->.foo;way(bn);node(w)->.foo;rel(bw););out meta;'; client.send(query); }, @@ -110,10 +110,15 @@ const vector = new VectorLayer({ } }); +const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; +const attributions = '© MapTiler ' + + '© OpenStreetMap contributors'; + const raster = new TileLayer({ - source: new BingMaps({ - imagerySet: 'Aerial', - key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5' + source: new XYZ({ + attributions: attributions, + url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20 }) }); From 7b55fe381eb3f6d60ccb6af6ae52aa99eb27ce97 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 31 Mar 2020 22:36:07 +0100 Subject: [PATCH 241/636] Replace Bing layer with MapTiler --- examples/vector-osm.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/vector-osm.html b/examples/vector-osm.html index c8e19ea2c0..0bdaf67045 100644 --- a/examples/vector-osm.html +++ b/examples/vector-osm.html @@ -4,9 +4,9 @@ title: OSM XML shortdesc: Example of using the OSM XML source. docs: > OSM XML vector data is loaded dynamically from a the [Overpass API](http://overpass-api.de) using a bbox strategy. Note that panning and zooming will eventually lead to "Too many requests" errors from the Overpass API. -tags: "vector, osmxml, loading, server, strategy, bbox" +tags: "vector, osmxml, loading, server, strategy, bbox, maptiler" cloak: - - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5 - value: Your Bing Maps Key from http://www.bingmapsportal.com/ here + - key: get_your_own_D6rA4zTHduk6KOKTXzGB + value: Get your own API key at https://www.maptiler.com/cloud/ ---
    From 82dd764d13801052d75b4b1e68cb043d814b83f7 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 31 Mar 2020 22:37:51 +0100 Subject: [PATCH 242/636] Replace Bing layer with MapTiler --- examples/vector-osm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vector-osm.js b/examples/vector-osm.js index 96cd3dde4a..d67d520205 100644 --- a/examples/vector-osm.js +++ b/examples/vector-osm.js @@ -4,7 +4,7 @@ import OSMXML from '../src/ol/format/OSMXML.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {bbox as bboxStrategy} from '../src/ol/loadingstrategy.js'; import {transformExtent} from '../src/ol/proj.js'; -import BingMaps from '../src/ol/source/BingMaps.js'; +import XYZ from '../src/ol/source/XYZ.js'; import VectorSource from '../src/ol/source/Vector.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; From 2b863793d0ba70d570966bb6436cbd9b2e43a5a4 Mon Sep 17 00:00:00 2001 From: Edward Nash Date: Wed, 1 Apr 2020 06:50:01 +0200 Subject: [PATCH 243/636] Perform auto-pan when adding an Overlay to a Map * Auto-pan settings currently only activate when the position of the Overlay is set and the Overlay is already on a Map. * The consequence of this is that creating an Overlay with position set and then adding to a Map results in no auto-pan being performed - it is necessary to first create the Overlay, then add to a Map and finally set the position in order for the Map to auto-pan. * This commit changes this behaviour so that the auto-pan settings are also considered when the map property of the Overlay is set and not only when the position property is set, leading to a more intuitive behaviour. * Fixes Issue #10843 --- src/ol/Overlay.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index b0025d08d8..c99aea8452 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -300,6 +300,7 @@ class Overlay extends BaseObject { } else { container.appendChild(this.element); } + this.performAutoPan(); } } From 061ccb987b2fbdd14e888fd088392a78b603ed34 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Wed, 1 Apr 2020 08:43:30 +0200 Subject: [PATCH 244/636] Key update --- examples/bing-maps.html | 2 +- examples/bing-maps.js | 2 +- examples/mobile-full-screen.html | 2 +- examples/mobile-full-screen.js | 2 +- examples/preload.html | 2 +- examples/preload.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/bing-maps.html b/examples/bing-maps.html index a3e7b5b48f..b03cf180f0 100644 --- a/examples/bing-maps.html +++ b/examples/bing-maps.html @@ -6,7 +6,7 @@ docs: >

    When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set maxZoom to 19 in the options passed to ol/source/BingMaps.

    tags: "bing, bing-maps" cloak: - - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5 + - key: Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd value: Your Bing Maps Key from http://www.bingmapsportal.com/ here ---
    diff --git a/examples/bing-maps.js b/examples/bing-maps.js index b0ecb7c2be..eabdcae542 100644 --- a/examples/bing-maps.js +++ b/examples/bing-maps.js @@ -18,7 +18,7 @@ for (i = 0, ii = styles.length; i < ii; ++i) { visible: false, preload: Infinity, source: new BingMaps({ - key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5', + key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', imagerySet: styles[i] // use maxZoom 19 to see stretched tiles instead of the BingMaps // "no photos at this zoom level" tiles diff --git a/examples/mobile-full-screen.html b/examples/mobile-full-screen.html index 8bb8b0ee22..05915d0280 100644 --- a/examples/mobile-full-screen.html +++ b/examples/mobile-full-screen.html @@ -4,7 +4,7 @@ title: Full-Screen Mobile shortdesc: Example of a full screen map. tags: "fullscreen, geolocation, mobile" cloak: - - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5 + - key: Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd value: Your Bing Maps Key from http://www.bingmapsportal.com/ here --- diff --git a/examples/mobile-full-screen.js b/examples/mobile-full-screen.js index d1a3071bbe..65535f6a50 100644 --- a/examples/mobile-full-screen.js +++ b/examples/mobile-full-screen.js @@ -14,7 +14,7 @@ const map = new Map({ layers: [ new TileLayer({ source: new BingMaps({ - key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5', + key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', imagerySet: 'RoadOnDemand' }) }) diff --git a/examples/preload.html b/examples/preload.html index 7398986e0b..87ca0b1304 100644 --- a/examples/preload.html +++ b/examples/preload.html @@ -6,7 +6,7 @@ docs: >

    The map on the top preloads low resolution tiles. The map on the bottom does not use any preloading. Try zooming out and panning to see the difference.

    tags: "preload, bing" cloak: - - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5 + - key: Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd value: Your Bing Maps Key from http://www.bingmapsportal.com/ here ---
    diff --git a/examples/preload.js b/examples/preload.js index 5d15402941..8107ed267f 100644 --- a/examples/preload.js +++ b/examples/preload.js @@ -14,7 +14,7 @@ const map1 = new Map({ new TileLayer({ preload: Infinity, source: new BingMaps({ - key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5', + key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', imagerySet: 'Aerial' }) }) @@ -28,7 +28,7 @@ const map2 = new Map({ new TileLayer({ preload: 0, // default value source: new BingMaps({ - key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5', + key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', imagerySet: 'AerialWithLabelsOnDemand' }) }) From 7dd42ef19fa61f7b935d248dcd25655a72cc161a Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Wed, 1 Apr 2020 09:07:07 +0200 Subject: [PATCH 245/636] Key update --- examples/bing-maps.html | 2 +- examples/bing-maps.js | 2 +- examples/mobile-full-screen.html | 2 +- examples/mobile-full-screen.js | 2 +- examples/preload.html | 2 +- examples/preload.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/bing-maps.html b/examples/bing-maps.html index b03cf180f0..e201f69efc 100644 --- a/examples/bing-maps.html +++ b/examples/bing-maps.html @@ -6,7 +6,7 @@ docs: >

    When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set maxZoom to 19 in the options passed to ol/source/BingMaps.

    tags: "bing, bing-maps" cloak: - - key: Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd + - key: ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp value: Your Bing Maps Key from http://www.bingmapsportal.com/ here ---
    diff --git a/examples/bing-maps.js b/examples/bing-maps.js index eabdcae542..1823ab4740 100644 --- a/examples/bing-maps.js +++ b/examples/bing-maps.js @@ -18,7 +18,7 @@ for (i = 0, ii = styles.length; i < ii; ++i) { visible: false, preload: Infinity, source: new BingMaps({ - key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', + key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', imagerySet: styles[i] // use maxZoom 19 to see stretched tiles instead of the BingMaps // "no photos at this zoom level" tiles diff --git a/examples/mobile-full-screen.html b/examples/mobile-full-screen.html index 05915d0280..cfc4a270c1 100644 --- a/examples/mobile-full-screen.html +++ b/examples/mobile-full-screen.html @@ -4,7 +4,7 @@ title: Full-Screen Mobile shortdesc: Example of a full screen map. tags: "fullscreen, geolocation, mobile" cloak: - - key: Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd + - key: ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp value: Your Bing Maps Key from http://www.bingmapsportal.com/ here --- diff --git a/examples/mobile-full-screen.js b/examples/mobile-full-screen.js index 65535f6a50..80d03d2a5f 100644 --- a/examples/mobile-full-screen.js +++ b/examples/mobile-full-screen.js @@ -14,7 +14,7 @@ const map = new Map({ layers: [ new TileLayer({ source: new BingMaps({ - key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', + key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', imagerySet: 'RoadOnDemand' }) }) diff --git a/examples/preload.html b/examples/preload.html index 87ca0b1304..e13138d2aa 100644 --- a/examples/preload.html +++ b/examples/preload.html @@ -6,7 +6,7 @@ docs: >

    The map on the top preloads low resolution tiles. The map on the bottom does not use any preloading. Try zooming out and panning to see the difference.

    tags: "preload, bing" cloak: - - key: Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd + - key: ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp value: Your Bing Maps Key from http://www.bingmapsportal.com/ here ---
    diff --git a/examples/preload.js b/examples/preload.js index 8107ed267f..6bf91a82ad 100644 --- a/examples/preload.js +++ b/examples/preload.js @@ -14,7 +14,7 @@ const map1 = new Map({ new TileLayer({ preload: Infinity, source: new BingMaps({ - key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', + key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', imagerySet: 'Aerial' }) }) @@ -28,7 +28,7 @@ const map2 = new Map({ new TileLayer({ preload: 0, // default value source: new BingMaps({ - key: 'Avgbq4irmuveuESSXWk_LNBp5HFobQx8QgHDA4gWEQo2OqYHrYqCF0WL6-_TbrTd', + key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', imagerySet: 'AerialWithLabelsOnDemand' }) }) From 23c2e1062ca57cef829582eef11e1ad804152468 Mon Sep 17 00:00:00 2001 From: Simon Daron Date: Wed, 1 Apr 2020 10:08:37 +0200 Subject: [PATCH 246/636] Add an example of clipping layer based on a vector source --- examples/layer-clipping-vector.css | 3 ++ examples/layer-clipping-vector.html | 9 ++++++ examples/layer-clipping-vector.js | 46 +++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 examples/layer-clipping-vector.css create mode 100644 examples/layer-clipping-vector.html create mode 100644 examples/layer-clipping-vector.js diff --git a/examples/layer-clipping-vector.css b/examples/layer-clipping-vector.css new file mode 100644 index 0000000000..3d35756e41 --- /dev/null +++ b/examples/layer-clipping-vector.css @@ -0,0 +1,3 @@ +#map { + background: transparent; +} diff --git a/examples/layer-clipping-vector.html b/examples/layer-clipping-vector.html new file mode 100644 index 0000000000..2343aa0105 --- /dev/null +++ b/examples/layer-clipping-vector.html @@ -0,0 +1,9 @@ +--- +layout: example.html +title: Vector Clipping Layer +shortdesc: Vector Clipping Layer example +docs: > + Example of a clipping layer based on a vector source +tags: "clipping, openstreetmap, vector" +--- +
    diff --git a/examples/layer-clipping-vector.js b/examples/layer-clipping-vector.js new file mode 100644 index 0000000000..13c416b477 --- /dev/null +++ b/examples/layer-clipping-vector.js @@ -0,0 +1,46 @@ +import Map from '../src/ol/Map.js'; +import View from '../src/ol/View.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import VectorSource from '../src/ol/source/Vector.js'; +import GeoJSON from '../src/ol/format/GeoJSON.js'; +import OSM from '../src/ol/source/OSM.js'; +import {Fill, Style} from '../src/ol/style.js'; +import {getVectorContext} from '../src/ol/render.js'; +import {fromLonLat} from '../src/ol/proj.js'; + +const base = new TileLayer({ + source: new OSM() +}); + +const clipLayer = new VectorLayer({ + style: null, + source: new VectorSource({ + url: + './data/geojson/switzerland.geojson', + format: new GeoJSON() + }) +}); + +const style = new Style({ + fill: new Fill({ + color: 'black' + }) +}); + +base.on('postrender', function(e) { + e.context.globalCompositeOperation = 'destination-in'; + const vectorContext = getVectorContext(e); + clipLayer.getSource().forEachFeature(function(feature) { + vectorContext.drawFeature(feature, style); + }); + e.context.globalCompositeOperation = 'source-over'; +}); + +const map = new Map({ + layers: [base, clipLayer], + target: 'map', + view: new View({ + center: fromLonLat([8.23, 46.86]), + zoom: 7 + }) +}); From 8e6b5ce0bf994a1fb69712e5d6a3f4f0bf4d3019 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 2 Apr 2020 13:50:12 +0200 Subject: [PATCH 247/636] Update dependencies --- package-lock.json | 53 +++++++++++++++++++++++++++-------------------- package.json | 6 +++--- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e29ee74e7..a4173b921a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5971,8 +5971,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "resolved": "", "dev": true, "optional": true } @@ -6326,15 +6325,15 @@ "dev": true }, "handlebars": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.3.tgz", - "integrity": "sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.4.tgz", + "integrity": "sha512-Is8+SzHv8K9STNadlBVpVhxXrSXxVgTyIvhdg2Qjak1SfSZ7iEozLHdwiX1jJ9lLFkcFJxqGK5s/cI7ZX+qGkQ==", "dev": true, "requires": { "neo-async": "^2.6.0", - "optimist": "^0.6.1", "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "uglify-js": "^3.1.4", + "yargs": "^15.3.1" } }, "har-schema": { @@ -7730,6 +7729,14 @@ "dev": true, "requires": { "minimist": "1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } } }, "karma-sourcemap-loader": { @@ -7801,9 +7808,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "klaw": { @@ -8217,9 +8224,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "minipass": { @@ -9515,13 +9522,13 @@ "dev": true }, "proj4": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.6.0.tgz", - "integrity": "sha512-ll2WyehUFOyzEZtN8hAiOTmZpuDCN5V+4A/HjhPbhlwVwlsFKnIHSZ3l3uhzgDndHjoL2MyERFGe9VmXN4rYUg==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.6.1.tgz", + "integrity": "sha512-RP5EcrfrLcARy+Zjjz1wIeqZzZdPtQNl685asHcwdU/MQ/dvydmf1XWM4mgok6wPaNsXZ8IFrM4qadO3g46PiQ==", "dev": true, "requires": { "mgrs": "1.0.0", - "wkt-parser": "^1.2.0" + "wkt-parser": "^1.2.4" } }, "promise-inflight": { @@ -11927,9 +11934,9 @@ "dev": true }, "uglify-js": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.7.tgz", - "integrity": "sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.1.tgz", + "integrity": "sha512-W7KxyzeaQmZvUFbGj4+YFshhVrMBGSg2IbcYAjGWGvx8DHvJMclbTDMpffdxFUGPBHjIytk7KJUR/KUXstUGDw==", "dev": true, "optional": true, "requires": { @@ -12681,9 +12688,9 @@ } }, "wkt-parser": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.3.tgz", - "integrity": "sha512-s7zrOedGuHbbzMaQOuf8HacuCYp3LmmrHjkkN//7UEAzsYz7xJ6J+j/84ZWZkQcrRqi3xXyuc4odPHj7PEB0bw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.4.tgz", + "integrity": "sha512-ZzKnc7ml/91fOPh5bANBL4vUlWPIYYv11waCtWTkl2TRN+LEmBg60Q1MA8gqV4hEp4MGfSj9JiHz91zw/gTDXg==", "dev": true }, "word-wrap": { diff --git a/package.json b/package.json index 7d6c715384..1bb076716b 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "fs-extra": "^9.0.0", "glob": "^7.1.5", "globby": "^11.0.0", - "handlebars": "4.7.3", + "handlebars": "4.7.4", "istanbul": "0.4.5", "istanbul-instrumenter-loader": "^3.0.1", "jquery": "3.4.1", @@ -84,10 +84,10 @@ "loglevelnext": "^3.0.1", "marked": "0.8.2", "mocha": "7.1.1", - "ol-mapbox-style": "^6.1.0", + "ol-mapbox-style": "^6.1.1", "pixelmatch": "^5.1.0", "pngjs": "^3.4.0", - "proj4": "2.6.0", + "proj4": "2.6.1", "puppeteer": "~2.1.0", "rollup": "^2.1.0", "rollup-plugin-babel": "^4.3.3", From 32321e381cead34f231724120ea834bb2320c69b Mon Sep 17 00:00:00 2001 From: Olivier Guyot Date: Thu, 2 Apr 2020 14:14:40 +0200 Subject: [PATCH 248/636] View / avoid solving constraints related to map size change during anim --- src/ol/PluggableMap.js | 2 +- src/ol/View.js | 5 +++- test/spec/ol/view.test.js | 48 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 792215e1cc..5cd3ad7f22 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -989,7 +989,7 @@ class PluggableMap extends BaseObject { * @private */ handleSizeChanged_() { - if (this.getView()) { + if (this.getView() && !this.getView().getAnimating()) { this.getView().resolveConstraints(0); } diff --git a/src/ol/View.js b/src/ol/View.js index bcccad7e04..3d5be60121 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -762,11 +762,14 @@ class View extends BaseObject { * Stores the viewport size on the view. The viewport size is not read every time from the DOM * to avoid performance hit and layout reflow. * This should be done on map size change. + * Note: the constraints are not resolved during an animation to avoid stopping it * @param {import("./size.js").Size=} opt_size Viewport size; if undefined, [100, 100] is assumed */ setViewportSize(opt_size) { this.viewportSize_ = Array.isArray(opt_size) ? opt_size.slice() : [100, 100]; - this.resolveConstraints(0); + if (!this.getAnimating()) { + this.resolveConstraints(0); + } } /** diff --git a/test/spec/ol/view.test.js b/test/spec/ol/view.test.js index 3e186909e9..e10af8c0cb 100644 --- a/test/spec/ol/view.test.js +++ b/test/spec/ol/view.test.js @@ -1090,6 +1090,54 @@ describe('ol.View', function() { }); + it('completes even though Map#setSize is called', function(done) { + + const view = new View({ + center: [0, 0], + zoom: 0 + }); + const map = new Map({ + view + }); + map.setSize([110, 90]); + + view.animate({ + zoom: 1, + duration: 25 + }, function() { + expect(view.getZoom()).to.be(1); + done(); + }); + + setTimeout(function() { + map.setSize([100, 100]); + }, 10); + + }); + + it('completes even though Map#updateSize is called', function(done) { + + const view = new View({ + center: [0, 0], + zoom: 0 + }); + const map = new Map({ + view + }); + + view.animate({ + zoom: 1, + duration: 25 + }, function() { + expect(view.getZoom()).to.be(1); + done(); + }); + + setTimeout(function() { + map.updateSize(); + }, 10); + + }); }); describe('#cancelAnimations()', function() { From e2ac566c05c6670704b577c316998e9dbf4f4c4f Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 16 Jan 2020 23:41:52 +0000 Subject: [PATCH 249/636] Correct resolution used for scale. Add dpi option. Also add setDpi and setMinWidth methods Add Print to scale example --- examples/print-to-scale.css | 6 ++ examples/print-to-scale.html | 44 ++++++++++++ examples/print-to-scale.js | 132 +++++++++++++++++++++++++++++++++++ src/ol/control/ScaleLine.js | 34 ++++++++- 4 files changed, 214 insertions(+), 2 deletions(-) create mode 100644 examples/print-to-scale.css create mode 100644 examples/print-to-scale.html create mode 100644 examples/print-to-scale.js diff --git a/examples/print-to-scale.css b/examples/print-to-scale.css new file mode 100644 index 0000000000..383a21eb6b --- /dev/null +++ b/examples/print-to-scale.css @@ -0,0 +1,6 @@ +.container { + max-width: 566px; + width: 100%; + height: 400px; + overflow: hidden; +} diff --git a/examples/print-to-scale.html b/examples/print-to-scale.html new file mode 100644 index 0000000000..7f4068e41a --- /dev/null +++ b/examples/print-to-scale.html @@ -0,0 +1,44 @@ +--- +layout: example.html +title: Print to scale example +shortdesc: Example of printing a map to a specified scale. +docs: > + Example of printing a map to a specified scale. + The print is exported as a PDF using the jsPDF library. + Unlike the Export PDF example the on screen map is only used to set the center and rotation. + The extent printed depends on the scale and page size. +tags: "print, printing, scale, scaleline, export, pdf" +resources: + - https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.min.js +--- +
    +
    +
    + + + + + + + + + diff --git a/examples/print-to-scale.js b/examples/print-to-scale.js new file mode 100644 index 0000000000..80e8e30e4d --- /dev/null +++ b/examples/print-to-scale.js @@ -0,0 +1,132 @@ +import Map from '../src/ol/Map.js'; +import View from '../src/ol/View.js'; +import {defaults as defaultControls, ScaleLine} from '../src/ol/control.js'; +import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import {get as getProjection, getPointResolution} from '../src/ol/proj.js'; +import {register} from '../src/ol/proj/proj4.js'; +import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; +import proj4 from 'proj4'; + +import {toJpeg} from 'html-to-image'; + + +proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + + '+x_0=400000 +y_0=-100000 +ellps=airy ' + + '+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' + + '+units=m +no_defs'); + +register(proj4); + +const proj27700 = getProjection('EPSG:27700'); +proj27700.setExtent([0, 0, 700000, 1300000]); + +const raster = new TileLayer(); + +const url = 'https://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/OS_Open_Raster/MapServer/WMTS'; +fetch(url) + .then(function(response) { + return response.text(); + }) + .then(function(text) { + const result = new WMTSCapabilities().read(text); + const options = optionsFromCapabilities(result, { + layer: 'OS_Open_Raster' + }); + options.attributions = 'Contains OS data © Crown Copyright and database right ' + new Date().getFullYear(); + options.crossOrigin = ''; + options.projection = proj27700; + options.wrapX = false; + raster.setSource(new WMTS(options)); + }); + + +const map = new Map({ + layers: [raster], + controls: defaultControls({ + attributionOptions: {collapsible: false} + }), + target: 'map', + view: new View({ + center: [373500, 436500], + projection: proj27700, + zoom: 7 + }) +}); + +const scaleLine = new ScaleLine({bar: true, text: true}); +map.addControl(scaleLine); + + +const dims = { + a0: [1189, 841], + a1: [841, 594], + a2: [594, 420], + a3: [420, 297], + a4: [297, 210], + a5: [210, 148] +}; + + +// export options for html-to-image. +// See: https://github.com/bubkoo/html-to-image#options +const exportOptions = { + filter: function(element) { + const className = element.className || ''; + return ( + className.indexOf('ol-control') === -1 || + className.indexOf('ol-scale') > -1 || + (className.indexOf('ol-attribution') > -1 && + className.indexOf('ol-uncollapsible')) + ); + } +}; + +const exportButton = document.getElementById('export-pdf'); + +exportButton.addEventListener('click', function() { + + exportButton.disabled = true; + document.body.style.cursor = 'progress'; + + const format = document.getElementById('format').value; + const resolution = document.getElementById('resolution').value; + const scale = document.getElementById('scale').value; + const dim = dims[format]; + const width = Math.round(dim[0] * resolution / 25.4); + const height = Math.round(dim[1] * resolution / 25.4); + const viewResolution = map.getView().getResolution(); + const scaleResolution = scale / getPointResolution( + map.getView().getProjection(), + resolution / 25.4, + map.getView().getCenter() + ); + + map.once('rendercomplete', function() { + exportOptions.width = width; + exportOptions.height = height; + toJpeg(map.getViewport(), exportOptions).then(function(dataUrl) { + const pdf = new jsPDF('landscape', undefined, format); + pdf.addImage(dataUrl, 'JPEG', 0, 0, dim[0], dim[1]); + pdf.save('map.pdf'); + // Reset original map size + scaleLine.setDpi(); + scaleLine.setMinWidth(); + map.getTargetElement().style.width = ''; + map.getTargetElement().style.height = ''; + map.updateSize(); + map.getView().setResolution(viewResolution); + exportButton.disabled = false; + document.body.style.cursor = 'auto'; + }); + }); + + // Set print size + scaleLine.setDpi(resolution); + scaleLine.setMinWidth(resolution * 4 / 2.54); // 4cm + map.getTargetElement().style.width = width + 'px'; + map.getTargetElement().style.height = height + 'px'; + map.updateSize(); + map.getView().setResolution(scaleResolution); + +}, false); diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index e0d7733ea3..be645ea4f9 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -49,6 +49,8 @@ const LEADING_DIGITS = [1, 2, 5]; * for best results. Only applies when `bar` is `true`. * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies * when `bar` is `true`. + * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies + * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed. */ @@ -146,6 +148,12 @@ class ScaleLine extends Control { */ this.scaleBarText_ = options.text || false; + /** + * @private + * @type {number|undefined} + */ + this.dpi_ = options.dpi || undefined; + } /** @@ -176,6 +184,24 @@ class ScaleLine extends Control { this.set(UNITS_PROP, units); } + /** + * Specify the dpi of output device such as printer. + * @param {number|undefined} dpi The dpi of output device. + * @api + */ + setDpi(dpi) { + this.dpi_ = dpi; + } + + /** + * Set the minimum width. + * @param {number|undefined} minWidth The ninimum width in pixels. + * @api + */ + setMinWidth(minWidth) { + this.minWidth_ = minWidth !== undefined ? minWidth : 64; + } + /** * @private */ @@ -406,8 +432,12 @@ class ScaleLine extends Control { * @return {number} The appropriate scale. */ getScaleForResolution() { - const resolution = this.getMap().getView().getResolution(); - const dpi = 25.4 / 0.28; + const resolution = getPointResolution( + this.viewState_.projection, + this.viewState_.resolution, + this.viewState_.center + ); + const dpi = this.dpi_ || (25.4 / 0.28); const mpu = this.viewState_.projection.getMetersPerUnit(); const inchesPerMeter = 39.37; return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi; From e6658aec1eed84b202a374eb787bdc4a1f0218e7 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 13:47:46 +0100 Subject: [PATCH 250/636] add domtoimage --- examples/.eslintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/.eslintrc b/examples/.eslintrc index 769357d35a..c404b2e6e6 100644 --- a/examples/.eslintrc +++ b/examples/.eslintrc @@ -5,6 +5,7 @@ "common": false, "createMapboxStreetsV6Style": false, "d3": false, + "domtoimage": false, "geojsonvt": false, "GyroNorm": false, "jsPDF": false, From b56ca954d51ef05ff3103cc1252dac91ee87bc51 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 13:55:17 +0100 Subject: [PATCH 251/636] avoid classname conflict with example template --- examples/print-to-scale.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/print-to-scale.css b/examples/print-to-scale.css index 383a21eb6b..7911e178ab 100644 --- a/examples/print-to-scale.css +++ b/examples/print-to-scale.css @@ -1,4 +1,4 @@ -.container { +.wrapper { max-width: 566px; width: 100%; height: 400px; From ab006abf25b770e938aa99da8cd23eda2bf67477 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 14:16:51 +0100 Subject: [PATCH 252/636] use dom-to-image-more --- examples/print-to-scale.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/print-to-scale.html b/examples/print-to-scale.html index 7f4068e41a..54d88db427 100644 --- a/examples/print-to-scale.html +++ b/examples/print-to-scale.html @@ -6,12 +6,15 @@ docs: > Example of printing a map to a specified scale. The print is exported as a PDF using the jsPDF library. Unlike the Export PDF example the on screen map is only used to set the center and rotation. - The extent printed depends on the scale and page size. + The extent printed depends on the scale and page size. To print the scale bar and attributions the example uses the + dom-to-image-more library. Due to browser + limitations and restrictions Internet Explorer and Safari are not supported. tags: "print, printing, scale, scaleline, export, pdf" resources: - - https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.min.js + - https://unpkg.com/dom-to-image-more@2.8.0/dist/dom-to-image-more.min.js + - https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js --- -
    +
    From 23fe5463faf5e4112148edea4fe5d3c36eee53dc Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 14:20:31 +0100 Subject: [PATCH 253/636] use dom-to-image-more --- examples/print-to-scale.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/print-to-scale.js b/examples/print-to-scale.js index 80e8e30e4d..01cda5568a 100644 --- a/examples/print-to-scale.js +++ b/examples/print-to-scale.js @@ -8,8 +8,6 @@ import {register} from '../src/ol/proj/proj4.js'; import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; import proj4 from 'proj4'; -import {toJpeg} from 'html-to-image'; - proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + '+x_0=400000 +y_0=-100000 +ellps=airy ' + @@ -105,7 +103,7 @@ exportButton.addEventListener('click', function() { map.once('rendercomplete', function() { exportOptions.width = width; exportOptions.height = height; - toJpeg(map.getViewport(), exportOptions).then(function(dataUrl) { + domtoimage.toJpeg(map.getViewport(), exportOptions).then(function(dataUrl) { const pdf = new jsPDF('landscape', undefined, format); pdf.addImage(dataUrl, 'JPEG', 0, 0, dim[0], dim[1]); pdf.save('map.pdf'); From 72907566bbbb6f760e2fb7be02d22766ecf191cd Mon Sep 17 00:00:00 2001 From: philip Date: Thu, 2 Apr 2020 14:14:13 +0000 Subject: [PATCH 254/636] Add comment to explain calculation. --- src/ol/reproj/Triangulation.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index b6091d149f..ba49bac8c4 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -139,6 +139,16 @@ class Triangulation { const sourceBottomRight = this.transformInv_(destinationBottomRight); const sourceBottomLeft = this.transformInv_(destinationBottomLeft); + /* + * The maxSubdivision controls how many splittings of the target area can + * be done. The idea here is to do a linear mapping of the target areas + * but the actual overal reprojection (can be) extremely non-linear. The + * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256 + * tile size. However this function is also called to remap canvas rendered + * layers which can be much larger. This calculation increases the maxSubdivision + * value by the right factor so that each 256x256 pixel area has + * MAX_SUBDIVISION divisions. + */ const maxSubdivision = MAX_SUBDIVISION + (opt_destinationResolution ? Math.max(0, Math.ceil(Math.log2(getArea(targetExtent) / (opt_destinationResolution * opt_destinationResolution * 256 * 256)))) From 1cd4d37c45118855cdd27a94973f9f28133acd2e Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 16:25:25 +0100 Subject: [PATCH 255/636] change option name to imageSmoothing --- examples/disable-image-smoothing.js | 2 +- rendering/cases/reproj-tile-disable-smoothing/main.js | 2 +- src/ol/source/BingMaps.js | 5 ++--- src/ol/source/IIIF.js | 5 ++--- src/ol/source/OSM.js | 5 ++--- src/ol/source/Stamen.js | 5 ++--- src/ol/source/TileArcGISRest.js | 5 ++--- src/ol/source/TileImage.js | 9 +++++---- src/ol/source/TileJSON.js | 5 ++--- src/ol/source/TileWMS.js | 5 ++--- src/ol/source/WMTS.js | 5 ++--- src/ol/source/XYZ.js | 5 ++--- src/ol/source/Zoomify.js | 5 ++--- src/ol/source/common.js | 9 +++++++++ 14 files changed, 36 insertions(+), 36 deletions(-) diff --git a/examples/disable-image-smoothing.js b/examples/disable-image-smoothing.js index 52ab34265b..dd8a27ed7b 100644 --- a/examples/disable-image-smoothing.js +++ b/examples/disable-image-smoothing.js @@ -15,7 +15,7 @@ const disabledLayer = new TileLayer({ url: 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, maxZoom: 10, crossOrigin: '', - reprojectionContextOptions: {imageSmoothingEnabled: false, msImageSmoothingEnabled: false} + imageSmoothing: false }) }); diff --git a/rendering/cases/reproj-tile-disable-smoothing/main.js b/rendering/cases/reproj-tile-disable-smoothing/main.js index 9338a743c9..7bc4598ab9 100644 --- a/rendering/cases/reproj-tile-disable-smoothing/main.js +++ b/rendering/cases/reproj-tile-disable-smoothing/main.js @@ -13,7 +13,7 @@ const source = new XYZ({ transition: 0, minZoom: 5, maxZoom: 5, - reprojectionContextOptions: {imageSmoothingEnabled: false}, + imageSmoothing: false, url: '/data/tiles/osm/{z}/{x}/{y}.png' }); diff --git a/src/ol/source/BingMaps.js b/src/ol/source/BingMaps.js index 270282e7f9..ecc88d4e16 100644 --- a/src/ol/source/BingMaps.js +++ b/src/ol/source/BingMaps.js @@ -55,11 +55,10 @@ const TOS_ATTRIBUTION = '} [resolutions] Supported resolutions as given in IIIF 'scaleFactors' * @property {import("../size.js").Size} size Size of the image [width, height]. * @property {Array} [sizes] Supported scaled image sizes. @@ -277,9 +276,9 @@ class IIIF extends TileImage { attributionsCollapsible: options.attributionsCollapsible, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, + imageSmoothing: options.imageSmoothing, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, state: options.state, tileClass: IiifTileClass, tileGrid: tileGrid, diff --git a/src/ol/source/OSM.js b/src/ol/source/OSM.js index b2d4a8054c..fdcb225d2a 100644 --- a/src/ol/source/OSM.js +++ b/src/ol/source/OSM.js @@ -24,12 +24,11 @@ export const ATTRIBUTION = '© ' + * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {number} [maxZoom=19] Max zoom. * @property {boolean} [opaque=true] Whether the layer is opaque. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is * ```js * function(imageTile, src) { @@ -72,10 +71,10 @@ class OSM extends XYZ { attributions: attributions, cacheSize: options.cacheSize, crossOrigin: crossOrigin, + imageSmoothing: options.imageSmoothing, opaque: options.opaque !== undefined ? options.opaque : true, maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, tileLoadFunction: options.tileLoadFunction, url: url, wrapX: options.wrapX, diff --git a/src/ol/source/Stamen.js b/src/ol/source/Stamen.js index 2e672a010a..c91711e811 100644 --- a/src/ol/source/Stamen.js +++ b/src/ol/source/Stamen.js @@ -91,13 +91,12 @@ const ProviderConfig = { /** * @typedef {Object} Options * @property {number} [cacheSize] Tile cache size. The default depends on the screen size. Will be ignored if too small. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {string} layer Layer name. * @property {number} [minZoom] Minimum zoom. * @property {number} [maxZoom] Maximum zoom. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] * Optional function to load a tile given a URL. The default is * ```js @@ -136,11 +135,11 @@ class Stamen extends XYZ { attributions: ATTRIBUTIONS, cacheSize: options.cacheSize, crossOrigin: 'anonymous', + imageSmoothing: options.imageSmoothing, maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom, minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom, opaque: layerConfig.opaque, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, tileLoadFunction: options.tileLoadFunction, transition: options.transition, url: url, diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index c730e8429b..300572d67c 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -17,6 +17,7 @@ import {appendParams} from '../uri.js'; * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {Object} [params] ArcGIS Rest parameters. This field is optional. Service defaults will be * used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by * default. `TRANSPARENT` is `true` by default. `BBOX`, `SIZE`, `BBOXSR`, @@ -34,8 +35,6 @@ import {appendParams} from '../uri.js'; * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. * The default is * ```js @@ -74,9 +73,9 @@ class TileArcGISRest extends TileImage { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, + imageSmoothing: options.imageSmoothing, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, tileGrid: options.tileGrid, tileLoadFunction: options.tileLoadFunction, tileUrlFunction: tileUrlFunction, diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 5dfd5c9710..bd78f49302 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -10,6 +10,7 @@ import EventType from '../events/EventType.js'; import {equivalent, get as getProjection} from '../proj.js'; import ReprojTile from '../reproj/Tile.js'; import UrlTile from './UrlTile.js'; +import {IMAGE_SMOOTHING_DISABLED} from './common.js'; import {getKey, getKeyZXY} from '../tilecoord.js'; import {getForProjection as getTileGridForProjection} from '../tilegrid.js'; @@ -21,12 +22,11 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js'; * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {boolean} [opaque=true] Whether the layer is opaque. * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("./State.js").default} [state] Source state. * @property {typeof import("../ImageTile.js").default} [tileClass] Class used to instantiate image tiles. * Default is {@link module:ol/ImageTile~ImageTile}. @@ -129,7 +129,8 @@ class TileImage extends UrlTile { * @private * @type {object|undefined} */ - this.reprojectionContextOptions_ = options.reprojectionContextOptions; + this.contextOptions_ = options.imageSmoothing === false ? + IMAGE_SMOOTHING_DISABLED : undefined; /** * @private @@ -304,7 +305,7 @@ class TileImage extends UrlTile { function(z, x, y, pixelRatio) { return this.getTileInternal(z, x, y, pixelRatio, sourceProjection); }.bind(this), this.reprojectionErrorThreshold_, - this.renderReprojectionEdges_, this.reprojectionContextOptions_); + this.renderReprojectionEdges_, this.contextOptions_); newTile.key = key; if (tile) { diff --git a/src/ol/source/TileJSON.js b/src/ol/source/TileJSON.js index 13fd7118f8..9667c76fda 100644 --- a/src/ol/source/TileJSON.js +++ b/src/ol/source/TileJSON.js @@ -43,12 +43,11 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON. * Useful when the server does not support CORS.. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {Config} [tileJSON] TileJSON configuration for this source. * If not provided, `url` must be configured. * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is @@ -80,9 +79,9 @@ class TileJSON extends TileImage { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, + imageSmoothing: options.imageSmoothing, projection: getProjection('EPSG:3857'), reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, state: SourceState.LOADING, tileLoadFunction: options.tileLoadFunction, wrapX: options.wrapX !== undefined ? options.wrapX : true, diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index 9e1caab990..d716e78e44 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -24,6 +24,7 @@ import {appendParams} from '../uri.js'; * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {Object} params WMS request parameters. * At least a `LAYERS` param is required. `STYLES` is * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX` @@ -42,8 +43,6 @@ import {appendParams} from '../uri.js'; * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {typeof import("../ImageTile.js").default} [tileClass] Class used to instantiate image tiles. * Default is {@link module:ol/ImageTile~ImageTile}. * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid. Base this on the resolutions, @@ -93,10 +92,10 @@ class TileWMS extends TileImage { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, + imageSmoothing: options.imageSmoothing, opaque: !transparent, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, tileClass: options.tileClass, tileGrid: options.tileGrid, tileLoadFunction: options.tileLoadFunction, diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index 9c82f822f6..3b3bc861de 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -19,12 +19,11 @@ import {appendParams} from '../uri.js'; * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {import("../tilegrid/WMTS.js").default} tileGrid Tile grid. * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {import("./WMTSRequestEncoding.js").default|string} [requestEncoding='KVP'] Request encoding. * @property {string} layer Layer name as advertised in the WMTS capabilities. * @property {string} style Style name as advertised in the WMTS capabilities. @@ -87,9 +86,9 @@ class WMTS extends TileImage { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, + imageSmoothing: options.imageSmoothing, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, tileClass: options.tileClass, tileGrid: tileGrid, tileLoadFunction: options.tileLoadFunction, diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js index 0242b31e9f..df62402006 100644 --- a/src/ol/source/XYZ.js +++ b/src/ol/source/XYZ.js @@ -13,12 +13,11 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {boolean} [opaque=true] Whether the layer is opaque. * @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided. * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided. * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided. @@ -92,10 +91,10 @@ class XYZ extends TileImage { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, + imageSmoothing: options.imageSmoothing, opaque: options.opaque, projection: projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, tileGrid: tileGrid, tileLoadFunction: options.tileLoadFunction, tilePixelRatio: options.tilePixelRatio, diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index 493d9a5dd7..543dc954fe 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -85,12 +85,11 @@ export class CustomTile extends ImageTile { * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value you want to access pixel data with the Canvas renderer. * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail. + * @property {boolean} [imageSmoothing=true] Enable image smoothing. * @property {import("../proj.js").ProjectionLike} [projection] Projection. * @property {number} [tilePixelRatio] The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then `tilePixelRatio` should be set to `2` * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. - * @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used - * for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing. * @property {string} url URL template or base URL of the Zoomify service. * A base URL is the fixed part * of the URL, excluding the tile group, z, x, and y folder structure, e.g. @@ -248,10 +247,10 @@ class Zoomify extends TileImage { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, + imageSmoothing: options.imageSmoothing, projection: options.projection, tilePixelRatio: tilePixelRatio, reprojectionErrorThreshold: options.reprojectionErrorThreshold, - reprojectionContextOptions: options.reprojectionContextOptions, tileClass: ZoomifyTileClass, tileGrid: tileGrid, tileUrlFunction: tileUrlFunction, diff --git a/src/ol/source/common.js b/src/ol/source/common.js index ebf0d96808..e78ca95101 100644 --- a/src/ol/source/common.js +++ b/src/ol/source/common.js @@ -7,3 +7,12 @@ * @type {string} */ export const DEFAULT_WMS_VERSION = '1.3.0'; + +/** + * Context options to disable image smoothing. + * @type {Object} + */ +export const IMAGE_SMOOTHING_DISABLED = { + imageSmoothingEnabled: false, + msImageSmoothingEnabled: false +}; From 10c7f08fa41ae2efb4217006ef68161ce3277962 Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Tue, 7 Jan 2020 11:28:19 +0100 Subject: [PATCH 256/636] Select style multiple select interactions removed This fixes issue 10486 by removing the event listeners when an interaction is removed from a map. --- src/ol/interaction/Select.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index 11a3c74bd0..3bd762db51 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -167,6 +167,16 @@ class Select extends Interaction { const options = opt_options ? opt_options : {}; + /** + * @private + */ + this.boundAddFeature_ = this.addFeature_.bind(this); + + /** + * @private + */ + this.boundRemoveFeature_ = this.removeFeature_.bind(this); + /** * @private * @type {import("../events/condition.js").Condition} @@ -250,9 +260,8 @@ class Select extends Interaction { */ this.featureLayerAssociation_ = {}; - const features = this.getFeatures(); - features.addEventListener(CollectionEventType.ADD, this.addFeature_.bind(this)); - features.addEventListener(CollectionEventType.REMOVE, this.removeFeature_.bind(this)); + this.features_.addEventListener(CollectionEventType.ADD, this.boundAddFeature_); + this.features_.addEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_); } /** @@ -323,6 +332,10 @@ class Select extends Interaction { if (map && this.style_) { this.features_.forEach(this.applySelectedStyle_.bind(this)); } + if (!map) { + this.features_.removeEventListener(CollectionEventType.ADD, this.boundAddFeature_); + this.features_.removeEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_); + } } /** From a30a92a9635e40f99e4c19270c58ab0c2cc9abab Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Wed, 8 Jan 2020 10:53:00 +0100 Subject: [PATCH 257/636] CK-240: fix multiple select interactions on map event handlers have to be (de)activated when the interaction is added or removed to the map, not when constructed added unit test --- src/ol/interaction/Select.js | 12 +++--- test/spec/ol/interaction/select.test.js | 50 +++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index 3bd762db51..a08c22bc54 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -259,9 +259,6 @@ class Select extends Interaction { * @type {Object} */ this.featureLayerAssociation_ = {}; - - this.features_.addEventListener(CollectionEventType.ADD, this.boundAddFeature_); - this.features_.addEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_); } /** @@ -329,8 +326,13 @@ class Select extends Interaction { this.features_.forEach(this.restorePreviousStyle_.bind(this)); } super.setMap(map); - if (map && this.style_) { - this.features_.forEach(this.applySelectedStyle_.bind(this)); + if (map) { + this.features_.addEventListener(CollectionEventType.ADD, this.boundAddFeature_); + this.features_.addEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_); + + if (this.style_) { + this.features_.forEach(this.applySelectedStyle_.bind(this)); + } } if (!map) { this.features_.removeEventListener(CollectionEventType.ADD, this.boundAddFeature_); diff --git a/test/spec/ol/interaction/select.test.js b/test/spec/ol/interaction/select.test.js index e64eb2dc28..65d47cea43 100644 --- a/test/spec/ol/interaction/select.test.js +++ b/test/spec/ol/interaction/select.test.js @@ -9,6 +9,7 @@ import Interaction from '../../../../src/ol/interaction/Interaction.js'; import Select from '../../../../src/ol/interaction/Select.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js'; +import Style from '../../../../src/ol/style/Style.js'; describe('ol.interaction.Select', function() { @@ -406,4 +407,53 @@ describe('ol.interaction.Select', function() { }); }); + + describe('clear event listeners on interaction removal', function() { + let firstInteraction, secondInteraction, feature; + + beforeEach(function() { + feature = source.getFeatures()[3]; // top feature is selected + + const style = new Style({}); + const features = new Collection(); + + firstInteraction = new Select({ style, features }); + secondInteraction = new Select({ style, features }); + }); + + afterEach(function() { + map.removeInteraction(secondInteraction); + map.removeInteraction(firstInteraction); + }); + + // The base case + describe('with a single interaction added', function() { + it('changes the selected feature once', function() { + map.addInteraction(firstInteraction); + + const listenerSpy = sinon.spy(); + feature.on('change', listenerSpy); + + simulateEvent('singleclick', 10, -20, false); + + expect(listenerSpy.callCount).to.be(1); + }); + }); + + // The "difficult" case. To prevent regression + describe('with a replaced interaction', function() { + it('changes the selected feature once', function() { + map.addInteraction(firstInteraction); + map.removeInteraction(firstInteraction); + map.addInteraction(secondInteraction); + + const listenerSpy = sinon.spy(); + feature.on('change', listenerSpy); + + simulateEvent('singleclick', 10, -20, false); + + expect(listenerSpy.callCount).to.be(1); + }); + }); + }); }); From dc957ec10455f06ecd0b640dd0c52df7ef6a7682 Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Wed, 8 Jan 2020 11:04:33 +0100 Subject: [PATCH 258/636] CK-240: fix lint errors --- test/spec/ol/interaction/select.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/ol/interaction/select.test.js b/test/spec/ol/interaction/select.test.js index 65d47cea43..f648ad94ca 100644 --- a/test/spec/ol/interaction/select.test.js +++ b/test/spec/ol/interaction/select.test.js @@ -417,8 +417,8 @@ describe('ol.interaction.Select', function() { const style = new Style({}); const features = new Collection(); - firstInteraction = new Select({ style, features }); - secondInteraction = new Select({ style, features }); + firstInteraction = new Select({style, features}); + secondInteraction = new Select({style, features}); }); afterEach(function() { From 2d7e55e26abb4eb90cb89676adc1dd06e747aba7 Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Wed, 8 Jan 2020 13:44:43 +0100 Subject: [PATCH 259/636] Small code cleanup drop superfluous if. --- src/ol/interaction/Select.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index a08c22bc54..9fde58ccbb 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -333,8 +333,7 @@ class Select extends Interaction { if (this.style_) { this.features_.forEach(this.applySelectedStyle_.bind(this)); } - } - if (!map) { + } else { this.features_.removeEventListener(CollectionEventType.ADD, this.boundAddFeature_); this.features_.removeEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_); } From e9e75cd8aff58ad96a0b7a93d16780ae0e54e0c2 Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Wed, 8 Jan 2020 15:31:33 +0100 Subject: [PATCH 260/636] temporarily disable test to observe impact --- test/spec/ol/interaction/select.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/ol/interaction/select.test.js b/test/spec/ol/interaction/select.test.js index f648ad94ca..be2d03cc93 100644 --- a/test/spec/ol/interaction/select.test.js +++ b/test/spec/ol/interaction/select.test.js @@ -408,7 +408,7 @@ describe('ol.interaction.Select', function() { }); - describe('clear event listeners on interaction removal', function() { + xdescribe('clear event listeners on interaction removal', function() { let firstInteraction, secondInteraction, feature; beforeEach(function() { From 3909938a706acba76263f514a6cb29cd7b3f63e4 Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Wed, 8 Jan 2020 15:37:27 +0100 Subject: [PATCH 261/636] Experiment with test impact further --- test/spec/ol/interaction/select.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/ol/interaction/select.test.js b/test/spec/ol/interaction/select.test.js index be2d03cc93..bc8aa66a97 100644 --- a/test/spec/ol/interaction/select.test.js +++ b/test/spec/ol/interaction/select.test.js @@ -408,7 +408,7 @@ describe('ol.interaction.Select', function() { }); - xdescribe('clear event listeners on interaction removal', function() { + describe('clear event listeners on interaction removal', function() { let firstInteraction, secondInteraction, feature; beforeEach(function() { @@ -441,7 +441,7 @@ describe('ol.interaction.Select', function() { }); // The "difficult" case. To prevent regression - describe('with a replaced interaction', function() { + xdescribe('with a replaced interaction', function() { it('changes the selected feature once', function() { map.addInteraction(firstInteraction); map.removeInteraction(firstInteraction); From cf1191505ead9cfd38aed30d2d93a150dac94f20 Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Wed, 8 Jan 2020 17:17:33 +0100 Subject: [PATCH 262/636] Experiment with test impact further (2) --- test/spec/ol/interaction/select.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/ol/interaction/select.test.js b/test/spec/ol/interaction/select.test.js index bc8aa66a97..06aa5b4fb5 100644 --- a/test/spec/ol/interaction/select.test.js +++ b/test/spec/ol/interaction/select.test.js @@ -427,7 +427,7 @@ describe('ol.interaction.Select', function() { }); // The base case - describe('with a single interaction added', function() { + xdescribe('with a single interaction added', function() { it('changes the selected feature once', function() { map.addInteraction(firstInteraction); @@ -441,7 +441,7 @@ describe('ol.interaction.Select', function() { }); // The "difficult" case. To prevent regression - xdescribe('with a replaced interaction', function() { + describe('with a replaced interaction', function() { it('changes the selected feature once', function() { map.addInteraction(firstInteraction); map.removeInteraction(firstInteraction); From ad77143417041c6ec93d8a8a287b0bfb96d7dcb0 Mon Sep 17 00:00:00 2001 From: Geert Premereur Date: Wed, 8 Jan 2020 22:31:31 +0100 Subject: [PATCH 263/636] Experiment with test impact further (3) --- test/spec/ol/interaction/select.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/ol/interaction/select.test.js b/test/spec/ol/interaction/select.test.js index 06aa5b4fb5..f648ad94ca 100644 --- a/test/spec/ol/interaction/select.test.js +++ b/test/spec/ol/interaction/select.test.js @@ -427,7 +427,7 @@ describe('ol.interaction.Select', function() { }); // The base case - xdescribe('with a single interaction added', function() { + describe('with a single interaction added', function() { it('changes the selected feature once', function() { map.addInteraction(firstInteraction); From 0ba659b6af1fb99cc4c084cc572e7f5615b6d8ef Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 20:09:58 +0100 Subject: [PATCH 264/636] make context options available to renderer --- src/ol/source/TileImage.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index bd78f49302..c96aa9638a 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -175,6 +175,13 @@ class TileImage extends UrlTile { } } + /** + * @inheritDoc + */ + getContextOptions() { + return this.contextOptions_; + } + /** * @inheritDoc */ From 5c848ac1b941d68f66850e3cd25d38646b21ddcb Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 20:10:07 +0100 Subject: [PATCH 265/636] make context options available to renderer --- src/ol/source/Tile.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ol/source/Tile.js b/src/ol/source/Tile.js index 8e5246e816..46a870770e 100644 --- a/src/ol/source/Tile.js +++ b/src/ol/source/Tile.js @@ -167,6 +167,13 @@ class TileSource extends Source { return covered; } + /** + * @return {Object|undefined} Context options. + */ + getContextOptions() { + return undefined; + } + /** * @param {import("../proj/Projection.js").default} projection Projection. * @return {number} Gutter. From 5357b4fcedb188591d73c1dfe4d7402e1cb8c2d9 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 2 Apr 2020 22:03:53 +0200 Subject: [PATCH 266/636] Changelog for v6.3.0 --- changelog/upgrade-notes.md | 6 +- changelog/v6.3.0.md | 123 +++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 changelog/v6.3.0.md diff --git a/changelog/upgrade-notes.md b/changelog/upgrade-notes.md index 81c6eb6060..6ade599999 100644 --- a/changelog/upgrade-notes.md +++ b/changelog/upgrade-notes.md @@ -1,8 +1,10 @@ ## Upgrade notes -### v6.2.0 +### v6.3.0 -### v6.1.0 +#### Vector source loading when extent crosses +/-180 + +Previously, when an extent crossed the date line, vector source loaders were called with an extent with 540 degrees of longitude. Now, two loader calls with the visible extent on both sides of the projection extent are issued. This should not require any application code changes, but may affect custom loaders. ### v6.0.0 diff --git a/changelog/v6.3.0.md b/changelog/v6.3.0.md new file mode 100644 index 0000000000..1107121b15 --- /dev/null +++ b/changelog/v6.3.0.md @@ -0,0 +1,123 @@ +# 6.3.0 + +With more than 70 pull requests, this release not only brings significant improvements to the API documentation. It also fixes some old bugs and brings frequently requested improvments. And good news for TypeScript users: OpenLayers now ships with type definitions in `.d.ts` files. + +## New features and improvements + +* Several improvements to the Graticule layer, like consistent labeling, no more missing graticule lines, and it now works for views that cross the date line. +* Better support for KML icon colors, as well as fills and outlines in PolyStyle +* Better `ol/Overlay` performance and support for panning off-screen overlays into view +* Most of the rendering code can now be run in web workers, e.g. to render to an OffscreenCanvas +* OpenLayers now works fine in web components with shadow root +* WebGL point layers now support rotation based on feature attributes + +## List of all changes + + * [#10490](https://github.com/openlayers/openlayers/pull/10490) - Select style multiple select interactions removed ([@bepremeg](https://github.com/bepremeg)) + * [#10531](https://github.com/openlayers/openlayers/pull/10531) - Dynamically chose the number of subdivisions based on the size of the Image to reproject ([@pjsg](https://github.com/pjsg)) + * [#10618](https://github.com/openlayers/openlayers/pull/10618) - Add apidoc-debug task to debug the apidoc generation process ([@MoonE](https://github.com/MoonE)) + * [#10343](https://github.com/openlayers/openlayers/pull/10343) - Correct interactions with circle geometries when using user coordinates ([@mike-000](https://github.com/mike-000)) + * [#10864](https://github.com/openlayers/openlayers/pull/10864) - Update dependencies ([@ahocevar](https://github.com/ahocevar)) + * [#10859](https://github.com/openlayers/openlayers/pull/10859) - Add an example of clipping layer based on a vector source ([@SDaron](https://github.com/SDaron)) + * [#10850](https://github.com/openlayers/openlayers/pull/10850) - API docs for enums ([@ahocevar](https://github.com/ahocevar)) + * [#10857](https://github.com/openlayers/openlayers/pull/10857) - Make OSM XML example work at dateline and replace Bing with MapTiler ([@mike-000](https://github.com/mike-000)) + * [#10858](https://github.com/openlayers/openlayers/pull/10858) - Perform auto-pan when adding an Overlay to a Map ([@ejn](https://github.com/ejn)) + * [#10646](https://github.com/openlayers/openlayers/pull/10646) - Write fill and outline in KML PolyStyle ([@mike-000](https://github.com/mike-000)) + * [#10800](https://github.com/openlayers/openlayers/pull/10800) - Make Overlay.panIntoView an API method ([@ejn](https://github.com/ejn)) + * [#10807](https://github.com/openlayers/openlayers/pull/10807) - Handle Graticule wrapX without calculating excess meridians ([@mike-000](https://github.com/mike-000)) + * [#10795](https://github.com/openlayers/openlayers/pull/10795) - Show graticule labels in wrapped worlds ([@mike-000](https://github.com/mike-000)) + * [#10824](https://github.com/openlayers/openlayers/pull/10824) - Fix drawing svg icon with color option in ie11 ([@MoonE](https://github.com/MoonE)) + * [#10802](https://github.com/openlayers/openlayers/pull/10802) - Apidoc add default-exported enums ([@MoonE](https://github.com/MoonE)) + * [#10805](https://github.com/openlayers/openlayers/pull/10805) - make ImageSourceEventType available for consumers ([@regileeso](https://github.com/regileeso)) + * [#10822](https://github.com/openlayers/openlayers/pull/10822) - parsing color from IconStyle in KML files ([@lysek](https://github.com/lysek)) + * [#10848](https://github.com/openlayers/openlayers/pull/10848) - Speed up Overlay element positioning using CSS translate() ([@horsenit](https://github.com/horsenit)) + * [#9590](https://github.com/openlayers/openlayers/pull/9590) - Calculate tile grid extent from extent of bottom-level tile matrix ([@mloskot](https://github.com/mloskot)) + * [#10845](https://github.com/openlayers/openlayers/pull/10845) - Fix createHitDetectionImageData error for features with no size ([@gedaiu](https://github.com/gedaiu)) + * [#10842](https://github.com/openlayers/openlayers/pull/10842) - Fix custom symbol example short description ([@mike-000](https://github.com/mike-000)) + * [#10828](https://github.com/openlayers/openlayers/pull/10828) - Offscreen canvas example ([@ahocevar](https://github.com/ahocevar)) + * [#10816](https://github.com/openlayers/openlayers/pull/10816) - Add 'funding' field to `package.json` ([@marcjansen](https://github.com/marcjansen)) + * [#10813](https://github.com/openlayers/openlayers/pull/10813) - Add sponsors section to the readme ([@tschaub](https://github.com/tschaub)) + * [#10474](https://github.com/openlayers/openlayers/pull/10474) - Fix for undefined source in Image layer ([@mike-000](https://github.com/mike-000)) + * [#10785](https://github.com/openlayers/openlayers/pull/10785) - Detect Zoomify server-side retina tiles ([@ahocevar](https://github.com/ahocevar)) + * [#10787](https://github.com/openlayers/openlayers/pull/10787) - Improved projection extent in the "Reprojection with EPSG.io Search" example ([@mike-000](https://github.com/mike-000)) + * [#10792](https://github.com/openlayers/openlayers/pull/10792) - Add support for EventListener Object ([@flexjoly](https://github.com/flexjoly)) + * [#10777](https://github.com/openlayers/openlayers/pull/10777) - Keep the render loop running during simulation ([@ahocevar](https://github.com/ahocevar)) + * [#10791](https://github.com/openlayers/openlayers/pull/10791) - iOS 12 touchmove: Prevent touchmove event default when no preceding pointer event ([@sosmo](https://github.com/sosmo)) + * [#10786](https://github.com/openlayers/openlayers/pull/10786) - Resolve constraints when updating size ([@ahocevar](https://github.com/ahocevar)) + * [#10788](https://github.com/openlayers/openlayers/pull/10788) - Add safeguard to handleTouchMove ([@sosmo](https://github.com/sosmo)) + * [#10722](https://github.com/openlayers/openlayers/pull/10722) - fix: handle layer clear event in case clear(true) called ([@jellyedwards](https://github.com/jellyedwards)) + * [#10723](https://github.com/openlayers/openlayers/pull/10723) - Improve the extent transforms used by Graticule and handle extents crossing the dateline ([@mike-000](https://github.com/mike-000)) + * [#10744](https://github.com/openlayers/openlayers/pull/10744) - Ensure the Modify Features Test example opens at correct zoom ([@mike-000](https://github.com/mike-000)) + * [#10767](https://github.com/openlayers/openlayers/pull/10767) - Replace Bing layer with MapTiler in examples ([@mike-000](https://github.com/mike-000)) + * [#10751](https://github.com/openlayers/openlayers/pull/10751) - Sort events / observables in all cases ([@MoonE](https://github.com/MoonE)) + * [#10763](https://github.com/openlayers/openlayers/pull/10763) - TypeScript: Fix inconsistent optionality in various APIs ([@jumpinjackie](https://github.com/jumpinjackie)) + * [#10758](https://github.com/openlayers/openlayers/pull/10758) - Allow using feature attributes for symbol rotation in WebGL layers ([@jahow](https://github.com/jahow)) + * [#10748](https://github.com/openlayers/openlayers/pull/10748) - Fix "Cannot read property 'anchor' of undefined" in ol/View ([@mike-000](https://github.com/mike-000)) + * [#10746](https://github.com/openlayers/openlayers/pull/10746) - Fix building apidoc on windows ([@MoonE](https://github.com/MoonE)) + * [#10720](https://github.com/openlayers/openlayers/pull/10720) - Apidoc better search ([@MoonE](https://github.com/MoonE)) + * [#10743](https://github.com/openlayers/openlayers/pull/10743) - Ignore user provided tile cache size when too small ([@ahocevar](https://github.com/ahocevar)) + * [#10736](https://github.com/openlayers/openlayers/pull/10736) - Allow cluster source to unlisten from its source ([@M393](https://github.com/M393)) + * [#10739](https://github.com/openlayers/openlayers/pull/10739) - Fix typo in trackpad timeout ([@ahocevar](https://github.com/ahocevar)) + * [#10740](https://github.com/openlayers/openlayers/pull/10740) - Document tabindex behavior for MouseWheelZoom and DragPan ([@matthias-ccri](https://github.com/matthias-ccri)) + * [#10738](https://github.com/openlayers/openlayers/pull/10738) - Fix text background decluttering ([@ahocevar](https://github.com/ahocevar)) + * [#10715](https://github.com/openlayers/openlayers/pull/10715) - Fix disappearing graticule labels when rotation returns to 0 ([@mike-000](https://github.com/mike-000)) + * [#10713](https://github.com/openlayers/openlayers/pull/10713) - Draw graticule labels in a postrender function ([@mike-000](https://github.com/mike-000)) + * [#10711](https://github.com/openlayers/openlayers/pull/10711) - Make sure that optional args are typed accordingly ([@ahocevar](https://github.com/ahocevar)) + * [#10710](https://github.com/openlayers/openlayers/pull/10710) - Fix stylefunction return type ([@ahocevar](https://github.com/ahocevar)) + * [#10709](https://github.com/openlayers/openlayers/pull/10709) - Fix type and documentation of style function ([@ahocevar](https://github.com/ahocevar)) + * [#10708](https://github.com/openlayers/openlayers/pull/10708) - Handle Select interactions with falsey select style ([@ahocevar](https://github.com/ahocevar)) + * [#10707](https://github.com/openlayers/openlayers/pull/10707) - Get default projection for overview map from main map. ([@AugustusKling](https://github.com/AugustusKling)) + * [#10699](https://github.com/openlayers/openlayers/pull/10699) - Make Select interaction work when there are multiple instances ([@ahocevar](https://github.com/ahocevar)) + * [#10694](https://github.com/openlayers/openlayers/pull/10694) - Draw image with configured opacity ([@M393](https://github.com/M393)) + * [#10703](https://github.com/openlayers/openlayers/pull/10703) - CI and test fixes ([@ahocevar](https://github.com/ahocevar)) + * [#10698](https://github.com/openlayers/openlayers/pull/10698) - Shadow root ([@ahocevar](https://github.com/ahocevar)) + * [#10688](https://github.com/openlayers/openlayers/pull/10688) - Publish type definition files ([@ahocevar](https://github.com/ahocevar)) + * [#10691](https://github.com/openlayers/openlayers/pull/10691) - Do not exceed color range ([@ahocevar](https://github.com/ahocevar)) + * [#10683](https://github.com/openlayers/openlayers/pull/10683) - Dispatch enterfullscreen and leavefullscreen from the FullScreen control ([@fredj](https://github.com/fredj)) + * [#10676](https://github.com/openlayers/openlayers/pull/10676) - Document that overviewmap view must use same projection as main map ([@mike-000](https://github.com/mike-000)) + * [#10678](https://github.com/openlayers/openlayers/pull/10678) - Add maxResolution option to ol/tilegrid.createXYZ() and ol/source/XYZ ([@mike-000](https://github.com/mike-000)) + * [#10690](https://github.com/openlayers/openlayers/pull/10690) - Document minZoom and maxZoom options for all layers ([@mike-000](https://github.com/mike-000)) + * [#10672](https://github.com/openlayers/openlayers/pull/10672) - Nicer mousewheel and trackpad zooming ([@ahocevar](https://github.com/ahocevar)) + * [#10687](https://github.com/openlayers/openlayers/pull/10687) - Increase timeout in listenImage test ([@fredj](https://github.com/fredj)) + * [#10684](https://github.com/openlayers/openlayers/pull/10684) - perf: only do expensive reload when texture changes ([@jellyedwards](https://github.com/jellyedwards)) + * [#10675](https://github.com/openlayers/openlayers/pull/10675) - typo ([@jipexu](https://github.com/jipexu)) + * [#10669](https://github.com/openlayers/openlayers/pull/10669) - More browser compatible Export Map example ([@mike-000](https://github.com/mike-000)) + * [#10667](https://github.com/openlayers/openlayers/pull/10667) - Do not render label with the current linedash ([@ahocevar](https://github.com/ahocevar)) + * [#10666](https://github.com/openlayers/openlayers/pull/10666) - Load polyfill before example specific scripts in examples template ([@mike-000](https://github.com/mike-000)) + * [#6526](https://github.com/openlayers/openlayers/pull/6526) - Draw interaction: add abortDrawing method and drawabort event ([@tchandelle](https://github.com/tchandelle)) + * [#10657](https://github.com/openlayers/openlayers/pull/10657) - Changelog for v6.2.1 ([@openlayers](https://github.com/openlayers)) + + +
    + Dependency Updates + + * [#10855](https://github.com/openlayers/openlayers/pull/10855) - Bump rollup from 2.1.0 to 2.3.0 ([@openlayers](https://github.com/openlayers)) + * [#10854](https://github.com/openlayers/openlayers/pull/10854) - Bump ol-mapbox-style from 6.1.0 to 6.1.1 ([@openlayers](https://github.com/openlayers)) + * [#10853](https://github.com/openlayers/openlayers/pull/10853) - Bump buble from 0.19.8 to 0.20.0 ([@openlayers](https://github.com/openlayers)) + * [#10852](https://github.com/openlayers/openlayers/pull/10852) - Bump webpack from 4.42.0 to 4.42.1 ([@openlayers](https://github.com/openlayers)) + * [#10837](https://github.com/openlayers/openlayers/pull/10837) - Bump ol-mapbox-style from 6.0.1 to 6.1.0 ([@openlayers](https://github.com/openlayers)) + * [#10836](https://github.com/openlayers/openlayers/pull/10836) - Bump coveralls from 3.0.9 to 3.0.11 ([@openlayers](https://github.com/openlayers)) + * [#10835](https://github.com/openlayers/openlayers/pull/10835) - Bump @babel/preset-env from 7.8.7 to 7.9.0 ([@openlayers](https://github.com/openlayers)) + * [#10834](https://github.com/openlayers/openlayers/pull/10834) - Bump rollup from 1.32.1 to 2.1.0 ([@openlayers](https://github.com/openlayers)) + * [#10833](https://github.com/openlayers/openlayers/pull/10833) - Bump fs-extra from 8.1.0 to 9.0.0 ([@openlayers](https://github.com/openlayers)) + * [#10832](https://github.com/openlayers/openlayers/pull/10832) - Bump @babel/core from 7.8.7 to 7.9.0 ([@openlayers](https://github.com/openlayers)) + * [#10831](https://github.com/openlayers/openlayers/pull/10831) - Bump babel-loader from 8.0.6 to 8.1.0 ([@openlayers](https://github.com/openlayers)) + * [#10830](https://github.com/openlayers/openlayers/pull/10830) - Bump mocha from 7.1.0 to 7.1.1 ([@openlayers](https://github.com/openlayers)) + * [#10829](https://github.com/openlayers/openlayers/pull/10829) - Bump marked from 0.8.0 to 0.8.2 ([@openlayers](https://github.com/openlayers)) + * [#10811](https://github.com/openlayers/openlayers/pull/10811) - Bump sinon from 9.0.0 to 9.0.1 ([@openlayers](https://github.com/openlayers)) + * [#10810](https://github.com/openlayers/openlayers/pull/10810) - Bump rollup-plugin-terser from 5.2.0 to 5.3.0 ([@openlayers](https://github.com/openlayers)) + * [#10809](https://github.com/openlayers/openlayers/pull/10809) - Bump yargs from 15.3.0 to 15.3.1 ([@openlayers](https://github.com/openlayers)) + * [#10806](https://github.com/openlayers/openlayers/pull/10806) - [Security] Bump acorn from 6.1.1 to 6.4.1 ([@openlayers](https://github.com/openlayers)) + * [#10755](https://github.com/openlayers/openlayers/pull/10755) - Bump rollup from 1.31.1 to 1.32.0 ([@openlayers](https://github.com/openlayers)) + * [#10754](https://github.com/openlayers/openlayers/pull/10754) - Bump @babel/preset-env from 7.8.4 to 7.8.6 ([@openlayers](https://github.com/openlayers)) + * [#10753](https://github.com/openlayers/openlayers/pull/10753) - Bump mocha from 7.0.1 to 7.1.0 ([@openlayers](https://github.com/openlayers)) + * [#10752](https://github.com/openlayers/openlayers/pull/10752) - Bump @babel/core from 7.8.4 to 7.8.6 ([@openlayers](https://github.com/openlayers)) + * [#10725](https://github.com/openlayers/openlayers/pull/10725) - Bump elm-pep from 1.0.4 to 1.0.6 ([@openlayers](https://github.com/openlayers)) + * [#10726](https://github.com/openlayers/openlayers/pull/10726) - Bump sinon from 8.1.1 to 9.0.0 ([@openlayers](https://github.com/openlayers)) + * [#10680](https://github.com/openlayers/openlayers/pull/10680) - Bump terser-webpack-plugin from 2.3.4 to 2.3.5 ([@openlayers](https://github.com/openlayers)) + * [#10682](https://github.com/openlayers/openlayers/pull/10682) - Bump webpack from 4.41.5 to 4.41.6 ([@openlayers](https://github.com/openlayers)) + * [#10681](https://github.com/openlayers/openlayers/pull/10681) - Bump webpack-cli from 3.3.10 to 3.3.11 ([@openlayers](https://github.com/openlayers)) + * [#10679](https://github.com/openlayers/openlayers/pull/10679) - Bump rollup from 1.31.0 to 1.31.1 ([@openlayers](https://github.com/openlayers)) + + +
    From bdf969cc953f319ec7538db7fed50d8454866367 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 2 Apr 2020 22:04:52 +0200 Subject: [PATCH 267/636] Update package version to 6.3.0 --- package-lock.json | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a4173b921a..2280550715 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.2.2", + "version": "6.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -5971,7 +5971,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } diff --git a/package.json b/package.json index 7b1b6f52df..df5010c94a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.2.2", + "version": "6.3.0", "description": "OpenLayers mapping library", "keywords": [ "map", From b71e8ebb73ca44c82d46d8d89f3b50aa8c5bf82e Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 2 Apr 2020 22:24:08 +0200 Subject: [PATCH 268/636] Develop on 6.3.1-dev --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2280550715..43de8147d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.3.0", + "version": "6.3.1-dev", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index df5010c94a..f7fefb945c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.3.0", + "version": "6.3.1-dev", "description": "OpenLayers mapping library", "keywords": [ "map", From b866a447c226190121ce2dc1f5e053aeec3e8e4c Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 22:28:09 +0100 Subject: [PATCH 269/636] assign tile source context options to context --- src/ol/renderer/canvas/TileLayer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol/renderer/canvas/TileLayer.js b/src/ol/renderer/canvas/TileLayer.js index 51fb12939f..dea9aea321 100644 --- a/src/ol/renderer/canvas/TileLayer.js +++ b/src/ol/renderer/canvas/TileLayer.js @@ -9,6 +9,7 @@ import {createEmpty, equals, getIntersection, getTopLeft} from '../../extent.js' import CanvasLayerRenderer from './Layer.js'; import {apply as applyTransform, compose as composeTransform, makeInverse} from '../../transform.js'; import {numberSafeCompareFunction} from '../../array.js'; +import {assign} from '../../obj.js'; /** * @classdesc @@ -270,6 +271,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer { this.clipUnrotated(context, frameState, layerExtent); } + assign(context, tileSource.getContextOptions()); this.preRender(context, frameState); this.renderedTiles.length = 0; From 5ad788194e7172e983333f9fffb89ec443cf5146 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 22:30:08 +0100 Subject: [PATCH 270/636] remove prerender context setting --- rendering/cases/reproj-tile-disable-smoothing/main.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rendering/cases/reproj-tile-disable-smoothing/main.js b/rendering/cases/reproj-tile-disable-smoothing/main.js index 7bc4598ab9..fb194dfe0c 100644 --- a/rendering/cases/reproj-tile-disable-smoothing/main.js +++ b/rendering/cases/reproj-tile-disable-smoothing/main.js @@ -21,10 +21,6 @@ const layer = new TileLayer({ source: source }); -layer.on('prerender', function(evt) { - evt.context.imageSmoothingEnabled = false; -}); - new Map({ pixelRatio: 1, target: 'map', From f4a3a3bc70b6bb467fcb802de0ca2d668c8be57f Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 22:32:30 +0100 Subject: [PATCH 271/636] remove prerender context setting --- examples/disable-image-smoothing.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/disable-image-smoothing.js b/examples/disable-image-smoothing.js index dd8a27ed7b..5c231e8e49 100644 --- a/examples/disable-image-smoothing.js +++ b/examples/disable-image-smoothing.js @@ -38,11 +38,6 @@ const enabledLayer = new TileLayer({ }) }); -disabledLayer.on('prerender', function(evt) { - evt.context.imageSmoothingEnabled = false; - evt.context.msImageSmoothingEnabled = false; -}); - imagery.on('prerender', function(evt) { // use opaque background to conceal DEM while fully opaque imagery renders if (imagery.getOpacity() === 1) { From dd95d60c2eac3ae17942957111ecfc8b41c426cd Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 23:17:10 +0100 Subject: [PATCH 272/636] test imageSmoothing: false without reprojection --- .../cases/tile-disable-smoothing/main.js | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 rendering/cases/tile-disable-smoothing/main.js diff --git a/rendering/cases/tile-disable-smoothing/main.js b/rendering/cases/tile-disable-smoothing/main.js new file mode 100644 index 0000000000..805344e9b2 --- /dev/null +++ b/rendering/cases/tile-disable-smoothing/main.js @@ -0,0 +1,33 @@ +import Map from '../../../src/ol/Map.js'; +import View from '../../../src/ol/View.js'; +import XYZ from '../../../src/ol/source/XYZ.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; +import {createXYZ} from '../../../src/ol/tilegrid.js'; + +const tileGrid = createXYZ(); +const extent = tileGrid.getTileCoordExtent([5, 5, 12]); +const center = [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2]; + +const source = new XYZ({ + transition: 0, + minZoom: 5, + maxZoom: 5, + imageSmoothing: false, + url: '/data/tiles/osm/{z}/{x}/{y}.png' +}); + +const layer = new TileLayer({ + source: source +}); + +new Map({ + pixelRatio: 1, + target: 'map', + layers: [layer], + view: new View({ + center: center, + zoom: 10 + }) +}); + +render(); From 74ba208c22960f48e56e0b8803c7f4830b031053 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 2 Apr 2020 23:18:10 +0100 Subject: [PATCH 273/636] test imageSmoothing: false without reprojection --- .../cases/tile-disable-smoothing/expected.png | Bin 0 -> 2391 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 rendering/cases/tile-disable-smoothing/expected.png diff --git a/rendering/cases/tile-disable-smoothing/expected.png b/rendering/cases/tile-disable-smoothing/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..46f555f607b644cf337bae5928b34ff4c3083082 GIT binary patch literal 2391 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|GzJDvIZqeIkczmsHw?3;W=phQ z{J%hK(y<2&EV@PvjvETTyxg*Bi-3qokgJlGV2_~tN0I8goH_q%ziqE5_BX#C{=NPG zCN{nOd(UqA&%VFzlhN7wimD0E*0;}RxZnr0LqnXSVbkBo77PpxMNJGEx7iOo^lvC@ zV95Ag&iJFA;UyE}glq5p8N?l|9T>L!-OUgK6=Eu2+``P_aC<-Z0oDn60t}gd^@gFM z|AoK5m;chQDF1ACw!ZkE*4cP|c85K{U|TRpf#KA*{==*fm^^?XxTTKahwuVf1%_My zVj1)rN*WnFUY9fOV7SG|wBYT1xFYce?vbGA^Oy4b_m}@~d)_~P=}&)oThGt03mC5K zcbLP^z;Nfdw1~VJFa#MCY8pySfONwz(YBu;fkW&O?#w`XMSS86pvvK>p#I(aLth^M z`0+Y;R(;_&rL*e~gR&^YiuzUqd7zISelWbw0MZO!wRt{+3W65?4Sk@JAYlKY;jN&+ z_SfO_{h6%d>A+C1I{3DLVaxviFQ5J5VtAWxFqg04+jDk@+y85<7;bSgEO=XQC(H1b zh2g?C`}uqgWlX@rYQ8_agEb?tggU>RdBI!;U_N|)nGsaL<^KQtk|9H#p<&zqpCt@i zgc*joG5Y)W`dU|jilX(083X<^J^sm%!9Hw!N2MsUzhCERy<_k1xzFO~?DhBztitqV z7#KcqwMhf>Qrq+Qmw|a}eZmePnNaZ$n3jg3RO9;X;V-ZM-|>4U(36Y`e;Hf0^8$VM nmTBp75dD&&bp-Gius)EN*ymnZX8Bzi=xGK|S3j3^P6 Date: Thu, 2 Apr 2020 23:51:36 +0100 Subject: [PATCH 274/636] update description --- examples/disable-image-smoothing.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/disable-image-smoothing.html b/examples/disable-image-smoothing.html index 3d67e435fb..918aa558b4 100644 --- a/examples/disable-image-smoothing.html +++ b/examples/disable-image-smoothing.html @@ -4,10 +4,8 @@ title: Disable Image Smoothing shortdesc: Example of disabling image smoothing docs: > Example of disabling image smoothing when using raster DEM (digital elevation model) data. - The imageSmoothingEnabled (or for Internet Explorer msImageSmoothingEnabled) canvas - context property is set to false at the layer's prerender event. Additionally for a - reprojected source those properties must also be also be specified for the canvas contexts used in - the reprojection via the source's reprojectionContextOptions option. Elevation data is + The imageSmoothing: false setting is used to disable canvas image smoothing during + reprojection and rendering. Elevation data is calculated from the pixel value returned by forEachLayerAtPixel. For comparison a second map with smoothing enabled returns inaccuate elevations which are very noticeable close to 3107 meters due to how elevation is calculated from the pixel value. From 6e2d8cc26682583e7f0b568fb9df330f76ff5d14 Mon Sep 17 00:00:00 2001 From: philip Date: Fri, 3 Apr 2020 01:46:03 +0000 Subject: [PATCH 275/636] Add test for the reprojection being able to handle translucent layers --- test/spec/ol/reproj/image.test.js | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/spec/ol/reproj/image.test.js b/test/spec/ol/reproj/image.test.js index cc5d05d12b..d040891460 100644 --- a/test/spec/ol/reproj/image.test.js +++ b/test/spec/ol/reproj/image.test.js @@ -19,6 +19,20 @@ describe('ol.reproj.Image', function() { }); } + function createTranslucentImage(pixelRatio) { + return new ReprojImage( + getProjection('EPSG:3857'), getProjection('EPSG:4326'), + [-180, -85, 180, 85], 10, pixelRatio, + function(extent, resolution, pixelRatio) { + return new ImageWrapper(extent, resolution, pixelRatio, + 'data:image/png;base64,' + + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8depePQAIiwMjFXlnJQAAAABJRU5ErkJggg==', null, + function(image, src) { + image.getImage().src = src; + }); + }); + } + it('changes state as expected', function(done) { const image = createImage(1); expect(image.getState()).to.be(0); // IDLE @@ -55,4 +69,26 @@ describe('ol.reproj.Image', function() { }); image.load(); }); + + it('has uniform color', function(done) { + const image = createTranslucentImage(1); + listen(image, 'change', function() { + if (image.getState() == 2) { // LOADED + const canvas = image.getImage(); + expect(canvas.width).to.be(36); + expect(canvas.height).to.be(17); + const pixels = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height).data; + + for (let i = 0; i < canvas.width * canvas.height * 4; i += 4) { + expect(pixels[i + 0]).to.be.within(pixels[0] - 2, pixels[0] + 2); + expect(pixels[i + 1]).to.be.within(pixels[1] - 2, pixels[1] + 2); + expect(pixels[i + 2]).to.be.within(pixels[2] - 2, pixels[2] + 2); + expect(pixels[i + 3]).to.be.within(pixels[3] - 2, pixels[3] + 2); + } + done(); + } + }); + image.load(); + }); + }); From f392f6b6bbb9b2a426b2e6eaae497d2a4d752b8e Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 25 Mar 2020 07:41:13 +0100 Subject: [PATCH 276/636] Remove all inheritDoc tags from src/ol/geom --- src/ol/geom/Circle.js | 38 ++++++++++++++-------- src/ol/geom/Geometry.js | 3 +- src/ol/geom/GeometryCollection.js | 53 ++++++++++++++++++++++++------- src/ol/geom/LineString.js | 20 ++++++++---- src/ol/geom/LinearRing.js | 21 ++++++++---- src/ol/geom/MultiLineString.js | 20 ++++++++---- src/ol/geom/MultiPoint.js | 16 ++++++---- src/ol/geom/MultiPolygon.js | 24 +++++++++----- src/ol/geom/Point.js | 22 +++++++++---- src/ol/geom/Polygon.js | 24 +++++++++----- src/ol/geom/SimpleGeometry.js | 11 ++++--- 11 files changed, 170 insertions(+), 82 deletions(-) diff --git a/src/ol/geom/Circle.js b/src/ol/geom/Circle.js index 25010f9ed3..e5bdf14397 100644 --- a/src/ol/geom/Circle.js +++ b/src/ol/geom/Circle.js @@ -36,7 +36,6 @@ class Circle extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!Circle} Clone. - * @override * @api */ clone() { @@ -44,7 +43,11 @@ class Circle extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { const flatCoordinates = this.flatCoordinates; @@ -72,7 +75,9 @@ class Circle extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). */ containsXY(x, y) { const flatCoordinates = this.flatCoordinates; @@ -91,7 +96,9 @@ class Circle extends SimpleGeometry { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @protected + * @return {import("../extent.js").Extent} extent Extent. */ computeExtent(extent) { const flatCoordinates = this.flatCoordinates; @@ -122,7 +129,8 @@ class Circle extends SimpleGeometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -130,7 +138,9 @@ class Circle extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -193,16 +203,10 @@ class Circle extends SimpleGeometry { this.changed(); } - /** - * @inheritDoc - */ getCoordinates() { return null; } - /** - * @inheritDoc - */ setCoordinates(coordinates, opt_layout) {} /** @@ -216,7 +220,10 @@ class Circle extends SimpleGeometry { } /** - * @inheritDoc + * Rotate the geometry around a given coordinate. This modifies the geometry + * coordinates in place. + * @param {number} angle Rotation angle in radians. + * @param {import("../coordinate.js").Coordinate} anchor The rotation center. * @api */ rotate(angle, anchor) { @@ -227,7 +234,10 @@ class Circle extends SimpleGeometry { } /** - * @inheritDoc + * Translate the geometry. This modifies the geometry coordinates in place. If + * instead you want a new geometry, first `clone()` this geometry. + * @param {number} deltaX Delta X. + * @param {number} deltaY Delta Y. * @api */ translate(deltaX, deltaY) { diff --git a/src/ol/geom/Geometry.js b/src/ol/geom/Geometry.js index bc6092d06b..f63e6a9779 100644 --- a/src/ol/geom/Geometry.js +++ b/src/ol/geom/Geometry.js @@ -184,8 +184,7 @@ class Geometry extends BaseObject { * coordinates in place. * @abstract * @param {number} sx The scaling factor in the x-direction. - * @param {number=} opt_sy The scaling factor in the y-direction (defaults to - * sx). + * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx). * @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center * of the geometry extent). * @api diff --git a/src/ol/geom/GeometryCollection.js b/src/ol/geom/GeometryCollection.js index 1d407f2fdc..981140a949 100644 --- a/src/ol/geom/GeometryCollection.js +++ b/src/ol/geom/GeometryCollection.js @@ -61,7 +61,6 @@ class GeometryCollection extends Geometry { /** * Make a complete copy of the geometry. * @return {!GeometryCollection} Clone. - * @override * @api */ clone() { @@ -71,7 +70,11 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { @@ -86,7 +89,9 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). */ containsXY(x, y) { const geometries = this.geometries_; @@ -99,7 +104,9 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @protected + * @return {import("../extent.js").Extent} extent Extent. */ computeExtent(extent) { createOrUpdateEmpty(extent); @@ -144,7 +151,9 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Create a simplified version of this geometry using the Douglas Peucker algorithm. + * @param {number} squaredTolerance Squared tolerance. + * @return {GeometryCollection} Simplified GeometryCollection. */ getSimplifiedGeometry(squaredTolerance) { if (this.simplifiedGeometryRevision !== this.getRevision()) { @@ -179,7 +188,8 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -187,7 +197,9 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -208,7 +220,10 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Rotate the geometry around a given coordinate. This modifies the geometry + * coordinates in place. + * @param {number} angle Rotation angle in radians. + * @param {import("../coordinate.js").Coordinate} anchor The rotation center. * @api */ rotate(angle, anchor) { @@ -220,7 +235,13 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Scale the geometry (with an optional origin). This modifies the geometry + * coordinates in place. + * @abstract + * @param {number} sx The scaling factor in the x-direction. + * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx). + * @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center + * of the geometry extent). * @api */ scale(sx, opt_sy, opt_anchor) { @@ -255,7 +276,12 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Apply a transform function to the coordinates of the geometry. + * The geometry is modified in place. + * If you do not want the geometry modified in place, first `clone()` it and + * then use this function on the clone. + * @param {import("../proj.js").TransformFunction} transformFn Transform function. + * Called with a flat array of geometry coordinates. * @api */ applyTransform(transformFn) { @@ -267,7 +293,10 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Translate the geometry. This modifies the geometry coordinates in place. If + * instead you want a new geometry, first `clone()` this geometry. + * @param {number} deltaX Delta X. + * @param {number} deltaY Delta Y. * @api */ translate(deltaX, deltaY) { @@ -279,7 +308,7 @@ class GeometryCollection extends Geometry { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.unlistenGeometriesChange_(); diff --git a/src/ol/geom/LineString.js b/src/ol/geom/LineString.js index e8928c7d22..6334708e51 100644 --- a/src/ol/geom/LineString.js +++ b/src/ol/geom/LineString.js @@ -81,7 +81,6 @@ class LineString extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!LineString} Clone. - * @override * @api */ clone() { @@ -89,7 +88,11 @@ class LineString extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { @@ -147,7 +150,6 @@ class LineString extends SimpleGeometry { /** * Return the coordinates of the linestring. * @return {Array} Coordinates. - * @override * @api */ getCoordinates() { @@ -193,7 +195,9 @@ class LineString extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} squaredTolerance Squared tolerance. + * @return {LineString} Simplified LineString. + * @protected */ getSimplifiedGeometryInternal(squaredTolerance) { const simplifiedFlatCoordinates = []; @@ -204,7 +208,8 @@ class LineString extends SimpleGeometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -212,7 +217,9 @@ class LineString extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -225,7 +232,6 @@ class LineString extends SimpleGeometry { * Set the coordinates of the linestring. * @param {!Array} coordinates Coordinates. * @param {GeometryLayout=} opt_layout Layout. - * @override * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/LinearRing.js b/src/ol/geom/LinearRing.js index 40f99071a9..e85ab25969 100644 --- a/src/ol/geom/LinearRing.js +++ b/src/ol/geom/LinearRing.js @@ -52,7 +52,6 @@ class LinearRing extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!LinearRing} Clone. - * @override * @api */ clone() { @@ -60,7 +59,11 @@ class LinearRing extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { @@ -88,7 +91,6 @@ class LinearRing extends SimpleGeometry { /** * Return the coordinates of the linear ring. * @return {Array} Coordinates. - * @override * @api */ getCoordinates() { @@ -97,7 +99,9 @@ class LinearRing extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} squaredTolerance Squared tolerance. + * @return {LinearRing} Simplified LinearRing. + * @protected */ getSimplifiedGeometryInternal(squaredTolerance) { const simplifiedFlatCoordinates = []; @@ -108,7 +112,8 @@ class LinearRing extends SimpleGeometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -116,7 +121,10 @@ class LinearRing extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. + * @api */ intersectsExtent(extent) { return false; @@ -126,7 +134,6 @@ class LinearRing extends SimpleGeometry { * Set the coordinates of the linear ring. * @param {!Array} coordinates Coordinates. * @param {GeometryLayout=} opt_layout Layout. - * @override * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/MultiLineString.js b/src/ol/geom/MultiLineString.js index 449338bf1b..1e483b11e2 100644 --- a/src/ol/geom/MultiLineString.js +++ b/src/ol/geom/MultiLineString.js @@ -93,7 +93,6 @@ class MultiLineString extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!MultiLineString} Clone. - * @override * @api */ clone() { @@ -101,7 +100,11 @@ class MultiLineString extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { @@ -154,7 +157,6 @@ class MultiLineString extends SimpleGeometry { /** * Return the coordinates of the multilinestring. * @return {Array>} Coordinates. - * @override * @api */ getCoordinates() { @@ -224,7 +226,9 @@ class MultiLineString extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} squaredTolerance Squared tolerance. + * @return {MultiLineString} Simplified MultiLineString. + * @protected */ getSimplifiedGeometryInternal(squaredTolerance) { const simplifiedFlatCoordinates = []; @@ -236,7 +240,8 @@ class MultiLineString extends SimpleGeometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -244,7 +249,9 @@ class MultiLineString extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -256,7 +263,6 @@ class MultiLineString extends SimpleGeometry { * Set the coordinates of the multilinestring. * @param {!Array>} coordinates Coordinates. * @param {GeometryLayout=} opt_layout Layout. - * @override * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/MultiPoint.js b/src/ol/geom/MultiPoint.js index e433e51bf3..a487828c93 100644 --- a/src/ol/geom/MultiPoint.js +++ b/src/ol/geom/MultiPoint.js @@ -49,7 +49,6 @@ class MultiPoint extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!MultiPoint} Clone. - * @override * @api */ clone() { @@ -58,7 +57,11 @@ class MultiPoint extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { @@ -83,7 +86,6 @@ class MultiPoint extends SimpleGeometry { /** * Return the coordinates of the multipoint. * @return {Array} Coordinates. - * @override * @api */ getCoordinates() { @@ -125,7 +127,8 @@ class MultiPoint extends SimpleGeometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -133,7 +136,9 @@ class MultiPoint extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -153,7 +158,6 @@ class MultiPoint extends SimpleGeometry { * Set the coordinates of the multipoint. * @param {!Array} coordinates Coordinates. * @param {import("./GeometryLayout.js").default=} opt_layout Layout. - * @override * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/MultiPolygon.js b/src/ol/geom/MultiPolygon.js index ca9eb29b73..c3098284fa 100644 --- a/src/ol/geom/MultiPolygon.js +++ b/src/ol/geom/MultiPolygon.js @@ -138,7 +138,6 @@ class MultiPolygon extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!MultiPolygon} Clone. - * @override * @api */ clone() { @@ -153,7 +152,11 @@ class MultiPolygon extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { @@ -170,7 +173,9 @@ class MultiPolygon extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). */ containsXY(x, y) { return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y); @@ -196,7 +201,6 @@ class MultiPolygon extends SimpleGeometry { * By default, coordinate orientation will depend on how the geometry was * constructed. * @return {Array>>} Coordinates. - * @override * @api */ getCoordinates(opt_right) { @@ -266,7 +270,9 @@ class MultiPolygon extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} squaredTolerance Squared tolerance. + * @return {MultiPolygon} Simplified MultiPolygon. + * @protected */ getSimplifiedGeometryInternal(squaredTolerance) { const simplifiedFlatCoordinates = []; @@ -332,7 +338,8 @@ class MultiPolygon extends SimpleGeometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -340,7 +347,9 @@ class MultiPolygon extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -352,7 +361,6 @@ class MultiPolygon extends SimpleGeometry { * Set the coordinates of the multipolygon. * @param {!Array>>} coordinates Coordinates. * @param {GeometryLayout=} opt_layout Layout. - * @override * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/Point.js b/src/ol/geom/Point.js index 92b27d6a0e..0c3b7fc0d9 100644 --- a/src/ol/geom/Point.js +++ b/src/ol/geom/Point.js @@ -27,7 +27,6 @@ class Point extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!Point} Clone. - * @override * @api */ clone() { @@ -36,7 +35,11 @@ class Point extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { const flatCoordinates = this.flatCoordinates; @@ -56,7 +59,6 @@ class Point extends SimpleGeometry { /** * Return the coordinate of the point. * @return {import("../coordinate.js").Coordinate} Coordinates. - * @override * @api */ getCoordinates() { @@ -64,14 +66,17 @@ class Point extends SimpleGeometry { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @protected + * @return {import("../extent.js").Extent} extent Extent. */ computeExtent(extent) { return createOrUpdateFromCoordinate(this.flatCoordinates, extent); } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -79,7 +84,9 @@ class Point extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -87,7 +94,8 @@ class Point extends SimpleGeometry { } /** - * @inheritDoc + * @param {!Array<*>} coordinates Coordinates. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/Polygon.js b/src/ol/geom/Polygon.js index 24d0f17d82..4280671787 100644 --- a/src/ol/geom/Polygon.js +++ b/src/ol/geom/Polygon.js @@ -112,7 +112,6 @@ class Polygon extends SimpleGeometry { /** * Make a complete copy of the geometry. * @return {!Polygon} Clone. - * @override * @api */ clone() { @@ -120,7 +119,11 @@ class Polygon extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. */ closestPointXY(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { @@ -137,7 +140,9 @@ class Polygon extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). */ containsXY(x, y) { return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y); @@ -163,7 +168,6 @@ class Polygon extends SimpleGeometry { * By default, coordinate orientation will depend on how the geometry was * constructed. * @return {Array>} Coordinates. - * @override * @api */ getCoordinates(opt_right) { @@ -281,7 +285,9 @@ class Polygon extends SimpleGeometry { } /** - * @inheritDoc + * @param {number} squaredTolerance Squared tolerance. + * @return {Polygon} Simplified Polygon. + * @protected */ getSimplifiedGeometryInternal(squaredTolerance) { const simplifiedFlatCoordinates = []; @@ -294,7 +300,8 @@ class Polygon extends SimpleGeometry { } /** - * @inheritDoc + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. * @api */ getType() { @@ -302,7 +309,9 @@ class Polygon extends SimpleGeometry { } /** - * @inheritDoc + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. * @api */ intersectsExtent(extent) { @@ -314,7 +323,6 @@ class Polygon extends SimpleGeometry { * Set the coordinates of the polygon. * @param {!Array>} coordinates Coordinates. * @param {GeometryLayout=} opt_layout Layout. - * @override * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/SimpleGeometry.js b/src/ol/geom/SimpleGeometry.js index 5a8e697ad5..c70e5ea753 100644 --- a/src/ol/geom/SimpleGeometry.js +++ b/src/ol/geom/SimpleGeometry.js @@ -41,7 +41,9 @@ class SimpleGeometry extends Geometry { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @protected + * @return {import("../extent.js").Extent} extent Extent. */ computeExtent(extent) { return createOrUpdateFromFlatCoordinates(this.flatCoordinates, @@ -91,7 +93,9 @@ class SimpleGeometry extends Geometry { } /** - * @inheritDoc + * Create a simplified version of this geometry using the Douglas Peucker algorithm. + * @param {number} squaredTolerance Squared tolerance. + * @return {SimpleGeometry} Simplified geometry. */ getSimplifiedGeometry(squaredTolerance) { if (this.simplifiedGeometryRevision !== this.getRevision()) { @@ -224,8 +228,7 @@ class SimpleGeometry extends Geometry { * Scale the geometry (with an optional origin). This modifies the geometry * coordinates in place. * @param {number} sx The scaling factor in the x-direction. - * @param {number=} opt_sy The scaling factor in the y-direction (defaults to - * sx). + * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx). * @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center * of the geometry extent). * @api From d7c83e46513612e451d86cd7b29ee2b12edfbeb9 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 25 Mar 2020 08:43:52 +0100 Subject: [PATCH 277/636] Remove all inheritDoc tags from src/ol/format --- src/ol/format/EsriJSON.js | 24 ++++++++++------ src/ol/format/Feature.js | 10 +++---- src/ol/format/GML2.js | 2 +- src/ol/format/GML3.js | 4 +-- src/ol/format/GML32.js | 2 +- src/ol/format/GMLBase.js | 12 ++++++-- src/ol/format/GPX.js | 11 ++++--- src/ol/format/GeoJSON.js | 26 +++++++++++------ src/ol/format/IGC.js | 12 ++++++-- src/ol/format/JSONFeature.js | 12 ++++---- src/ol/format/KML.js | 12 +++++--- src/ol/format/MVT.js | 7 +++-- src/ol/format/OSMXML.js | 7 +++-- src/ol/format/OWS.js | 8 ++++-- src/ol/format/Polyline.js | 32 ++++++++++++++++----- src/ol/format/TextFeature.js | 12 ++++---- src/ol/format/TopoJSON.js | 11 +++++-- src/ol/format/WFS.js | 15 ++++++---- src/ol/format/WKT.js | 30 +++++++++++++++---- src/ol/format/WMSCapabilities.js | 8 ++++-- src/ol/format/WMSGetFeatureInfo.js | 5 +++- src/ol/format/WMTSCapabilities.js | 8 ++++-- src/ol/format/XMLFeature.js | 46 +++++++++++++++++++----------- 23 files changed, 211 insertions(+), 105 deletions(-) diff --git a/src/ol/format/EsriJSON.js b/src/ol/format/EsriJSON.js index 2a15c14368..f36d1243aa 100644 --- a/src/ol/format/EsriJSON.js +++ b/src/ol/format/EsriJSON.js @@ -102,7 +102,10 @@ class EsriJSON extends JSONFeature { } /** - * @inheritDoc + * @param {Object} object Object. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {import("../Feature.js").default} Feature. */ readFeatureFromObject(object, opt_options) { const esriJSONFeature = /** @type {EsriJSONFeature} */ (object); @@ -123,7 +126,10 @@ class EsriJSON extends JSONFeature { } /** - * @inheritDoc + * @param {Object} object Object. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {Array} Features. */ readFeaturesFromObject(object, opt_options) { const options = opt_options ? opt_options : {}; @@ -143,14 +149,19 @@ class EsriJSON extends JSONFeature { } /** - * @inheritDoc + * @param {EsriJSONGeometry} object Object. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {import("../geom/Geometry.js").default} Geometry. */ readGeometryFromObject(object, opt_options) { - return readGeometry(/** @type {EsriJSONGeometry} */(object), opt_options); + return readGeometry(object, opt_options); } /** - * @inheritDoc + * @param {Object} object Object. + * @protected + * @return {import("../proj/Projection.js").default} Projection. */ readProjectionFromObject(object) { if (object['spatialReference'] && object['spatialReference']['wkid'] !== undefined) { @@ -168,7 +179,6 @@ class EsriJSON extends JSONFeature { * @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @return {EsriJSONGeometry} Object. - * @override * @api */ writeGeometryObject(geometry, opt_options) { @@ -181,7 +191,6 @@ class EsriJSON extends JSONFeature { * @param {import("../Feature.js").default} feature Feature. * @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @return {Object} Object. - * @override * @api */ writeFeatureObject(feature, opt_options) { @@ -212,7 +221,6 @@ class EsriJSON extends JSONFeature { * @param {Array} features Features. * @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @return {EsriJSONFeatureSet} EsriJSON Object. - * @override * @api */ writeFeaturesObject(features, opt_options) { diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index afc8aab5a1..f6d4ec1a13 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -81,7 +81,7 @@ class FeatureFormat { /** * Adds the data projection to the read options. - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {ReadOptions=} opt_options Options. * @return {ReadOptions|undefined} Options. * @protected @@ -132,7 +132,7 @@ class FeatureFormat { * Read a single feature from a source. * * @abstract - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {ReadOptions=} opt_options Read options. * @return {import("../Feature.js").FeatureLike} Feature. */ @@ -144,7 +144,7 @@ class FeatureFormat { * Read all features from a source. * * @abstract - * @param {Document|Node|ArrayBuffer|Object|string} source Source. + * @param {Document|Element|ArrayBuffer|Object|string} source Source. * @param {ReadOptions=} opt_options Read options. * @return {Array} Features. */ @@ -156,7 +156,7 @@ class FeatureFormat { * Read a single geometry from a source. * * @abstract - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {ReadOptions=} opt_options Read options. * @return {import("../geom/Geometry.js").default} Geometry. */ @@ -168,7 +168,7 @@ class FeatureFormat { * Read the projection from a source. * * @abstract - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @return {import("../proj/Projection.js").default} Projection. */ readProjection(source) { diff --git a/src/ol/format/GML2.js b/src/ol/format/GML2.js index 596ff706bd..0842d2ac07 100644 --- a/src/ol/format/GML2.js +++ b/src/ol/format/GML2.js @@ -53,7 +53,7 @@ class GML2 extends GMLBase { makeArrayPusher(this.readFeaturesInternal); /** - * @inheritDoc + * @type {string} */ this.schemaLocation = options.schemaLocation ? options.schemaLocation : schemaLocation; diff --git a/src/ol/format/GML3.js b/src/ol/format/GML3.js index e6fd12d07d..b2929794f5 100644 --- a/src/ol/format/GML3.js +++ b/src/ol/format/GML3.js @@ -86,7 +86,7 @@ class GML3 extends GMLBase { options.multiSurface : true; /** - * @inheritDoc + * @type {string} */ this.schemaLocation = options.schemaLocation ? options.schemaLocation : schemaLocation; @@ -866,7 +866,6 @@ class GML3 extends GMLBase { * @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("./Feature.js").WriteOptions=} opt_options Options. * @return {Node} Node. - * @override * @api */ writeGeometryNode(geometry, opt_options) { @@ -888,7 +887,6 @@ class GML3 extends GMLBase { * @param {Array} features Features. * @param {import("./Feature.js").WriteOptions=} opt_options Options. * @return {Element} Node. - * @override * @api */ writeFeaturesNode(features, opt_options) { diff --git a/src/ol/format/GML32.js b/src/ol/format/GML32.js index 1cae5f8dd7..777829cecf 100644 --- a/src/ol/format/GML32.js +++ b/src/ol/format/GML32.js @@ -22,7 +22,7 @@ class GML32 extends GML3 { super(options); /** - * @inheritDoc + * @type {string} */ this.schemaLocation = options.schemaLocation ? options.schemaLocation : this.namespace + ' http://schemas.opengis.net/gml/3.2.1/gml.xsd'; diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js index d0f5c7b05a..c3a726a484 100644 --- a/src/ol/format/GMLBase.js +++ b/src/ol/format/GMLBase.js @@ -470,7 +470,10 @@ class GMLBase extends XMLFeature { } /** - * @inheritDoc + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @protected + * @return {import("../geom/Geometry.js").default|import("../extent.js").Extent} Geometry. */ //@ts-ignore readGeometryFromNode(node, opt_options) { @@ -480,7 +483,9 @@ class GMLBase extends XMLFeature { } /** - * @inheritDoc + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {Array} Features. */ readFeaturesFromNode(node, opt_options) { const options = { @@ -495,7 +500,8 @@ class GMLBase extends XMLFeature { } /** - * @inheritDoc + * @param {Element} node Node. + * @return {import("../proj/Projection.js").default} Projection. */ readProjectionFromNode(node) { return getProjection(this.srsName ? this.srsName : node.firstElementChild.getAttribute('srsName')); diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index ec56119232..d1be09df7b 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -130,7 +130,7 @@ class GPX extends XMLFeature { /** - * @inheritDoc + * @type {import("../proj/Projection.js").default} */ this.dataProjection = getProjection('EPSG:4326'); @@ -160,7 +160,9 @@ class GPX extends XMLFeature { } /** - * @inheritDoc + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {import("../Feature.js").default} Feature. */ readFeatureFromNode(node, opt_options) { if (!includes(NAMESPACE_URIS, node.namespaceURI)) { @@ -179,7 +181,9 @@ class GPX extends XMLFeature { } /** - * @inheritDoc + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {Array} Features. */ readFeaturesFromNode(node, opt_options) { if (!includes(NAMESPACE_URIS, node.namespaceURI)) { @@ -207,7 +211,6 @@ class GPX extends XMLFeature { * @param {Array} features Features. * @param {import("./Feature.js").WriteOptions=} opt_options Options. * @return {Node} Node. - * @override * @api */ writeFeaturesNode(features, opt_options) { diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index 2e3f30dee2..0ea2a67ee9 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -63,7 +63,7 @@ class GeoJSON extends JSONFeature { super(); /** - * @inheritDoc + * @type {import("../proj/Projection.js").default} */ this.dataProjection = getProjection( options.dataProjection ? @@ -90,7 +90,10 @@ class GeoJSON extends JSONFeature { } /** - * @inheritDoc + * @param {Object} object Object. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {import("../Feature.js").default} Feature. */ readFeatureFromObject(object, opt_options) { /** @@ -127,7 +130,10 @@ class GeoJSON extends JSONFeature { } /** - * @inheritDoc + * @param {Object} object Object. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {Array} Features. */ readFeaturesFromObject(object, opt_options) { const geoJSONObject = /** @type {GeoJSONObject} */ (object); @@ -147,14 +153,19 @@ class GeoJSON extends JSONFeature { } /** - * @inheritDoc + * @param {GeoJSONGeometry} object Object. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {import("../geom/Geometry.js").default} Geometry. */ readGeometryFromObject(object, opt_options) { - return readGeometry(/** @type {GeoJSONGeometry} */ (object), opt_options); + return readGeometry(object, opt_options); } /** - * @inheritDoc + * @param {Object} object Object. + * @protected + * @return {import("../proj/Projection.js").default} Projection. */ readProjectionFromObject(object) { const crs = object['crs']; @@ -181,7 +192,6 @@ class GeoJSON extends JSONFeature { * @param {import("../Feature.js").default} feature Feature. * @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @return {GeoJSONFeature} Object. - * @override * @api */ writeFeatureObject(feature, opt_options) { @@ -218,7 +228,6 @@ class GeoJSON extends JSONFeature { * @param {Array} features Features. * @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @return {GeoJSONFeatureCollection} GeoJSON Object. - * @override * @api */ writeFeaturesObject(features, opt_options) { @@ -239,7 +248,6 @@ class GeoJSON extends JSONFeature { * @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("./Feature.js").WriteOptions=} opt_options Write options. * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object. - * @override * @api */ writeGeometryObject(geometry, opt_options) { diff --git a/src/ol/format/IGC.js b/src/ol/format/IGC.js index fb2d71f306..3c46e8af47 100644 --- a/src/ol/format/IGC.js +++ b/src/ol/format/IGC.js @@ -77,7 +77,7 @@ class IGC extends TextFeature { const options = opt_options ? opt_options : {}; /** - * @inheritDoc + * @type {import("../proj/Projection.js").default} */ this.dataProjection = getProjection('EPSG:4326'); @@ -89,7 +89,10 @@ class IGC extends TextFeature { } /** - * @inheritDoc + * @protected + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @return {import("../Feature.js").default} Feature. */ readFeatureFromText(text, opt_options) { const altitudeMode = this.altitudeMode_; @@ -164,7 +167,10 @@ class IGC extends TextFeature { } /** - * @inheritDoc + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {Array} Features. */ readFeaturesFromText(text, opt_options) { const feature = this.readFeatureFromText(text, opt_options); diff --git a/src/ol/format/JSONFeature.js b/src/ol/format/JSONFeature.js index 2186befc84..483c192752 100644 --- a/src/ol/format/JSONFeature.js +++ b/src/ol/format/JSONFeature.js @@ -19,7 +19,7 @@ class JSONFeature extends FeatureFormat { } /** - * @inheritDoc + * @return {import("./FormatType.js").default} Format. */ getType() { return FormatType.JSON; @@ -29,7 +29,7 @@ class JSONFeature extends FeatureFormat { * Read a feature. Only works for a single feature. Use `readFeatures` to * read a feature collection. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {ArrayBuffer|Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @return {import("../Feature.js").default} Feature. * @api @@ -43,7 +43,7 @@ class JSONFeature extends FeatureFormat { * Read all features. Works with both a single feature and a feature * collection. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {ArrayBuffer|Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @return {Array} Features. * @api @@ -78,7 +78,7 @@ class JSONFeature extends FeatureFormat { /** * Read a geometry. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {ArrayBuffer|Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @return {import("../geom/Geometry.js").default} Geometry. * @api @@ -102,7 +102,7 @@ class JSONFeature extends FeatureFormat { /** * Read the projection. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {ArrayBuffer|Document|Element|Object|string} source Source. * @return {import("../proj/Projection.js").default} Projection. * @api */ @@ -189,7 +189,7 @@ class JSONFeature extends FeatureFormat { /** - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @return {Object} Object. */ function getObject(source) { diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 7cbe238247..1c1608d935 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -427,7 +427,7 @@ class KML extends XMLFeature { } /** - * @inheritDoc + * @type {import("../proj/Projection.js").default} */ this.dataProjection = getProjection('EPSG:4326'); @@ -598,7 +598,9 @@ class KML extends XMLFeature { } /** - * @inheritDoc + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {import("../Feature.js").default} Feature. */ readFeatureFromNode(node, opt_options) { if (!includes(NAMESPACE_URIS, node.namespaceURI)) { @@ -614,7 +616,10 @@ class KML extends XMLFeature { } /** - * @inheritDoc + * @protected + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {Array} Features. */ readFeaturesFromNode(node, opt_options) { if (!includes(NAMESPACE_URIS, node.namespaceURI)) { @@ -847,7 +852,6 @@ class KML extends XMLFeature { * @param {Array} features Features. * @param {import("./Feature.js").WriteOptions=} opt_options Options. * @return {Node} Node. - * @override * @api */ writeFeaturesNode(features, opt_options) { diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index c8c8e2c77e..40c80480e7 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -234,7 +234,7 @@ class MVT extends FeatureFormat { } /** - * @inheritDoc + * @return {import("./FormatType.js").default} Format. */ getType() { return FormatType.ARRAY_BUFFER; @@ -277,7 +277,10 @@ class MVT extends FeatureFormat { } /** - * @inheritDoc + * Read the projection from the source. + * + * @param {Document|Element|Object|string} source Source. + * @return {import("../proj/Projection.js").default} Projection. * @api */ readProjection(source) { diff --git a/src/ol/format/OSMXML.js b/src/ol/format/OSMXML.js index d74ddd2aa2..cef247f8a6 100644 --- a/src/ol/format/OSMXML.js +++ b/src/ol/format/OSMXML.js @@ -58,13 +58,16 @@ class OSMXML extends XMLFeature { super(); /** - * @inheritDoc + * @type {import("../proj/Projection.js").default} */ this.dataProjection = getProjection('EPSG:4326'); } /** - * @inheritDoc + * @protected + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {Array} Features. */ readFeaturesFromNode(node, opt_options) { const options = this.getReadOptions(node, opt_options); diff --git a/src/ol/format/OWS.js b/src/ol/format/OWS.js index 1c4578afa9..e9dd976dd8 100644 --- a/src/ol/format/OWS.js +++ b/src/ol/format/OWS.js @@ -33,19 +33,21 @@ class OWS extends XML { } /** - * @inheritDoc + * @param {Document} doc Document. + * @return {Object} Object */ readFromDocument(doc) { for (let n = doc.firstChild; n; n = n.nextSibling) { if (n.nodeType == Node.ELEMENT_NODE) { - return this.readFromNode(n); + return this.readFromNode(/** @type {Element} */ (n)); } } return null; } /** - * @inheritDoc + * @param {Element} node Node. + * @return {Object} Object */ readFromNode(node) { const owsObject = pushParseAndPop({}, diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index d28f2c4e2f..8900422cd5 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -47,7 +47,7 @@ class Polyline extends TextFeature { /** - * @inheritDoc + * @type {import("../proj/Projection.js").default} */ this.dataProjection = getProjection('EPSG:4326'); @@ -66,7 +66,10 @@ class Polyline extends TextFeature { } /** - * @inheritDoc + * @protected + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @return {import("../Feature.js").default} Feature. */ readFeatureFromText(text, opt_options) { const geometry = this.readGeometryFromText(text, opt_options); @@ -74,7 +77,10 @@ class Polyline extends TextFeature { } /** - * @inheritDoc + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {Array} Features. */ readFeaturesFromText(text, opt_options) { const feature = this.readFeatureFromText(text, opt_options); @@ -82,7 +88,10 @@ class Polyline extends TextFeature { } /** - * @inheritDoc + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {import("../geom/Geometry.js").default} Geometry. */ readGeometryFromText(text, opt_options) { const stride = getStrideForLayout(this.geometryLayout_); @@ -95,7 +104,10 @@ class Polyline extends TextFeature { } /** - * @inheritDoc + * @param {import("../Feature.js").default} feature Features. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. */ writeFeatureText(feature, opt_options) { const geometry = feature.getGeometry(); @@ -108,14 +120,20 @@ class Polyline extends TextFeature { } /** - * @inheritDoc + * @param {Array} features Features. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. */ writeFeaturesText(features, opt_options) { return this.writeFeatureText(features[0], opt_options); } /** - * @inheritDoc + * @param {LineString} geometry Geometry. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. */ writeGeometryText(geometry, opt_options) { geometry = /** @type {LineString} */ diff --git a/src/ol/format/TextFeature.js b/src/ol/format/TextFeature.js index 926ae832e4..c1f40290d7 100644 --- a/src/ol/format/TextFeature.js +++ b/src/ol/format/TextFeature.js @@ -19,7 +19,7 @@ class TextFeature extends FeatureFormat { } /** - * @inheritDoc + * @return {import("./FormatType.js").default} Format. */ getType() { return FormatType.TEXT; @@ -28,7 +28,7 @@ class TextFeature extends FeatureFormat { /** * Read the feature from the source. * - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @return {import("../Feature.js").default} Feature. * @api @@ -51,7 +51,7 @@ class TextFeature extends FeatureFormat { /** * Read the features from the source. * - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @return {Array} Features. * @api @@ -74,7 +74,7 @@ class TextFeature extends FeatureFormat { /** * Read the geometry from the source. * - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @return {import("../geom/Geometry.js").default} Geometry. * @api @@ -97,7 +97,7 @@ class TextFeature extends FeatureFormat { /** * Read the projection from the source. * - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @return {import("../proj/Projection.js").default} Projection. * @api */ @@ -186,7 +186,7 @@ class TextFeature extends FeatureFormat { /** - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @return {string} Text. */ function getText(source) { diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index c8cc330cf7..37d3d7bcb9 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -78,7 +78,7 @@ class TopoJSON extends JSONFeature { this.layers_ = options.layers ? options.layers : null; /** - * @inheritDoc + * @type {import("../proj/Projection.js").default} */ this.dataProjection = getProjection( options.dataProjection ? @@ -87,7 +87,10 @@ class TopoJSON extends JSONFeature { } /** - * @inheritDoc + * @param {Object} object Object. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {Array} Features. */ readFeaturesFromObject(object, opt_options) { if (object.type == 'Topology') { @@ -128,7 +131,9 @@ class TopoJSON extends JSONFeature { } /** - * @inheritDoc + * @param {Object} object Object. + * @protected + * @return {import("../proj/Projection.js").default} Projection. */ readProjectionFromObject(object) { return this.dataProjection; diff --git a/src/ol/format/WFS.js b/src/ol/format/WFS.js index e3cd863db2..435dc870e9 100644 --- a/src/ol/format/WFS.js +++ b/src/ol/format/WFS.js @@ -254,7 +254,10 @@ class WFS extends XMLFeature { } /** - * @inheritDoc + * @protected + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {Array} Features. */ readFeaturesFromNode(node, opt_options) { /** @type {import("../xml.js").NodeStackItem} */ @@ -513,19 +516,21 @@ class WFS extends XMLFeature { } /** - * @inheritDoc + * @param {Document} doc Document. + * @return {import("../proj/Projection.js").default} Projection. */ readProjectionFromDocument(doc) { - for (let n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) { + for (let n = doc.firstChild; n; n = n.nextSibling) { if (n.nodeType == Node.ELEMENT_NODE) { - return this.readProjectionFromNode(n); + return this.readProjectionFromNode(/** @type {Element} */ (n)); } } return null; } /** - * @inheritDoc + * @param {Element} node Node. + * @return {import("../proj/Projection.js").default} Projection. */ readProjectionFromNode(node) { if (node.firstElementChild && diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index c4c6ad2eb2..20660e484f 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -642,7 +642,10 @@ class WKT extends TextFeature { } /** - * @inheritDoc + * @protected + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @return {import("../Feature.js").default} Feature. */ readFeatureFromText(text, opt_options) { const geom = this.readGeometryFromText(text, opt_options); @@ -655,7 +658,10 @@ class WKT extends TextFeature { } /** - * @inheritDoc + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {Array} Features. */ readFeaturesFromText(text, opt_options) { let geometries = []; @@ -677,7 +683,10 @@ class WKT extends TextFeature { } /** - * @inheritDoc + * @param {string} text Text. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @protected + * @return {import("../geom/Geometry.js").default} Geometry. */ readGeometryFromText(text, opt_options) { const geometry = this.parse_(text); @@ -689,7 +698,10 @@ class WKT extends TextFeature { } /** - * @inheritDoc + * @param {import("../Feature.js").default} feature Features. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. */ writeFeatureText(feature, opt_options) { const geometry = feature.getGeometry(); @@ -700,7 +712,10 @@ class WKT extends TextFeature { } /** - * @inheritDoc + * @param {Array} features Features. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. */ writeFeaturesText(features, opt_options) { if (features.length == 1) { @@ -715,7 +730,10 @@ class WKT extends TextFeature { } /** - * @inheritDoc + * @param {import("../geom/Geometry.js").default} geometry Geometry. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. */ writeGeometryText(geometry, opt_options) { return encode(transformGeometryWithOptions(geometry, true, opt_options)); diff --git a/src/ol/format/WMSCapabilities.js b/src/ol/format/WMSCapabilities.js index 7dda2be9de..82b5874383 100644 --- a/src/ol/format/WMSCapabilities.js +++ b/src/ol/format/WMSCapabilities.js @@ -60,19 +60,21 @@ class WMSCapabilities extends XML { } /** - * @inheritDoc + * @param {Document} doc Document. + * @return {Object} Object */ readFromDocument(doc) { for (let n = doc.firstChild; n; n = n.nextSibling) { if (n.nodeType == Node.ELEMENT_NODE) { - return this.readFromNode(n); + return this.readFromNode(/** @type {Element} */ (n)); } } return null; } /** - * @inheritDoc + * @param {Element} node Node. + * @return {Object} Object */ readFromNode(node) { this.version = node.getAttribute('version').trim(); diff --git a/src/ol/format/WMSGetFeatureInfo.js b/src/ol/format/WMSGetFeatureInfo.js index f63f88cb54..ccc8e2a136 100644 --- a/src/ol/format/WMSGetFeatureInfo.js +++ b/src/ol/format/WMSGetFeatureInfo.js @@ -144,7 +144,10 @@ class WMSGetFeatureInfo extends XMLFeature { } /** - * @inheritDoc + * @protected + * @param {Element} node Node. + * @param {import("./Feature.js").ReadOptions=} opt_options Options. + * @return {Array} Features. */ readFeaturesFromNode(node, opt_options) { const options = {}; diff --git a/src/ol/format/WMTSCapabilities.js b/src/ol/format/WMTSCapabilities.js index bd1629f1d7..cfdcdd8cb4 100644 --- a/src/ol/format/WMTSCapabilities.js +++ b/src/ol/format/WMTSCapabilities.js @@ -59,19 +59,21 @@ class WMTSCapabilities extends XML { } /** - * @inheritDoc + * @param {Document} doc Document. + * @return {Object} Object */ readFromDocument(doc) { for (let n = doc.firstChild; n; n = n.nextSibling) { if (n.nodeType == Node.ELEMENT_NODE) { - return this.readFromNode(n); + return this.readFromNode(/** @type {Element} */ (n)); } } return null; } /** - * @inheritDoc + * @param {Element} node Node. + * @return {Object} Object */ readFromNode(node) { let version = node.getAttribute('version'); diff --git a/src/ol/format/XMLFeature.js b/src/ol/format/XMLFeature.js index 0f413e21c3..550b78dca7 100644 --- a/src/ol/format/XMLFeature.js +++ b/src/ol/format/XMLFeature.js @@ -27,7 +27,7 @@ class XMLFeature extends FeatureFormat { } /** - * @inheritDoc + * @return {import("./FormatType.js").default} Format. */ getType() { return FormatType.XML; @@ -36,7 +36,7 @@ class XMLFeature extends FeatureFormat { /** * Read a single feature. * - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @return {import("../Feature.js").default} Feature. * @api @@ -50,7 +50,7 @@ class XMLFeature extends FeatureFormat { } else if (isDocument(source)) { return this.readFeatureFromDocument(/** @type {Document} */ (source), opt_options); } else { - return this.readFeatureFromNode(/** @type {Node} */ (source), opt_options); + return this.readFeatureFromNode(/** @type {Element} */ (source), opt_options); } } @@ -69,7 +69,7 @@ class XMLFeature extends FeatureFormat { } /** - * @param {Node} node Node. + * @param {Element} node Node. * @param {import("./Feature.js").ReadOptions=} opt_options Options. * @return {import("../Feature.js").default} Feature. */ @@ -80,7 +80,7 @@ class XMLFeature extends FeatureFormat { /** * Read all features from a feature collection. * - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @param {import("./Feature.js").ReadOptions=} opt_options Options. * @return {Array} Features. * @api @@ -95,7 +95,7 @@ class XMLFeature extends FeatureFormat { return this.readFeaturesFromDocument( /** @type {Document} */ (source), opt_options); } else { - return this.readFeaturesFromNode(/** @type {Node} */ (source), opt_options); + return this.readFeaturesFromNode(/** @type {Element} */ (source), opt_options); } } @@ -108,9 +108,9 @@ class XMLFeature extends FeatureFormat { readFeaturesFromDocument(doc, opt_options) { /** @type {Array} */ const features = []; - for (let n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) { + for (let n = doc.firstChild; n; n = n.nextSibling) { if (n.nodeType == Node.ELEMENT_NODE) { - extend(features, this.readFeaturesFromNode(n, opt_options)); + extend(features, this.readFeaturesFromNode(/** @type {Element} */ (n), opt_options)); } } return features; @@ -118,7 +118,7 @@ class XMLFeature extends FeatureFormat { /** * @abstract - * @param {Node} node Node. + * @param {Element} node Node. * @param {import("./Feature.js").ReadOptions=} opt_options Options. * @protected * @return {Array} Features. @@ -128,7 +128,11 @@ class XMLFeature extends FeatureFormat { } /** - * @inheritDoc + * Read a single geometry from a source. + * + * @param {Document|Element|Object|string} source Source. + * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @return {import("../geom/Geometry.js").default} Geometry. */ readGeometry(source, opt_options) { if (!source) { @@ -140,7 +144,7 @@ class XMLFeature extends FeatureFormat { return this.readGeometryFromDocument( /** @type {Document} */ (source), opt_options); } else { - return this.readGeometryFromNode(/** @type {Node} */ (source), opt_options); + return this.readGeometryFromNode(/** @type {Element} */ (source), opt_options); } } @@ -155,7 +159,7 @@ class XMLFeature extends FeatureFormat { } /** - * @param {Node} node Node. + * @param {Element} node Node. * @param {import("./Feature.js").ReadOptions=} opt_options Options. * @protected * @return {import("../geom/Geometry.js").default} Geometry. @@ -167,7 +171,7 @@ class XMLFeature extends FeatureFormat { /** * Read the projection from the source. * - * @param {Document|Node|Object|string} source Source. + * @param {Document|Element|Object|string} source Source. * @return {import("../proj/Projection.js").default} Projection. * @api */ @@ -180,7 +184,7 @@ class XMLFeature extends FeatureFormat { } else if (isDocument(source)) { return this.readProjectionFromDocument(/** @type {Document} */ (source)); } else { - return this.readProjectionFromNode(/** @type {Node} */ (source)); + return this.readProjectionFromNode(/** @type {Element} */ (source)); } } @@ -194,7 +198,7 @@ class XMLFeature extends FeatureFormat { } /** - * @param {Node} node Node. + * @param {Element} node Node. * @protected * @return {import("../proj/Projection.js").default} Projection. */ @@ -203,7 +207,11 @@ class XMLFeature extends FeatureFormat { } /** - * @inheritDoc + * Encode a feature as string. + * + * @param {import("../Feature.js").default} feature Feature. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @return {string} Encoded feature. */ writeFeature(feature, opt_options) { const node = this.writeFeatureNode(feature, opt_options); @@ -243,7 +251,11 @@ class XMLFeature extends FeatureFormat { } /** - * @inheritDoc + * Encode a geometry as string. + * + * @param {import("../geom/Geometry.js").default} geometry Geometry. + * @param {import("./Feature.js").WriteOptions=} opt_options Write options. + * @return {string} Encoded geometry. */ writeGeometry(geometry, opt_options) { const node = this.writeGeometryNode(geometry, opt_options); From 6522e6a17febcb60ae0fb3b231ae1f8fcea3c9fd Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 25 Mar 2020 08:51:27 +0100 Subject: [PATCH 278/636] Pass the id field name as a new param --- src/ol/format/EsriJSON.js | 14 +++++++------- test/spec/ol/format/esrijson.test.js | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ol/format/EsriJSON.js b/src/ol/format/EsriJSON.js index f36d1243aa..37d4dcee8e 100644 --- a/src/ol/format/EsriJSON.js +++ b/src/ol/format/EsriJSON.js @@ -104,10 +104,11 @@ class EsriJSON extends JSONFeature { /** * @param {Object} object Object. * @param {import("./Feature.js").ReadOptions=} opt_options Read options. + * @param {string=} opt_idField Name of the field where to get the id from. * @protected * @return {import("../Feature.js").default} Feature. */ - readFeatureFromObject(object, opt_options) { + readFeatureFromObject(object, opt_options, opt_idField) { const esriJSONFeature = /** @type {EsriJSONFeature} */ (object); const geometry = readGeometry(esriJSONFeature.geometry, opt_options); const feature = new Feature(); @@ -115,12 +116,12 @@ class EsriJSON extends JSONFeature { feature.setGeometryName(this.geometryName_); } feature.setGeometry(geometry); - if (opt_options && opt_options.idField && - esriJSONFeature.attributes[opt_options.idField]) { - feature.setId(/** @type {number} */(esriJSONFeature.attributes[opt_options.idField])); - } if (esriJSONFeature.attributes) { feature.setProperties(esriJSONFeature.attributes, true); + const id = esriJSONFeature.attributes[opt_idField]; + if (id !== undefined) { + feature.setId(/** @type {number} */(id)); + } } return feature; } @@ -138,9 +139,8 @@ class EsriJSON extends JSONFeature { /** @type {Array} */ const features = []; const esriJSONFeatures = esriJSONFeatureSet.features; - options.idField = object.objectIdFieldName; for (let i = 0, ii = esriJSONFeatures.length; i < ii; ++i) { - features.push(this.readFeatureFromObject(esriJSONFeatures[i], options)); + features.push(this.readFeatureFromObject(esriJSONFeatures[i], options, object.objectIdFieldName)); } return features; } else { diff --git a/test/spec/ol/format/esrijson.test.js b/test/spec/ol/format/esrijson.test.js index 7513708d6d..c6490b3ba9 100644 --- a/test/spec/ol/format/esrijson.test.js +++ b/test/spec/ol/format/esrijson.test.js @@ -97,6 +97,7 @@ describe('ol.format.EsriJSON', function() { }; const featureCollectionEsriJSON = { + objectIdFieldName: 'prop0', features: [pointEsriJSON, lineStringEsriJSON, polygonEsriJSON] }; @@ -230,6 +231,10 @@ describe('ol.format.EsriJSON', function() { expect(features[0].getGeometry()).to.be.an(Point); expect(features[1].getGeometry()).to.be.an(LineString); expect(features[2].getGeometry()).to.be.an(Polygon); + + expect(features[0].getId()).to.eql('value0'); + expect(features[1].getId()).to.eql('value0'); + expect(features[2].getId()).to.eql('value0'); }); it('can read and transform a point', function() { From 706dd3c87c88e02512914de21c6d84b83a0095b1 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 26 Mar 2020 10:30:46 +0100 Subject: [PATCH 279/636] Remove all inheritDoc tags from src/ol/control --- src/ol/control/Control.js | 2 +- src/ol/control/FullScreen.js | 5 ++++- src/ol/control/MousePosition.js | 5 ++++- src/ol/control/OverviewMap.js | 5 ++++- src/ol/control/ZoomSlider.js | 6 +++++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/ol/control/Control.js b/src/ol/control/Control.js index 2f03317507..1f54f28ce7 100644 --- a/src/ol/control/Control.js +++ b/src/ol/control/Control.js @@ -91,7 +91,7 @@ class Control extends BaseObject { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { removeNode(this.element); diff --git a/src/ol/control/FullScreen.js b/src/ol/control/FullScreen.js index d3741fb8e6..d2f82a3268 100644 --- a/src/ol/control/FullScreen.js +++ b/src/ol/control/FullScreen.js @@ -213,7 +213,10 @@ class FullScreen extends Control { } /** - * @inheritDoc + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. * @api */ setMap(map) { diff --git a/src/ol/control/MousePosition.js b/src/ol/control/MousePosition.js index 3a2c017999..b55796638e 100644 --- a/src/ol/control/MousePosition.js +++ b/src/ol/control/MousePosition.js @@ -162,7 +162,10 @@ class MousePosition extends Control { } /** - * @inheritDoc + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. * @api */ setMap(map) { diff --git a/src/ol/control/OverviewMap.js b/src/ol/control/OverviewMap.js index a77f8ae698..a64b15979d 100644 --- a/src/ol/control/OverviewMap.js +++ b/src/ol/control/OverviewMap.js @@ -255,7 +255,10 @@ class OverviewMap extends Control { } /** - * @inheritDoc + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. * @api */ setMap(map) { diff --git a/src/ol/control/ZoomSlider.js b/src/ol/control/ZoomSlider.js index 58f2229d40..b65ec01808 100644 --- a/src/ol/control/ZoomSlider.js +++ b/src/ol/control/ZoomSlider.js @@ -148,7 +148,11 @@ class ZoomSlider extends Control { } /** - * @inheritDoc + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. + * @api */ setMap(map) { super.setMap(map); From da8ef43db75af09a1d0f2a27056a638201a0f44a Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 26 Mar 2020 11:03:08 +0100 Subject: [PATCH 280/636] Remove all inheritDoc tags from src/ol/interaction --- src/ol/interaction/DragAndDrop.js | 10 ++++++++-- src/ol/interaction/DragBox.js | 11 ++++++++--- src/ol/interaction/DragPan.js | 11 ++++++++--- src/ol/interaction/DragRotate.js | 11 ++++++++--- src/ol/interaction/DragRotateAndZoom.js | 11 ++++++++--- src/ol/interaction/Draw.js | 18 ++++++++++++----- src/ol/interaction/Extent.js | 22 ++++++++++++++------- src/ol/interaction/Modify.js | 26 ++++++++++++++++++------- src/ol/interaction/MouseWheelZoom.js | 3 ++- src/ol/interaction/PinchRotate.js | 11 ++++++++--- src/ol/interaction/PinchZoom.js | 11 ++++++++--- src/ol/interaction/Pointer.js | 5 +++-- src/ol/interaction/Select.js | 1 - src/ol/interaction/Snap.js | 12 +++++++++--- src/ol/interaction/Translate.js | 19 +++++++++++++----- 15 files changed, 131 insertions(+), 51 deletions(-) diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 5cb69e3b08..fe6c9c1ba8 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -185,7 +185,10 @@ class DragAndDrop extends Interaction { } /** - * @inheritDoc + * Activate or deactivate the interaction. + * @param {boolean} active Active. + * @observable + * @api */ setActive(active) { if (!this.getActive() && active) { @@ -198,7 +201,10 @@ class DragAndDrop extends Interaction { } /** - * @inheritDoc + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. */ setMap(map) { this.unregisterListeners_(); diff --git a/src/ol/interaction/DragBox.js b/src/ol/interaction/DragBox.js index 28ae6ecbe0..5d9f93658e 100644 --- a/src/ol/interaction/DragBox.js +++ b/src/ol/interaction/DragBox.js @@ -181,7 +181,8 @@ class DragBox extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. */ handleDragEvent(mapBrowserEvent) { this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel); @@ -191,7 +192,9 @@ class DragBox extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(mapBrowserEvent) { this.box_.setMap(null); @@ -205,7 +208,9 @@ class DragBox extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(mapBrowserEvent) { if (this.condition_(mapBrowserEvent)) { diff --git a/src/ol/interaction/DragPan.js b/src/ol/interaction/DragPan.js index 2b3f6ba755..38dd51e1a0 100644 --- a/src/ol/interaction/DragPan.js +++ b/src/ol/interaction/DragPan.js @@ -86,7 +86,8 @@ class DragPan extends PointerInteraction { /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. */ handleDragEvent(mapBrowserEvent) { if (!this.panning_) { @@ -121,7 +122,9 @@ class DragPan extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(mapBrowserEvent) { const map = mapBrowserEvent.map; @@ -159,7 +162,9 @@ class DragPan extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(mapBrowserEvent) { if (this.targetPointers.length > 0 && this.conditionInternal_(mapBrowserEvent)) { diff --git a/src/ol/interaction/DragRotate.js b/src/ol/interaction/DragRotate.js index 2749785fd6..2a705601b7 100644 --- a/src/ol/interaction/DragRotate.js +++ b/src/ol/interaction/DragRotate.js @@ -60,7 +60,8 @@ class DragRotate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. */ handleDragEvent(mapBrowserEvent) { if (!mouseOnly(mapBrowserEvent)) { @@ -85,7 +86,9 @@ class DragRotate extends PointerInteraction { /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(mapBrowserEvent) { if (!mouseOnly(mapBrowserEvent)) { @@ -100,7 +103,9 @@ class DragRotate extends PointerInteraction { /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(mapBrowserEvent) { if (!mouseOnly(mapBrowserEvent)) { diff --git a/src/ol/interaction/DragRotateAndZoom.js b/src/ol/interaction/DragRotateAndZoom.js index 593bc9e4ee..4dd5188461 100644 --- a/src/ol/interaction/DragRotateAndZoom.js +++ b/src/ol/interaction/DragRotateAndZoom.js @@ -70,7 +70,8 @@ class DragRotateAndZoom extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. */ handleDragEvent(mapBrowserEvent) { if (!mouseOnly(mapBrowserEvent)) { @@ -100,7 +101,9 @@ class DragRotateAndZoom extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(mapBrowserEvent) { if (!mouseOnly(mapBrowserEvent)) { @@ -116,7 +119,9 @@ class DragRotateAndZoom extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(mapBrowserEvent) { if (!mouseOnly(mapBrowserEvent)) { diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index b00c73f25c..a1b76655a1 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -465,7 +465,10 @@ class Draw extends PointerInteraction { } /** - * @inheritDoc + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. */ setMap(map) { super.setMap(map); @@ -483,7 +486,8 @@ class Draw extends PointerInteraction { /** * Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing. - * @override + * @param {import("../MapBrowserPointerEvent.js").default} event Map browser event. + * @return {boolean} `false` to stop event propagation. * @api */ handleEvent(event) { @@ -520,7 +524,7 @@ class Draw extends PointerInteraction { pass = event.type === MapBrowserEventType.POINTERMOVE; if (pass && this.freehand_) { pass = this.handlePointerMove_(event); - } else if (/** @type {MapBrowserPointerEvent} */ (event).pointerEvent.pointerType == 'mouse' || + } else if (event.pointerEvent.pointerType == 'mouse' || (event.type === MapBrowserEventType.POINTERDRAG && this.downTimeout_ === undefined)) { this.handlePointerMove_(event); } @@ -532,7 +536,9 @@ class Draw extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} event Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(event) { this.shouldHandle_ = !this.freehand_; @@ -559,7 +565,9 @@ class Draw extends PointerInteraction { /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} event Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(event) { let pass = true; diff --git a/src/ol/interaction/Extent.js b/src/ol/interaction/Extent.js index 5ca737e2bb..2f3a5b32fb 100644 --- a/src/ol/interaction/Extent.js +++ b/src/ol/interaction/Extent.js @@ -273,10 +273,11 @@ class Extent extends PointerInteraction { } /** - * @inheritDoc + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} `false` to stop event propagation. */ handleEvent(mapBrowserEvent) { - if (!(/** @type {import("../MapBrowserPointerEvent.js").default} */ (mapBrowserEvent).pointerEvent)) { + if (!mapBrowserEvent.pointerEvent) { return true; } //display pointer (if not dragging) @@ -290,7 +291,9 @@ class Extent extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(mapBrowserEvent) { const pixel = mapBrowserEvent.pixel; @@ -347,7 +350,8 @@ class Extent extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. */ handleDragEvent(mapBrowserEvent) { if (this.pointerHandler_) { @@ -355,11 +359,12 @@ class Extent extends PointerInteraction { this.setExtent(this.pointerHandler_(pixelCoordinate)); this.createOrUpdatePointerFeature_(pixelCoordinate); } - return true; } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(mapBrowserEvent) { this.pointerHandler_ = null; @@ -372,7 +377,10 @@ class Extent extends PointerInteraction { } /** - * @inheritDoc + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. */ setMap(map) { this.extentOverlay_.setMap(map); diff --git a/src/ol/interaction/Modify.js b/src/ol/interaction/Modify.js index dffdf8e707..61ee477232 100644 --- a/src/ol/interaction/Modify.js +++ b/src/ol/interaction/Modify.js @@ -404,7 +404,10 @@ class Modify extends PointerInteraction { } /** - * @inheritDoc + * Activate or deactivate the interaction. + * @param {boolean} active Active. + * @observable + * @api */ setActive(active) { if (this.vertexFeature_ && !active) { @@ -415,7 +418,10 @@ class Modify extends PointerInteraction { } /** - * @inheritDoc + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. */ setMap(map) { this.overlay_.setMap(map); @@ -702,10 +708,11 @@ class Modify extends PointerInteraction { /** * Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry. - * @override + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} `false` to stop event propagation. */ handleEvent(mapBrowserEvent) { - if (!(/** @type {import("../MapBrowserPointerEvent.js").default} */ (mapBrowserEvent).pointerEvent)) { + if (!mapBrowserEvent.pointerEvent) { return true; } this.lastPointerEvent_ = mapBrowserEvent; @@ -732,7 +739,8 @@ class Modify extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} evt Event. */ handleDragEvent(evt) { this.ignoreNextSingleClick_ = false; @@ -818,7 +826,9 @@ class Modify extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} evt Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(evt) { if (!this.condition_(evt)) { @@ -899,7 +909,9 @@ class Modify extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} evt Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(evt) { for (let i = this.dragSegments_.length - 1; i >= 0; --i) { diff --git a/src/ol/interaction/MouseWheelZoom.js b/src/ol/interaction/MouseWheelZoom.js index 9eb6027c4d..519ea34fe8 100644 --- a/src/ol/interaction/MouseWheelZoom.js +++ b/src/ol/interaction/MouseWheelZoom.js @@ -162,7 +162,8 @@ class MouseWheelZoom extends Interaction { /** * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually * zooms the map. - * @override + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} `false` to stop event propagation. */ handleEvent(mapBrowserEvent) { if (!this.conditionInternal_(mapBrowserEvent)) { diff --git a/src/ol/interaction/PinchRotate.js b/src/ol/interaction/PinchRotate.js index f3ad9b23e0..ab126f1fff 100644 --- a/src/ol/interaction/PinchRotate.js +++ b/src/ol/interaction/PinchRotate.js @@ -75,7 +75,8 @@ class PinchRotate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. */ handleDragEvent(mapBrowserEvent) { let rotationDelta = 0.0; @@ -122,7 +123,9 @@ class PinchRotate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(mapBrowserEvent) { if (this.targetPointers.length < 2) { @@ -136,7 +139,9 @@ class PinchRotate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(mapBrowserEvent) { if (this.targetPointers.length >= 2) { diff --git a/src/ol/interaction/PinchZoom.js b/src/ol/interaction/PinchZoom.js index 31aa44dd16..775edc6adb 100644 --- a/src/ol/interaction/PinchZoom.js +++ b/src/ol/interaction/PinchZoom.js @@ -60,7 +60,8 @@ class PinchZoom extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. */ handleDragEvent(mapBrowserEvent) { let scaleDelta = 1.0; @@ -99,7 +100,9 @@ class PinchZoom extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(mapBrowserEvent) { if (this.targetPointers.length < 2) { @@ -114,7 +117,9 @@ class PinchZoom extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(mapBrowserEvent) { if (this.targetPointers.length >= 2) { diff --git a/src/ol/interaction/Pointer.js b/src/ol/interaction/Pointer.js index 2a3fa574d2..6c45375f20 100644 --- a/src/ol/interaction/Pointer.js +++ b/src/ol/interaction/Pointer.js @@ -126,11 +126,12 @@ class PointerInteraction extends Interaction { * Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are * detected. - * @override + * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} `false` to stop event propagation. * @api */ handleEvent(mapBrowserEvent) { - if (!(/** @type {import("../MapBrowserPointerEvent.js").default} */ (mapBrowserEvent).pointerEvent)) { + if (!mapBrowserEvent.pointerEvent) { return true; } diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index 9fde58ccbb..b24a6352fb 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -317,7 +317,6 @@ class Select extends Interaction { * Remove the interaction from its current map, if any, and attach it to a new * map, if any. Pass `null` to just remove the interaction from the current map. * @param {import("../PluggableMap.js").default} map Map. - * @override * @api */ setMap(map) { diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index 61a5a1c6de..af66ec06c9 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -243,7 +243,8 @@ class Snap extends PointerInteraction { } /** - * @inheritDoc + * @param {import("../MapBrowserPointerEvent.js").default} evt Map browser event. + * @return {boolean} `false` to stop event propagation. */ handleEvent(evt) { const result = this.snapTo(evt.pixel, evt.coordinate, evt.map); @@ -289,7 +290,9 @@ class Snap extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} evt Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(evt) { const featuresToUpdate = getValues(this.pendingFeatures_); @@ -331,7 +334,10 @@ class Snap extends PointerInteraction { } /** - * @inheritDoc + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. */ setMap(map) { const currentMap = this.getMap(); diff --git a/src/ol/interaction/Translate.js b/src/ol/interaction/Translate.js index 293fb457c1..f8334d3362 100644 --- a/src/ol/interaction/Translate.js +++ b/src/ol/interaction/Translate.js @@ -193,7 +193,9 @@ class Translate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer down events. + * @param {import("../MapBrowserPointerEvent.js").default} event Event. + * @return {boolean} If the event was consumed. */ handleDownEvent(event) { this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map); @@ -214,7 +216,9 @@ class Translate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer up events. + * @param {import("../MapBrowserPointerEvent.js").default} event Event. + * @return {boolean} If the event was consumed. */ handleUpEvent(event) { if (this.lastCoordinate_) { @@ -235,7 +239,8 @@ class Translate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer drag events. + * @param {import("../MapBrowserPointerEvent.js").default} event Event. */ handleDragEvent(event) { if (this.lastCoordinate_) { @@ -260,7 +265,8 @@ class Translate extends PointerInteraction { } /** - * @inheritDoc + * Handle pointer move events. + * @param {import("../MapBrowserPointerEvent.js").default} event Event. */ handleMoveEvent(event) { const elem = event.map.getViewport(); @@ -318,7 +324,10 @@ class Translate extends PointerInteraction { } /** - * @inheritDoc + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. */ setMap(map) { const oldMap = this.getMap(); From 615ae71a8fecb3c938652def677b92317804e38d Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 26 Mar 2020 11:37:22 +0100 Subject: [PATCH 281/636] Remove all inheritDoc tags from src/ol/source --- src/ol/source/Cluster.js | 9 ++++++--- src/ol/source/IIIF.js | 2 +- src/ol/source/Image.js | 1 - src/ol/source/ImageArcGISRest.js | 6 +++++- src/ol/source/ImageCanvas.js | 8 ++++++-- src/ol/source/ImageMapGuide.js | 6 +++++- src/ol/source/ImageStatic.js | 8 ++++++-- src/ol/source/ImageWMS.js | 6 +++++- src/ol/source/Raster.js | 8 ++++++-- src/ol/source/Tile.js | 2 +- src/ol/source/TileArcGISRest.js | 6 ++++-- src/ol/source/TileDebug.js | 10 +++++----- src/ol/source/TileImage.js | 32 ++++++++++++++++++++------------ src/ol/source/TileWMS.js | 9 +++++---- src/ol/source/UTFGrid.js | 20 +++++++++++++------- src/ol/source/UrlTile.js | 5 ++++- src/ol/source/VectorTile.js | 21 ++++++++++++++++----- src/ol/source/WMTS.js | 2 +- src/ol/source/Zoomify.js | 5 +++-- 19 files changed, 112 insertions(+), 54 deletions(-) diff --git a/src/ol/source/Cluster.js b/src/ol/source/Cluster.js index 535956bc67..4ee85445e9 100644 --- a/src/ol/source/Cluster.js +++ b/src/ol/source/Cluster.js @@ -91,7 +91,9 @@ class Cluster extends VectorSource { } /** - * @override + * Remove all features from the source. + * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events. + * @api */ clear(opt_fast) { this.features.length = 0; @@ -117,7 +119,9 @@ class Cluster extends VectorSource { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {import("../proj/Projection.js").default} projection Projection. */ loadFeatures(extent, resolution, projection) { this.source.loadFeatures(extent, resolution, projection); @@ -157,7 +161,6 @@ class Cluster extends VectorSource { /** * Handle the source changing. - * @override */ refresh() { this.clear(); diff --git a/src/ol/source/IIIF.js b/src/ol/source/IIIF.js index 9f28e3a1f2..5ec6dc6ee1 100644 --- a/src/ol/source/IIIF.js +++ b/src/ol/source/IIIF.js @@ -286,7 +286,7 @@ class IIIF extends TileImage { }); /** - * @inheritDoc + * @type {number} */ this.zDirection = options.zDirection; diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js index cf93b63ebe..632595e6d8 100644 --- a/src/ol/source/Image.js +++ b/src/ol/source/Image.js @@ -120,7 +120,6 @@ class ImageSource extends Source { /** * @return {Array} Resolutions. - * @override */ getResolutions() { return this.resolutions_; diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index 7638353474..5c36d346aa 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -134,7 +134,11 @@ class ImageArcGISRest extends ImageSource { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../Image.js").default} Single image. */ getImageInternal(extent, resolution, pixelRatio, projection) { diff --git a/src/ol/source/ImageCanvas.js b/src/ol/source/ImageCanvas.js index b0988f5f28..ae3dc1afaa 100644 --- a/src/ol/source/ImageCanvas.js +++ b/src/ol/source/ImageCanvas.js @@ -90,8 +90,12 @@ class ImageCanvasSource extends ImageSource { } /** - * @inheritDoc - */ + * @param {import("../extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../ImageCanvas.js").default} Single image. + */ getImageInternal(extent, resolution, pixelRatio, projection) { resolution = this.findNearestResolution(resolution); diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js index d39f82e111..964fb311b7 100644 --- a/src/ol/source/ImageMapGuide.js +++ b/src/ol/source/ImageMapGuide.js @@ -132,7 +132,11 @@ class ImageMapGuide extends ImageSource { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../Image.js").default} Single image. */ getImageInternal(extent, resolution, pixelRatio, projection) { resolution = this.findNearestResolution(resolution); diff --git a/src/ol/source/ImageStatic.js b/src/ol/source/ImageStatic.js index 146a0fb1d5..20112e3f96 100644 --- a/src/ol/source/ImageStatic.js +++ b/src/ol/source/ImageStatic.js @@ -86,7 +86,11 @@ class Static extends ImageSource { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../Image.js").default} Single image. */ getImageInternal(extent, resolution, pixelRatio, projection) { if (intersects(extent, this.image_.getExtent())) { @@ -105,7 +109,7 @@ class Static extends ImageSource { } /** - * @inheritDoc + * @param {import("../events/Event.js").default} evt Event. */ handleImageChange(evt) { if (this.image_.getState() == ImageState.LOADED) { diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js index a32b9b061e..07134a5023 100644 --- a/src/ol/source/ImageWMS.js +++ b/src/ol/source/ImageWMS.js @@ -248,7 +248,11 @@ class ImageWMS extends ImageSource { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../Image.js").default} Single image. */ getImageInternal(extent, resolution, pixelRatio, projection) { diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index 725e1d220c..4f976233d4 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -315,7 +315,11 @@ class RasterSource extends ImageSource { } /** - * @inheritDoc + * @param {import("../extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../ImageCanvas.js").default} Single image. */ getImage(extent, resolution, pixelRatio, projection) { if (!this.allSourcesReady_()) { @@ -409,7 +413,7 @@ class RasterSource extends ImageSource { } /** - * @override + * @return {null} not implemented */ getImageInternal() { return null; // not implemented diff --git a/src/ol/source/Tile.js b/src/ol/source/Tile.js index 8e5246e816..4be18cfb6a 100644 --- a/src/ol/source/Tile.js +++ b/src/ol/source/Tile.js @@ -205,7 +205,7 @@ class TileSource extends Source { } /** - * @inheritDoc + * @return {Array} Resolutions. */ getResolutions() { return this.tileGrid.getResolutions(); diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index cd347f3c5d..24415ce0d9 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -170,10 +170,12 @@ class TileArcGISRest extends TileImage { } /** - * @inheritDoc + * Get the tile pixel ratio for this source. + * @param {number} pixelRatio Pixel ratio. + * @return {number} Tile pixel ratio. */ getTilePixelRatio(pixelRatio) { - return this.hidpi_ ? /** @type {number} */ (pixelRatio) : 1; + return this.hidpi_ ? pixelRatio : 1; } /** diff --git a/src/ol/source/TileDebug.js b/src/ol/source/TileDebug.js index 127fb23f3f..3c4ac9f849 100644 --- a/src/ol/source/TileDebug.js +++ b/src/ol/source/TileDebug.js @@ -68,9 +68,6 @@ class LabeledTile extends Tile { } } - /** - * @override - */ load() {} } @@ -118,8 +115,11 @@ class TileDebug extends XYZ { } /** - * @inheritDoc - */ + * @param {number} z Tile coordinate z. + * @param {number} x Tile coordinate x. + * @param {number} y Tile coordinate y. + * @return {!LabeledTile} Tile. + */ getTile(z, x, y) { const tileCoordKey = getKeyZXY(z, x, y); if (this.tileCache.containsKey(tileCoordKey)) { diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 7e32dd149b..7c8ec6dc3d 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -131,7 +131,7 @@ class TileImage extends UrlTile { } /** - * @inheritDoc + * @return {boolean} Can expire cache. */ canExpireCache() { if (!ENABLE_RASTER_REPROJECTION) { @@ -150,7 +150,8 @@ class TileImage extends UrlTile { } /** - * @inheritDoc + * @param {import("../proj/Projection.js").default} projection Projection. + * @param {!Object} usedTiles Used tiles. */ expireCache(projection, usedTiles) { if (!ENABLE_RASTER_REPROJECTION) { @@ -167,7 +168,8 @@ class TileImage extends UrlTile { } /** - * @inheritDoc + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {number} Gutter. */ getGutterForProjection(projection) { if (ENABLE_RASTER_REPROJECTION && @@ -186,7 +188,8 @@ class TileImage extends UrlTile { } /** - * @inheritDoc + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {boolean} Opaque. */ getOpaque(projection) { if (ENABLE_RASTER_REPROJECTION && @@ -198,7 +201,8 @@ class TileImage extends UrlTile { } /** - * @inheritDoc + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {!import("../tilegrid/TileGrid.js").default} Tile grid. */ getTileGridForProjection(projection) { if (!ENABLE_RASTER_REPROJECTION) { @@ -212,14 +216,13 @@ class TileImage extends UrlTile { if (!(projKey in this.tileGridForProjection)) { this.tileGridForProjection[projKey] = getTileGridForProjection(projection); } - return ( - /** @type {!import("../tilegrid/TileGrid.js").default} */ (this.tileGridForProjection[projKey]) - ); + return this.tileGridForProjection[projKey]; } } /** - * @inheritDoc + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../TileCache.js").default} Tile cache. */ getTileCacheForProjection(projection) { if (!ENABLE_RASTER_REPROJECTION) { @@ -265,10 +268,15 @@ class TileImage extends UrlTile { } /** - * @inheritDoc + * @param {number} z Tile coordinate z. + * @param {number} x Tile coordinate x. + * @param {number} y Tile coordinate y. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {!import("../Tile.js").default} Tile. */ getTile(z, x, y, pixelRatio, projection) { - const sourceProjection = /** @type {!import("../proj/Projection.js").default} */ (this.getProjection()); + const sourceProjection = this.getProjection(); if (!ENABLE_RASTER_REPROJECTION || !sourceProjection || !projection || equivalent(sourceProjection, projection)) { return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection); @@ -278,7 +286,7 @@ class TileImage extends UrlTile { let tile; const tileCoordKey = getKey(tileCoord); if (cache.containsKey(tileCoordKey)) { - tile = /** @type {!import("../Tile.js").default} */ (cache.get(tileCoordKey)); + tile = cache.get(tileCoordKey); } const key = this.getKey(); if (tile && tile.key == key) { diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index 9ee929b63c..59d7a9a445 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -260,7 +260,7 @@ class TileWMS extends TileImage { } /** - * @inheritDoc + * @return {number} Gutter. */ getGutter() { return this.gutter_; @@ -349,11 +349,12 @@ class TileWMS extends TileImage { } /** - * @inheritDoc + * Get the tile pixel ratio for this source. + * @param {number} pixelRatio Pixel ratio. + * @return {number} Tile pixel ratio. */ getTilePixelRatio(pixelRatio) { - return (!this.hidpi_ || this.serverType_ === undefined) ? 1 : - /** @type {number} */ (pixelRatio); + return (!this.hidpi_ || this.serverType_ === undefined) ? 1 : pixelRatio; } /** diff --git a/src/ol/source/UTFGrid.js b/src/ol/source/UTFGrid.js index 8254fb70c4..7c0b30cf61 100644 --- a/src/ol/source/UTFGrid.js +++ b/src/ol/source/UTFGrid.js @@ -162,7 +162,8 @@ export class CustomTile extends Tile { /** - * @inheritDoc + * Return the key to be used for all tiles in the source. + * @return {string} The key for all tiles. */ getKey() { return this.src_; @@ -244,7 +245,6 @@ export class CustomTile extends Tile { /** - * @override */ load() { if (this.preemptive_) { @@ -467,14 +467,17 @@ class UTFGrid extends TileSource { /** - * @inheritDoc + * @param {number} z Tile coordinate z. + * @param {number} x Tile coordinate x. + * @param {number} y Tile coordinate y. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {!CustomTile} Tile. */ getTile(z, x, y, pixelRatio, projection) { const tileCoordKey = getKeyZXY(z, x, y); if (this.tileCache.containsKey(tileCoordKey)) { - return ( - /** @type {!import("../Tile.js").default} */ (this.tileCache.get(tileCoordKey)) - ); + return this.tileCache.get(tileCoordKey); } else { const tileCoord = [z, x, y]; const urlTileCoord = @@ -494,7 +497,10 @@ class UTFGrid extends TileSource { /** - * @inheritDoc + * Marks a tile coord as being used, without triggering a load. + * @param {number} z Tile coordinate z. + * @param {number} x Tile coordinate x. + * @param {number} y Tile coordinate y. */ useTile(z, x, y) { const tileCoordKey = getKeyZXY(z, x, y); diff --git a/src/ol/source/UrlTile.js b/src/ol/source/UrlTile.js index ebc3f5a8ed..17bc269b66 100644 --- a/src/ol/source/UrlTile.js +++ b/src/ol/source/UrlTile.js @@ -201,7 +201,10 @@ class UrlTile extends TileSource { } /** - * @inheritDoc + * Marks a tile coord as being used, without triggering a load. + * @param {number} z Tile coordinate z. + * @param {number} x Tile coordinate x. + * @param {number} y Tile coordinate y. */ useTile(z, x, y) { const tileCoordKey = getKeyZXY(z, x, y); diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index 42e4a1f4b9..07cabf7ffe 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -341,14 +341,19 @@ class VectorTile extends UrlTile { } /** - * @inheritDoc + * @param {number} z Tile coordinate z. + * @param {number} x Tile coordinate x. + * @param {number} y Tile coordinate y. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {!VectorRenderTile} Tile. */ getTile(z, x, y, pixelRatio, projection) { const coordKey = getKeyZXY(z, x, y); const key = this.getKey(); let tile; if (this.tileCache.containsKey(coordKey)) { - tile = /** @type {!import("../Tile.js").default} */ (this.tileCache.get(coordKey)); + tile = this.tileCache.get(coordKey); if (tile.key === key) { return tile; } @@ -395,7 +400,8 @@ class VectorTile extends UrlTile { } /** - * @inheritDoc + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {!import("../tilegrid/TileGrid.js").default} Tile grid. */ getTileGridForProjection(projection) { const code = projection.getCode(); @@ -412,14 +418,19 @@ class VectorTile extends UrlTile { } /** - * @inheritDoc + * Get the tile pixel ratio for this source. + * @param {number} pixelRatio Pixel ratio. + * @return {number} Tile pixel ratio. */ getTilePixelRatio(pixelRatio) { return pixelRatio; } /** - * @inheritDoc + * @param {number} z Z. + * @param {number} pixelRatio Pixel ratio. + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {import("../size.js").Size} Tile size. */ getTilePixelSize(z, pixelRatio, projection) { const tileGrid = this.getTileGridForProjection(projection); diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index 77663ad2a3..757ff108a3 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -152,7 +152,7 @@ class WMTS extends TileImage { /** * Set the URLs to use for requests. * URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}. - * @override + * @param {Array} urls URLs. */ setUrls(urls) { this.urls = urls; diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index 0c0e36533a..39fd155cf3 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -52,7 +52,8 @@ export class CustomTile extends ImageTile { } /** - * @inheritDoc + * Get the image element for this tile. + * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image. */ getImage() { if (this.zoomifyImage_) { @@ -256,7 +257,7 @@ class Zoomify extends TileImage { }); /** - * @inheritDoc + * @type {number} */ this.zDirection = options.zDirection; From 506aa7aae79adc3f102933f1293a5f88957fe5e5 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 26 Mar 2020 11:47:56 +0100 Subject: [PATCH 282/636] Remove all inheritDoc tags from src/ol/style --- src/ol/style/Circle.js | 9 ++++----- src/ol/style/Icon.js | 25 ++++++++++++++----------- src/ol/style/IconImage.js | 1 + src/ol/style/Image.js | 2 -- src/ol/style/RegularShape.js | 29 ++++++++++++++++++----------- 5 files changed, 37 insertions(+), 29 deletions(-) diff --git a/src/ol/style/Circle.js b/src/ol/style/Circle.js index 64dc96cd3a..190d8f5f20 100644 --- a/src/ol/style/Circle.js +++ b/src/ol/style/Circle.js @@ -38,11 +38,10 @@ class CircleStyle extends RegularShape { } /** - * Clones the style. - * @return {CircleStyle} The cloned style. - * @override - * @api - */ + * Clones the style. + * @return {CircleStyle} The cloned style. + * @api + */ clone() { const style = new CircleStyle({ fill: this.getFill() ? this.getFill().clone() : undefined, diff --git a/src/ol/style/Icon.js b/src/ol/style/Icon.js index 9882e4e274..60f6ddd7b7 100644 --- a/src/ol/style/Icon.js +++ b/src/ol/style/Icon.js @@ -225,7 +225,9 @@ class Icon extends ImageStyle { } /** - * @inheritDoc + * Get the anchor point in pixels. The anchor determines the center point for the + * symbolizer. + * @return {Array} Anchor. * @api */ getAnchor() { @@ -293,7 +295,6 @@ class Icon extends ImageStyle { * Get the image icon. * @param {number} pixelRatio Pixel ratio. * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element. - * @override * @api */ getImage(pixelRatio) { @@ -301,35 +302,37 @@ class Icon extends ImageStyle { } /** - * @override + * @return {import("../size.js").Size} Image size. */ getImageSize() { return this.iconImage_.getSize(); } /** - * @override + * @return {import("../size.js").Size} Size of the hit-detection image. */ getHitDetectionImageSize() { return this.getImageSize(); } /** - * @override + * @return {import("../ImageState.js").default} Image state. */ getImageState() { return this.iconImage_.getImageState(); } /** - * @override + * @param {number} pixelRatio Pixel ratio. + * @return {HTMLImageElement|HTMLCanvasElement} Image element. */ getHitDetectionImage(pixelRatio) { return this.iconImage_.getHitDetectionImage(pixelRatio); } /** - * @inheritDoc + * Get the origin of the symbolizer. + * @return {Array} Origin. * @api */ getOrigin() { @@ -371,7 +374,8 @@ class Icon extends ImageStyle { } /** - * @inheritDoc + * Get the size of the icon (in pixels). + * @return {import("../size.js").Size} Image size. * @api */ getSize() { @@ -379,7 +383,7 @@ class Icon extends ImageStyle { } /** - * @override + * @param {function(import("../events/Event.js").default): void} listener Listener function. */ listenImageChange(listener) { this.iconImage_.addEventListener(EventType.CHANGE, listener); @@ -390,7 +394,6 @@ class Icon extends ImageStyle { * When rendering a feature with an icon style, the vector renderer will * automatically call this method. However, you might want to call this * method yourself for preloading or other purposes. - * @override * @api */ load() { @@ -398,7 +401,7 @@ class Icon extends ImageStyle { } /** - * @override + * @param {function(import("../events/Event.js").default): void} listener Listener function. */ unlistenImageChange(listener) { this.iconImage_.removeEventListener(EventType.CHANGE, listener); diff --git a/src/ol/style/IconImage.js b/src/ol/style/IconImage.js index 38ca4cda5c..cde9a86523 100644 --- a/src/ol/style/IconImage.js +++ b/src/ol/style/IconImage.js @@ -170,6 +170,7 @@ class IconImage extends EventTarget { } /** + * Get the size of the icon (in pixels). * @return {import("../size.js").Size} Image size. */ getSize() { diff --git a/src/ol/style/Image.js b/src/ol/style/Image.js index 3e01ddc84f..700792b4a1 100644 --- a/src/ol/style/Image.js +++ b/src/ol/style/Image.js @@ -233,7 +233,6 @@ class ImageStyle { /** * @abstract * @param {function(import("../events/Event.js").default): void} listener Listener function. - * @template T */ listenImageChange(listener) { abstract(); @@ -250,7 +249,6 @@ class ImageStyle { /** * @abstract * @param {function(import("../events/Event.js").default): void} listener Listener function. - * @template T */ unlistenImageChange(listener) { abstract(); diff --git a/src/ol/style/RegularShape.js b/src/ol/style/RegularShape.js index 30f017ef91..463d99d353 100644 --- a/src/ol/style/RegularShape.js +++ b/src/ol/style/RegularShape.js @@ -171,7 +171,9 @@ class RegularShape extends ImageStyle { } /** - * @inheritDoc + * Get the anchor point in pixels. The anchor determines the center point for the + * symbolizer. + * @return {Array} Anchor. * @api */ getAnchor() { @@ -197,14 +199,17 @@ class RegularShape extends ImageStyle { } /** - * @inheritDoc + * @param {number} pixelRatio Pixel ratio. + * @return {HTMLImageElement|HTMLCanvasElement} Image element. */ getHitDetectionImage(pixelRatio) { return this.hitDetectionCanvas_; } /** - * @inheritDoc + * Get the image icon. + * @param {number} pixelRatio Pixel ratio. + * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element. * @api */ getImage(pixelRatio) { @@ -212,28 +217,29 @@ class RegularShape extends ImageStyle { } /** - * @inheritDoc + * @return {import("../size.js").Size} Image size. */ getImageSize() { return this.imageSize_; } /** - * @inheritDoc + * @return {import("../size.js").Size} Size of the hit-detection image. */ getHitDetectionImageSize() { return this.hitDetectionImageSize_; } /** - * @inheritDoc + * @return {import("../ImageState.js").default} Image state. */ getImageState() { return ImageState.LOADED; } /** - * @inheritDoc + * Get the origin of the symbolizer. + * @return {Array} Origin. * @api */ getOrigin() { @@ -268,7 +274,8 @@ class RegularShape extends ImageStyle { } /** - * @inheritDoc + * Get the size of the symbolizer (in pixels). + * @return {import("../size.js").Size} Size. * @api */ getSize() { @@ -285,17 +292,17 @@ class RegularShape extends ImageStyle { } /** - * @inheritDoc + * @param {function(import("../events/Event.js").default): void} listener Listener function. */ listenImageChange(listener) {} /** - * @inheritDoc + * Load not yet loaded URI. */ load() {} /** - * @inheritDoc + * @param {function(import("../events/Event.js").default): void} listener Listener function. */ unlistenImageChange(listener) {} From 15d36a22f0c8513c83d036935086ba697f7e3d35 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 26 Mar 2020 15:56:04 +0100 Subject: [PATCH 283/636] Remove all inheritDoc tags from src/ol/layer --- src/ol/layer/Base.js | 2 +- src/ol/layer/Group.js | 8 +++++--- src/ol/layer/Heatmap.js | 3 ++- src/ol/layer/Layer.js | 14 ++++++++------ src/ol/layer/WebGLPoints.js | 6 +++--- src/ol/renderer/Layer.js | 2 +- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/ol/layer/Base.js b/src/ol/layer/Base.js index 21a44fdc36..7f39118e4b 100644 --- a/src/ol/layer/Base.js +++ b/src/ol/layer/Base.js @@ -322,7 +322,7 @@ class BaseLayer extends BaseObject { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { if (this.state_) { diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index 12dff00af2..c7dd443100 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -190,7 +190,8 @@ class LayerGroup extends BaseLayer { } /** - * @inheritDoc + * @param {Array=} opt_array Array of layers (to be modified in place). + * @return {Array} Array of layers. */ getLayersArray(opt_array) { const array = opt_array !== undefined ? opt_array : []; @@ -201,7 +202,8 @@ class LayerGroup extends BaseLayer { } /** - * @inheritDoc + * @param {Array=} opt_states Optional list of layer states (to be modified in place). + * @return {Array} List of layer states. */ getLayerStatesArray(opt_states) { const states = opt_states !== undefined ? opt_states : []; @@ -238,7 +240,7 @@ class LayerGroup extends BaseLayer { } /** - * @inheritDoc + * @return {import("../source/State.js").default} Source state. */ getSourceState() { return SourceState.READY; diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index 0d015bf985..961c144418 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -178,7 +178,8 @@ class Heatmap extends VectorLayer { } /** - * @inheritDoc + * Create a renderer for this layer. + * @return {WebGLPointsLayerRenderer} A layer renderer. */ createRenderer() { return new WebGLPointsLayerRenderer(this, { diff --git a/src/ol/layer/Layer.js b/src/ol/layer/Layer.js index 2f6b2fb0b7..a96ee841c5 100644 --- a/src/ol/layer/Layer.js +++ b/src/ol/layer/Layer.js @@ -46,7 +46,7 @@ import {assert} from '../asserts.js'; /** * @typedef {Object} State - * @property {import("./Base.js").default} layer + * @property {import("./Layer.js").default} layer * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point. * @property {SourceState} sourceState * @property {boolean} visible @@ -138,7 +138,8 @@ class Layer extends BaseLayer { } /** - * @inheritDoc + * @param {Array=} opt_array Array of layers (to be modified in place). + * @return {Array} Array of layers. */ getLayersArray(opt_array) { const array = opt_array ? opt_array : []; @@ -147,7 +148,8 @@ class Layer extends BaseLayer { } /** - * @inheritDoc + * @param {Array=} opt_states Optional list of layer states (to be modified in place). + * @return {Array} List of layer states. */ getLayerStatesArray(opt_states) { const states = opt_states ? opt_states : []; @@ -166,8 +168,8 @@ class Layer extends BaseLayer { } /** - * @inheritDoc - */ + * @return {import("../source/State.js").default} Source state. + */ getSourceState() { const source = this.getSource(); return !source ? SourceState.UNDEFINED : source.getState(); @@ -299,7 +301,7 @@ class Layer extends BaseLayer { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.setSource(null); diff --git a/src/ol/layer/WebGLPoints.js b/src/ol/layer/WebGLPoints.js index cdcea572b4..fb9428a7ff 100644 --- a/src/ol/layer/WebGLPoints.js +++ b/src/ol/layer/WebGLPoints.js @@ -93,7 +93,8 @@ class WebGLPointsLayer extends Layer { } /** - * @inheritDoc + * Create a renderer for this layer. + * @return {WebGLPointsLayerRenderer} A layer renderer. */ createRenderer() { return new WebGLPointsLayerRenderer(this, { @@ -109,8 +110,7 @@ class WebGLPointsLayer extends Layer { } /** - * - * @inheritDoc + * Clean up. */ disposeInternal() { this.renderer_.dispose(); diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index 072e043906..4c0058a512 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -23,7 +23,7 @@ class LayerRenderer extends Observable { this.boundHandleImageChange_ = this.handleImageChange_.bind(this); /** - * @private + * @protected * @type {LayerType} */ this.layer_ = layer; From a695ce86167e48763875399fcadfb735927218aa Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 26 Mar 2020 16:31:26 +0100 Subject: [PATCH 284/636] Remove all inheritDoc tags from src/ol/render --- src/ol/render/Box.js | 2 +- src/ol/render/VectorContext.js | 2 +- src/ol/render/canvas/Builder.js | 12 +++++++----- src/ol/render/canvas/ImageBuilder.js | 13 ++++++++----- src/ol/render/canvas/Immediate.js | 14 -------------- src/ol/render/canvas/LineStringBuilder.js | 12 +++++++----- src/ol/render/canvas/PolygonBuilder.js | 13 ++++++++----- src/ol/render/canvas/TextBuilder.js | 18 ++++++++++-------- 8 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/ol/render/Box.js b/src/ol/render/Box.js index 6b1f8c323e..3402b35857 100644 --- a/src/ol/render/Box.js +++ b/src/ol/render/Box.js @@ -47,7 +47,7 @@ class RenderBox extends Disposable { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.setMap(null); diff --git a/src/ol/render/VectorContext.js b/src/ol/render/VectorContext.js index 838996200d..e00d586363 100644 --- a/src/ol/render/VectorContext.js +++ b/src/ol/render/VectorContext.js @@ -87,7 +87,7 @@ class VectorContext { drawPolygon(polygonGeometry, feature) {} /** - * @param {import("../geom/Geometry.js").default|import("./Feature.js").default} geometry Geometry. + * @param {import("../geom/SimpleGeometry.js").default|import("./Feature.js").default} geometry Geometry. * @param {import("../Feature.js").FeatureLike} feature Feature. */ drawText(geometry, feature) {} diff --git a/src/ol/render/canvas/Builder.js b/src/ol/render/canvas/Builder.js index ade18f1e61..f56abfe483 100644 --- a/src/ol/render/canvas/Builder.js +++ b/src/ol/render/canvas/Builder.js @@ -203,7 +203,9 @@ class CanvasBuilder extends VectorContext { } /** - * @inheritDoc. + * @param {import("../../geom/SimpleGeometry.js").default} geometry Geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. + * @param {Function} renderer Renderer. */ drawCustom(geometry, feature, renderer) { this.beginGeometry(geometry, feature); @@ -213,10 +215,9 @@ class CanvasBuilder extends VectorContext { let flatCoordinates, builderEnd, builderEnds, builderEndss; let offset; if (type == GeometryType.MULTI_POLYGON) { - geometry = /** @type {import("../../geom/MultiPolygon.js").default} */ (geometry); - flatCoordinates = geometry.getOrientedFlatCoordinates(); + flatCoordinates = /** @type {import("../../geom/MultiPolygon.js").default} */ (geometry).getOrientedFlatCoordinates(); builderEndss = []; - const endss = geometry.getEndss(); + const endss = /** @type {import("../../geom/MultiPolygon.js").default} */ (geometry).getEndss(); offset = 0; for (let i = 0, ii = endss.length; i < ii; ++i) { const myEnds = []; @@ -302,7 +303,8 @@ class CanvasBuilder extends VectorContext { } /** - * @inheritDoc + * @param {import("../../style/Fill.js").default} fillStyle Fill style. + * @param {import("../../style/Stroke.js").default} strokeStyle Stroke style. */ setFillStrokeStyle(fillStyle, strokeStyle) { const state = this.state; diff --git a/src/ol/render/canvas/ImageBuilder.js b/src/ol/render/canvas/ImageBuilder.js index f60304d577..dc217fd0b7 100644 --- a/src/ol/render/canvas/ImageBuilder.js +++ b/src/ol/render/canvas/ImageBuilder.js @@ -107,7 +107,8 @@ class CanvasImageBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../geom/Point.js").default|import("../Feature.js").default} pointGeometry Point geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. */ drawPoint(pointGeometry, feature) { if (!this.image_) { @@ -136,7 +137,8 @@ class CanvasImageBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../geom/MultiPoint.js").default|import("../Feature.js").default} multiPointGeometry MultiPoint geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. */ drawMultiPoint(multiPointGeometry, feature) { if (!this.image_) { @@ -166,7 +168,7 @@ class CanvasImageBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @return {import("./Builder.js").SerializableInstructions} the serializable instructions. */ finish() { this.reverseHitDetectionInstructions(); @@ -187,7 +189,8 @@ class CanvasImageBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../style/Image.js").default} imageStyle Image style. + * @param {import("../canvas.js").DeclutterGroup} declutterGroups Declutter. */ setImageStyle(imageStyle, declutterGroups) { const anchor = imageStyle.getAnchor(); @@ -197,7 +200,7 @@ class CanvasImageBuilder extends CanvasBuilder { const origin = imageStyle.getOrigin(); this.anchorX_ = anchor[0]; this.anchorY_ = anchor[1]; - this.declutterGroups_ = /** @type {import("../canvas.js").DeclutterGroups} */ (declutterGroups); + this.declutterGroups_ = declutterGroups; this.hitDetectionImage_ = hitDetectionImage; this.image_ = image; this.height_ = size[1]; diff --git a/src/ol/render/canvas/Immediate.js b/src/ol/render/canvas/Immediate.js index 4f16188299..13a2923115 100644 --- a/src/ol/render/canvas/Immediate.js +++ b/src/ol/render/canvas/Immediate.js @@ -390,7 +390,6 @@ class CanvasImmediateRenderer extends VectorContext { * the current fill and stroke styles. * * @param {import("../../geom/Circle.js").default} geometry Circle geometry. - * @override * @api */ drawCircle(geometry) { @@ -430,7 +429,6 @@ class CanvasImmediateRenderer extends VectorContext { * any `zIndex` on the provided style will be ignored. * * @param {import("../../style/Style.js").default} style The rendering style. - * @override * @api */ setStyle(style) { @@ -451,7 +449,6 @@ class CanvasImmediateRenderer extends VectorContext { * {@link module:ol/render/canvas/Immediate#setStyle} first to set the rendering style. * * @param {import("../../geom/Geometry.js").default|import("../Feature.js").default} geometry The geometry to render. - * @override * @api */ drawGeometry(geometry) { @@ -493,7 +490,6 @@ class CanvasImmediateRenderer extends VectorContext { * * @param {import("../../Feature.js").default} feature Feature. * @param {import("../../style/Style.js").default} style Style. - * @override * @api */ drawFeature(feature, style) { @@ -510,7 +506,6 @@ class CanvasImmediateRenderer extends VectorContext { * uses the current styles appropriate for each geometry in the collection. * * @param {import("../../geom/GeometryCollection.js").default} geometry Geometry collection. - * @override */ drawGeometryCollection(geometry) { const geometries = geometry.getGeometriesArray(); @@ -524,7 +519,6 @@ class CanvasImmediateRenderer extends VectorContext { * the current style. * * @param {import("../../geom/Point.js").default|import("../Feature.js").default} geometry Point geometry. - * @override */ drawPoint(geometry) { if (this.squaredTolerance_) { @@ -545,7 +539,6 @@ class CanvasImmediateRenderer extends VectorContext { * uses the current style. * * @param {import("../../geom/MultiPoint.js").default|import("../Feature.js").default} geometry MultiPoint geometry. - * @override */ drawMultiPoint(geometry) { if (this.squaredTolerance_) { @@ -566,7 +559,6 @@ class CanvasImmediateRenderer extends VectorContext { * the current style. * * @param {import("../../geom/LineString.js").default|import("../Feature.js").default} geometry LineString geometry. - * @override */ drawLineString(geometry) { if (this.squaredTolerance_) { @@ -595,7 +587,6 @@ class CanvasImmediateRenderer extends VectorContext { * and uses the current style. * * @param {import("../../geom/MultiLineString.js").default|import("../Feature.js").default} geometry MultiLineString geometry. - * @override */ drawMultiLineString(geometry) { if (this.squaredTolerance_) { @@ -629,7 +620,6 @@ class CanvasImmediateRenderer extends VectorContext { * the current style. * * @param {import("../../geom/Polygon.js").default|import("../Feature.js").default} geometry Polygon geometry. - * @override */ drawPolygon(geometry) { if (this.squaredTolerance_) { @@ -666,7 +656,6 @@ class CanvasImmediateRenderer extends VectorContext { * Render MultiPolygon geometry into the canvas. Rendering is immediate and * uses the current style. * @param {import("../../geom/MultiPolygon.js").default} geometry MultiPolygon geometry. - * @override */ drawMultiPolygon(geometry) { if (this.squaredTolerance_) { @@ -824,7 +813,6 @@ class CanvasImmediateRenderer extends VectorContext { * * @param {import("../../style/Fill.js").default} fillStyle Fill style. * @param {import("../../style/Stroke.js").default} strokeStyle Stroke style. - * @override */ setFillStrokeStyle(fillStyle, strokeStyle) { if (!fillStyle) { @@ -870,7 +858,6 @@ class CanvasImmediateRenderer extends VectorContext { * the image style. * * @param {import("../../style/Image.js").default} imageStyle Image style. - * @override */ setImageStyle(imageStyle) { if (!imageStyle) { @@ -900,7 +887,6 @@ class CanvasImmediateRenderer extends VectorContext { * remove the text style. * * @param {import("../../style/Text.js").default} textStyle Text style. - * @override */ setTextStyle(textStyle) { if (!textStyle) { diff --git a/src/ol/render/canvas/LineStringBuilder.js b/src/ol/render/canvas/LineStringBuilder.js index eedbc70b67..2d898ad9e1 100644 --- a/src/ol/render/canvas/LineStringBuilder.js +++ b/src/ol/render/canvas/LineStringBuilder.js @@ -34,7 +34,8 @@ class CanvasLineStringBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../geom/LineString.js").default|import("../Feature.js").default} lineStringGeometry Line string geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. */ drawLineString(lineStringGeometry, feature) { const state = this.state; @@ -58,7 +59,8 @@ class CanvasLineStringBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../geom/MultiLineString.js").default|import("../Feature.js").default} multiLineStringGeometry MultiLineString geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. */ drawMultiLineString(multiLineStringGeometry, feature) { const state = this.state; @@ -79,14 +81,14 @@ class CanvasLineStringBuilder extends CanvasBuilder { const stride = multiLineStringGeometry.getStride(); let offset = 0; for (let i = 0, ii = ends.length; i < ii; ++i) { - offset = this.drawFlatCoordinates_(flatCoordinates, offset, ends[i], stride); + offset = this.drawFlatCoordinates_(flatCoordinates, offset, /** @type {number} */ (ends[i]), stride); } this.hitDetectionInstructions.push(strokeInstruction); this.endGeometry(feature); } /** - * @inheritDoc + * @return {import("./Builder.js").SerializableInstructions} the serializable instructions. */ finish() { const state = this.state; @@ -99,7 +101,7 @@ class CanvasLineStringBuilder extends CanvasBuilder { } /** - * @inheritDoc. + * @param {import("../canvas.js").FillStrokeState} state State. */ applyStroke(state) { if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) { diff --git a/src/ol/render/canvas/PolygonBuilder.js b/src/ol/render/canvas/PolygonBuilder.js index 090ec6d1c7..6fa794fc55 100644 --- a/src/ol/render/canvas/PolygonBuilder.js +++ b/src/ol/render/canvas/PolygonBuilder.js @@ -62,7 +62,8 @@ class CanvasPolygonBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../geom/Circle.js").default} circleGeometry Circle geometry. + * @param {import("../../Feature.js").default} feature Feature. */ drawCircle(circleGeometry, feature) { const state = this.state; @@ -106,7 +107,8 @@ class CanvasPolygonBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../geom/Polygon.js").default|import("../Feature.js").default} polygonGeometry Polygon geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. */ drawPolygon(polygonGeometry, feature) { const state = this.state; @@ -133,12 +135,13 @@ class CanvasPolygonBuilder extends CanvasBuilder { const ends = polygonGeometry.getEnds(); const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates(); const stride = polygonGeometry.getStride(); - this.drawFlatCoordinatess_(flatCoordinates, 0, ends, stride); + this.drawFlatCoordinatess_(flatCoordinates, 0, /** @type {Array} */ (ends), stride); this.endGeometry(feature); } /** - * @inheritDoc + * @param {import("../../geom/MultiPolygon.js").default} multiPolygonGeometry MultiPolygon geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. */ drawMultiPolygon(multiPolygonGeometry, feature) { const state = this.state; @@ -173,7 +176,7 @@ class CanvasPolygonBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @return {import("./Builder.js").SerializableInstructions} the serializable instructions. */ finish() { this.reverseHitDetectionInstructions(); diff --git a/src/ol/render/canvas/TextBuilder.js b/src/ol/render/canvas/TextBuilder.js index aec72113ad..942c31a73d 100644 --- a/src/ol/render/canvas/TextBuilder.js +++ b/src/ol/render/canvas/TextBuilder.js @@ -134,7 +134,7 @@ class CanvasTextBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @return {import("./Builder.js").SerializableInstructions} the serializable instructions. */ finish() { const instructions = super.finish(); @@ -145,7 +145,8 @@ class CanvasTextBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../geom/SimpleGeometry.js").default|import("../Feature.js").default} geometry Geometry. + * @param {import("../../Feature.js").FeatureLike} feature Feature. */ drawText(geometry, feature) { const fillState = this.textFillState_; @@ -173,11 +174,11 @@ class CanvasTextBuilder extends CanvasBuilder { if (geometryType == GeometryType.LINE_STRING) { ends = [flatCoordinates.length]; } else if (geometryType == GeometryType.MULTI_LINE_STRING) { - ends = geometry.getEnds(); + ends = /** @type {import("../../geom/MultiLineString.js").default} */ (geometry).getEnds(); } else if (geometryType == GeometryType.POLYGON) { - ends = geometry.getEnds().slice(0, 1); + ends = /** @type {import("../../geom/Polygon.js").default} */ (geometry).getEnds().slice(0, 1); } else if (geometryType == GeometryType.MULTI_POLYGON) { - const endss = geometry.getEndss(); + const endss = /** @type {import("../../geom/MultiPolygon.js").default} */ (geometry).getEndss(); ends = []; for (i = 0, ii = endss.length; i < ii; ++i) { ends.push(endss[i][0]); @@ -217,7 +218,7 @@ class CanvasTextBuilder extends CanvasBuilder { switch (geometryType) { case GeometryType.POINT: case GeometryType.MULTI_POINT: - flatCoordinates = geometry.getFlatCoordinates(); + flatCoordinates = /** @type {import("../../geom/MultiPoint.js").default} */ (geometry).getFlatCoordinates(); end = flatCoordinates.length; break; case GeometryType.LINE_STRING: @@ -379,14 +380,15 @@ class CanvasTextBuilder extends CanvasBuilder { } /** - * @inheritDoc + * @param {import("../../style/Text.js").default} textStyle Text style. + * @param {import("../canvas.js").DeclutterGroups} declutterGroups Declutter. */ setTextStyle(textStyle, declutterGroups) { let textState, fillState, strokeState; if (!textStyle) { this.text_ = ''; } else { - this.declutterGroups_ = /** @type {import("../canvas.js").DeclutterGroups} */ (declutterGroups); + this.declutterGroups_ = declutterGroups; const textFillStyle = textStyle.getFill(); if (!textFillStyle) { From d15ec1c12cd87df9d1796c6e430408574f914c1e Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 3 Apr 2020 08:10:17 +0200 Subject: [PATCH 285/636] Remove all inheritDoc tags from disposeInternal functions --- config/jsdoc/api/readme.md | 2 +- src/ol/Geolocation.js | 2 +- src/ol/MapBrowserEventHandler.js | 2 +- src/ol/PluggableMap.js | 2 +- src/ol/events/Target.js | 2 +- src/ol/renderer/canvas/VectorImageLayer.js | 2 +- src/ol/renderer/webgl/Layer.js | 2 +- src/ol/renderer/webgl/PointsLayer.js | 2 +- src/ol/reproj/Image.js | 2 +- src/ol/webgl/Helper.js | 2 +- test/spec/ol/source/tile.test.js | 3 --- 11 files changed, 10 insertions(+), 13 deletions(-) diff --git a/config/jsdoc/api/readme.md b/config/jsdoc/api/readme.md index db290d473d..5179e075e5 100644 --- a/config/jsdoc/api/readme.md +++ b/config/jsdoc/api/readme.md @@ -24,7 +24,7 @@ The second line tells the Closure compiler the type of the argument. The third line (`@api`) marks the method as part of the api and thus exportable. Without such an api annotation, the method will not be documented in the generated API documentation. Symbols without an api annotation will also not be exportable. -The `@api` annotation can be used in conjunction with the `@inheritDoc` annotation to export a symbol that is documented on a parent class (where the method may be abstract). In general, `@api` annotations should never be used on abstract methods (only on their implementations). +In general, `@api` annotations should never be used on abstract methods (only on their implementations). ### Events diff --git a/src/ol/Geolocation.js b/src/ol/Geolocation.js index fa1f61f03b..094148bb94 100644 --- a/src/ol/Geolocation.js +++ b/src/ol/Geolocation.js @@ -129,7 +129,7 @@ class Geolocation extends BaseObject { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.setTracking(false); diff --git a/src/ol/MapBrowserEventHandler.js b/src/ol/MapBrowserEventHandler.js index 1c70416eb7..a1d2b67157 100644 --- a/src/ol/MapBrowserEventHandler.js +++ b/src/ol/MapBrowserEventHandler.js @@ -295,7 +295,7 @@ class MapBrowserEventHandler extends EventTarget { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { if (this.relayedListenerKey_) { diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 792215e1cc..365a0a9240 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -498,7 +498,7 @@ class PluggableMap extends BaseObject { /** * - * @inheritDoc + * Clean up. */ disposeInternal() { this.mapBrowserEventHandler_.dispose(); diff --git a/src/ol/events/Target.js b/src/ol/events/Target.js index 7ea0ccf929..475d2d570e 100644 --- a/src/ol/events/Target.js +++ b/src/ol/events/Target.js @@ -130,7 +130,7 @@ class Target extends Disposable { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { clear(this.listeners_); diff --git a/src/ol/renderer/canvas/VectorImageLayer.js b/src/ol/renderer/canvas/VectorImageLayer.js index 6f85052a20..5560edaf3e 100644 --- a/src/ol/renderer/canvas/VectorImageLayer.js +++ b/src/ol/renderer/canvas/VectorImageLayer.js @@ -52,7 +52,7 @@ class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.vectorRenderer_.dispose(); diff --git a/src/ol/renderer/webgl/Layer.js b/src/ol/renderer/webgl/Layer.js index b3f6072fec..ed1075d006 100644 --- a/src/ol/renderer/webgl/Layer.js +++ b/src/ol/renderer/webgl/Layer.js @@ -68,7 +68,7 @@ class WebGLLayerRenderer extends LayerRenderer { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.helper.dispose(); diff --git a/src/ol/renderer/webgl/PointsLayer.js b/src/ol/renderer/webgl/PointsLayer.js index b35e3831b7..573f46cd64 100644 --- a/src/ol/renderer/webgl/PointsLayer.js +++ b/src/ol/renderer/webgl/PointsLayer.js @@ -567,7 +567,7 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.worker_.terminate(); diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index 7a5cfd7240..ae3d4f7054 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -112,7 +112,7 @@ class ReprojImage extends ImageBase { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { if (this.state == ImageState.LOADING) { diff --git a/src/ol/webgl/Helper.js b/src/ol/webgl/Helper.js index ce97b33a01..0f56ed066c 100644 --- a/src/ol/webgl/Helper.js +++ b/src/ol/webgl/Helper.js @@ -402,7 +402,7 @@ class WebGLHelper extends Disposable { } /** - * @inheritDoc + * Clean up. */ disposeInternal() { this.canvas_.removeEventListener(ContextEventType.LOST, this.boundHandleWebGLContextLost_); diff --git a/test/spec/ol/source/tile.test.js b/test/spec/ol/source/tile.test.js index d9db390d97..e7b6edb9b3 100644 --- a/test/spec/ol/source/tile.test.js +++ b/test/spec/ol/source/tile.test.js @@ -35,9 +35,6 @@ class MockTile extends TileSource { } -/** - * @inheritDoc - */ MockTile.prototype.getTile = function(z, x, y) { const key = getKeyZXY(z, x, y); if (this.tileCache.containsKey(key)) { From 9e862c111120f0bc2ab7b1e90e92099d39941e3f Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 3 Apr 2020 08:20:49 +0200 Subject: [PATCH 286/636] Remove all inheritDoc tags from src/ol/ --- src/ol/Image.js | 2 +- src/ol/ImageCanvas.js | 2 +- src/ol/ImageTile.js | 4 ++-- src/ol/TileQueue.js | 3 ++- src/ol/VectorRenderTile.js | 4 ++-- src/ol/VectorTile.js | 4 ++-- src/ol/reproj/Image.js | 4 ++-- src/ol/reproj/Tile.js | 2 +- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/ol/Image.js b/src/ol/Image.js index a7f0797b0e..3142637202 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -78,7 +78,7 @@ class ImageWrapper extends ImageBase { } /** - * @inheritDoc + * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image. * @api */ getImage() { diff --git a/src/ol/ImageCanvas.js b/src/ol/ImageCanvas.js index dde34ad47c..599beac831 100644 --- a/src/ol/ImageCanvas.js +++ b/src/ol/ImageCanvas.js @@ -76,7 +76,7 @@ class ImageCanvas extends ImageBase { } /** - * @inheritDoc + * Load not yet loaded URI. */ load() { if (this.state == ImageState.IDLE) { diff --git a/src/ol/ImageTile.js b/src/ol/ImageTile.js index 3e0b95253a..de3ad74440 100644 --- a/src/ol/ImageTile.js +++ b/src/ol/ImageTile.js @@ -68,7 +68,7 @@ class ImageTile extends Tile { } /** - * @inheritDoc + * @return {string} Key. */ getKey() { return this.src_; @@ -103,7 +103,7 @@ class ImageTile extends Tile { } /** - * @inheritDoc + * Load not yet loaded URI. * @api */ load() { diff --git a/src/ol/TileQueue.js b/src/ol/TileQueue.js index eb39b119d8..400cd56f74 100644 --- a/src/ol/TileQueue.js +++ b/src/ol/TileQueue.js @@ -59,7 +59,8 @@ class TileQueue extends PriorityQueue { } /** - * @inheritDoc + * @param {Array} element Element. + * @return {boolean} The element was added to the queue. */ enqueue(element) { const added = super.enqueue(element); diff --git a/src/ol/VectorRenderTile.js b/src/ol/VectorRenderTile.js index 372fc8a3a0..db9a6ec07f 100644 --- a/src/ol/VectorRenderTile.js +++ b/src/ol/VectorRenderTile.js @@ -155,14 +155,14 @@ class VectorRenderTile extends Tile { } /** - * @inheritDoc + * Load the tile. */ load() { this.getSourceTiles(); } /** - * @inheritDoc + * Remove from the cache due to expiry */ release() { for (const key in this.context_) { diff --git a/src/ol/VectorTile.js b/src/ol/VectorTile.js index ecf13ed8ea..f957a452df 100644 --- a/src/ol/VectorTile.js +++ b/src/ol/VectorTile.js @@ -87,14 +87,14 @@ class VectorTile extends Tile { } /** - * @inheritDoc + * @return {string} Key. */ getKey() { return this.url_; } /** - * @inheritDoc + * Load not yet loaded URI. */ load() { if (this.state == TileState.IDLE) { diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index ae3d4f7054..b52e439fd6 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -122,7 +122,7 @@ class ReprojImage extends ImageBase { } /** - * @inheritDoc + * @return {HTMLCanvasElement} Image. */ getImage() { return this.canvas_; @@ -156,7 +156,7 @@ class ReprojImage extends ImageBase { } /** - * @inheritDoc + * Load not yet loaded URI. */ load() { if (this.state == ImageState.IDLE) { diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index 7defc9e48b..c239b2463f 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -249,7 +249,7 @@ class ReprojTile extends Tile { } /** - * @inheritDoc + * Load not yet loaded URI. */ load() { if (this.state == TileState.IDLE) { From dda7342ea7ec31e8cbacd5912d79021fdea0b286 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 3 Apr 2020 08:51:49 +0200 Subject: [PATCH 287/636] Remove all inheritDoc tags from src/ol/renderer --- src/ol/Image.js | 1 - src/ol/MapBrowserEvent.js | 2 -- src/ol/renderer/Composite.js | 15 ++++++++-- src/ol/renderer/Layer.js | 2 ++ src/ol/renderer/Map.js | 6 ++-- src/ol/renderer/canvas/ImageLayer.js | 11 +++++-- src/ol/renderer/canvas/TileLayer.js | 21 +++++++------ src/ol/renderer/canvas/VectorImageLayer.js | 20 +++++++++---- src/ol/renderer/canvas/VectorLayer.js | 30 ++++++++++++++----- src/ol/renderer/canvas/VectorTileLayer.js | 34 +++++++++++++++++----- src/ol/renderer/webgl/PointsLayer.js | 18 +++++++++--- 11 files changed, 115 insertions(+), 45 deletions(-) diff --git a/src/ol/Image.js b/src/ol/Image.js index 3142637202..d8f9cbb09c 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -114,7 +114,6 @@ class ImageWrapper extends ImageBase { * Load the image or retry if loading previously failed. * Loading is taken care of by the tile queue, and calling this method is * only needed for preloading or for reloading in case of an error. - * @override * @api */ load() { diff --git a/src/ol/MapBrowserEvent.js b/src/ol/MapBrowserEvent.js index dc301946b7..fe5f426052 100644 --- a/src/ol/MapBrowserEvent.js +++ b/src/ol/MapBrowserEvent.js @@ -86,7 +86,6 @@ class MapBrowserEvent extends MapEvent { /** * Prevents the default browser action. * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault. - * @override * @api */ preventDefault() { @@ -97,7 +96,6 @@ class MapBrowserEvent extends MapEvent { /** * Prevents further propagation of the current event. * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation. - * @override * @api */ stopPropagation() { diff --git a/src/ol/renderer/Composite.js b/src/ol/renderer/Composite.js index 24ee0ef801..7cb44ee8ec 100644 --- a/src/ol/renderer/Composite.js +++ b/src/ol/renderer/Composite.js @@ -79,7 +79,8 @@ class CompositeMapRenderer extends MapRenderer { } /** - * @inheritDoc + * Render. + * @param {?import("../PluggableMap.js").FrameState} frameState Frame state. */ renderFrame(frameState) { if (!frameState) { @@ -133,7 +134,17 @@ class CompositeMapRenderer extends MapRenderer { } /** - * @inheritDoc + * @param {import("../pixel.js").Pixel} pixel Pixel. + * @param {import("../PluggableMap.js").FrameState} frameState FrameState. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {function(import("../layer/Layer.js").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer + * callback. + * @param {function(import("../layer/Layer.js").default): boolean} layerFilter Layer filter + * function, only layers which are visible and for which this function + * returns `true` will be tested for features. By default, all visible + * layers will be tested. + * @return {T|undefined} Callback result. + * @template T */ forEachLayerAtPixel(pixel, frameState, hitTolerance, callback, layerFilter) { const viewState = frameState.viewState; diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index 4c0058a512..5ccef03487 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -65,12 +65,14 @@ class LayerRenderer extends Observable { * @param {Object>} tiles Lookup of loaded tiles by zoom level. * @param {number} zoom Zoom level. * @param {import("../Tile.js").default} tile Tile. + * @return {boolean|void} If `false`, the tile will not be considered loaded. */ loadedTileCallback(tiles, zoom, tile) { if (!tiles[zoom]) { tiles[zoom] = {}; } tiles[zoom][tile.tileCoord.toString()] = tile; + return undefined; } /** diff --git a/src/ol/renderer/Map.js b/src/ol/renderer/Map.js index 86ee999a81..588904658b 100644 --- a/src/ol/renderer/Map.js +++ b/src/ol/renderer/Map.js @@ -151,14 +151,14 @@ class MapRenderer extends Disposable { * @param {import("../pixel.js").Pixel} pixel Pixel. * @param {import("../PluggableMap.js").FrameState} frameState FrameState. * @param {number} hitTolerance Hit tolerance in pixels. - * @param {function(this: S, import("../layer/Layer.js").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer + * @param {function(import("../layer/Layer.js").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer * callback. - * @param {function(this: U, import("../layer/Layer.js").default): boolean} layerFilter Layer filter + * @param {function(import("../layer/Layer.js").default): boolean} layerFilter Layer filter * function, only layers which are visible and for which this function * returns `true` will be tested for features. By default, all visible * layers will be tested. * @return {T|undefined} Callback result. - * @template S,T,U + * @template T */ forEachLayerAtPixel(pixel, frameState, hitTolerance, callback, layerFilter) { return abstract(); diff --git a/src/ol/renderer/canvas/ImageLayer.js b/src/ol/renderer/canvas/ImageLayer.js index bd11ac74b3..c53510b041 100644 --- a/src/ol/renderer/canvas/ImageLayer.js +++ b/src/ol/renderer/canvas/ImageLayer.js @@ -31,14 +31,16 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image. */ getImage() { return !this.image_ ? null : this.image_.getImage(); } /** - * @inheritDoc + * Determine whether render should be called. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {boolean} Layer is ready to be rendered. */ prepareFrame(frameState) { const layerState = frameState.layerStatesArray[frameState.layerIndex]; @@ -77,7 +79,10 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * Render the layer. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {HTMLElement} target Target that may be used to render content to. + * @return {HTMLElement} The rendered element. */ renderFrame(frameState, target) { const image = this.image_; diff --git a/src/ol/renderer/canvas/TileLayer.js b/src/ol/renderer/canvas/TileLayer.js index 51a4d8a372..1eeb56533f 100644 --- a/src/ol/renderer/canvas/TileLayer.js +++ b/src/ol/renderer/canvas/TileLayer.js @@ -122,7 +122,10 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * @param {Object>} tiles Lookup of loaded tiles by zoom level. + * @param {number} zoom Zoom level. + * @param {import("../../Tile.js").default} tile Tile. + * @return {boolean|void} If `false`, the tile will not be considered loaded. */ loadedTileCallback(tiles, zoom, tile) { if (this.isDrawableTile(tile)) { @@ -132,19 +135,19 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * Determine whether render should be called. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {boolean} Layer is ready to be rendered. */ prepareFrame(frameState) { return !!this.getLayer().getSource(); } /** - * TODO: File a TypeScript issue about inheritDoc not being followed - * all the way. Without this explicit return type, the VectorTileLayer - * renderFrame function does not pass. - * - * @inheritDoc - * @returns {HTMLElement} The rendered element. + * Render the layer. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {HTMLElement} target Target that may be used to render content to. + * @return {HTMLElement} The rendered element. */ renderFrame(frameState, target) { const layerState = frameState.layerStatesArray[frameState.layerIndex]; @@ -416,7 +419,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * @return {HTMLCanvasElement} Image */ getImage() { const context = this.context; diff --git a/src/ol/renderer/canvas/VectorImageLayer.js b/src/ol/renderer/canvas/VectorImageLayer.js index 5560edaf3e..79537a6d7a 100644 --- a/src/ol/renderer/canvas/VectorImageLayer.js +++ b/src/ol/renderer/canvas/VectorImageLayer.js @@ -60,7 +60,9 @@ class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer { } /** - * @inheritDoc + * Asynchronous layer level hit detection. + * @param {import("../../pixel.js").Pixel} pixel Pixel. + * @return {Promise>} Promise that resolves with an array of features. */ getFeatures(pixel) { if (this.vectorRenderer_) { @@ -76,14 +78,16 @@ class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer { } /** - * @inheritDoc + * Perform action necessary to get the layer rendered after new fonts have loaded */ handleFontsChanged() { this.vectorRenderer_.handleFontsChanged(); } /** - * @inheritDoc + * Determine whether render should be called. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {boolean} Layer is ready to be rendered. */ prepareFrame(frameState) { const pixelRatio = frameState.pixelRatio; @@ -145,17 +149,21 @@ class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer { } /** - * @override */ preRender() {} /** - * @override */ postRender() {} /** - * @inheritDoc + * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {function(import("../../Feature.js").FeatureLike, import("../../layer/Layer.js").default): T} callback Feature callback. + * @param {Array} declutteredFeatures Decluttered features. + * @return {T|void} Callback result. + * @template T */ forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, declutteredFeatures) { if (this.vectorRenderer_) { diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index 0d7af8e81b..4288ae872c 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -107,7 +107,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * Get a rendering container from an existing target, if compatible. + * @param {HTMLElement} target Potential render target. + * @param {string} transform CSS Transform. + * @param {number} opacity Opacity. */ useContainer(target, transform, opacity) { if (opacity < 1) { @@ -117,7 +120,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * Render the layer. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {HTMLElement} target Target that may be used to render content to. + * @return {HTMLElement} The rendered element. */ renderFrame(frameState, target) { @@ -221,14 +227,16 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { const opacity = layerState.opacity; const container = this.container; if (opacity !== parseFloat(container.style.opacity)) { - container.style.opacity = opacity === 1 ? '' : opacity; + container.style.opacity = opacity === 1 ? '' : String(opacity); } return this.container; } /** - * @inheritDoc + * Asynchronous layer level hit detection. + * @param {import("../../pixel.js").Pixel} pixel Pixel. + * @return {Promise>} Promise that resolves with an array of features. */ getFeatures(pixel) { return new Promise(function(resolve, reject) { @@ -276,7 +284,13 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {function(import("../../Feature.js").FeatureLike, import("../../layer/Layer.js").default): T} callback Feature callback. + * @param {Array} declutteredFeatures Decluttered features. + * @return {T|void} Callback result. + * @template T */ forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, declutteredFeatures) { if (!this.replayGroup_) { @@ -306,7 +320,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * Perform action necessary to get the layer rendered after new fonts have loaded */ handleFontsChanged() { const layer = this.getLayer(); @@ -325,7 +339,9 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { } /** - * @inheritDoc + * Determine whether render should be called. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {boolean} Layer is ready to be rendered. */ prepareFrame(frameState) { const vectorLayer = this.getLayer(); diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index a3520f9caa..b65d4f4a8f 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -136,7 +136,11 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { } /** - * @inheritDoc + * @param {number} z Tile coordinate z. + * @param {number} x Tile coordinate x. + * @param {number} y Tile coordinate y. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {!import("../../Tile.js").default} Tile. */ getTile(z, x, y, frameState) { const pixelRatio = frameState.pixelRatio; @@ -167,7 +171,8 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { } /** - * @inheritdoc + * @param {import("../../VectorRenderTile.js").default} tile Tile. + * @return {boolean} Tile is drawable. */ isDrawableTile(tile) { const layer = this.getLayer(); @@ -182,7 +187,9 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { } /** - * @inheritDoc + * Determine whether render should be called. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {boolean} Layer is ready to be rendered. */ prepareFrame(frameState) { const layerRevision = this.getLayer().getRevision(); @@ -279,13 +286,19 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { } /** - * @inheritDoc + * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {function(import("../../Feature.js").FeatureLike, import("../../layer/Layer.js").default): T} callback Feature callback. + * @param {Array} declutteredFeatures Decluttered features. + * @return {T|void} Callback result. + * @template T */ forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, declutteredFeatures) { const resolution = frameState.viewState.resolution; const rotation = frameState.viewState.rotation; hitTolerance = hitTolerance == undefined ? 0 : hitTolerance; - const layer = /** @type {import("../../layer/VectorTile.js").default} */ (this.getLayer()); + const layer = this.getLayer(); const declutter = layer.getDeclutter(); const source = layer.getSource(); const tileGrid = source.getTileGridForProjection(frameState.viewState.projection); @@ -334,7 +347,9 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { } /** - * @inheritDoc + * Asynchronous layer level hit detection. + * @param {import("../../pixel.js").Pixel} pixel Pixel. + * @return {Promise>} Promise that resolves with an array of features. */ getFeatures(pixel) { return new Promise(function(resolve, reject) { @@ -394,7 +409,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { } /** - * @inheritDoc + * Perform action necessary to get the layer rendered after new fonts have loaded */ handleFontsChanged() { clear(this.renderTileImageQueue_); @@ -414,7 +429,10 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { } /** - * @inheritDoc + * Render the layer. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {HTMLElement} target Target that may be used to render content to. + * @return {HTMLElement} The rendered element. */ renderFrame(frameState, target) { const viewHints = frameState.viewHints; diff --git a/src/ol/renderer/webgl/PointsLayer.js b/src/ol/renderer/webgl/PointsLayer.js index 573f46cd64..a5e4a08867 100644 --- a/src/ol/renderer/webgl/PointsLayer.js +++ b/src/ol/renderer/webgl/PointsLayer.js @@ -349,7 +349,9 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer { } /** - * @inheritDoc + * Render the layer. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {HTMLElement} The rendered element. */ renderFrame(frameState) { const renderCount = this.indicesBuffer_.getSize(); @@ -360,7 +362,7 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer { const layerState = frameState.layerStatesArray[frameState.layerIndex]; const opacity = layerState.opacity; if (opacity !== parseFloat(canvas.style.opacity)) { - canvas.style.opacity = opacity; + canvas.style.opacity = String(opacity); } if (this.hitDetectionEnabled_) { @@ -372,7 +374,9 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer { } /** - * @inheritDoc + * Determine whether render should be called. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @return {boolean} Layer is ready to be rendered. */ prepareFrame(frameState) { const layer = this.getLayer(); @@ -511,7 +515,13 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer { } /** - * @inheritDoc + * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("../../PluggableMap.js").FrameState} frameState Frame state. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {function(import("../../Feature.js").FeatureLike, import("../../layer/Layer.js").default): T} callback Feature callback. + * @param {Array} declutteredFeatures Decluttered features. + * @return {T|void} Callback result. + * @template T */ forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, declutteredFeatures) { assert(this.hitDetectionEnabled_, 66); From 6006fb2c0336a813420580c8b230d8b514bb2b72 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Fri, 3 Apr 2020 17:11:20 +0100 Subject: [PATCH 288/636] base minWidth on default dpi & remove setMinWidth --- examples/print-to-scale.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/print-to-scale.js b/examples/print-to-scale.js index 01cda5568a..ec8ef2ae23 100644 --- a/examples/print-to-scale.js +++ b/examples/print-to-scale.js @@ -52,7 +52,7 @@ const map = new Map({ }) }); -const scaleLine = new ScaleLine({bar: true, text: true}); +const scaleLine = new ScaleLine({bar: true, text: true, minWidth: 125}); map.addControl(scaleLine); @@ -109,7 +109,6 @@ exportButton.addEventListener('click', function() { pdf.save('map.pdf'); // Reset original map size scaleLine.setDpi(); - scaleLine.setMinWidth(); map.getTargetElement().style.width = ''; map.getTargetElement().style.height = ''; map.updateSize(); @@ -121,7 +120,6 @@ exportButton.addEventListener('click', function() { // Set print size scaleLine.setDpi(resolution); - scaleLine.setMinWidth(resolution * 4 / 2.54); // 4cm map.getTargetElement().style.width = width + 'px'; map.getTargetElement().style.height = height + 'px'; map.updateSize(); From 6aa953b5713c591393b5b657c7026d5244572ad4 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Fri, 3 Apr 2020 17:11:25 +0100 Subject: [PATCH 289/636] base minWidth on default dpi & remove setMinWidth --- src/ol/control/ScaleLine.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index be645ea4f9..5aab52706c 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -34,11 +34,18 @@ export const Units = { */ const LEADING_DIGITS = [1, 2, 5]; +/** + * @const + * @type {number} + */ +const DEFAULT_DPI = 25.4 / 0.28; + /** * @typedef {Object} Options * @property {string} [className='ol-scale-line'] CSS Class name. - * @property {number} [minWidth=64] Minimum width in pixels. + * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be + * adjusted to match the dpi used. * @property {function(import("../MapEvent.js").default)} [render] Function called when the control * should be re-rendered. This is called in a `requestAnimationFrame` callback. * @property {HTMLElement|string} [target] Specify a target if you want the control @@ -193,15 +200,6 @@ class ScaleLine extends Control { this.dpi_ = dpi; } - /** - * Set the minimum width. - * @param {number|undefined} minWidth The ninimum width in pixels. - * @api - */ - setMinWidth(minWidth) { - this.minWidth_ = minWidth !== undefined ? minWidth : 64; - } - /** * @private */ @@ -225,7 +223,9 @@ class ScaleLine extends Control { let pointResolution = getPointResolution(projection, viewState.resolution, center, pointResolutionUnits); - let nominalCount = this.minWidth_ * pointResolution; + const minWidth = this.minWidth_ * (this.dpi_ || DEFAULT_DPI) / DEFAULT_DPI; + + let nominalCount = minWidth * pointResolution; let suffix = ''; if (units == Units.DEGREES) { const metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES]; @@ -282,7 +282,7 @@ class ScaleLine extends Control { } let i = 3 * Math.floor( - Math.log(this.minWidth_ * pointResolution) / Math.log(10)); + Math.log(minWidth * pointResolution) / Math.log(10)); let count, width, decimalCount; while (true) { decimalCount = Math.floor(i / 3); @@ -293,7 +293,7 @@ class ScaleLine extends Control { this.element.style.display = 'none'; this.renderedVisible_ = false; return; - } else if (width >= this.minWidth_) { + } else if (width >= minWidth) { break; } ++i; From fb8442641199d5cba0831fc0856a181a78301463 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Fri, 3 Apr 2020 17:17:11 +0100 Subject: [PATCH 290/636] use constant for default dpi --- src/ol/control/ScaleLine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index 5aab52706c..b910182ab1 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -437,7 +437,7 @@ class ScaleLine extends Control { this.viewState_.resolution, this.viewState_.center ); - const dpi = this.dpi_ || (25.4 / 0.28); + const dpi = this.dpi_ || DEFAULT_DPI; const mpu = this.viewState_.projection.getMetersPerUnit(); const inchesPerMeter = 39.37; return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi; From 665a8275f6f0421931a6a9f1bfbb84e1f02ccea8 Mon Sep 17 00:00:00 2001 From: philip Date: Fri, 3 Apr 2020 21:54:42 +0000 Subject: [PATCH 291/636] It appears that Safari and Chrome behave differently when doing a drawImage with coordinates that are outside the source. Chrome appears to draw the piece of the image that is within the area specified on the drawImage and within the source. Safari bails and draws nothing if (I think) any of the corners are outside the source. --- src/ol/reproj.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index e0420e7a8c..7e286d0715 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -314,13 +314,7 @@ export function render(width, height, pixelRatio, context.scale(sourceResolution / pixelRatio, -sourceResolution / pixelRatio); - const sourceTriangleExtent = boundingExtent(source); - const topLeftX = Math.floor((sourceTriangleExtent[0] - sourceDataExtent[0]) * stitchScale); - const topLeftY = Math.floor((sourceDataExtent[3] - sourceTriangleExtent[3]) * stitchScale); - const width = Math.ceil((sourceTriangleExtent[2] - sourceTriangleExtent[0]) * stitchScale) + 2; - const height = Math.ceil((sourceTriangleExtent[3] - sourceTriangleExtent[1]) * stitchScale) + 2; - - context.drawImage(stitchContext.canvas, topLeftX, topLeftY, width, height, topLeftX, topLeftY, width, height); + context.drawImage(stitchContext.canvas, 0, 0); context.restore(); }); From 4e81cf02ee1e14485c81a6ca6ce88f6dcf8ccaea Mon Sep 17 00:00:00 2001 From: philip Date: Fri, 3 Apr 2020 21:58:51 +0000 Subject: [PATCH 292/636] Remove the unused import --- src/ol/reproj.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index 7e286d0715..518e815572 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -2,7 +2,7 @@ * @module ol/reproj */ import {createCanvasContext2D} from './dom.js'; -import {boundingExtent, containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth} from './extent.js'; +import {containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth} from './extent.js'; import {solveLinearSystem} from './math.js'; import {getPointResolution, transform} from './proj.js'; From 3528149c5bd497db9acc5206387e7885127a60bc Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 4 Apr 2020 09:57:30 +0200 Subject: [PATCH 293/636] Use TypeScript 3.9 for type generation for better enums --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f7fefb945c..8c59997158 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build-index": "npm run build-package && node tasks/generate-index", "build-legacy": "shx rm -rf build && npm run build-index && webpack --config config/webpack-config-legacy-build.js && cleancss --source-map src/ol/ol.css -o build/legacy/ol.css", "copy-css": "shx cp src/ol/ol.css build/ol/ol.css", - "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && npx --package typescript@3.8.1-rc tsc --project config/tsconfig-build.json", + "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && npx --package typescript@3.9.0-dev.20200403 tsc --project config/tsconfig-build.json", "typecheck": "tsc --pretty", "apidoc-debug": "shx rm -rf build/apidoc && node --inspect-brk=9229 ./node_modules/jsdoc/jsdoc.js -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc", "apidoc": "shx rm -rf build/apidoc && jsdoc -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc" From 0a6468d7ae9ef17e290d0c3862ec4ee4f58ea971 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 3 Apr 2020 10:00:49 -0600 Subject: [PATCH 294/636] Remove plugin for @inheritDoc --- config/jsdoc/api/conf.json | 1 - config/jsdoc/api/plugins/inheritdoc.js | 110 ------------------------- 2 files changed, 111 deletions(-) delete mode 100755 config/jsdoc/api/plugins/inheritdoc.js diff --git a/config/jsdoc/api/conf.json b/config/jsdoc/api/conf.json index 63badc07eb..2a2f328b2b 100644 --- a/config/jsdoc/api/conf.json +++ b/config/jsdoc/api/conf.json @@ -17,7 +17,6 @@ "config/jsdoc/api/plugins/markdown", "jsdoc-plugin-typescript", "config/jsdoc/api/plugins/inline-options", - "config/jsdoc/api/plugins/inheritdoc", "config/jsdoc/api/plugins/events", "config/jsdoc/api/plugins/observable", "config/jsdoc/api/plugins/api" diff --git a/config/jsdoc/api/plugins/inheritdoc.js b/config/jsdoc/api/plugins/inheritdoc.js deleted file mode 100755 index 6284a731ee..0000000000 --- a/config/jsdoc/api/plugins/inheritdoc.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This is a hack to prevent inheritDoc tags from entirely removing - * documentation of the method that inherits the documentation. - */ - -exports.defineTags = function(dictionary) { - dictionary.defineTag('inheritDoc', { - mustNotHaveValue: true, - canHaveType: false, - canHaveName: false, - onTagged: function(doclet, tag) { - doclet.inheritdoc = true; - } - }); -}; - - -const lookup = {}; -const incompleteByClass = {}; -const keepKeys = ['comment', 'meta', 'name', 'memberof', 'longname', 'augment', - 'stability']; - -exports.handlers = { - - newDoclet: function(e) { - const doclet = e.doclet; - let incompletes; - if (!(doclet.longname in lookup)) { - lookup[doclet.longname] = []; - } - lookup[doclet.longname].push(doclet); - if (doclet.inheritdoc) { - if (!(doclet.memberof in incompleteByClass)) { - incompleteByClass[doclet.memberof] = []; - } - incompletes = incompleteByClass[doclet.memberof]; - if (incompletes.indexOf(doclet.name) == -1) { - incompletes.push(doclet.name); - } - } - }, - - parseComplete: function(e) { - let ancestors, candidate, candidates, doclet, i, j, k, l, key; - let stability, incomplete, incompletes; - const doclets = e.doclets; - for (i = doclets.length - 1; i >= 0; --i) { - doclet = doclets[i]; - incompletes = incompleteByClass[doclet.longname]; - if (!doclet.augments || !incompletes) { - continue; - } - ancestors = doclet.augments.slice(); - // collect ancestors from the whole hierarchy - for (j = 0; j < ancestors.length; ++j) { - candidates = lookup[ancestors[j]]; - if (candidates) { - for (k = candidates.length - 1; k >= 0; --k) { - candidate = candidates[k]; - if (candidate.augments) { - Array.prototype.push.apply(ancestors, candidate.augments); - } - } - } - } - // walk through all inheritDoc members - let incompleteDoclet; - for (j = incompletes.length - 1; j >= 0; --j) { - incomplete = incompletes[j]; - candidates = lookup[doclet.longname + '#' + incomplete]; - if (candidates) { - // get the incomplete doclet that needs to be augmented - for (k = candidates.length - 1; k >= 0; --k) { - incompleteDoclet = candidates[k]; - if (incompleteDoclet.inheritdoc) { - break; - } - } - } - // find the documented ancestor - for (k = ancestors.length - 1; k >= 0; --k) { - candidates = lookup[ancestors[k] + '#' + incomplete]; - if (candidates) { - for (l = candidates.length - 1; l >= 0; --l) { - candidate = candidates[l]; - if (candidate && !candidate.inheritdoc) { - stability = candidate.stability || incompleteDoclet.stability; - if (stability) { - incompleteDoclet.stability = stability; - for (key in candidate) { - if (candidate.hasOwnProperty(key) && - keepKeys.indexOf(key) == -1) { - incompleteDoclet[key] = candidate[key]; - } - } - // We have found a matching parent doc and applied it so we - // don't want to ignore this doclet anymore. - incompleteDoclet.ignore = false; - // We found a match so we can stop break - break; - } - } - } - } - } - } - } - } - -}; From a1dd9cacf7c2f9ea4b8a3781148d5cc6ac5d887b Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sat, 4 Apr 2020 14:00:20 +0100 Subject: [PATCH 295/636] fix return type --- src/ol/source/TileImage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 1a74acb885..3d81f9bae8 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -177,15 +177,15 @@ class TileImage extends UrlTile { } /** - * @param {import("../proj/Projection.js").default} projection Projection. - * @return {number} Gutter. + * @return {Object|undefined} Context options. */ getContextOptions() { return this.contextOptions_; } /** - * @inheritDoc + * @param {import("../proj/Projection.js").default} projection Projection. + * @return {number} Gutter. */ getGutterForProjection(projection) { if (ENABLE_RASTER_REPROJECTION && From ad9c4449759c98df4f5131f4828b4956dd6dd3be Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 4 Apr 2020 20:09:59 +0200 Subject: [PATCH 296/636] Remove .d.ts files from the package --- README.md | 25 +++++++++++++++++++++++++ config/tsconfig-build.json | 4 ++-- package.json | 2 +- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7c789b6835..dd54fb0ed9 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,31 @@ OpenLayers appreciates contributions of all kinds. We especially want to thank See our [Open Collective](https://opencollective.com/openlayers/contribute/sponsors-214/checkout) page if you too are interested in becoming a regular sponsor. +## IntelliSense support and type checking for VS Code + +The ol package contains a src/ folder with JSDoc annotated sources. TypeScript can get type definitions from these sources with a `jsconfig.json` config file in the project root: + +```json +{ + "compilerOptions": { + "checkJs": true, + "baseUrl": "./", + "paths": { + "ol": ["node_modules/ol/src"], + "ol/*": ["node_modules/ol/src/*"] + } + }, + "include": [ + "**/*.js", + "node_modules/ol/**/*.js" + ] +} +``` + +Project template with this configuration: https://gist.github.com/9a7253cb4712e8bf38d75d8ac898e36c. + +Note that the above only works when authoring in plain JavaScript. For similar configurations with a `tsconfig.json` in TypeScript projects, your mileage may vary. You may want to use a [third-party types package](https://github.com/hanreev/types-ol) in this case. + ## Supported Browsers OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](http://www.ecma-international.org/ecma-262/5.1/). This includes Chrome, Firefox, Safari and Edge. For older browsers and platforms like Internet Explorer (down to version 9) and Android 4.x, [polyfills](http://polyfill.io) for `requestAnimationFrame` and `Element.prototype.classList` are required, and using the KML format requires a polyfill for `URL`. diff --git a/config/tsconfig-build.json b/config/tsconfig-build.json index f5a8720329..56de194321 100644 --- a/config/tsconfig-build.json +++ b/config/tsconfig-build.json @@ -7,8 +7,8 @@ "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "../build/ol", /* Redirect output structure to the directory. */ diff --git a/package.json b/package.json index 8c59997158..a2930cc3e3 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build-index": "npm run build-package && node tasks/generate-index", "build-legacy": "shx rm -rf build && npm run build-index && webpack --config config/webpack-config-legacy-build.js && cleancss --source-map src/ol/ol.css -o build/legacy/ol.css", "copy-css": "shx cp src/ol/ol.css build/ol/ol.css", - "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && npx --package typescript@3.9.0-dev.20200403 tsc --project config/tsconfig-build.json", + "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && tsc --project config/tsconfig-build.json", "typecheck": "tsc --pretty", "apidoc-debug": "shx rm -rf build/apidoc && node --inspect-brk=9229 ./node_modules/jsdoc/jsdoc.js -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc", "apidoc": "shx rm -rf build/apidoc && jsdoc -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc" From 79ccef7bf642e177fd485b5fa690512f3b418f19 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 5 Apr 2020 09:55:09 +0200 Subject: [PATCH 297/636] Do not append hit canvas to document body --- src/ol/render/canvas/hitdetect.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ol/render/canvas/hitdetect.js b/src/ol/render/canvas/hitdetect.js index ced9974156..136a1f1527 100644 --- a/src/ol/render/canvas/hitdetect.js +++ b/src/ol/render/canvas/hitdetect.js @@ -125,7 +125,6 @@ export function createHitDetectionImageData(size, transforms, features, styleFun } } } - document.body.appendChild(context.canvas); return context.getImageData(0, 0, canvas.width, canvas.height); } From a7a21aab088a757b0871c5bc10fc660496bbd71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sat, 29 Feb 2020 21:25:37 +0100 Subject: [PATCH 298/636] Fix toggle state when there are no hidden members --- config/jsdoc/api/template/static/scripts/main.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/config/jsdoc/api/template/static/scripts/main.js b/config/jsdoc/api/template/static/scripts/main.js index 8a053e5c7a..5a705ab243 100644 --- a/config/jsdoc/api/template/static/scripts/main.js +++ b/config/jsdoc/api/template/static/scripts/main.js @@ -233,18 +233,8 @@ $(function () { return; } const clsItem = $(this).closest('.item'); - let show; - if (clsItem.hasClass('toggle-manual-show')) { - show = false; - } else if (clsItem.hasClass('toggle-manual-hide')) { - show = true; - } else { - clsItem.find('.member-list li').each(function (i, v) { - show = $(v).is(':hidden'); - return !show; - }); - } - search.manualToggle(clsItem, !!show); + const show = !clsItem.hasClass('toggle-manual-show'); + search.manualToggle(clsItem, show); }); // Auto resizing on navigation From 7dd6d72093bb618fb46870c6bf75f5175aa29615 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 5 Apr 2020 22:02:19 +0200 Subject: [PATCH 299/636] Avoid page scrolling when freehand drawing on mobile --- src/ol/interaction/Draw.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index a1b76655a1..b8adce2840 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -523,7 +523,11 @@ class Draw extends PointerInteraction { } else if (move) { pass = event.type === MapBrowserEventType.POINTERMOVE; if (pass && this.freehand_) { - pass = this.handlePointerMove_(event); + this.handlePointerMove_(event); + if (this.shouldHandle_) { + // Avoid page scrolling when freehand drawing on mobile + event.preventDefault(); + } } else if (event.pointerEvent.pointerType == 'mouse' || (event.type === MapBrowserEventType.POINTERDRAG && this.downTimeout_ === undefined)) { this.handlePointerMove_(event); @@ -609,7 +613,6 @@ class Draw extends PointerInteraction { /** * Handle move events. * @param {import("../MapBrowserEvent.js").default} event A move event. - * @return {boolean} Pass the event to other interactions. * @private */ handlePointerMove_(event) { @@ -625,7 +628,7 @@ class Draw extends PointerInteraction { squaredDistance > this.squaredClickTolerance_ : squaredDistance <= this.squaredClickTolerance_; if (!this.shouldHandle_) { - return true; + return; } } @@ -634,7 +637,6 @@ class Draw extends PointerInteraction { } else { this.createOrUpdateSketchPoint_(event); } - return true; } /** From a21470f6b4204de2119e205d704b07c622502c2a Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 4 Apr 2020 10:55:43 +0200 Subject: [PATCH 300/636] Merge pull request #10872 from ahocevar/fix-type-generation Use TypeScript 3.9 for type generation for better enums --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f7fefb945c..8c59997158 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build-index": "npm run build-package && node tasks/generate-index", "build-legacy": "shx rm -rf build && npm run build-index && webpack --config config/webpack-config-legacy-build.js && cleancss --source-map src/ol/ol.css -o build/legacy/ol.css", "copy-css": "shx cp src/ol/ol.css build/ol/ol.css", - "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && npx --package typescript@3.8.1-rc tsc --project config/tsconfig-build.json", + "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && npx --package typescript@3.9.0-dev.20200403 tsc --project config/tsconfig-build.json", "typecheck": "tsc --pretty", "apidoc-debug": "shx rm -rf build/apidoc && node --inspect-brk=9229 ./node_modules/jsdoc/jsdoc.js -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc", "apidoc": "shx rm -rf build/apidoc && jsdoc -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc" From afa96df55dff69366a6874d649cd8d3afc0342ce Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 5 Apr 2020 08:37:27 +0200 Subject: [PATCH 301/636] Merge pull request #10877 from ahocevar/no-dts Remove .d.ts files from the package --- README.md | 25 +++++++++++++++++++++++++ config/tsconfig-build.json | 4 ++-- package.json | 2 +- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7c789b6835..dd54fb0ed9 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,31 @@ OpenLayers appreciates contributions of all kinds. We especially want to thank See our [Open Collective](https://opencollective.com/openlayers/contribute/sponsors-214/checkout) page if you too are interested in becoming a regular sponsor. +## IntelliSense support and type checking for VS Code + +The ol package contains a src/ folder with JSDoc annotated sources. TypeScript can get type definitions from these sources with a `jsconfig.json` config file in the project root: + +```json +{ + "compilerOptions": { + "checkJs": true, + "baseUrl": "./", + "paths": { + "ol": ["node_modules/ol/src"], + "ol/*": ["node_modules/ol/src/*"] + } + }, + "include": [ + "**/*.js", + "node_modules/ol/**/*.js" + ] +} +``` + +Project template with this configuration: https://gist.github.com/9a7253cb4712e8bf38d75d8ac898e36c. + +Note that the above only works when authoring in plain JavaScript. For similar configurations with a `tsconfig.json` in TypeScript projects, your mileage may vary. You may want to use a [third-party types package](https://github.com/hanreev/types-ol) in this case. + ## Supported Browsers OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](http://www.ecma-international.org/ecma-262/5.1/). This includes Chrome, Firefox, Safari and Edge. For older browsers and platforms like Internet Explorer (down to version 9) and Android 4.x, [polyfills](http://polyfill.io) for `requestAnimationFrame` and `Element.prototype.classList` are required, and using the KML format requires a polyfill for `URL`. diff --git a/config/tsconfig-build.json b/config/tsconfig-build.json index f5a8720329..56de194321 100644 --- a/config/tsconfig-build.json +++ b/config/tsconfig-build.json @@ -7,8 +7,8 @@ "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "../build/ol", /* Redirect output structure to the directory. */ diff --git a/package.json b/package.json index 8c59997158..a2930cc3e3 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build-index": "npm run build-package && node tasks/generate-index", "build-legacy": "shx rm -rf build && npm run build-index && webpack --config config/webpack-config-legacy-build.js && cleancss --source-map src/ol/ol.css -o build/legacy/ol.css", "copy-css": "shx cp src/ol/ol.css build/ol/ol.css", - "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && npx --package typescript@3.9.0-dev.20200403 tsc --project config/tsconfig-build.json", + "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && tsc --project config/tsconfig-build.json", "typecheck": "tsc --pretty", "apidoc-debug": "shx rm -rf build/apidoc && node --inspect-brk=9229 ./node_modules/jsdoc/jsdoc.js -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc", "apidoc": "shx rm -rf build/apidoc && jsdoc -R config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -P package.json -d build/apidoc" From 6704cf3aced4eab3eca8306c5f0b017fbb1dcdc8 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 6 Apr 2020 09:11:58 +0200 Subject: [PATCH 302/636] Changelog for v6.3.1 --- changelog/v6.3.1.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 changelog/v6.3.1.md diff --git a/changelog/v6.3.1.md b/changelog/v6.3.1.md new file mode 100644 index 0000000000..8d814d125a --- /dev/null +++ b/changelog/v6.3.1.md @@ -0,0 +1,9 @@ +# 6.3.1 + +This is a bugfix release which removes the auto-generated `.d.ts` TypeScript type files from the published package. + +## List of all changes + + * [#10877](https://github.com/openlayers/openlayers/pull/10877) - Remove .d.ts files from the package ([@ahocevar](https://github.com/ahocevar)) + * [#10872](https://github.com/openlayers/openlayers/pull/10872) - Use TypeScript 3.9 for type generation for better enums ([@ahocevar](https://github.com/ahocevar)) + From af9f26b9d343e5496ea44a729265c4002616b240 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 6 Apr 2020 09:15:48 +0200 Subject: [PATCH 303/636] Update package version for 6.3.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43de8147d9..2429cfc732 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.3.1-dev", + "version": "6.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a2930cc3e3..a14d7e89cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.3.1-dev", + "version": "6.3.1", "description": "OpenLayers mapping library", "keywords": [ "map", From 347159d5fdf4fb9bee87371cd6409426212be756 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 6 Apr 2020 09:20:14 +0200 Subject: [PATCH 304/636] Develop on 6.3.2-dev --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2429cfc732..790ac2a44a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.3.1", + "version": "6.3.2-dev", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a14d7e89cc..9768e344a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ol", - "version": "6.3.1", + "version": "6.3.2-dev", "description": "OpenLayers mapping library", "keywords": [ "map", From c9d27e29d6b36a1a5cd0d919e3ff327a48b45b72 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 09:08:08 +0000 Subject: [PATCH 305/636] Bump rollup from 2.3.0 to 2.3.3 Bumps [rollup](https://github.com/rollup/rollup) from 2.3.0 to 2.3.3. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v2.3.0...v2.3.3) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 790ac2a44a..fc906d0a8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10170,9 +10170,9 @@ } }, "rollup": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.3.0.tgz", - "integrity": "sha512-nIq2Z9YwNbEfqTlAXe/tVl8CwUsjX/8Q5Jxlx+JRoYCu5keKLc6k0zyt11sM6WtCDxhmmJEIosFy9y26ZFRx6w==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.3.3.tgz", + "integrity": "sha512-uJ9VNWk80mb4wDCSfd1AyHoSc9TrWbkZtnO6wbsMTp9muSWkT26Dvc99MX1yGCOTvUN1Skw/KpFzKdUDuZKTXA==", "dev": true, "requires": { "fsevents": "~2.1.2" From 00d6b8272cf1e8ca790cfcda63e7b99a29a90580 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 09:09:50 +0000 Subject: [PATCH 306/636] Bump handlebars from 4.7.4 to 4.7.6 Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.4 to 4.7.6. - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md) - [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.4...v4.7.6) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 790ac2a44a..443105afae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6326,15 +6326,16 @@ "dev": true }, "handlebars": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.4.tgz", - "integrity": "sha512-Is8+SzHv8K9STNadlBVpVhxXrSXxVgTyIvhdg2Qjak1SfSZ7iEozLHdwiX1jJ9lLFkcFJxqGK5s/cI7ZX+qGkQ==", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", "dev": true, "requires": { + "minimist": "^1.2.5", "neo-async": "^2.6.0", "source-map": "^0.6.1", "uglify-js": "^3.1.4", - "yargs": "^15.3.1" + "wordwrap": "^1.0.0" } }, "har-schema": { diff --git a/package.json b/package.json index 9768e344a9..f3ae5a60d7 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "fs-extra": "^9.0.0", "glob": "^7.1.5", "globby": "^11.0.0", - "handlebars": "4.7.4", + "handlebars": "4.7.6", "istanbul": "0.4.5", "istanbul-instrumenter-loader": "^3.0.1", "jquery": "3.4.1", From 4330697ed2f467bb5141d94c64058f21c90653f6 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 6 Apr 2020 11:57:10 +0200 Subject: [PATCH 307/636] Fix focus condition --- src/ol/events/condition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/events/condition.js b/src/ol/events/condition.js index fca9ac4032..b4049571f1 100644 --- a/src/ol/events/condition.js +++ b/src/ol/events/condition.js @@ -58,7 +58,7 @@ export const altShiftKeysOnly = function(mapBrowserEvent) { * @api */ export const focus = function(event) { - return event.target.getTargetElement() === document.activeElement; + return event.target.getTargetElement().contains(document.activeElement); }; From e951a3c7d5447e17c516b33eea79ed0715ffe9bf Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 6 Apr 2020 16:51:22 +0200 Subject: [PATCH 308/636] Fix dependency source management for examples --- examples/webpack/example-builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js index d25306b897..37148fb303 100644 --- a/examples/webpack/example-builder.js +++ b/examples/webpack/example-builder.js @@ -248,7 +248,7 @@ ExampleBuilder.prototype.render = async function(dir, chunk) { data.pkgJson = JSON.stringify({ name: name, - dependencies: getDependencies(jsSource + workerSource ? `\n${workerSource}` : ''), + dependencies: getDependencies(jsSource + (workerSource ? `\n${workerSource}` : '')), devDependencies: { parcel: '1.11.0' }, From 054af0903281760daa80a289d1c1d50481be59cc Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 6 Apr 2020 12:25:12 -0600 Subject: [PATCH 309/636] Make code prettier This updates ESLint and our shared eslint-config-openlayers to use Prettier. Most formatting changes were automatically applied with this: npm run lint -- --fix A few manual changes were required: * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import. * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason. While editing this, I reworked `ExampleBuilder` to be a class. * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument. --- config/jsdoc/api/plugins/api.js | 49 +- config/jsdoc/api/plugins/events.js | 8 +- config/jsdoc/api/plugins/inline-options.js | 21 +- config/jsdoc/api/plugins/markdown.js | 42 +- config/jsdoc/api/plugins/observable.js | 18 +- config/jsdoc/api/template/publish.js | 205 +- config/jsdoc/info/api-plugin.js | 10 +- config/jsdoc/info/define-plugin.js | 12 +- config/jsdoc/info/publish.js | 237 +- config/jsdoc/info/virtual-plugin.js | 8 +- config/webpack-config-legacy-build.js | 4 +- examples/accessible.js | 17 +- examples/animation.js | 135 +- examples/arcgis-image.js | 21 +- examples/arcgis-tiled.js | 19 +- examples/attributions.js | 16 +- examples/bing-maps.js | 36 +- examples/box-selection.js | 35 +- examples/button-title.js | 17 +- examples/canvas-gradient-pattern.js | 32 +- examples/canvas-tiles.js | 13 +- examples/cartodb.js | 37 +- examples/center.js | 77 +- examples/chaikin.js | 20 +- examples/cluster.js | 41 +- examples/color-manipulation.js | 59 +- examples/custom-controls.js | 25 +- examples/custom-interactions.js | 78 +- examples/d3.js | 41 +- examples/device-orientation.js | 19 +- examples/disable-image-smoothing.js | 60 +- examples/drag-and-drop-image-vector.js | 56 +- examples/drag-and-drop.js | 51 +- examples/drag-rotate-and-zoom.js | 22 +- examples/draw-and-modify-features.js | 29 +- examples/draw-features.js | 17 +- examples/draw-freehand.js | 17 +- examples/draw-shapes.js | 26 +- examples/dynamic-data.js | 34 +- examples/earthquake-clusters.js | 93 +- examples/earthquake-custom-symbol.js | 57 +- examples/edit-geographic.js | 24 +- examples/epsg-4326.js | 21 +- examples/es2015-custom-element.js | 14 +- examples/export-map.js | 51 +- examples/export-pdf.js | 126 +- examples/extent-constrained.js | 15 +- examples/extent-interaction.js | 22 +- examples/feature-animation.js | 32 +- examples/feature-move-animation.js | 86 +- examples/filter-points-webgl.js | 89 +- examples/flight-animation.js | 92 +- examples/fractal.js | 31 +- examples/full-screen-drag-rotate-and-zoom.js | 34 +- examples/full-screen-source.js | 19 +- examples/full-screen.js | 25 +- examples/geographic.js | 38 +- examples/geojson-vt.js | 92 +- examples/geojson.js | 255 +- examples/geolocation-orientation.js | 105 +- examples/geolocation.js | 57 +- examples/getfeatureinfo-image.js | 26 +- examples/getfeatureinfo-layers.js | 42 +- examples/getfeatureinfo-tile.js | 24 +- examples/gpx.js | 51 +- examples/graticule.js | 21 +- examples/heatmap-earthquakes.js | 26 +- examples/here-maps.js | 44 +- examples/hit-tolerance.js | 55 +- examples/hitdetect-vector.js | 53 +- examples/icon-color.js | 72 +- examples/icon-negative.js | 32 +- examples/icon-sprite-webgl.js | 115 +- examples/icon.js | 38 +- examples/igc.js | 80 +- examples/iiif.js | 74 +- examples/image-filter.js | 80 +- examples/image-load-events.js | 42 +- examples/image-vector-layer.js | 76 +- examples/immediate-geographic.js | 22 +- examples/jsts.js | 75 +- examples/kml-earthquakes.js | 46 +- examples/kml-timezones.js | 51 +- examples/kml.js | 31 +- examples/layer-clipping-vector.js | 31 +- examples/layer-clipping.js | 18 +- examples/layer-extent.js | 33 +- examples/layer-group.js | 57 +- examples/layer-spy.js | 40 +- examples/layer-swipe.js | 31 +- examples/layer-z-index.js | 29 +- examples/layer-zoom-limits.js | 23 +- examples/lazy-source.js | 12 +- examples/line-arrows.js | 56 +- examples/localized-openstreetmap.js | 30 +- examples/magnify.js | 34 +- examples/mapbox-layer.js | 34 +- examples/mapbox-style.js | 7 +- examples/mapbox-vector-tiles-advanced.js | 44 +- examples/mapbox-vector-tiles.js | 25 +- examples/mapguide-untiled.js | 21 +- examples/measure.js | 149 +- examples/min-max-resolution.js | 23 +- examples/min-zoom.js | 14 +- examples/mobile-full-screen.js | 22 +- examples/modify-features.js | 25 +- examples/modify-test.js | 334 +- examples/mouse-position.js | 22 +- examples/moveend.js | 15 +- examples/navigation-controls.js | 25 +- examples/offscreen-canvas.js | 68 +- examples/offscreen-canvas.worker.js | 159 +- examples/osm-vector-tiles.js | 55 +- examples/overlay.js | 27 +- examples/overviewmap-custom.js | 41 +- examples/overviewmap.js | 24 +- examples/page-scroll.js | 13 +- examples/permalink.js | 37 +- examples/pinch-zoom.js | 22 +- examples/polygon-styles.js | 122 +- examples/popup.js | 40 +- examples/preload.js | 31 +- examples/print-to-scale.js | 132 +- examples/raster.js | 102 +- examples/region-growing.js | 36 +- examples/regularshape.js | 48 +- examples/render-geometry.js | 25 +- examples/reprojection-by-code.js | 99 +- examples/reprojection-image.js | 36 +- examples/reprojection-wgs84.js | 12 +- examples/reprojection.js | 193 +- examples/reusable-source.js | 22 +- examples/rotation.js | 13 +- examples/scale-line.js | 22 +- examples/scaleline-indiana-east.js | 30 +- examples/sea-level.js | 44 +- examples/select-features.js | 45 +- examples/select-hover-features.js | 34 +- examples/select-multiple-features.js | 34 +- examples/semi-transparent-layer.js | 25 +- examples/shaded-relief.js | 47 +- examples/side-by-side.js | 19 +- examples/simple.js | 13 +- examples/snap.js | 59 +- examples/sphere-mollweide.js | 36 +- examples/stamen.js | 21 +- examples/static-image.js | 19 +- examples/street-labels.js | 59 +- examples/svg-layer.js | 44 +- examples/synthetic-lines.js | 19 +- examples/synthetic-points.js | 49 +- examples/teleport.js | 25 +- examples/tile-load-events.js | 49 +- examples/tile-transitions.js | 29 +- examples/tilejson.js | 15 +- examples/tissot.js | 34 +- examples/topojson.js | 31 +- examples/topolis.js | 88 +- examples/tracing.js | 88 +- examples/translate-features.js | 25 +- examples/turf.js | 61 +- examples/two-finger-pan-scroll.js | 22 +- examples/utfgrid.js | 39 +- examples/vector-esri-edit.js | 144 +- examples/vector-esri.js | 136 +- examples/vector-label-decluttering.js | 28 +- examples/vector-labels.js | 103 +- examples/vector-layer.js | 53 +- examples/vector-osm.js | 89 +- examples/vector-tile-info.js | 21 +- examples/vector-tile-selection.js | 49 +- examples/vector-tiles-4326.js | 41 +- examples/vector-wfs-getfeature.js | 50 +- examples/vector-wfs.js | 45 +- examples/webgl-points-layer.js | 140 +- examples/webpack/config.js | 68 +- examples/webpack/example-builder.js | 387 +- examples/webpack/worker-loader.js | 2 +- examples/wkt.js | 21 +- examples/wms-capabilities.js | 14 +- examples/wms-custom-proj.js | 130 +- examples/wms-custom-tilegrid-512x256.js | 25 +- examples/wms-getlegendgraphic.js | 20 +- examples/wms-image-custom-proj.js | 51 +- examples/wms-image.js | 17 +- examples/wms-no-proj.js | 35 +- examples/wms-tiled-wrap-180.js | 17 +- examples/wms-tiled.js | 17 +- examples/wms-time.js | 24 +- examples/wmts-capabilities.js | 14 +- examples/wmts-dimensions.js | 31 +- examples/wmts-hidpi.js | 42 +- examples/wmts-ign.js | 22 +- examples/wmts-layer-from-capabilities.js | 56 +- examples/wmts.js | 33 +- examples/worker.js | 19 +- examples/xyz-esri-4326-512.js | 17 +- examples/xyz-esri.js | 23 +- examples/xyz-retina.js | 26 +- examples/xyz.js | 16 +- examples/zoom-constrained.js | 17 +- examples/zoomify.js | 16 +- examples/zoomslider.js | 11 +- package-lock.json | 818 +-- package.json | 4 +- rendering/cases/circle-style/main.js | 35 +- rendering/cases/geometry-geographic/main.js | 31 +- rendering/cases/heatmap-layer/main.js | 24 +- rendering/cases/icon-opacity/main.js | 39 +- rendering/cases/icon-symbol-svg/main.js | 75 +- rendering/cases/icon-symbol/main.js | 39 +- rendering/cases/immediate-geographic/main.js | 30 +- rendering/cases/layer-clipping/main.js | 44 +- rendering/cases/layer-group/main.js | 18 +- .../main.js | 30 +- .../cases/layer-image-extent-rotation/main.js | 36 +- rendering/cases/layer-image/main.js | 30 +- .../layer-tile-extent-geographic/main.js | 16 +- rendering/cases/layer-tile-extent/main.js | 18 +- .../cases/layer-tile-none-square/main.js | 12 +- rendering/cases/layer-tile-opacity/main.js | 14 +- .../cases/layer-tile-render-listener/main.js | 42 +- rendering/cases/layer-tile-simple/main.js | 14 +- rendering/cases/layer-tile-transition/main.js | 14 +- rendering/cases/layer-tile-two-layers/main.js | 16 +- .../cases/layer-vector-decluttering/main.js | 186 +- .../layer-vector-extent-geographic/main.js | 14 +- .../main.js | 29 +- .../layer-vector-polygon-partial/main.js | 62 +- rendering/cases/layer-vector-polygon/main.js | 48 +- rendering/cases/layer-vector/main.js | 103 +- .../layer-vectorimage-decluttering/main.js | 186 +- rendering/cases/layer-vectorimage/main.js | 105 +- .../main.js | 20 +- .../layer-vectortile-rotate-hidpi/main.js | 20 +- .../layer-vectortile-rotate-vector/main.js | 44 +- .../cases/layer-vectortile-rotate/main.js | 18 +- .../cases/layer-vectortile-simple/main.js | 20 +- .../cases/linestring-style-css-filter/main.js | 80 +- .../cases/linestring-style-opacity/main.js | 80 +- .../cases/linestring-style-rotation/main.js | 80 +- rendering/cases/linestring-style/main.js | 80 +- rendering/cases/map-pan/main.js | 20 +- rendering/cases/map-text-align/main.js | 15 +- rendering/cases/map/main.js | 20 +- rendering/cases/multiple-layers/main.js | 37 +- rendering/cases/multipoint-style/main.js | 256 +- rendering/cases/point-style/main.js | 256 +- .../polygon-style-gradient-pattern/main.js | 84 +- rendering/cases/polygon-style/main.js | 168 +- rendering/cases/regularshape-style/main.js | 115 +- rendering/cases/render-context/main.js | 151 +- rendering/cases/reproj-image/main.js | 27 +- rendering/cases/reproj-tile-4326/main.js | 21 +- rendering/cases/reproj-tile-5070/main.js | 20 +- rendering/cases/reproj-tile-54009/main.js | 19 +- .../cases/reproj-tile-dateline-merc/main.js | 16 +- .../reproj-tile-disable-smoothing/main.js | 12 +- .../cases/reproj-tile-none-square/main.js | 19 +- rendering/cases/reproj-tile-northpole/main.js | 21 +- rendering/cases/rotated-view/main.js | 31 +- rendering/cases/single-layer/main.js | 12 +- rendering/cases/source-raster/main.js | 23 +- .../cases/source-tilewms-gutter0/main.js | 11 +- .../cases/source-tilewms-gutter20/main.js | 11 +- rendering/cases/stacking/main.js | 50 +- .../cases/text-style-linestring-nice/main.js | 187 +- .../cases/text-style-linestring-ugly/main.js | 165 +- rendering/cases/text-style-overlap/main.js | 96 +- rendering/cases/text-style/main.js | 172 +- .../cases/tile-disable-smoothing/main.js | 10 +- rendering/cases/vector-zindex/main.js | 46 +- rendering/cases/webgl-points/main.js | 30 +- rendering/cases/zoomify-no-zdirection/main.js | 10 +- rendering/cases/zoomify-zdirection/main.js | 10 +- rendering/test.js | 136 +- rendering/webpack.config.js | 22 +- src/ol/AssertionError.js | 10 +- src/ol/Collection.js | 26 +- src/ol/CollectionEventType.js | 2 +- src/ol/Disposable.js | 1 - src/ol/Feature.js | 44 +- src/ol/Geolocation.js | 83 +- src/ol/Image.js | 56 +- src/ol/ImageBase.js | 6 +- src/ol/ImageCanvas.js | 9 +- src/ol/ImageState.js | 2 +- src/ol/ImageTile.js | 14 +- src/ol/Kinetic.js | 2 - src/ol/Map.js | 6 +- src/ol/MapBrowserEvent.js | 4 - src/ol/MapBrowserEventHandler.js | 144 +- src/ol/MapBrowserEventType.js | 3 +- src/ol/MapBrowserPointerEvent.js | 4 - src/ol/MapEvent.js | 4 - src/ol/MapEventType.js | 4 +- src/ol/MapProperty.js | 2 +- src/ol/Object.js | 19 +- src/ol/ObjectEventType.js | 2 +- src/ol/Observable.js | 6 +- src/ol/Overlay.js | 153 +- src/ol/OverlayPositioning.js | 2 +- src/ol/PluggableMap.js | 479 +- src/ol/Tile.js | 18 +- src/ol/TileCache.js | 16 +- src/ol/TileQueue.js | 45 +- src/ol/TileRange.js | 31 +- src/ol/TileState.js | 2 +- src/ol/VectorRenderTile.js | 8 +- src/ol/VectorTile.js | 3 - src/ol/View.js | 474 +- src/ol/ViewHint.js | 2 +- src/ol/ViewProperty.js | 2 +- src/ol/array.js | 29 +- src/ol/centerconstraint.js | 11 +- src/ol/color.js | 103 +- src/ol/colorlike.js | 2 - src/ol/control.js | 8 +- src/ol/control/Attribution.js | 58 +- src/ol/control/Control.js | 27 +- src/ol/control/FullScreen.js | 74 +- src/ol/control/MousePosition.js | 52 +- src/ol/control/OverviewMap.js | 159 +- src/ol/control/Rotate.js | 24 +- src/ol/control/ScaleLine.js | 144 +- src/ol/control/Zoom.js | 54 +- src/ol/control/ZoomSlider.js | 82 +- src/ol/control/ZoomToExtent.js | 28 +- src/ol/coordinate.js | 69 +- src/ol/css.js | 33 +- src/ol/dom.js | 14 +- src/ol/easing.js | 5 - src/ol/events.js | 7 +- src/ol/events/Event.js | 5 - src/ol/events/EventType.js | 2 +- src/ol/events/KeyCode.js | 2 +- src/ol/events/Target.js | 22 +- src/ol/events/condition.js | 93 +- src/ol/extent.js | 197 +- src/ol/extent/Corner.js | 2 +- src/ol/extent/Relationship.js | 2 +- src/ol/featureloader.js | 51 +- src/ol/format/EsriJSON.js | 129 +- src/ol/format/Feature.js | 85 +- src/ol/format/FormatType.js | 2 +- src/ol/format/GML.js | 2 - src/ol/format/GML2.js | 331 +- src/ol/format/GML3.js | 544 +- src/ol/format/GML32.js | 211 +- src/ol/format/GMLBase.js | 223 +- src/ol/format/GPX.js | 602 ++- src/ol/format/GeoJSON.js | 133 +- src/ol/format/IGC.js | 27 +- src/ol/format/IIIFInfo.js | 298 +- src/ol/format/JSONFeature.js | 16 +- src/ol/format/KML.js | 1727 ++++--- src/ol/format/MVT.js | 102 +- src/ol/format/OSMXML.js | 103 +- src/ol/format/OWS.js | 241 +- src/ol/format/Polyline.js | 62 +- src/ol/format/TextFeature.js | 19 +- src/ol/format/TopoJSON.js | 100 +- src/ol/format/WFS.js | 412 +- src/ol/format/WKT.js | 87 +- src/ol/format/WMSCapabilities.js | 390 +- src/ol/format/WMSGetFeatureInfo.js | 39 +- src/ol/format/WMTSCapabilities.js | 188 +- src/ol/format/XLink.js | 2 - src/ol/format/XMLFeature.js | 40 +- src/ol/format/filter.js | 38 +- src/ol/format/filter/And.js | 2 - src/ol/format/filter/Bbox.js | 7 +- src/ol/format/filter/Comparison.js | 3 - src/ol/format/filter/ComparisonBinary.js | 3 - src/ol/format/filter/Contains.js | 4 - src/ol/format/filter/During.js | 2 - src/ol/format/filter/EqualTo.js | 2 - src/ol/format/filter/Filter.js | 2 - src/ol/format/filter/GreaterThan.js | 2 - src/ol/format/filter/GreaterThanOrEqualTo.js | 2 - src/ol/format/filter/Intersects.js | 2 - src/ol/format/filter/IsBetween.js | 2 - src/ol/format/filter/IsLike.js | 17 +- src/ol/format/filter/IsNull.js | 2 - src/ol/format/filter/LessThan.js | 2 - src/ol/format/filter/LessThanOrEqualTo.js | 2 - src/ol/format/filter/LogicalNary.js | 5 +- src/ol/format/filter/Not.js | 4 - src/ol/format/filter/NotEqualTo.js | 2 - src/ol/format/filter/Or.js | 2 - src/ol/format/filter/Spatial.js | 3 - src/ol/format/filter/Within.js | 2 - src/ol/format/xsd.js | 35 +- src/ol/functions.js | 2 +- src/ol/geom/Circle.js | 27 +- src/ol/geom/Geometry.js | 75 +- src/ol/geom/GeometryCollection.js | 43 +- src/ol/geom/GeometryLayout.js | 2 +- src/ol/geom/GeometryType.js | 2 +- src/ol/geom/LineString.js | 115 +- src/ol/geom/LinearRing.js | 73 +- src/ol/geom/MultiLineString.js | 136 +- src/ol/geom/MultiPoint.js | 52 +- src/ol/geom/MultiPolygon.js | 174 +- src/ol/geom/Point.js | 17 +- src/ol/geom/Polygon.js | 184 +- src/ol/geom/SimpleGeometry.js | 83 +- src/ol/geom/flat/area.js | 3 - src/ol/geom/flat/center.js | 8 +- src/ol/geom/flat/closest.js | 157 +- src/ol/geom/flat/contains.js | 64 +- src/ol/geom/flat/deflate.js | 40 +- src/ol/geom/flat/flip.js | 10 +- src/ol/geom/flat/geodesic.js | 53 +- src/ol/geom/flat/inflate.js | 44 +- src/ol/geom/flat/interiorpoint.js | 36 +- src/ol/geom/flat/interpolate.js | 76 +- src/ol/geom/flat/intersectsextent.js | 159 +- src/ol/geom/flat/length.js | 2 - src/ol/geom/flat/orient.js | 68 +- src/ol/geom/flat/reverse.js | 1 - src/ol/geom/flat/segments.js | 3 +- src/ol/geom/flat/simplify.js | 189 +- src/ol/geom/flat/straightchunk.js | 1 - src/ol/geom/flat/textpath.js | 21 +- src/ol/geom/flat/topology.js | 7 +- src/ol/geom/flat/transform.js | 44 +- src/ol/has.js | 21 +- src/ol/interaction.js | 84 +- src/ol/interaction/DoubleClickZoom.js | 10 +- src/ol/interaction/DragAndDrop.js | 48 +- src/ol/interaction/DragBox.js | 56 +- src/ol/interaction/DragPan.js | 31 +- src/ol/interaction/DragRotate.js | 27 +- src/ol/interaction/DragRotateAndZoom.js | 7 +- src/ol/interaction/DragZoom.js | 25 +- src/ol/interaction/Draw.js | 307 +- src/ol/interaction/Extent.js | 112 +- src/ol/interaction/Interaction.js | 9 +- src/ol/interaction/KeyboardPan.js | 40 +- src/ol/interaction/KeyboardZoom.js | 24 +- src/ol/interaction/Modify.js | 354 +- src/ol/interaction/MouseWheelZoom.js | 51 +- src/ol/interaction/PinchRotate.js | 14 +- src/ol/interaction/PinchZoom.js | 9 +- src/ol/interaction/Pointer.js | 26 +- src/ol/interaction/Property.js | 2 +- src/ol/interaction/Select.js | 175 +- src/ol/interaction/Snap.js | 182 +- src/ol/interaction/Translate.js | 67 +- src/ol/layer.js | 1 - src/ol/layer/Base.js | 45 +- src/ol/layer/BaseImage.js | 4 - src/ol/layer/BaseTile.js | 55 +- src/ol/layer/BaseVector.js | 42 +- src/ol/layer/Graticule.js | 364 +- src/ol/layer/Group.js | 79 +- src/ol/layer/Heatmap.js | 49 +- src/ol/layer/Image.js | 3 - src/ol/layer/Layer.js | 62 +- src/ol/layer/Property.js | 2 +- src/ol/layer/Tile.js | 3 - src/ol/layer/TileProperty.js | 2 +- src/ol/layer/Vector.js | 2 - src/ol/layer/VectorImage.js | 8 +- src/ol/layer/VectorTile.js | 27 +- src/ol/layer/VectorTileRenderType.js | 2 +- src/ol/layer/WebGLPoints.js | 16 +- src/ol/loadingstrategy.js | 17 +- src/ol/math.js | 16 +- src/ol/net.js | 13 +- src/ol/obj.js | 56 +- src/ol/pointer/EventType.js | 2 +- src/ol/proj.js | 155 +- src/ol/proj/Projection.js | 11 +- src/ol/proj/Units.js | 5 +- src/ol/proj/epsg3857.js | 35 +- src/ol/proj/epsg4326.js | 14 +- src/ol/proj/proj4.js | 30 +- src/ol/proj/projections.js | 4 - src/ol/proj/transforms.js | 5 - src/ol/render.js | 42 +- src/ol/render/Box.js | 9 +- src/ol/render/Event.js | 4 - src/ol/render/EventType.js | 4 +- src/ol/render/Feature.js | 102 +- src/ol/render/canvas.js | 96 +- src/ol/render/canvas/Builder.js | 225 +- src/ol/render/canvas/BuilderGroup.js | 15 +- src/ol/render/canvas/BuilderType.js | 2 +- src/ol/render/canvas/Executor.js | 354 +- src/ol/render/canvas/ExecutorGroup.js | 131 +- src/ol/render/canvas/ImageBuilder.js | 102 +- src/ol/render/canvas/Immediate.js | 342 +- src/ol/render/canvas/Instruction.js | 7 +- src/ol/render/canvas/LineStringBuilder.js | 80 +- src/ol/render/canvas/PolygonBuilder.js | 85 +- src/ol/render/canvas/TextBuilder.js | 239 +- src/ol/render/canvas/hitdetect.js | 67 +- src/ol/renderer/Composite.js | 43 +- src/ol/renderer/Layer.js | 22 +- src/ol/renderer/Map.js | 66 +- src/ol/renderer/canvas/ImageLayer.js | 83 +- src/ol/renderer/canvas/Layer.js | 68 +- src/ol/renderer/canvas/TileLayer.js | 193 +- src/ol/renderer/canvas/VectorImageLayer.js | 125 +- src/ol/renderer/canvas/VectorLayer.js | 401 +- src/ol/renderer/canvas/VectorTileLayer.js | 442 +- src/ol/renderer/vector.js | 142 +- src/ol/renderer/webgl/Layer.js | 37 +- src/ol/renderer/webgl/PointsLayer.js | 301 +- src/ol/reproj.js | 169 +- src/ol/reproj/Image.js | 91 +- src/ol/reproj/Tile.js | 156 +- src/ol/reproj/Triangulation.js | 283 +- src/ol/resolutionconstraint.js | 115 +- src/ol/rotationconstraint.js | 17 +- src/ol/size.js | 5 - src/ol/source/BingMaps.js | 152 +- src/ol/source/CartoDB.js | 27 +- src/ol/source/Cluster.js | 29 +- src/ol/source/IIIF.js | 163 +- src/ol/source/Image.js | 86 +- src/ol/source/ImageArcGISRest.js | 77 +- src/ol/source/ImageCanvas.js | 62 +- src/ol/source/ImageMapGuide.js | 89 +- src/ol/source/ImageStatic.js | 51 +- src/ol/source/ImageWMS.js | 128 +- src/ol/source/OSM.js | 25 +- src/ol/source/Raster.js | 117 +- src/ol/source/Source.js | 26 +- src/ol/source/Stamen.js | 65 +- src/ol/source/State.js | 2 +- src/ol/source/Tile.js | 47 +- src/ol/source/TileArcGISRest.js | 42 +- src/ol/source/TileDebug.js | 59 +- src/ol/source/TileEventType.js | 4 +- src/ol/source/TileImage.js | 120 +- src/ol/source/TileJSON.js | 45 +- src/ol/source/TileWMS.js | 84 +- src/ol/source/UTFGrid.js | 150 +- src/ol/source/UrlTile.js | 31 +- src/ol/source/Vector.js | 185 +- src/ol/source/VectorEventType.js | 2 +- src/ol/source/VectorTile.js | 237 +- src/ol/source/WMSServerType.js | 2 +- src/ol/source/WMTS.js | 154 +- src/ol/source/WMTSRequestEncoding.js | 2 +- src/ol/source/XYZ.js | 27 +- src/ol/source/Zoomify.js | 101 +- src/ol/source/common.js | 2 +- src/ol/sphere.js | 39 +- src/ol/string.js | 8 +- src/ol/structs/LRUCache.js | 33 +- src/ol/structs/LinkedList.js | 17 +- src/ol/structs/PriorityQueue.js | 32 +- src/ol/structs/RBush.js | 36 +- src/ol/style/Circle.js | 10 +- src/ol/style/Fill.js | 6 +- src/ol/style/Icon.js | 107 +- src/ol/style/IconAnchorUnits.js | 2 +- src/ol/style/IconImage.js | 14 +- src/ol/style/IconImageCache.js | 62 +- src/ol/style/IconOrigin.js | 2 +- src/ol/style/Image.js | 6 +- src/ol/style/LiteralStyle.js | 3 +- src/ol/style/RegularShape.js | 83 +- src/ol/style/Stroke.js | 6 +- src/ol/style/Style.js | 102 +- src/ol/style/Text.js | 34 +- src/ol/style/TextPlacement.js | 2 +- src/ol/style/expressions.js | 330 +- src/ol/tilecoord.js | 7 - src/ol/tilegrid.js | 63 +- src/ol/tilegrid/TileGrid.js | 134 +- src/ol/tilegrid/WMTS.js | 48 +- src/ol/tileurlfunction.js | 14 +- src/ol/transform.js | 12 - src/ol/uri.js | 3 +- src/ol/util.js | 2 +- src/ol/vec/mat4.js | 2 - src/ol/webgl.js | 36 +- src/ol/webgl/Buffer.js | 8 +- src/ol/webgl/ContextEventType.js | 2 +- src/ol/webgl/Helper.js | 334 +- src/ol/webgl/PostProcessingPass.js | 142 +- src/ol/webgl/RenderTarget.js | 22 +- src/ol/webgl/ShaderBuilder.js | 145 +- src/ol/worker/version.js | 2 +- src/ol/worker/webgl.js | 29 +- src/ol/xml.js | 184 +- tasks/generate-index.js | 37 +- tasks/generate-info.js | 35 +- tasks/prepare-package.js | 10 +- tasks/serialize-workers.js | 17 +- test/karma.config.js | 119 +- test/spec/ol/MapBrowserEvent.test.js | 25 +- test/spec/ol/MapBrowserEventHandler.test.js | 75 +- test/spec/ol/array.test.js | 537 +- test/spec/ol/assertionerror.test.js | 21 +- test/spec/ol/asserts.test.js | 11 +- test/spec/ol/collection.test.js | 165 +- test/spec/ol/color.test.js | 129 +- test/spec/ol/control/attribution.test.js | 80 +- test/spec/ol/control/control.test.js | 36 +- test/spec/ol/control/fullscreen.test.js | 10 +- test/spec/ol/control/mouseposition.test.js | 54 +- test/spec/ol/control/overviewmap.test.js | 81 +- test/spec/ol/control/rotate.test.js | 10 +- test/spec/ol/control/scaleline.test.js | 466 +- test/spec/ol/control/zoom.test.js | 10 +- test/spec/ol/control/zoomslider.test.js | 78 +- test/spec/ol/control/zoomtoextent.test.js | 10 +- test/spec/ol/coordinate.test.js | 213 +- test/spec/ol/css.test.js | 80 +- test/spec/ol/disposable.test.js | 25 +- test/spec/ol/dom/dom.test.js | 213 +- test/spec/ol/events.test.js | 56 +- test/spec/ol/events/event.test.js | 33 +- test/spec/ol/events/eventtarget.test.js | 81 +- test/spec/ol/expect.test.js | 85 +- test/spec/ol/extent.test.js | 585 ++- test/spec/ol/feature.test.js | 201 +- test/spec/ol/featureloader.test.js | 28 +- test/spec/ol/format/esrijson.test.js | 1596 ++++-- test/spec/ol/format/geojson.test.js | 776 +-- test/spec/ol/format/gml.test.js | 3421 ++++++------ test/spec/ol/format/gpx.test.js | 687 +-- test/spec/ol/format/igc.test.js | 137 +- test/spec/ol/format/iiif.test.js | 299 +- test/spec/ol/format/kml.test.js | 4569 +++++++++-------- test/spec/ol/format/mvt.test.js | 129 +- test/spec/ol/format/osmxml.test.js | 144 +- test/spec/ol/format/ows.test.js | 161 +- test/spec/ol/format/polyline.test.js | 235 +- test/spec/ol/format/topojson.test.js | 144 +- test/spec/ol/format/wfs.test.js | 1369 ++--- test/spec/ol/format/wkt.test.js | 790 ++- test/spec/ol/format/wmscapabilities.test.js | 134 +- test/spec/ol/format/wmsgetfeatureinfo.test.js | 300 +- test/spec/ol/format/wmtscapabilities.test.js | 121 +- test/spec/ol/format/xsd.test.js | 13 +- test/spec/ol/functions.test.js | 15 +- test/spec/ol/geolocation.test.js | 11 +- test/spec/ol/geom/circle.test.js | 165 +- test/spec/ol/geom/flat/area.test.js | 24 +- test/spec/ol/geom/flat/center.test.js | 71 +- test/spec/ol/geom/flat/closest.test.js | 443 +- test/spec/ol/geom/flat/contains.test.js | 104 +- test/spec/ol/geom/flat/deflate.test.js | 52 +- test/spec/ol/geom/flat/flip.test.js | 32 +- test/spec/ol/geom/flat/inflate.test.js | 44 +- test/spec/ol/geom/flat/interpolate.test.js | 95 +- .../ol/geom/flat/intersectsextent.test.js | 194 +- test/spec/ol/geom/flat/length.test.js | 39 +- test/spec/ol/geom/flat/orient.test.js | 337 +- test/spec/ol/geom/flat/reverse.test.js | 91 +- test/spec/ol/geom/flat/segments.test.js | 20 +- test/spec/ol/geom/flat/simplify.test.js | 978 +++- test/spec/ol/geom/flat/straightchunk.test.js | 51 +- test/spec/ol/geom/flat/textpath.test.js | 200 +- .../ol/geom/flat/topologyflatgeom.test.js | 42 +- test/spec/ol/geom/flat/transform.test.js | 175 +- test/spec/ol/geom/geometrycollection.test.js | 204 +- test/spec/ol/geom/linestring.test.js | 387 +- test/spec/ol/geom/multilinestring.test.js | 694 ++- test/spec/ol/geom/multipoint.test.js | 252 +- test/spec/ol/geom/multipolygon.test.js | 516 +- test/spec/ol/geom/point.test.js | 133 +- test/spec/ol/geom/polygon.test.js | 587 ++- test/spec/ol/graticule.test.js | 151 +- test/spec/ol/image.test.js | 22 +- test/spec/ol/imagetile.test.js | 25 +- test/spec/ol/index.test.js | 6 +- test/spec/ol/interaction/draganddrop.test.js | 68 +- .../ol/interaction/dragrotateandzoom.test.js | 51 +- test/spec/ol/interaction/dragzoom.test.js | 54 +- test/spec/ol/interaction/draw.test.js | 602 ++- test/spec/ol/interaction/extent.test.js | 43 +- test/spec/ol/interaction/interaction.test.js | 51 +- test/spec/ol/interaction/keyboardpan.test.js | 19 +- test/spec/ol/interaction/keyboardzoom.test.js | 24 +- test/spec/ol/interaction/modify.test.js | 329 +- .../ol/interaction/mousewheelzoom.test.js | 64 +- test/spec/ol/interaction/pointer.test.js | 47 +- test/spec/ol/interaction/select.test.js | 225 +- test/spec/ol/interaction/snap.test.js | 167 +- test/spec/ol/interaction/translate.test.js | 102 +- test/spec/ol/layer/group.test.js | 200 +- test/spec/ol/layer/heatmap.test.js | 43 +- test/spec/ol/layer/layer.test.js | 556 +- test/spec/ol/layer/tile.test.js | 54 +- test/spec/ol/layer/vector.test.js | 110 +- test/spec/ol/layer/vectorimage.test.js | 38 +- test/spec/ol/layer/vectortile.test.js | 107 +- test/spec/ol/map.test.js | 504 +- test/spec/ol/math.test.js | 87 +- test/spec/ol/net.test.js | 35 +- test/spec/ol/object.test.js | 100 +- test/spec/ol/objectutil.test.js | 47 +- test/spec/ol/observable.test.js | 55 +- test/spec/ol/overlay.test.js | 44 +- test/spec/ol/proj.test.js | 528 +- test/spec/ol/proj/epsg3857.test.js | 96 +- test/spec/ol/proj/transforms.test.js | 15 +- test/spec/ol/render.test.js | 44 +- test/spec/ol/render/box.test.js | 31 +- .../ol/render/canvas/executorgroup.test.js | 9 +- test/spec/ol/render/canvas/hitdetect.test.js | 38 +- test/spec/ol/render/canvas/immediate.test.js | 260 +- test/spec/ol/render/canvas/index.test.js | 93 +- .../spec/ol/render/canvas/textbuilder.test.js | 105 +- test/spec/ol/render/feature.test.js | 260 +- test/spec/ol/renderer/canvas/builder.test.js | 308 +- .../ol/renderer/canvas/imagelayer.test.js | 89 +- .../spec/ol/renderer/canvas/tilelayer.test.js | 54 +- .../ol/renderer/canvas/vectorimage.test.js | 33 +- .../ol/renderer/canvas/vectorlayer.test.js | 363 +- .../renderer/canvas/vectortilelayer.test.js | 278 +- test/spec/ol/renderer/layer.test.js | 75 +- test/spec/ol/renderer/map.test.js | 11 +- test/spec/ol/renderer/vector.test.js | 174 +- test/spec/ol/renderer/webgl/layer.test.js | 94 +- .../ol/renderer/webgl/pointslayer.test.js | 331 +- test/spec/ol/reproj/image.test.js | 90 +- test/spec/ol/reproj/reproj.test.js | 44 +- test/spec/ol/reproj/tile.test.js | 105 +- test/spec/ol/reproj/triangulation.test.js | 57 +- test/spec/ol/resolutionconstraint.test.js | 224 +- test/spec/ol/rotationconstraint.test.js | 10 +- test/spec/ol/size.test.js | 44 +- test/spec/ol/source/bingmaps.test.js | 66 +- test/spec/ol/source/cartodb.test.js | 9 +- test/spec/ol/source/cluster.test.js | 74 +- test/spec/ol/source/iiif.test.js | 526 +- test/spec/ol/source/imagearcgisrest.test.js | 106 +- test/spec/ol/source/imagestatic.test.js | 55 +- test/spec/ol/source/imagewms.test.js | 212 +- test/spec/ol/source/raster.test.js | 204 +- test/spec/ol/source/source.test.js | 65 +- test/spec/ol/source/stamen.test.js | 18 +- test/spec/ol/source/tile.test.js | 164 +- test/spec/ol/source/tilearcgisrest.test.js | 147 +- test/spec/ol/source/tileimage.test.js | 193 +- test/spec/ol/source/tilejson.test.js | 126 +- test/spec/ol/source/tilewms.test.js | 160 +- test/spec/ol/source/urltile.test.js | 125 +- test/spec/ol/source/utfgrid.test.js | 123 +- test/spec/ol/source/vector.test.js | 474 +- test/spec/ol/source/vectortile.test.js | 286 +- test/spec/ol/source/wmts.test.js | 438 +- test/spec/ol/source/xyz.test.js | 161 +- test/spec/ol/source/zoomify.test.js | 218 +- test/spec/ol/sphere.test.js | 316 +- test/spec/ol/string.test.js | 20 +- test/spec/ol/structs/linkedlist.test.js | 98 +- test/spec/ol/structs/lrucache.test.js | 123 +- test/spec/ol/structs/priorityqueue.test.js | 59 +- test/spec/ol/structs/rbush.test.js | 176 +- test/spec/ol/style/circle.test.js | 65 +- test/spec/ol/style/expressions.test.js | 973 ++-- test/spec/ol/style/fill.test.js | 17 +- test/spec/ol/style/icon.test.js | 141 +- test/spec/ol/style/iconimagecache.test.js | 20 +- test/spec/ol/style/regularshape.test.js | 79 +- test/spec/ol/style/stroke.test.js | 17 +- test/spec/ol/style/style.test.js | 175 +- test/spec/ol/style/text.test.js | 67 +- test/spec/ol/tile.test.js | 37 +- test/spec/ol/tilecache.test.js | 19 +- test/spec/ol/tilecoord.test.js | 59 +- test/spec/ol/tilegrid/tilegrid.test.js | 473 +- test/spec/ol/tilegrid/wmts.test.js | 417 +- test/spec/ol/tilequeue.test.js | 59 +- test/spec/ol/tilerange.test.js | 32 +- test/spec/ol/tileurlfunction.test.js | 65 +- test/spec/ol/transform.test.js | 96 +- test/spec/ol/uri.test.js | 41 +- test/spec/ol/vec/mat4.test.js | 39 +- test/spec/ol/vectorrendertile.test.js | 51 +- test/spec/ol/vectortile.test.js | 33 +- test/spec/ol/view.test.js | 1547 +++--- test/spec/ol/webgl/buffer.test.js | 45 +- test/spec/ol/webgl/helper.test.js | 169 +- test/spec/ol/webgl/rendertarget.test.js | 44 +- test/spec/ol/webgl/shaderbuilder.test.js | 214 +- test/spec/ol/worker/version.test.js | 17 +- test/spec/ol/worker/webgl.test.js | 29 +- test/spec/util.js | 7 +- test/test-extensions.js | 251 +- 790 files changed, 46833 insertions(+), 33765 deletions(-) diff --git a/config/jsdoc/api/plugins/api.js b/config/jsdoc/api/plugins/api.js index 53e0a8c174..fcc6434864 100644 --- a/config/jsdoc/api/plugins/api.js +++ b/config/jsdoc/api/plugins/api.js @@ -2,19 +2,18 @@ * Define an @api tag * @param {Object} dictionary The tag dictionary. */ -exports.defineTags = function(dictionary) { +exports.defineTags = function (dictionary) { dictionary.defineTag('api', { mustNotHaveValue: true, canHaveType: false, canHaveName: false, - onTagged: function(doclet, tag) { + onTagged: function (doclet, tag) { includeTypes(doclet); doclet.stability = 'stable'; - } + }, }); }; - /* * Based on @api annotations, and assuming that items with no @api annotation * should not be documented, this plugin removes undocumented symbols @@ -56,7 +55,7 @@ function includeAugments(doclet) { if (!doclet.fires) { doclet.fires = []; } - cls.fires.forEach(function(f) { + cls.fires.forEach(function (f) { if (doclet.fires.indexOf(f) == -1) { doclet.fires.push(f); } @@ -66,7 +65,7 @@ function includeAugments(doclet) { if (!doclet.observables) { doclet.observables = []; } - cls.observables.forEach(function(f) { + cls.observables.forEach(function (f) { if (doclet.observables.indexOf(f) == -1) { doclet.observables.push(f); } @@ -79,7 +78,7 @@ function includeAugments(doclet) { } function extractTypes(item) { - item.type.names.forEach(function(type) { + item.type.names.forEach(function (type) { const match = type.match(/^(.*<)?([^>]*)>?$/); if (match) { modules[match[2]] = true; @@ -109,31 +108,35 @@ const moduleRoot = path.join(process.cwd(), 'src'); // Tag default exported Identifiers because their name should be the same as the module name. exports.astNodeVisitor = { - visitNode: function(node, e, parser, currentSourceName) { + visitNode: function (node, e, parser, currentSourceName) { if (node.parent && node.parent.type === 'ExportDefaultDeclaration') { - const modulePath = path.relative(moduleRoot, currentSourceName).replace(/\.js$/, ''); - const exportName = 'module:' + modulePath.replace(/\\/g, '/') + (node.name ? '~' + node.name : ''); + const modulePath = path + .relative(moduleRoot, currentSourceName) + .replace(/\.js$/, ''); + const exportName = + 'module:' + + modulePath.replace(/\\/g, '/') + + (node.name ? '~' + node.name : ''); defaultExports[exportName] = true; } - } + }, }; function sortOtherMembers(doclet) { if (doclet.fires) { - doclet.fires.sort(function(a, b) { + doclet.fires.sort(function (a, b) { return a.split(/#?event:/)[1] < b.split(/#?event:/)[1] ? -1 : 1; }); } if (doclet.observables) { - doclet.observables.sort(function(a, b) { + doclet.observables.sort(function (a, b) { return a.name < b.name ? -1 : 1; }); } } exports.handlers = { - - newDoclet: function(e) { + newDoclet: function (e) { const doclet = e.doclet; if (doclet.stability) { modules[doclet.longname.split(/[~\.]/).shift()] = true; @@ -152,7 +155,7 @@ exports.handlers = { } }, - parseComplete: function(e) { + parseComplete: function (e) { const doclets = e.doclets; const byLongname = doclets.index.longname; for (let i = doclets.length - 1; i >= 0; --i) { @@ -183,9 +186,12 @@ exports.handlers = { // Remove all other undocumented symbols doclet.undocumented = true; } - if (doclet.memberof && byLongname[doclet.memberof] && - byLongname[doclet.memberof][0].isEnum && - !byLongname[doclet.memberof][0].properties.some(p => p.stability)) { + if ( + doclet.memberof && + byLongname[doclet.memberof] && + byLongname[doclet.memberof][0].isEnum && + !byLongname[doclet.memberof][0].properties.some((p) => p.stability) + ) { byLongname[doclet.memberof][0].undocumented = true; } } @@ -194,10 +200,9 @@ exports.handlers = { processingComplete(e) { const byLongname = e.doclets.index.longname; for (const name in defaultExports) { - byLongname[name].forEach(function(doclet) { + byLongname[name].forEach(function (doclet) { doclet.isDefaultExport = true; }); } - } - + }, }; diff --git a/config/jsdoc/api/plugins/events.js b/config/jsdoc/api/plugins/events.js index 8caa3e9ff7..6ce80dd5e2 100644 --- a/config/jsdoc/api/plugins/events.js +++ b/config/jsdoc/api/plugins/events.js @@ -1,8 +1,7 @@ const events = {}; exports.handlers = { - - newDoclet: function(e) { + newDoclet: function (e) { const doclet = e.doclet; if (doclet.kind !== 'event') { return; @@ -15,7 +14,7 @@ exports.handlers = { events[cls].push(doclet.longname); }, - parseComplete: function(e) { + parseComplete: function (e) { const doclets = e.doclets; for (let i = 0, ii = doclets.length - 1; i < ii; ++i) { const doclet = doclets[i]; @@ -34,6 +33,5 @@ exports.handlers = { } } } - } - + }, }; diff --git a/config/jsdoc/api/plugins/inline-options.js b/config/jsdoc/api/plugins/inline-options.js index 02d6cb8ea6..b3ea474cae 100644 --- a/config/jsdoc/api/plugins/inline-options.js +++ b/config/jsdoc/api/plugins/inline-options.js @@ -6,12 +6,11 @@ const properties = {}; exports.handlers = { - /** * Collects all typedefs, keyed by longname * @param {Object} e Event object. */ - newDoclet: function(e) { + newDoclet: function (e) { if (e.doclet.kind == 'typedef' && e.doclet.properties) { properties[e.doclet.longname] = e.doclet.properties; } @@ -22,7 +21,7 @@ exports.handlers = { * collected typedefs. * @param {Object} e Event object. */ - parseComplete: function(e) { + parseComplete: function (e) { const doclets = e.doclets; for (let i = 0, ii = doclets.length; i < ii; ++i) { const doclet = doclets[i]; @@ -34,16 +33,18 @@ exports.handlers = { const type = param.type.names[0]; if (type in properties) { param.type.names[0] = type; - params.push.apply(params, properties[type].map(p => { - const property = Object.assign({}, p); - property.name = `${param.name}.${property.name}`; - return property; - })); + params.push.apply( + params, + properties[type].map((p) => { + const property = Object.assign({}, p); + property.name = `${param.name}.${property.name}`; + return property; + }) + ); } } } } } - } - + }, }; diff --git a/config/jsdoc/api/plugins/markdown.js b/config/jsdoc/api/plugins/markdown.js index 5508d495dc..d5e5c486f8 100644 --- a/config/jsdoc/api/plugins/markdown.js +++ b/config/jsdoc/api/plugins/markdown.js @@ -19,7 +19,7 @@ const tags = [ 'properties', 'returns', 'see', - 'summary' + 'summary', ]; const hasOwnProp = Object.prototype.hasOwnProperty; @@ -27,32 +27,32 @@ const hasOwnProp = Object.prototype.hasOwnProperty; const markedRenderer = new marked.Renderer(); // Allow prettyprint to work on inline code samples -markedRenderer.code = function(code, language) { +markedRenderer.code = function (code, language) { const langClass = language ? ' lang-' + language : ''; - return format('
    %s
    ', - langClass, escapeCode(code)); + return format( + '
    %s
    ', + langClass, + escapeCode(code) + ); }; function escapeCode(source) { - return source.replace(/'; if (returnTypes.length) { - f.signature += '' + (returnTypes.length ? '{' + returnTypes.join('|') + '}' : '') + ''; + f.signature += + '' + + (returnTypes.length ? '{' + returnTypes.join('|') + '}' : '') + + ''; } } function addSignatureTypes(f) { const types = helper.getSignatureTypes(f); - f.signature = (f.signature || '') + '' + (types.length ? ' :' + types.join('|') : '') + ' '; + f.signature = + (f.signature || '') + + '' + + (types.length ? ' :' + types.join('|') : '') + + ' '; } function shortenPaths(files, commonPrefix) { // always use forward slashes const regexp = new RegExp('\\\\', 'g'); - Object.keys(files).forEach(function(file) { - files[file].shortened = files[file].resolved.replace(commonPrefix, '') + Object.keys(files).forEach(function (file) { + files[file].shortened = files[file].resolved + .replace(commonPrefix, '') .replace(regexp, '/'); }); @@ -112,9 +128,10 @@ function getPathFromDoclet(doclet) { return; } - const filepath = doclet.meta.path && doclet.meta.path !== 'null' ? - doclet.meta.path + '/' + doclet.meta.filename.split(/[\/\\]/).pop() : - doclet.meta.filename; + const filepath = + doclet.meta.path && doclet.meta.path !== 'null' + ? doclet.meta.path + '/' + doclet.meta.filename.split(/[\/\\]/).pop() + : doclet.meta.filename; return filepath; } @@ -126,7 +143,7 @@ function generate(title, docs, filename, resolveLinks) { filename: filename, title: title, docs: docs, - packageInfo: (find({kind: 'package'}) || []) [0] + packageInfo: (find({kind: 'package'}) || [])[0], }; const outpath = path.join(outdir, filename); @@ -140,7 +157,7 @@ function generate(title, docs, filename, resolveLinks) { } function generateSourceFiles(sourceFiles) { - Object.keys(sourceFiles).forEach(function(file) { + Object.keys(sourceFiles).forEach(function (file) { let source; // links are keyed to the shortened path in each doclet's `meta.filename` property const sourceOutfile = helper.getUniqueFilename(sourceFiles[file].shortened); @@ -149,14 +166,20 @@ function generateSourceFiles(sourceFiles) { try { source = { kind: 'source', - code: helper.htmlsafe(fs.readFileSync(sourceFiles[file].resolved, 'utf8')) + code: helper.htmlsafe( + fs.readFileSync(sourceFiles[file].resolved, 'utf8') + ), }; } catch (e) { handle(e); } - generate('Source: ' + sourceFiles[file].shortened, [source], sourceOutfile, - false); + generate( + 'Source: ' + sourceFiles[file].shortened, + [source], + sourceOutfile, + false + ); }); } @@ -175,14 +198,15 @@ function attachModuleSymbols(doclets, modules) { const symbols = {}; // build a lookup table - doclets.forEach(function(symbol) { + doclets.forEach(function (symbol) { symbols[symbol.longname] = symbol; }); - modules.forEach(function(module) { + modules.forEach(function (module) { if (symbols[module.longname]) { module.module = symbols[module.longname]; - module.module.name = module.module.name.replace('module:', 'require("') + '")'; + module.module.name = + module.module.name.replace('module:', 'require("') + '")'; } }); } @@ -210,7 +234,7 @@ function getPrettyName(doclet) { */ function buildNav(members) { const nav = []; - members.classes.forEach(function(v) { + members.classes.forEach(function (v) { // exclude interfaces from sidebar if (v.interface !== true) { nav.push({ @@ -220,52 +244,55 @@ function buildNav(members) { name: v.name, module: find({ kind: 'module', - longname: v.memberof + longname: v.memberof, })[0], members: find({ kind: 'member', - memberof: v.longname + memberof: v.longname, }), methods: find({ kind: 'function', - memberof: v.longname + memberof: v.longname, }), typedefs: find({ kind: 'typedef', - memberof: v.longname + memberof: v.longname, }), fires: v.fires, events: find({ kind: 'event', - memberof: v.longname - }) + memberof: v.longname, + }), }); } }); - members.modules.forEach(function(v) { + members.modules.forEach(function (v) { const classes = find({ kind: 'class', - memberof: v.longname + memberof: v.longname, }); const members = find({ kind: 'member', - memberof: v.longname + memberof: v.longname, }); const methods = find({ kind: 'function', - memberof: v.longname + memberof: v.longname, }); const typedefs = find({ kind: 'typedef', - memberof: v.longname + memberof: v.longname, }); const events = find({ kind: 'event', - memberof: v.longname + memberof: v.longname, }); // Only add modules that contain more than just classes with their // associated Options typedef - if (typedefs.length > classes.length || members.length + methods.length > 0) { + if ( + typedefs.length > classes.length || + members.length + methods.length > 0 + ) { nav.push({ type: 'module', longname: v.longname, @@ -275,12 +302,12 @@ function buildNav(members) { methods: methods, typedefs: typedefs, fires: v.fires, - events: events + events: events, }); } }); - nav.sort(function(a, b) { + nav.sort(function (a, b) { const prettyNameA = a.prettyname.toLowerCase(); const prettyNameB = b.prettyname.toLowerCase(); if (prettyNameA > prettyNameB) { @@ -294,13 +321,12 @@ function buildNav(members) { return nav; } - /** * @param {Object} taffyData See . * @param {Object} opts Options. * @param {Object} tutorials Tutorials. */ -exports.publish = function(taffyData, opts, tutorials) { +exports.publish = function (taffyData, opts, tutorials) { data = taffyData; const conf = env.conf.templates || {}; @@ -329,26 +355,30 @@ exports.publish = function(taffyData, opts, tutorials) { let sourceFiles = {}; const sourceFilePaths = []; - data().each(function(doclet) { + data().each(function (doclet) { doclet.attribs = ''; if (doclet.examples) { - doclet.examples = doclet.examples.map(function(example) { + doclet.examples = doclet.examples.map(function (example) { let caption, code; - if (example.match(/^\s*([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i)) { + if ( + example.match( + /^\s*([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i + ) + ) { caption = RegExp.$1; code = RegExp.$3; } return { caption: caption || '', - code: code || example + code: code || example, }; }); } if (doclet.see) { - doclet.see.forEach(function(seeItem, i) { + doclet.see.forEach(function (seeItem, i) { doclet.see[i] = hashToLink(doclet, seeItem); }); } @@ -361,7 +391,7 @@ exports.publish = function(taffyData, opts, tutorials) { resolvedSourcePath = resolveSourcePath(sourcePath); sourceFiles[sourcePath] = { resolved: resolvedSourcePath, - shortened: null + shortened: null, }; sourceFilePaths.push(resolvedSourcePath); } @@ -373,7 +403,7 @@ exports.publish = function(taffyData, opts, tutorials) { const fromDir = path.join(templatePath, 'static'); const staticFiles = fs.ls(fromDir, 3); - staticFiles.forEach(function(fileName) { + staticFiles.forEach(function (fileName) { const toDir = fs.toDir(fileName.replace(fromDir, outdir)); fs.mkPath(toDir); fs.copyFileSync(fileName, toDir); @@ -385,15 +415,22 @@ exports.publish = function(taffyData, opts, tutorials) { let staticFileScanner; if (conf['default'].staticFiles) { staticFilePaths = conf['default'].staticFiles.paths || []; - staticFileFilter = new (require('jsdoc/lib/jsdoc/src/filter')).Filter(conf['default'].staticFiles); - staticFileScanner = new (require('jsdoc/lib/jsdoc/src/scanner')).Scanner(); + staticFileFilter = new (require('jsdoc/lib/jsdoc/src/filter').Filter)( + conf['default'].staticFiles + ); + staticFileScanner = new (require('jsdoc/lib/jsdoc/src/scanner').Scanner)(); - staticFilePaths.forEach(function(filePath) { - const extraStaticFiles = staticFileScanner.scan([filePath], 10, staticFileFilter); + staticFilePaths.forEach(function (filePath) { + const extraStaticFiles = staticFileScanner.scan( + [filePath], + 10, + staticFileFilter + ); - extraStaticFiles.forEach(function(fileName) { - const sourcePath = fs.statSync(filePath).isDirectory() ? filePath : - path.dirname(filePath); + extraStaticFiles.forEach(function (fileName) { + const sourcePath = fs.statSync(filePath).isDirectory() + ? filePath + : path.dirname(filePath); const toDir = fs.toDir(fileName.replace(sourcePath, outdir)); fs.mkPath(toDir); fs.copyFileSync(fileName, toDir); @@ -404,7 +441,7 @@ exports.publish = function(taffyData, opts, tutorials) { if (sourceFilePaths.length) { sourceFiles = shortenPaths(sourceFiles, path.commonPrefix(sourceFilePaths)); } - data().each(function(doclet) { + data().each(function (doclet) { const url = helper.createLink(doclet); helper.registerLink(doclet.longname, url); @@ -419,7 +456,7 @@ exports.publish = function(taffyData, opts, tutorials) { } }); - data().each(function(doclet) { + data().each(function (doclet) { const url = helper.longnameToUrl[doclet.longname]; if (url.indexOf('#') > -1) { @@ -435,7 +472,7 @@ exports.publish = function(taffyData, opts, tutorials) { }); // do this after the urls have all been generated - data().each(function(doclet) { + data().each(function (doclet) { doclet.ancestors = getAncestorLinks(doclet); if (doclet.kind === 'member') { @@ -461,8 +498,10 @@ exports.publish = function(taffyData, opts, tutorials) { // once for all view.nav = buildNav(members); - attachModuleSymbols(find({kind: ['class', 'function'], longname: {left: 'module:'}}), - members.modules); + attachModuleSymbols( + find({kind: ['class', 'function'], longname: {left: 'module:'}}), + members.modules + ); // only output pretty-printed source files if requested; do this before generating any other // pages, so the other pages can link to the source files @@ -478,9 +517,17 @@ exports.publish = function(taffyData, opts, tutorials) { const files = find({kind: 'file'}); view.navigationHtml = helper.resolveLinks(view.partial('navigation.tmpl')); - generate('Index', - [{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}].concat(files), - indexUrl); + generate( + 'Index', + [ + { + kind: 'mainpage', + readme: opts.readme, + longname: opts.mainpagetitle ? opts.mainpagetitle : 'Main Page', + }, + ].concat(files), + indexUrl + ); // set up the lists that we'll use to generate pages const classes = taffy(members.classes); @@ -493,27 +540,47 @@ exports.publish = function(taffyData, opts, tutorials) { if (hasOwnProp.call(helper.longnameToUrl, longname)) { const myClasses = helper.find(classes, {longname: longname}); if (myClasses.length) { - generate('Class: ' + myClasses[0].name, myClasses, helper.longnameToUrl[longname]); + generate( + 'Class: ' + myClasses[0].name, + myClasses, + helper.longnameToUrl[longname] + ); } const myModules = helper.find(modules, {longname: longname}); if (myModules.length) { - generate('Module: ' + myModules[0].name, myModules, helper.longnameToUrl[longname]); + generate( + 'Module: ' + myModules[0].name, + myModules, + helper.longnameToUrl[longname] + ); } const myNamespaces = helper.find(namespaces, {longname: longname}); if (myNamespaces.length) { - generate('Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname]); + generate( + 'Namespace: ' + myNamespaces[0].name, + myNamespaces, + helper.longnameToUrl[longname] + ); } const myMixins = helper.find(mixins, {longname: longname}); if (myMixins.length) { - generate('Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname]); + generate( + 'Mixin: ' + myMixins[0].name, + myMixins, + helper.longnameToUrl[longname] + ); } const myExternals = helper.find(externals, {longname: longname}); if (myExternals.length) { - generate('External: ' + myExternals[0].name, myExternals, helper.longnameToUrl[longname]); + generate( + 'External: ' + myExternals[0].name, + myExternals, + helper.longnameToUrl[longname] + ); } } } @@ -524,7 +591,7 @@ exports.publish = function(taffyData, opts, tutorials) { title: title, header: tutorial.title, content: tutorial.parse(), - children: tutorial.children + children: tutorial.children, }; let html = view.render('tutorial.tmpl', tutorialData); @@ -537,8 +604,12 @@ exports.publish = function(taffyData, opts, tutorials) { // tutorials can have only one parent so there is no risk for loops function saveChildren(node) { - node.children.forEach(function(child) { - generateTutorial('Tutorial: ' + child.title, child, helper.tutorialToUrl(child.name)); + node.children.forEach(function (child) { + generateTutorial( + 'Tutorial: ' + child.title, + child, + helper.tutorialToUrl(child.name) + ); saveChildren(child); }); } diff --git a/config/jsdoc/info/api-plugin.js b/config/jsdoc/info/api-plugin.js index afef0dc34e..2a3dd96610 100644 --- a/config/jsdoc/info/api-plugin.js +++ b/config/jsdoc/info/api-plugin.js @@ -1,15 +1,11 @@ - - /** * Handle the api annotation. * @param {Object} dictionary The tag dictionary. */ -exports.defineTags = function(dictionary) { - +exports.defineTags = function (dictionary) { dictionary.defineTag('api', { - onTagged: function(doclet, tag) { + onTagged: function (doclet, tag) { doclet.api = true; - } + }, }); - }; diff --git a/config/jsdoc/info/define-plugin.js b/config/jsdoc/info/define-plugin.js index 78634499ba..3d604db19a 100644 --- a/config/jsdoc/info/define-plugin.js +++ b/config/jsdoc/info/define-plugin.js @@ -5,31 +5,27 @@ * insensitive, with or without ticks). */ - const DEFAULT_VALUE = /default\s+is\s+`?(true|false)`?/i; - /** * Hook to define new tags. * @param {Object} dictionary The tag dictionary. */ -exports.defineTags = function(dictionary) { - +exports.defineTags = function (dictionary) { dictionary.defineTag('define', { canHaveType: true, mustHaveValue: true, - onTagged: function(doclet, tag) { + onTagged: function (doclet, tag) { const types = tag.value.type.names; if (types.length === 1 && types[0] === 'boolean') { const match = tag.value.description.match(DEFAULT_VALUE); if (match) { doclet.define = { - default: match[1] === 'true' + default: match[1] === 'true', }; doclet.description = tag.value.description; } } - } + }, }); - }; diff --git a/config/jsdoc/info/publish.js b/config/jsdoc/info/publish.js index bc01c31f89..f57c4dec57 100644 --- a/config/jsdoc/info/publish.js +++ b/config/jsdoc/info/publish.js @@ -5,18 +5,16 @@ const assert = require('assert'); const path = require('path'); - /** * Publish hook for the JSDoc template. Writes to JSON stdout. * @param {function} data The root of the Taffy DB containing doclet records. * @param {Object} opts Options. * @return {Promise} A promise that resolves when writing is complete. */ -exports.publish = function(data, opts) { - +exports.publish = function (data, opts) { function getTypes(data) { const types = []; - data.forEach(function(name) { + data.forEach(function (name) { types.push(name.replace(/^function$/, 'Function')); }); return types; @@ -27,19 +25,22 @@ exports.publish = function(data, opts) { const docs = data( [ {define: {isObject: true}}, - function() { + function () { if (this.kind == 'class') { if (!('extends' in this) || typeof this.api == 'boolean') { classes[this.longname] = this; return true; } } - return (typeof this.api == 'boolean' || - this.meta && (/[\\\/]externs$/).test(this.meta.path)); - } + return ( + typeof this.api == 'boolean' || + (this.meta && /[\\\/]externs$/.test(this.meta.path)) + ); + }, ], {kind: {'!is': 'file'}}, - {kind: {'!is': 'event'}}).get(); + {kind: {'!is': 'event'}} + ).get(); // get symbols data, filter out those that are members of private classes const symbols = []; @@ -49,117 +50,133 @@ exports.publish = function(data, opts) { let base = []; const augments = {}; const symbolsByName = {}; - docs.filter(function(doc) { - let include = true; - const constructor = doc.memberof; - if (constructor && constructor.substr(-1) === '_' && constructor.indexOf('module:') === -1) { - assert.strictEqual(doc.inherited, true, - 'Unexpected export on private class: ' + doc.longname); - include = false; - } - return include; - }).forEach(function(doc) { - const isExterns = (/[\\\/]externs$/).test(doc.meta.path); - if (doc.define) { - defines.push({ - name: doc.longname, - description: doc.description, - path: path.join(doc.meta.path, doc.meta.filename), - default: doc.define.default - }); - } else if (doc.kind == 'typedef' || doc.isEnum === true) { - typedefs.push({ - name: doc.longname, - types: getTypes(doc.type.names) - }); - } else { - const symbol = { - name: doc.longname, - kind: doc.kind, - description: doc.classdesc || doc.description, - path: path.join(doc.meta.path, doc.meta.filename) - }; - if (doc.augments) { - symbol.extends = doc.augments[0]; + docs + .filter(function (doc) { + let include = true; + const constructor = doc.memberof; + if ( + constructor && + constructor.substr(-1) === '_' && + constructor.indexOf('module:') === -1 + ) { + assert.strictEqual( + doc.inherited, + true, + 'Unexpected export on private class: ' + doc.longname + ); + include = false; } - if (doc.virtual) { - symbol.virtual = true; - } - if (doc.type) { - symbol.types = getTypes(doc.type.names); - } - if (doc.params) { - const params = []; - doc.params.forEach(function(param) { - const paramInfo = { - name: param.name - }; - params.push(paramInfo); - paramInfo.types = getTypes(param.type.names); - if (typeof param.variable == 'boolean') { - paramInfo.variable = param.variable; - } - if (typeof param.optional == 'boolean') { - paramInfo.optional = param.optional; - } - if (typeof param.nullable == 'boolean') { - paramInfo.nullable = param.nullable; - } + return include; + }) + .forEach(function (doc) { + const isExterns = /[\\\/]externs$/.test(doc.meta.path); + if (doc.define) { + defines.push({ + name: doc.longname, + description: doc.description, + path: path.join(doc.meta.path, doc.meta.filename), + default: doc.define.default, }); - symbol.params = params; - } - if (doc.returns) { - symbol.returns = { - types: getTypes(doc.returns[0].type.names) + } else if (doc.kind == 'typedef' || doc.isEnum === true) { + typedefs.push({ + name: doc.longname, + types: getTypes(doc.type.names), + }); + } else { + const symbol = { + name: doc.longname, + kind: doc.kind, + description: doc.classdesc || doc.description, + path: path.join(doc.meta.path, doc.meta.filename), }; - if (typeof doc.returns[0].nullable == 'boolean') { - symbol.returns.nullable = doc.returns[0].nullable; + if (doc.augments) { + symbol.extends = doc.augments[0]; } - } - if (doc.tags) { - doc.tags.every(function(tag) { - if (tag.title == 'template') { - symbol.template = tag.value; - return false; + if (doc.virtual) { + symbol.virtual = true; + } + if (doc.type) { + symbol.types = getTypes(doc.type.names); + } + if (doc.params) { + const params = []; + doc.params.forEach(function (param) { + const paramInfo = { + name: param.name, + }; + params.push(paramInfo); + paramInfo.types = getTypes(param.type.names); + if (typeof param.variable == 'boolean') { + paramInfo.variable = param.variable; + } + if (typeof param.optional == 'boolean') { + paramInfo.optional = param.optional; + } + if (typeof param.nullable == 'boolean') { + paramInfo.nullable = param.nullable; + } + }); + symbol.params = params; + } + if (doc.returns) { + symbol.returns = { + types: getTypes(doc.returns[0].type.names), + }; + if (typeof doc.returns[0].nullable == 'boolean') { + symbol.returns.nullable = doc.returns[0].nullable; } - return true; - }); - } - - const target = isExterns ? externs : (doc.api ? symbols : base); - const existingSymbol = symbolsByName[symbol.name]; - if (existingSymbol) { - const idx = target.indexOf(existingSymbol); - target.splice(idx, 1); - } - target.push(symbol); - symbolsByName[symbol.name] = symbol; - - if (doc.api && symbol.extends) { - while (symbol.extends in classes && !classes[symbol.extends].api && - classes[symbol.extends].augments) { - symbol.extends = classes[symbol.extends].augments[0]; } - if (symbol.extends) { - augments[symbol.extends] = true; + if (doc.tags) { + doc.tags.every(function (tag) { + if (tag.title == 'template') { + symbol.template = tag.value; + return false; + } + return true; + }); + } + + const target = isExterns ? externs : doc.api ? symbols : base; + const existingSymbol = symbolsByName[symbol.name]; + if (existingSymbol) { + const idx = target.indexOf(existingSymbol); + target.splice(idx, 1); + } + target.push(symbol); + symbolsByName[symbol.name] = symbol; + + if (doc.api && symbol.extends) { + while ( + symbol.extends in classes && + !classes[symbol.extends].api && + classes[symbol.extends].augments + ) { + symbol.extends = classes[symbol.extends].augments[0]; + } + if (symbol.extends) { + augments[symbol.extends] = true; + } } } - } + }); + + base = base.filter(function (symbol) { + return symbol.name in augments || symbol.virtual; }); - base = base.filter(function(symbol) { - return (symbol.name in augments || symbol.virtual); - }); - - return new Promise(function(resolve, reject) { + return new Promise(function (resolve, reject) { process.stdout.write( - JSON.stringify({ - symbols: symbols, - defines: defines, - typedefs: typedefs, - externs: externs, - base: base - }, null, 2)); + JSON.stringify( + { + symbols: symbols, + defines: defines, + typedefs: typedefs, + externs: externs, + base: base, + }, + null, + 2 + ) + ); }); - }; diff --git a/config/jsdoc/info/virtual-plugin.js b/config/jsdoc/info/virtual-plugin.js index a1cb8ee8ec..f83a2dba26 100644 --- a/config/jsdoc/info/virtual-plugin.js +++ b/config/jsdoc/info/virtual-plugin.js @@ -2,15 +2,13 @@ * Handle the interface and abstract annotations. * @param {Object} dictionary The tag dictionary. */ -exports.defineTags = function(dictionary) { - +exports.defineTags = function (dictionary) { const classTag = dictionary.lookUp('class'); dictionary.defineTag('interface', { mustNotHaveValue: true, - onTagged: function(doclet, tag) { + onTagged: function (doclet, tag) { classTag.onTagged.apply(this, arguments); doclet.virtual = true; - } + }, }); - }; diff --git a/config/webpack-config-legacy-build.js b/config/webpack-config-legacy-build.js index ca374a0e61..33634de5b2 100644 --- a/config/webpack-config-legacy-build.js +++ b/config/webpack-config-legacy-build.js @@ -8,6 +8,6 @@ module.exports = { filename: 'ol.js', library: 'ol', libraryTarget: 'umd', - libraryExport: 'default' - } + libraryExport: 'default', + }, }; diff --git a/examples/accessible.js b/examples/accessible.js index 6eb92a4da1..0feda2138f 100644 --- a/examples/accessible.js +++ b/examples/accessible.js @@ -1,29 +1,28 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -document.getElementById('zoom-out').onclick = function() { +document.getElementById('zoom-out').onclick = function () { const view = map.getView(); const zoom = view.getZoom(); view.setZoom(zoom - 1); }; -document.getElementById('zoom-in').onclick = function() { +document.getElementById('zoom-in').onclick = function () { const view = map.getView(); const zoom = view.getZoom(); view.setZoom(zoom + 1); diff --git a/examples/animation.js b/examples/animation.js index ad59685ab5..7d07a41306 100644 --- a/examples/animation.js +++ b/examples/animation.js @@ -1,9 +1,9 @@ import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.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'; -import OSM from '../src/ol/source/OSM.js'; const london = fromLonLat([-0.12755, 51.507222]); const moscow = fromLonLat([37.6178, 55.7517]); @@ -13,7 +13,7 @@ const bern = fromLonLat([7.4458, 46.95]); const view = new View({ center: istanbul, - zoom: 6 + zoom: 6, }); const map = new Map({ @@ -21,10 +21,10 @@ const map = new Map({ layers: [ new TileLayer({ preload: 4, - source: new OSM() - }) + source: new OSM(), + }), ], - view: view + view: view, }); // A bounce easing method (from https://github.com/DmitryBaranovskiy/raphael). @@ -32,18 +32,18 @@ function bounce(t) { const s = 7.5625; const p = 2.75; let l; - if (t < (1 / p)) { + if (t < 1 / p) { l = s * t * t; } else { - if (t < (2 / p)) { - t -= (1.5 / p); + if (t < 2 / p) { + t -= 1.5 / p; l = s * t * t + 0.75; } else { - if (t < (2.5 / p)) { - t -= (2.25 / p); + if (t < 2.5 / p) { + t -= 2.25 / p; l = s * t * t + 0.9375; } else { - t -= (2.625 / p); + t -= 2.625 / p; l = s * t * t + 0.984375; } } @@ -53,77 +53,85 @@ function bounce(t) { // An elastic easing method (from https://github.com/DmitryBaranovskiy/raphael). function elastic(t) { - return Math.pow(2, -10 * t) * Math.sin((t - 0.075) * (2 * Math.PI) / 0.3) + 1; + return ( + Math.pow(2, -10 * t) * Math.sin(((t - 0.075) * (2 * Math.PI)) / 0.3) + 1 + ); } function onClick(id, callback) { document.getElementById(id).addEventListener('click', callback); } -onClick('rotate-left', function() { +onClick('rotate-left', function () { view.animate({ - rotation: view.getRotation() + Math.PI / 2 + rotation: view.getRotation() + Math.PI / 2, }); }); -onClick('rotate-right', function() { +onClick('rotate-right', function () { view.animate({ - rotation: view.getRotation() - Math.PI / 2 + rotation: view.getRotation() - Math.PI / 2, }); }); -onClick('rotate-around-rome', function() { +onClick('rotate-around-rome', function () { // Rotation animation takes the shortest arc, so animate in two parts const rotation = view.getRotation(); - view.animate({ - rotation: rotation + Math.PI, - anchor: rome, - easing: easeIn - }, { - rotation: rotation + 2 * Math.PI, - anchor: rome, - easing: easeOut - }); + view.animate( + { + rotation: rotation + Math.PI, + anchor: rome, + easing: easeIn, + }, + { + rotation: rotation + 2 * Math.PI, + anchor: rome, + easing: easeOut, + } + ); }); -onClick('pan-to-london', function() { +onClick('pan-to-london', function () { view.animate({ center: london, - duration: 2000 + duration: 2000, }); }); -onClick('elastic-to-moscow', function() { +onClick('elastic-to-moscow', function () { view.animate({ center: moscow, duration: 2000, - easing: elastic + easing: elastic, }); }); -onClick('bounce-to-istanbul', function() { +onClick('bounce-to-istanbul', function () { view.animate({ center: istanbul, duration: 2000, - easing: bounce + easing: bounce, }); }); -onClick('spin-to-rome', function() { +onClick('spin-to-rome', function () { // Rotation animation takes the shortest arc, so animate in two parts const center = view.getCenter(); - view.animate({ - center: [ - center[0] + (rome[0] - center[0]) / 2, - center[1] + (rome[1] - center[1]) / 2 - ], - rotation: Math.PI, - easing: easeIn - }, { - center: rome, - rotation: 2 * Math.PI, - easing: easeOut - }); + view.animate( + { + center: [ + center[0] + (rome[0] - center[0]) / 2, + center[1] + (rome[1] - center[1]) / 2, + ], + rotation: Math.PI, + easing: easeIn, + }, + { + center: rome, + rotation: 2 * Math.PI, + easing: easeOut, + } + ); }); function flyTo(location, done) { @@ -141,21 +149,28 @@ function flyTo(location, done) { done(complete); } } - view.animate({ - center: location, - duration: duration - }, callback); - view.animate({ - zoom: zoom - 1, - duration: duration / 2 - }, { - zoom: zoom, - duration: duration / 2 - }, callback); + view.animate( + { + center: location, + duration: duration, + }, + callback + ); + view.animate( + { + zoom: zoom - 1, + duration: duration / 2, + }, + { + zoom: zoom, + duration: duration / 2, + }, + callback + ); } -onClick('fly-to-bern', function() { - flyTo(bern, function() {}); +onClick('fly-to-bern', function () { + flyTo(bern, function () {}); }); function tour() { @@ -166,7 +181,7 @@ function tour() { ++index; if (index < locations.length) { const delay = index === 0 ? 0 : 750; - setTimeout(function() { + setTimeout(function () { flyTo(locations[index], next); }, delay); } else { diff --git a/examples/arcgis-image.js b/examples/arcgis-image.js index aff5b8f2ee..321b39f25b 100644 --- a/examples/arcgis-image.js +++ b/examples/arcgis-image.js @@ -1,28 +1,29 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {Tile as TileLayer, Image as ImageLayer} from '../src/ol/layer.js'; -import {OSM, ImageArcGISRest} from '../src/ol/source.js'; +import {ImageArcGISRest, OSM} from '../src/ol/source.js'; +import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -const url = 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + - 'Specialty/ESRI_StateCityHighway_USA/MapServer'; +const url = + 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + + 'Specialty/ESRI_StateCityHighway_USA/MapServer'; const layers = [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new ImageLayer({ source: new ImageArcGISRest({ ratio: 1, params: {}, - url: url - }) - }) + url: url, + }), + }), ]; const map = new Map({ layers: layers, target: 'map', view: new View({ center: [-10997148, 4569099], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/arcgis-tiled.js b/examples/arcgis-tiled.js index 4377963891..64f98e4aae 100644 --- a/examples/arcgis-tiled.js +++ b/examples/arcgis-tiled.js @@ -1,27 +1,28 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import {OSM, TileArcGISRest} from '../src/ol/source.js'; -const url = 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + - 'Specialty/ESRI_StateCityHighway_USA/MapServer'; +const url = + 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + + 'Specialty/ESRI_StateCityHighway_USA/MapServer'; const layers = [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ extent: [-13884991, 2870341, -7455066, 6338219], source: new TileArcGISRest({ - url: url - }) - }) + url: url, + }), + }), ]; const map = new Map({ layers: layers, target: 'map', view: new View({ center: [-10997148, 4569099], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/attributions.js b/examples/attributions.js index 360a918917..9ee484c4af 100644 --- a/examples/attributions.js +++ b/examples/attributions.js @@ -1,24 +1,24 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, Attribution} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {Attribution, defaults as defaultControls} from '../src/ol/control.js'; const attribution = new Attribution({ - collapsible: false + collapsible: false, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], controls: defaultControls({attribution: false}).extend([attribution]), target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); function checkSize() { diff --git a/examples/bing-maps.js b/examples/bing-maps.js index 1823ab4740..13f988fc6a 100644 --- a/examples/bing-maps.js +++ b/examples/bing-maps.js @@ -1,38 +1,40 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import BingMaps from '../src/ol/source/BingMaps.js'; - +import Map from '../src/ol/Map.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const styles = [ 'RoadOnDemand', 'Aerial', 'AerialWithLabelsOnDemand', 'CanvasDark', - 'OrdnanceSurvey' + 'OrdnanceSurvey', ]; const layers = []; let i, ii; for (i = 0, ii = styles.length; i < ii; ++i) { - layers.push(new TileLayer({ - visible: false, - preload: Infinity, - source: new BingMaps({ - key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', - imagerySet: styles[i] - // use maxZoom 19 to see stretched tiles instead of the BingMaps - // "no photos at this zoom level" tiles - // maxZoom: 19 + layers.push( + new TileLayer({ + visible: false, + preload: Infinity, + source: new BingMaps({ + key: + 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', + imagerySet: styles[i], + // use maxZoom 19 to see stretched tiles instead of the BingMaps + // "no photos at this zoom level" tiles + // maxZoom: 19 + }), }) - })); + ); } const map = new Map({ layers: layers, target: 'map', view: new View({ center: [-6655.5402445057125, 6709968.258934638], - zoom: 13 - }) + zoom: 13, + }), }); const select = document.getElementById('layer-select'); diff --git a/examples/box-selection.js b/examples/box-selection.js index 5f6b3de1a8..61962b310d 100644 --- a/examples/box-selection.js +++ b/examples/box-selection.js @@ -1,33 +1,31 @@ +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {platformModifierKeyOnly} from '../src/ol/events/condition.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; import {DragBox, Select} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {platformModifierKeyOnly} from '../src/ol/events/condition.js'; const vectorSource = new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }); - const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], zoom: 2, - constrainRotation: 16 - }) + constrainRotation: 16, + }), }); // a normal select interaction to handle click @@ -38,12 +36,12 @@ const selectedFeatures = select.getFeatures(); // a DragBox interaction used to select features by drawing boxes const dragBox = new DragBox({ - condition: platformModifierKeyOnly + condition: platformModifierKeyOnly, }); map.addInteraction(dragBox); -dragBox.on('boxend', function() { +dragBox.on('boxend', function () { // features that intersect the box geometry are added to the // collection of selected features @@ -54,7 +52,7 @@ dragBox.on('boxend', function() { const oblique = rotation % (Math.PI / 2) !== 0; const candidateFeatures = oblique ? [] : selectedFeatures; const extent = dragBox.getGeometry().getExtent(); - vectorSource.forEachFeatureIntersectingExtent(extent, function(feature) { + vectorSource.forEachFeatureIntersectingExtent(extent, function (feature) { candidateFeatures.push(feature); }); @@ -68,7 +66,7 @@ dragBox.on('boxend', function() { const geometry = dragBox.getGeometry().clone(); geometry.rotate(-rotation, anchor); const extent = geometry.getExtent(); - candidateFeatures.forEach(function(feature) { + candidateFeatures.forEach(function (feature) { const geometry = feature.getGeometry().clone(); geometry.rotate(-rotation, anchor); if (geometry.intersectsExtent(extent)) { @@ -76,18 +74,17 @@ dragBox.on('boxend', function() { } }); } - }); // clear selection when drawing a new box and when clicking on the map -dragBox.on('boxstart', function() { +dragBox.on('boxstart', function () { selectedFeatures.clear(); }); const infoBox = document.getElementById('info'); -selectedFeatures.on(['add', 'remove'], function() { - const names = selectedFeatures.getArray().map(function(feature) { +selectedFeatures.on(['add', 'remove'], function () { + const names = selectedFeatures.getArray().map(function (feature) { return feature.get('name'); }); if (names.length > 0) { diff --git a/examples/button-title.js b/examples/button-title.js index c48462a62f..b42183ea5d 100644 --- a/examples/button-title.js +++ b/examples/button-title.js @@ -1,26 +1,25 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [-8730000, 5930000], rotation: Math.PI / 5, - zoom: 8 - }) + zoom: 8, + }), }); - $('.ol-zoom-in, .ol-zoom-out').tooltip({ - placement: 'right' + placement: 'right', }); $('.ol-rotate-reset, .ol-attribution button[title]').tooltip({ - placement: 'left' + placement: 'left', }); diff --git a/examples/canvas-gradient-pattern.js b/examples/canvas-gradient-pattern.js index 1b91b8593d..3504e5e964 100644 --- a/examples/canvas-gradient-pattern.js +++ b/examples/canvas-gradient-pattern.js @@ -1,11 +1,11 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {DEVICE_PIXEL_RATIO} from '../src/ol/has.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; -import {fromLonLat} from '../src/ol/proj.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import {DEVICE_PIXEL_RATIO} from '../src/ol/has.js'; import {Fill, Stroke, Style} from '../src/ol/style.js'; +import {fromLonLat} from '../src/ol/proj.js'; const canvas = document.createElement('canvas'); const context = canvas.getContext('2d'); @@ -15,7 +15,7 @@ const context = canvas.getContext('2d'); const pixelRatio = DEVICE_PIXEL_RATIO; // Generate a rainbow gradient -const gradient = (function() { +const gradient = (function () { const grad = context.createLinearGradient(0, 0, 512 * pixelRatio, 0); grad.addColorStop(0, 'red'); grad.addColorStop(1 / 6, 'orange'); @@ -28,7 +28,7 @@ const gradient = (function() { })(); // Generate a canvasPattern with two circles on white background -const pattern = (function() { +const pattern = (function () { canvas.width = 8 * pixelRatio; canvas.height = 8 * pixelRatio; // white background @@ -45,7 +45,7 @@ const pattern = (function() { context.arc(4 * pixelRatio, 4 * pixelRatio, 1.5 * pixelRatio, 0, 2 * Math.PI); context.fill(); return context.createPattern(canvas, 'repeat'); -}()); +})(); // Generate style for gradient or pattern fill const fill = new Fill(); @@ -53,8 +53,8 @@ const style = new Style({ fill: fill, stroke: new Stroke({ color: '#333', - width: 2 - }) + width: 2, + }), }); /** @@ -64,7 +64,7 @@ const style = new Style({ * @param {import("../src/ol/Feature.js").default} feature The feature to style. * @return {Style} The style to use for the feature. */ -const getStackedStyle = function(feature) { +const getStackedStyle = function (feature) { const id = feature.getId(); fill.setColor(id > 'J' ? gradient : pattern); return style; @@ -74,19 +74,17 @@ const getStackedStyle = function(feature) { const vectorLayer = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: getStackedStyle + style: getStackedStyle, }); // … finally create a map with that layer. const map = new Map({ - layers: [ - vectorLayer - ], + layers: [vectorLayer], target: 'map', view: new View({ center: fromLonLat([16, 48]), - zoom: 3 - }) + zoom: 3, + }), }); diff --git a/examples/canvas-tiles.js b/examples/canvas-tiles.js index b8fcb00220..df852b27e9 100644 --- a/examples/canvas-tiles.js +++ b/examples/canvas-tiles.js @@ -1,21 +1,20 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import {OSM, TileDebug} from '../src/ol/source.js'; - const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ - source: new TileDebug() - }) + source: new TileDebug(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); diff --git a/examples/cartodb.js b/examples/cartodb.js index 81a27bca1b..c385fe1c5c 100644 --- a/examples/cartodb.js +++ b/examples/cartodb.js @@ -1,47 +1,48 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import {CartoDB, OSM} from '../src/ol/source.js'; const mapConfig = { - 'layers': [{ - 'type': 'cartodb', - 'options': { - 'cartocss_version': '2.1.1', - 'cartocss': '#layer { polygon-fill: #F00; }', - 'sql': 'select * from european_countries_e where area > 0' - } - }] + 'layers': [ + { + 'type': 'cartodb', + 'options': { + 'cartocss_version': '2.1.1', + 'cartocss': '#layer { polygon-fill: #F00; }', + 'sql': 'select * from european_countries_e where area > 0', + }, + }, + ], }; const cartoDBSource = new CartoDB({ account: 'documentation', - config: mapConfig + config: mapConfig, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ - source: cartoDBSource - }) + source: cartoDBSource, + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); function setArea(n) { mapConfig.layers[0].options.sql = - 'select * from european_countries_e where area > ' + n; + 'select * from european_countries_e where area > ' + n; cartoDBSource.setConfig(mapConfig); } - -document.getElementById('country-area').addEventListener('change', function() { +document.getElementById('country-area').addEventListener('change', function () { setArea(this.value); }); diff --git a/examples/center.js b/examples/center.js index 7f5ca270ad..df4d8fab3f 100644 --- a/examples/center.js +++ b/examples/center.js @@ -1,72 +1,83 @@ +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; /** @type {VectorSource} */ const source = new VectorSource({ url: 'data/geojson/switzerland.geojson', - format: new GeoJSON() + format: new GeoJSON(), }); const style = new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 + width: 1, }), image: new CircleStyle({ radius: 5, fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 - }) - }) + width: 1, + }), + }), }); const vectorLayer = new VectorLayer({ source: source, - style: style + style: style, }); const view = new View({ center: [0, 0], - zoom: 1 + zoom: 1, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), - vectorLayer + vectorLayer, ], target: 'map', - view: view + view: view, }); -const zoomtoswitzerland = - document.getElementById('zoomtoswitzerland'); -zoomtoswitzerland.addEventListener('click', function() { - const feature = source.getFeatures()[0]; - const polygon = feature.getGeometry(); - view.fit(polygon, {padding: [170, 50, 30, 150]}); -}, false); +const zoomtoswitzerland = document.getElementById('zoomtoswitzerland'); +zoomtoswitzerland.addEventListener( + 'click', + function () { + const feature = source.getFeatures()[0]; + const polygon = feature.getGeometry(); + view.fit(polygon, {padding: [170, 50, 30, 150]}); + }, + false +); const zoomtolausanne = document.getElementById('zoomtolausanne'); -zoomtolausanne.addEventListener('click', function() { - const feature = source.getFeatures()[1]; - const point = feature.getGeometry(); - view.fit(point, {padding: [170, 50, 30, 150], minResolution: 50}); -}, false); +zoomtolausanne.addEventListener( + 'click', + function () { + const feature = source.getFeatures()[1]; + const point = feature.getGeometry(); + view.fit(point, {padding: [170, 50, 30, 150], minResolution: 50}); + }, + false +); const centerlausanne = document.getElementById('centerlausanne'); -centerlausanne.addEventListener('click', function() { - const feature = source.getFeatures()[1]; - const point = feature.getGeometry(); - const size = map.getSize(); - view.centerOn(point.getCoordinates(), size, [570, 500]); -}, false); +centerlausanne.addEventListener( + 'click', + function () { + const feature = source.getFeatures()[1]; + const point = feature.getGeometry(); + const size = map.getSize(); + view.centerOn(point.getCoordinates(), size, [570, 500]); + }, + false +); diff --git a/examples/chaikin.js b/examples/chaikin.js index 15112b9721..6f4406356b 100644 --- a/examples/chaikin.js +++ b/examples/chaikin.js @@ -1,8 +1,8 @@ +import Draw from '../src/ol/interaction/Draw.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; -import Draw from '../src/ol/interaction/Draw.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import smooth from 'chaikin-smooth'; @@ -21,17 +21,17 @@ const map = new Map({ layers: [ new TileLayer({ source: new OSM(), - opacity: 0.5 + opacity: 0.5, }), new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ - center: [1078373.5950, 6871994.5910], - zoom: 5 - }) + center: [1078373.595, 6871994.591], + zoom: 5, + }), }); const shallSmoothen = document.getElementById('shall-smoothen'); @@ -39,10 +39,10 @@ const numIterations = document.getElementById('iterations'); const draw = new Draw({ source: vectorSource, - type: 'LineString' + type: 'LineString', }); map.addInteraction(draw); -draw.on('drawend', function(event) { +draw.on('drawend', function (event) { if (!shallSmoothen.checked) { return; } diff --git a/examples/cluster.js b/examples/cluster.js index b74f9194ab..944e1116b2 100644 --- a/examples/cluster.js +++ b/examples/cluster.js @@ -1,11 +1,16 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import View from '../src/ol/View.js'; +import { + Circle as CircleStyle, + Fill, + Stroke, + Style, + Text, +} from '../src/ol/style.js'; import {Cluster, OSM, Vector as VectorSource} from '../src/ol/source.js'; -import {Circle as CircleStyle, Fill, Stroke, Style, Text} from '../src/ol/style.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const distance = document.getElementById('distance'); @@ -18,18 +23,18 @@ for (let i = 0; i < count; ++i) { } const source = new VectorSource({ - features: features + features: features, }); const clusterSource = new Cluster({ distance: parseInt(distance.value, 10), - source: source + source: source, }); const styleCache = {}; const clusters = new VectorLayer({ source: clusterSource, - style: function(feature) { + style: function (feature) { const size = feature.get('features').length; let style = styleCache[size]; if (!style) { @@ -37,27 +42,27 @@ const clusters = new VectorLayer({ image: new CircleStyle({ radius: 10, stroke: new Stroke({ - color: '#fff' + color: '#fff', }), fill: new Fill({ - color: '#3399CC' - }) + color: '#3399CC', + }), }), text: new Text({ text: size.toString(), fill: new Fill({ - color: '#fff' - }) - }) + color: '#fff', + }), + }), }); styleCache[size] = style; } return style; - } + }, }); const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const map = new Map({ @@ -65,10 +70,10 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -distance.addEventListener('input', function() { +distance.addEventListener('input', function () { clusterSource.setDistance(parseInt(distance.value, 10)); }); diff --git a/examples/color-manipulation.js b/examples/color-manipulation.js index e249762850..dade6aeed2 100644 --- a/examples/color-manipulation.js +++ b/examples/color-manipulation.js @@ -1,23 +1,21 @@ +import ImageLayer from '../src/ol/layer/Image.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import ImageLayer from '../src/ol/layer/Image.js'; import {Raster as RasterSource, Stamen} from '../src/ol/source.js'; - /** * Color manipulation functions below are adapted from * https://github.com/d3/d3-color. */ -const Xn = 0.950470; +const Xn = 0.95047; const Yn = 1; -const Zn = 1.088830; +const Zn = 1.08883; const t0 = 4 / 29; const t1 = 6 / 29; const t2 = 3 * t1 * t1; const t3 = t1 * t1 * t1; const twoPi = 2 * Math.PI; - /** * Convert an RGB pixel into an HCL pixel. * @param {Array} pixel A pixel in RGB space. @@ -29,11 +27,14 @@ function rgb2hcl(pixel) { const blue = rgb2xyz(pixel[2]); const x = xyz2lab( - (0.4124564 * red + 0.3575761 * green + 0.1804375 * blue) / Xn); + (0.4124564 * red + 0.3575761 * green + 0.1804375 * blue) / Xn + ); const y = xyz2lab( - (0.2126729 * red + 0.7151522 * green + 0.0721750 * blue) / Yn); + (0.2126729 * red + 0.7151522 * green + 0.072175 * blue) / Yn + ); const z = xyz2lab( - (0.0193339 * red + 0.1191920 * green + 0.9503041 * blue) / Zn); + (0.0193339 * red + 0.119192 * green + 0.9503041 * blue) / Zn + ); const l = 116 * y - 16; const a = 500 * (x - y); @@ -52,7 +53,6 @@ function rgb2hcl(pixel) { return pixel; } - /** * Convert an HCL pixel into an RGB pixel. * @param {Array} pixel A pixel in HCL space. @@ -75,7 +75,7 @@ function hcl2rgb(pixel) { z = Zn * lab2xyz(z); pixel[0] = xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z); - pixel[1] = xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z); + pixel[1] = xyz2rgb(-0.969266 * x + 1.8760108 * y + 0.041556 * z); pixel[2] = xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z); return pixel; @@ -94,18 +94,21 @@ function rgb2xyz(x) { } function xyz2rgb(x) { - return 255 * (x <= 0.0031308 ? - 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); + return ( + 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055) + ); } const raster = new RasterSource({ - sources: [new Stamen({ - layer: 'watercolor' - })], - operation: function(pixels, data) { + sources: [ + new Stamen({ + layer: 'watercolor', + }), + ], + operation: function (pixels, data) { const hcl = rgb2hcl(pixels[0]); - let h = hcl[0] + Math.PI * data.hue / 180; + let h = hcl[0] + (Math.PI * data.hue) / 180; if (h < 0) { h += twoPi; } else if (h > twoPi) { @@ -113,8 +116,8 @@ const raster = new RasterSource({ } hcl[0] = h; - hcl[1] *= (data.chroma / 100); - hcl[2] *= (data.lightness / 100); + hcl[1] *= data.chroma / 100; + hcl[2] *= data.lightness / 100; return hcl2rgb(hcl); }, @@ -132,13 +135,13 @@ const raster = new RasterSource({ t1: t1, t2: t2, t3: t3, - twoPi: twoPi - } + twoPi: twoPi, + }, }); const controls = {}; -raster.on('beforeoperations', function(event) { +raster.on('beforeoperations', function (event) { const data = event.data; for (const id in controls) { data[id] = Number(controls[id].value); @@ -148,22 +151,22 @@ raster.on('beforeoperations', function(event) { const map = new Map({ layers: [ new ImageLayer({ - source: raster - }) + source: raster, + }), ], target: 'map', view: new View({ center: [0, 2500000], zoom: 2, - maxZoom: 18 - }) + maxZoom: 18, + }), }); const controlIds = ['hue', 'chroma', 'lightness']; -controlIds.forEach(function(id) { +controlIds.forEach(function (id) { const control = document.getElementById(id); const output = document.getElementById(id + 'Out'); - control.addEventListener('input', function() { + control.addEventListener('input', function () { output.innerText = control.value; raster.changed(); }); diff --git a/examples/custom-controls.js b/examples/custom-controls.js index f39be07a83..10c578229f 100644 --- a/examples/custom-controls.js +++ b/examples/custom-controls.js @@ -1,16 +1,14 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, Control} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {Control, defaults as defaultControls} from '../src/ol/control.js'; // // Define rotate to north control. // class RotateNorthControl extends Control { - /** * @param {Object=} opt_options Control options. */ @@ -26,7 +24,7 @@ class RotateNorthControl extends Control { super({ element: element, - target: options.target + target: options.target, }); button.addEventListener('click', this.handleRotateNorth.bind(this), false); @@ -35,28 +33,23 @@ class RotateNorthControl extends Control { handleRotateNorth() { this.getMap().getView().setRotation(0); } - } - // // Create map, giving it a rotate to north control. // - const map = new Map({ - controls: defaultControls().extend([ - new RotateNorthControl() - ]), + controls: defaultControls().extend([new RotateNorthControl()]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], zoom: 3, - rotation: 1 - }) + rotation: 1, + }), }); diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js index 9fa87a1b5f..ca75edf3ea 100644 --- a/examples/custom-interactions.js +++ b/examples/custom-interactions.js @@ -1,12 +1,14 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {LineString, Point, Polygon} from '../src/ol/geom.js'; -import {defaults as defaultInteractions, Pointer as PointerInteraction} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {TileJSON, Vector as VectorSource} from '../src/ol/source.js'; import {Fill, Icon, Stroke, Style} from '../src/ol/style.js'; - +import {LineString, Point, Polygon} from '../src/ol/geom.js'; +import { + Pointer as PointerInteraction, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; +import {TileJSON, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; class Drag extends PointerInteraction { constructor() { @@ -14,7 +16,7 @@ class Drag extends PointerInteraction { handleDownEvent: handleDownEvent, handleDragEvent: handleDragEvent, handleMoveEvent: handleMoveEvent, - handleUpEvent: handleUpEvent + handleUpEvent: handleUpEvent, }); /** @@ -43,7 +45,6 @@ class Drag extends PointerInteraction { } } - /** * @param {import("../src/ol/MapBrowserEvent.js").default} evt Map browser event. * @return {boolean} `true` to start the drag sequence. @@ -51,10 +52,9 @@ class Drag extends PointerInteraction { function handleDownEvent(evt) { const map = evt.map; - const feature = map.forEachFeatureAtPixel(evt.pixel, - function(feature) { - return feature; - }); + const feature = map.forEachFeatureAtPixel(evt.pixel, function (feature) { + return feature; + }); if (feature) { this.coordinate_ = evt.coordinate; @@ -64,7 +64,6 @@ function handleDownEvent(evt) { return !!feature; } - /** * @param {import("../src/ol/MapBrowserEvent.js").default} evt Map browser event. */ @@ -79,17 +78,15 @@ function handleDragEvent(evt) { this.coordinate_[1] = evt.coordinate[1]; } - /** * @param {import("../src/ol/MapBrowserEvent.js").default} evt Event. */ function handleMoveEvent(evt) { if (this.cursor_) { const map = evt.map; - const feature = map.forEachFeatureAtPixel(evt.pixel, - function(feature) { - return feature; - }); + const feature = map.forEachFeatureAtPixel(evt.pixel, function (feature) { + return feature; + }); const element = evt.map.getTargetElement(); if (feature) { if (element.style.cursor != this.cursor_) { @@ -103,7 +100,6 @@ function handleMoveEvent(evt) { } } - /** * @return {boolean} `false` to stop the drag sequence. */ @@ -113,29 +109,43 @@ function handleUpEvent() { return false; } - const pointFeature = new Feature(new Point([0, 0])); const lineFeature = new Feature( - new LineString([[-1e7, 1e6], [-1e6, 3e6]])); + new LineString([ + [-1e7, 1e6], + [-1e6, 3e6], + ]) +); const polygonFeature = new Feature( - new Polygon([[[-3e6, -1e6], [-3e6, 1e6], - [-1e6, 1e6], [-1e6, -1e6], [-3e6, -1e6]]])); + new Polygon([ + [ + [-3e6, -1e6], + [-3e6, 1e6], + [-1e6, 1e6], + [-1e6, -1e6], + [-3e6, -1e6], + ], + ]) +); -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; const map = new Map({ interactions: defaultInteractions().extend([new Drag()]), layers: [ new TileLayer({ source: new TileJSON({ - url: 'https://a.tiles.mapbox.com/v4/aj.1x1-degrees.json?access_token=' + key - }) + url: + 'https://a.tiles.mapbox.com/v4/aj.1x1-degrees.json?access_token=' + + key, + }), }), new VectorLayer({ source: new VectorSource({ - features: [pointFeature, lineFeature, polygonFeature] + features: [pointFeature, lineFeature, polygonFeature], }), style: new Style({ image: new Icon({ @@ -143,21 +153,21 @@ const map = new Map({ anchorXUnits: 'fraction', anchorYUnits: 'pixels', opacity: 0.95, - src: 'data/icon.png' + src: 'data/icon.png', }), stroke: new Stroke({ width: 3, - color: [255, 0, 0, 1] + color: [255, 0, 0, 1], }), fill: new Fill({ - color: [0, 0, 255, 0.6] - }) - }) - }) + color: [0, 0, 255, 0.6], + }), + }), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/d3.js b/examples/d3.js index e15fe1da8d..ae6b352f71 100644 --- a/examples/d3.js +++ b/examples/d3.js @@ -1,24 +1,23 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getWidth, getCenter} from '../src/ol/extent.js'; -import {Layer, Tile as TileLayer} from '../src/ol/layer.js'; import SourceState from '../src/ol/source/State.js'; -import {fromLonLat, toLonLat} from '../src/ol/proj.js'; import Stamen from '../src/ol/source/Stamen.js'; +import View from '../src/ol/View.js'; +import {Layer, Tile as TileLayer} from '../src/ol/layer.js'; +import {fromLonLat, toLonLat} from '../src/ol/proj.js'; +import {getCenter, getWidth} from '../src/ol/extent.js'; class CanvasLayer extends Layer { - constructor(options) { super(options); this.features = options.features; - this.svg = d3.select(document.createElement('div')).append('svg') + this.svg = d3 + .select(document.createElement('div')) + .append('svg') .style('position', 'absolute'); - this.svg.append('path') - .datum(this.features) - .attr('class', 'boundary'); + this.svg.append('path').datum(this.features).attr('class', 'boundary'); } getSourceState() { @@ -51,7 +50,10 @@ class CanvasLayer extends Layer { const scale = r / frameState.viewState.resolution; const center = toLonLat(getCenter(frameState.extent), projection); - d3Projection.scale(scale).center(center).translate([width / 2, height / 2]); + d3Projection + .scale(scale) + .center(center) + .translate([width / 2, height / 2]); d3Path = d3Path.projection(d3Projection); d3Path(this.features); @@ -59,8 +61,7 @@ class CanvasLayer extends Layer { this.svg.attr('width', width); this.svg.attr('height', height); - this.svg.select('path') - .attr('d', d3Path); + this.svg.select('path').attr('d', d3Path); return this.svg.node(); } @@ -70,25 +71,23 @@ const map = new Map({ layers: [ new TileLayer({ source: new Stamen({ - layer: 'watercolor' - }) - }) + layer: 'watercolor', + }), + }), ], target: 'map', view: new View({ center: fromLonLat([-97, 38]), - zoom: 4 - }) + zoom: 4, + }), }); - /** * Load the topojson data and create an ol/layer/Image for that data. */ -d3.json('data/topojson/us.json').then(function(us) { - +d3.json('data/topojson/us.json').then(function (us) { const layer = new CanvasLayer({ - features: topojson.feature(us, us.objects.counties) + features: topojson.feature(us, us.objects.counties), }); map.addLayer(layer); diff --git a/examples/device-orientation.js b/examples/device-orientation.js index 8f7fd602d6..d45579d23d 100644 --- a/examples/device-orientation.js +++ b/examples/device-orientation.js @@ -1,32 +1,31 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {toRadians} from '../src/ol/math.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {toRadians} from '../src/ol/math.js'; const view = new View({ center: [0, 0], - zoom: 2 + zoom: 2, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', - view: view + view: view, }); function el(id) { return document.getElementById(id); } - const gn = new GyroNorm(); -gn.init().then(function() { - gn.start(function(event) { +gn.init().then(function () { + gn.start(function (event) { const center = view.getCenter(); const resolution = view.getResolution(); const alpha = toRadians(event.do.alpha); diff --git a/examples/disable-image-smoothing.js b/examples/disable-image-smoothing.js index 5c231e8e49..0a6b23923a 100644 --- a/examples/disable-image-smoothing.js +++ b/examples/disable-image-smoothing.js @@ -1,10 +1,11 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '
    © MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const disabledLayer = new TileLayer({ @@ -12,11 +13,12 @@ const disabledLayer = new TileLayer({ className: 'ol-layer-dem', source: new XYZ({ attributions: attributions, - url: 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, + url: + 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, maxZoom: 10, crossOrigin: '', - imageSmoothing: false - }) + imageSmoothing: false, + }), }); const imagery = new TileLayer({ @@ -25,30 +27,36 @@ const imagery = new TileLayer({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, maxZoom: 20, - crossOrigin: '' - }) + crossOrigin: '', + }), }); const enabledLayer = new TileLayer({ source: new XYZ({ attributions: attributions, - url: 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, + url: + 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, maxZoom: 10, - crossOrigin: '' - }) + crossOrigin: '', + }), }); -imagery.on('prerender', function(evt) { +imagery.on('prerender', function (evt) { // use opaque background to conceal DEM while fully opaque imagery renders if (imagery.getOpacity() === 1) { evt.context.fillStyle = 'white'; - evt.context.fillRect(0, 0, evt.context.canvas.width, evt.context.canvas.height); + evt.context.fillRect( + 0, + 0, + evt.context.canvas.width, + evt.context.canvas.height + ); } }); const control = document.getElementById('opacity'); const output = document.getElementById('output'); -control.addEventListener('input', function() { +control.addEventListener('input', function () { output.innerText = control.value; imagery.setOpacity(control.value / 100); }); @@ -58,50 +66,52 @@ imagery.setOpacity(control.value / 100); const view = new View({ center: [6.893, 45.8295], zoom: 16, - projection: 'EPSG:4326' + projection: 'EPSG:4326', }); const map1 = new Map({ target: 'map1', layers: [disabledLayer, imagery], - view: view + view: view, }); const map2 = new Map({ target: 'map2', layers: [enabledLayer], - view: view + view: view, }); const info1 = document.getElementById('info1'); const info2 = document.getElementById('info2'); -const showElevations = function(evt) { +const showElevations = function (evt) { if (evt.dragging) { return; } map1.forEachLayerAtPixel( evt.pixel, - function(layer, pixel) { - const height = -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1; + function (layer, pixel) { + const height = + -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1; info1.innerText = height.toFixed(1); }, { - layerFilter: function(layer) { + layerFilter: function (layer) { return layer === disabledLayer; - } + }, } ); map2.forEachLayerAtPixel( evt.pixel, - function(layer, pixel) { - const height = -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1; + function (layer, pixel) { + const height = + -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1; info2.innerText = height.toFixed(1); }, { - layerFilter: function(layer) { + layerFilter: function (layer) { return layer === enabledLayer; - } + }, } ); }; diff --git a/examples/drag-and-drop-image-vector.js b/examples/drag-and-drop-image-vector.js index 56491c33dd..d230d1c7b6 100644 --- a/examples/drag-and-drop-image-vector.js +++ b/examples/drag-and-drop-image-vector.js @@ -1,22 +1,23 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; +import { + DragAndDrop, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; import {GPX, GeoJSON, IGC, KML, TopoJSON} from '../src/ol/format.js'; -import {defaults as defaultInteractions, DragAndDrop} from '../src/ol/interaction.js'; -import {VectorImage as VectorImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import {XYZ, Vector as VectorSource} from '../src/ol/source.js'; +import { + Tile as TileLayer, + VectorImage as VectorImageLayer, +} from '../src/ol/layer.js'; +import {Vector as VectorSource, XYZ} from '../src/ol/source.js'; const dragAndDropInteraction = new DragAndDrop({ - formatConstructors: [ - GPX, - GeoJSON, - IGC, - KML, - TopoJSON - ] + formatConstructors: [GPX, GeoJSON, IGC, KML, TopoJSON], }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const map = new Map({ @@ -25,31 +26,34 @@ const map = new Map({ new TileLayer({ source: new XYZ({ attributions: attributions, - url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) - }) + url: + 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20, + }), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -dragAndDropInteraction.on('addfeatures', function(event) { +dragAndDropInteraction.on('addfeatures', function (event) { const vectorSource = new VectorSource({ - features: event.features + features: event.features, }); - map.addLayer(new VectorImageLayer({ - source: vectorSource - })); + map.addLayer( + new VectorImageLayer({ + source: vectorSource, + }) + ); map.getView().fit(vectorSource.getExtent()); }); -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { const features = []; - map.forEachFeatureAtPixel(pixel, function(feature) { + map.forEachFeatureAtPixel(pixel, function (feature) { features.push(feature); }); if (features.length > 0) { @@ -64,7 +68,7 @@ const displayFeatureInfo = function(pixel) { } }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -72,6 +76,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(pixel); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/drag-and-drop.js b/examples/drag-and-drop.js index 0f407fec82..04ba089aee 100644 --- a/examples/drag-and-drop.js +++ b/examples/drag-and-drop.js @@ -1,22 +1,20 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; +import { + DragAndDrop, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; import {GPX, GeoJSON, IGC, KML, TopoJSON} from '../src/ol/format.js'; -import {defaults as defaultInteractions, DragAndDrop} from '../src/ol/interaction.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {XYZ, Vector as VectorSource} from '../src/ol/source.js'; +import {Vector as VectorSource, XYZ} from '../src/ol/source.js'; const dragAndDropInteraction = new DragAndDrop({ - formatConstructors: [ - GPX, - GeoJSON, - IGC, - KML, - TopoJSON - ] + formatConstructors: [GPX, GeoJSON, IGC, KML, TopoJSON], }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const map = new Map({ @@ -25,31 +23,34 @@ const map = new Map({ new TileLayer({ source: new XYZ({ attributions: attributions, - url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) - }) + url: + 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20, + }), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -dragAndDropInteraction.on('addfeatures', function(event) { +dragAndDropInteraction.on('addfeatures', function (event) { const vectorSource = new VectorSource({ - features: event.features + features: event.features, }); - map.addLayer(new VectorLayer({ - source: vectorSource - })); + map.addLayer( + new VectorLayer({ + source: vectorSource, + }) + ); map.getView().fit(vectorSource.getExtent()); }); -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { const features = []; - map.forEachFeatureAtPixel(pixel, function(feature) { + map.forEachFeatureAtPixel(pixel, function (feature) { features.push(feature); }); if (features.length > 0) { @@ -64,7 +65,7 @@ const displayFeatureInfo = function(pixel) { } }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -72,6 +73,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(pixel); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/drag-rotate-and-zoom.js b/examples/drag-rotate-and-zoom.js index 88e58a4f8a..f552b25553 100644 --- a/examples/drag-rotate-and-zoom.js +++ b/examples/drag-rotate-and-zoom.js @@ -1,22 +1,22 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultInteractions, DragRotateAndZoom} from '../src/ol/interaction.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import { + DragRotateAndZoom, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; const map = new Map({ - interactions: defaultInteractions().extend([ - new DragRotateAndZoom() - ]), + interactions: defaultInteractions().extend([new DragRotateAndZoom()]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/draw-and-modify-features.js b/examples/draw-and-modify-features.js index 0863a752fb..bc2a56773c 100644 --- a/examples/draw-and-modify-features.js +++ b/examples/draw-and-modify-features.js @@ -1,12 +1,12 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {Draw, Modify, Snap} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {Draw, Modify, Snap} from '../src/ol/interaction.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const source = new VectorSource(); @@ -14,19 +14,19 @@ const vector = new VectorLayer({ source: source, style: new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.2)' + color: 'rgba(255, 255, 255, 0.2)', }), stroke: new Stroke({ color: '#ffcc33', - width: 2 + width: 2, }), image: new CircleStyle({ radius: 7, fill: new Fill({ - color: '#ffcc33' - }) - }) - }) + color: '#ffcc33', + }), + }), + }), }); const map = new Map({ @@ -34,8 +34,8 @@ const map = new Map({ target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 4 - }) + zoom: 4, + }), }); const modify = new Modify({source: source}); @@ -47,18 +47,17 @@ const typeSelect = document.getElementById('type'); function addInteractions() { draw = new Draw({ source: source, - type: typeSelect.value + type: typeSelect.value, }); map.addInteraction(draw); snap = new Snap({source: source}); map.addInteraction(snap); - } /** * Handle change event. */ -typeSelect.onchange = function() { +typeSelect.onchange = function () { map.removeInteraction(draw); map.removeInteraction(snap); addInteractions(); diff --git a/examples/draw-features.js b/examples/draw-features.js index 4d0d200b8f..cefff36c35 100644 --- a/examples/draw-features.js +++ b/examples/draw-features.js @@ -1,17 +1,17 @@ +import Draw from '../src/ol/interaction/Draw.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import Draw from '../src/ol/interaction/Draw.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const source = new VectorSource({wrapX: false}); const vector = new VectorLayer({ - source: source + source: source, }); const map = new Map({ @@ -19,8 +19,8 @@ const map = new Map({ target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 4 - }) + zoom: 4, + }), }); const typeSelect = document.getElementById('type'); @@ -31,17 +31,16 @@ function addInteraction() { if (value !== 'None') { draw = new Draw({ source: source, - type: typeSelect.value + type: typeSelect.value, }); map.addInteraction(draw); } } - /** * Handle change event. */ -typeSelect.onchange = function() { +typeSelect.onchange = function () { map.removeInteraction(draw); addInteraction(); }; diff --git a/examples/draw-freehand.js b/examples/draw-freehand.js index 92cefa6c89..d7d2b08057 100644 --- a/examples/draw-freehand.js +++ b/examples/draw-freehand.js @@ -1,17 +1,17 @@ +import Draw from '../src/ol/interaction/Draw.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import Draw from '../src/ol/interaction/Draw.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const source = new VectorSource({wrapX: false}); const vector = new VectorLayer({ - source: source + source: source, }); const map = new Map({ @@ -19,8 +19,8 @@ const map = new Map({ target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 4 - }) + zoom: 4, + }), }); const typeSelect = document.getElementById('type'); @@ -32,17 +32,16 @@ function addInteraction() { draw = new Draw({ source: source, type: typeSelect.value, - freehand: true + freehand: true, }); map.addInteraction(draw); } } - /** * Handle change event. */ -typeSelect.onchange = function() { +typeSelect.onchange = function () { map.removeInteraction(draw); addInteraction(); }; diff --git a/examples/draw-shapes.js b/examples/draw-shapes.js index 7ed90d5be0..f02fba2ac8 100644 --- a/examples/draw-shapes.js +++ b/examples/draw-shapes.js @@ -1,18 +1,21 @@ +import Draw, { + createBox, + createRegularPolygon, +} from '../src/ol/interaction/Draw.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Polygon from '../src/ol/geom/Polygon.js'; -import Draw, {createRegularPolygon, createBox} from '../src/ol/interaction/Draw.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import View from '../src/ol/View.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const source = new VectorSource({wrapX: false}); const vector = new VectorLayer({ - source: source + source: source, }); const map = new Map({ @@ -20,8 +23,8 @@ const map = new Map({ target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 4 - }) + zoom: 4, + }), }); const typeSelect = document.getElementById('type'); @@ -39,7 +42,7 @@ function addInteraction() { geometryFunction = createBox(); } else if (value === 'Star') { value = 'Circle'; - geometryFunction = function(coordinates, geometry) { + geometryFunction = function (coordinates, geometry) { const center = coordinates[0]; const last = coordinates[1]; const dx = center[0] - last[0]; @@ -49,7 +52,7 @@ function addInteraction() { const newCoordinates = []; const numPoints = 12; for (let i = 0; i < numPoints; ++i) { - const angle = rotation + i * 2 * Math.PI / numPoints; + const angle = rotation + (i * 2 * Math.PI) / numPoints; const fraction = i % 2 === 0 ? 1 : 0.5; const offsetX = radius * fraction * Math.cos(angle); const offsetY = radius * fraction * Math.sin(angle); @@ -67,17 +70,16 @@ function addInteraction() { draw = new Draw({ source: source, type: value, - geometryFunction: geometryFunction + geometryFunction: geometryFunction, }); map.addInteraction(draw); } } - /** * Handle change event. */ -typeSelect.onchange = function() { +typeSelect.onchange = function () { map.removeInteraction(draw); addInteraction(); }; diff --git a/examples/dynamic-data.js b/examples/dynamic-data.js index e65a0d21f7..deca3b51aa 100644 --- a/examples/dynamic-data.js +++ b/examples/dynamic-data.js @@ -1,13 +1,13 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {MultiPoint, Point} from '../src/ol/geom.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {MultiPoint, Point} from '../src/ol/geom.js'; import {getVectorContext} from '../src/ol/render.js'; const tileLayer = new TileLayer({ - source: new OSM() + source: new OSM(), }); const map = new Map({ @@ -15,30 +15,30 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const imageStyle = new Style({ image: new CircleStyle({ radius: 5, fill: new Fill({color: 'yellow'}), - stroke: new Stroke({color: 'red', width: 1}) - }) + stroke: new Stroke({color: 'red', width: 1}), + }), }); const headInnerImageStyle = new Style({ image: new CircleStyle({ radius: 2, - fill: new Fill({color: 'blue'}) - }) + fill: new Fill({color: 'blue'}), + }), }); const headOuterImageStyle = new Style({ image: new CircleStyle({ radius: 5, - fill: new Fill({color: 'black'}) - }) + fill: new Fill({color: 'black'}), + }), }); const n = 200; @@ -46,16 +46,16 @@ const omegaTheta = 30000; // Rotation period in ms const R = 7e6; const r = 2e6; const p = 2e6; -tileLayer.on('postrender', function(event) { +tileLayer.on('postrender', function (event) { const vectorContext = getVectorContext(event); const frameState = event.frameState; - const theta = 2 * Math.PI * frameState.time / omegaTheta; + const theta = (2 * Math.PI * frameState.time) / omegaTheta; const coordinates = []; let i; for (i = 0; i < n; ++i) { - const t = theta + 2 * Math.PI * i / n; - const x = (R + r) * Math.cos(t) + p * Math.cos((R + r) * t / r); - const y = (R + r) * Math.sin(t) + p * Math.sin((R + r) * t / r); + const t = theta + (2 * Math.PI * i) / n; + const x = (R + r) * Math.cos(t) + p * Math.cos(((R + r) * t) / r); + const y = (R + r) * Math.sin(t) + p * Math.sin(((R + r) * t) / r); coordinates.push([x, y]); } vectorContext.setStyle(imageStyle); diff --git a/examples/earthquake-clusters.js b/examples/earthquake-clusters.js index e328f75562..8ffd0602a0 100644 --- a/examples/earthquake-clusters.js +++ b/examples/earthquake-clusters.js @@ -1,29 +1,38 @@ +import KML from '../src/ol/format/KML.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {createEmpty, getWidth, getHeight, extend} from '../src/ol/extent.js'; -import KML from '../src/ol/format/KML.js'; -import {defaults as defaultInteractions, Select} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import { + Circle as CircleStyle, + Fill, + RegularShape, + Stroke, + Style, + Text, +} from '../src/ol/style.js'; import {Cluster, Stamen, Vector as VectorSource} from '../src/ol/source.js'; -import {Circle as CircleStyle, Fill, RegularShape, Stroke, Style, Text} from '../src/ol/style.js'; - +import { + Select, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {createEmpty, extend, getHeight, getWidth} from '../src/ol/extent.js'; const earthquakeFill = new Fill({ - color: 'rgba(255, 153, 0, 0.8)' + color: 'rgba(255, 153, 0, 0.8)', }); const earthquakeStroke = new Stroke({ color: 'rgba(255, 204, 0, 0.2)', - width: 1 + width: 1, }); const textFill = new Fill({ - color: '#fff' + color: '#fff', }); const textStroke = new Stroke({ color: 'rgba(0, 0, 0, 0.6)', - width: 3 + width: 3, }); const invisibleFill = new Fill({ - color: 'rgba(255, 255, 255, 0.01)' + color: 'rgba(255, 255, 255, 0.01)', }); function createEarthquakeStyle(feature) { @@ -42,14 +51,14 @@ function createEarthquakeStyle(feature) { points: 5, angle: Math.PI, fill: earthquakeFill, - stroke: earthquakeStroke - }) + stroke: earthquakeStroke, + }), }); } let maxFeatureCount; let vector = null; -const calculateClusterInfo = function(resolution) { +const calculateClusterInfo = function (resolution) { maxFeatureCount = 0; const features = vector.getSource().getFeatures(); let feature, radius; @@ -62,8 +71,7 @@ const calculateClusterInfo = function(resolution) { extend(extent, originalFeatures[j].getGeometry().getExtent()); } maxFeatureCount = Math.max(maxFeatureCount, jj); - radius = 0.25 * (getWidth(extent) + getHeight(extent)) / - resolution; + radius = (0.25 * (getWidth(extent) + getHeight(extent))) / resolution; feature.set('radius', radius); } }; @@ -81,14 +89,14 @@ function styleFunction(feature, resolution) { image: new CircleStyle({ radius: feature.get('radius'), fill: new Fill({ - color: [255, 153, 0, Math.min(0.8, 0.4 + (size / maxFeatureCount))] - }) + color: [255, 153, 0, Math.min(0.8, 0.4 + size / maxFeatureCount)], + }), }), text: new Text({ text: size.toString(), fill: textFill, - stroke: textStroke - }) + stroke: textStroke, + }), }); } else { const originalFeature = feature.get('features')[0]; @@ -98,12 +106,14 @@ function styleFunction(feature, resolution) { } function selectStyleFunction(feature) { - const styles = [new Style({ - image: new CircleStyle({ - radius: feature.get('radius'), - fill: invisibleFill - }) - })]; + const styles = [ + new Style({ + image: new CircleStyle({ + radius: feature.get('radius'), + fill: invisibleFill, + }), + }), + ]; const originalFeatures = feature.get('features'); let originalFeature; for (let i = originalFeatures.length - 1; i >= 0; --i) { @@ -119,31 +129,32 @@ vector = new VectorLayer({ source: new VectorSource({ url: 'data/kml/2012_Earthquakes_Mag5.kml', format: new KML({ - extractStyles: false - }) - }) + extractStyles: false, + }), + }), }), - style: styleFunction + style: styleFunction, }); const raster = new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }); const map = new Map({ layers: [raster, vector], - interactions: defaultInteractions().extend([new Select({ - condition: function(evt) { - return evt.type == 'pointermove' || - evt.type == 'singleclick'; - }, - style: selectStyleFunction - })]), + interactions: defaultInteractions().extend([ + new Select({ + condition: function (evt) { + return evt.type == 'pointermove' || evt.type == 'singleclick'; + }, + style: selectStyleFunction, + }), + ]), target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/earthquake-custom-symbol.js b/examples/earthquake-custom-symbol.js index 917c1ada8e..45659589b4 100644 --- a/examples/earthquake-custom-symbol.js +++ b/examples/earthquake-custom-symbol.js @@ -1,22 +1,29 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; +import Map from '../src/ol/Map.js'; import Polygon from '../src/ol/geom/Polygon.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {toContext} from '../src/ol/render.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Icon, Stroke, Style} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {toContext} from '../src/ol/render.js'; - -const symbol = [[0, 0], [4, 2], [6, 0], [10, 5], [6, 3], [4, 5], [0, 0]]; +const symbol = [ + [0, 0], + [4, 2], + [6, 0], + [10, 5], + [6, 3], + [4, 5], + [0, 0], +]; let scale; -const scaleFunction = function(coordinate) { +const scaleFunction = function (coordinate) { return [coordinate[0] * scale, coordinate[1] * scale]; }; const styleCache = {}; -const styleFunction = function(feature) { +const styleFunction = function (feature) { // 2012_Earthquakes_Mag5.kml stores the magnitude of each earthquake in a // standards-violating tag in each Placemark. We extract it from // the Placemark's name instead. @@ -27,19 +34,23 @@ const styleFunction = function(feature) { let style = styleCache[size]; if (!style) { const canvas = document.createElement('canvas'); - const vectorContext = toContext(canvas.getContext('2d'), - {size: [size, size], pixelRatio: 1}); - vectorContext.setStyle(new Style({ - fill: new Fill({color: 'rgba(255, 153, 0, 0.4)'}), - stroke: new Stroke({color: 'rgba(255, 204, 0, 0.2)', width: 2}) - })); + const vectorContext = toContext(canvas.getContext('2d'), { + size: [size, size], + pixelRatio: 1, + }); + vectorContext.setStyle( + new Style({ + fill: new Fill({color: 'rgba(255, 153, 0, 0.4)'}), + stroke: new Stroke({color: 'rgba(255, 204, 0, 0.2)', width: 2}), + }) + ); vectorContext.drawGeometry(new Polygon([symbol.map(scaleFunction)])); style = new Style({ image: new Icon({ img: canvas, imgSize: [size, size], - rotation: 1.2 - }) + rotation: 1.2, + }), }); styleCache[size] = style; } @@ -50,16 +61,16 @@ const vector = new VectorLayer({ source: new VectorSource({ url: 'data/kml/2012_Earthquakes_Mag5.kml', format: new KML({ - extractStyles: false - }) + extractStyles: false, + }), }), - style: styleFunction + style: styleFunction, }); const raster = new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }); const map = new Map({ @@ -67,6 +78,6 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/edit-geographic.js b/examples/edit-geographic.js index 6c0cd07c1f..857e06ee20 100644 --- a/examples/edit-geographic.js +++ b/examples/edit-geographic.js @@ -1,46 +1,46 @@ -import {Map, View} from '../src/ol/index.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Modify, Select, Draw, Snap} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {Draw, Modify, Select, Snap} from '../src/ol/interaction.js'; +import {Map, View} from '../src/ol/index.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {useGeographic} from '../src/ol/proj.js'; useGeographic(); const source = new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }); const map = new Map({ target: 'map', layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new VectorLayer({ - source: source - }) + source: source, + }), ], view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const select = new Select(); const modify = new Modify({ - features: select.getFeatures() + features: select.getFeatures(), }); const draw = new Draw({ type: 'Polygon', - source: source + source: source, }); const snap = new Snap({ - source: source + source: source, }); function removeInteractions() { diff --git a/examples/epsg-4326.js b/examples/epsg-4326.js index 86cf815629..9ac4146e40 100644 --- a/examples/epsg-4326.js +++ b/examples/epsg-4326.js @@ -1,9 +1,8 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, ScaleLine} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import TileWMS from '../src/ol/source/TileWMS.js'; - +import View from '../src/ol/View.js'; +import {ScaleLine, defaults as defaultControls} from '../src/ol/control.js'; const layers = [ new TileLayer({ @@ -11,23 +10,23 @@ const layers = [ url: 'https://ahocevar.com/geoserver/wms', params: { 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', - 'TILED': true - } - }) - }) + 'TILED': true, + }, + }), + }), ]; const map = new Map({ controls: defaultControls().extend([ new ScaleLine({ - units: 'degrees' - }) + units: 'degrees', + }), ]), layers: layers, target: 'map', view: new View({ projection: 'EPSG:4326', center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/es2015-custom-element.js b/examples/es2015-custom-element.js index ff632b2b2e..4a4dbd8901 100644 --- a/examples/es2015-custom-element.js +++ b/examples/es2015-custom-element.js @@ -1,10 +1,9 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; class OLComponent extends HTMLElement { - constructor() { super(); this.shadow = this.attachShadow({mode: 'open'}); @@ -28,15 +27,14 @@ class OLComponent extends HTMLElement { target: div, layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); - } } diff --git a/examples/export-map.js b/examples/export-map.js index 0039f0f1d8..ca3836b8ef 100644 --- a/examples/export-map.js +++ b/examples/export-map.js @@ -1,48 +1,57 @@ +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - opacity: 0.5 - }) + opacity: 0.5, + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -document.getElementById('export-png').addEventListener('click', function() { - map.once('rendercomplete', function() { +document.getElementById('export-png').addEventListener('click', function () { + map.once('rendercomplete', function () { const mapCanvas = document.createElement('canvas'); const size = map.getSize(); mapCanvas.width = size[0]; mapCanvas.height = size[1]; const mapContext = mapCanvas.getContext('2d'); - Array.prototype.forEach.call(document.querySelectorAll('.ol-layer canvas'), function(canvas) { - if (canvas.width > 0) { - const opacity = canvas.parentNode.style.opacity; - mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity); - const transform = canvas.style.transform; - // Get the transform parameters from the style's transform matrix - const matrix = transform.match(/^matrix\(([^\(]*)\)$/)[1].split(',').map(Number); - // Apply the transform to the export map context - CanvasRenderingContext2D.prototype.setTransform.apply(mapContext, matrix); - mapContext.drawImage(canvas, 0, 0); + Array.prototype.forEach.call( + document.querySelectorAll('.ol-layer canvas'), + function (canvas) { + if (canvas.width > 0) { + const opacity = canvas.parentNode.style.opacity; + mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity); + const transform = canvas.style.transform; + // Get the transform parameters from the style's transform matrix + const matrix = transform + .match(/^matrix\(([^\(]*)\)$/)[1] + .split(',') + .map(Number); + // Apply the transform to the export map context + CanvasRenderingContext2D.prototype.setTransform.apply( + mapContext, + matrix + ); + mapContext.drawImage(canvas, 0, 0); + } } - }); + ); if (navigator.msSaveBlob) { // link download attribuute does not work on MS browsers navigator.msSaveBlob(mapCanvas.msToBlob(), 'map.png'); diff --git a/examples/export-pdf.js b/examples/export-pdf.js index 97dac9b59e..3d1bb4fcc0 100644 --- a/examples/export-pdf.js +++ b/examples/export-pdf.js @@ -1,94 +1,110 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import WKT from '../src/ol/format/WKT.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const format = new WKT(); const feature = format.readFeature( 'POLYGON((10.689697265625 -25.0927734375, 34.595947265625 ' + - '-20.1708984375, 38.814697265625 -35.6396484375, 13.502197265625 ' + - '-39.1552734375, 10.689697265625 -25.0927734375))'); + '-20.1708984375, 38.814697265625 -35.6396484375, 13.502197265625 ' + + '-39.1552734375, 10.689697265625 -25.0927734375))' +); feature.getGeometry().transform('EPSG:4326', 'EPSG:3857'); const vector = new VectorLayer({ source: new VectorSource({ - features: [feature] + features: [feature], }), - opacity: 0.5 + opacity: 0.5, }); - const map = new Map({ layers: [raster, vector], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); - const dims = { a0: [1189, 841], a1: [841, 594], a2: [594, 420], a3: [420, 297], a4: [297, 210], - a5: [210, 148] + a5: [210, 148], }; - const exportButton = document.getElementById('export-pdf'); -exportButton.addEventListener('click', function() { +exportButton.addEventListener( + 'click', + function () { + exportButton.disabled = true; + document.body.style.cursor = 'progress'; - exportButton.disabled = true; - document.body.style.cursor = 'progress'; + const format = document.getElementById('format').value; + const resolution = document.getElementById('resolution').value; + const dim = dims[format]; + const width = Math.round((dim[0] * resolution) / 25.4); + const height = Math.round((dim[1] * resolution) / 25.4); + const size = map.getSize(); + const viewResolution = map.getView().getResolution(); - const format = document.getElementById('format').value; - const resolution = document.getElementById('resolution').value; - const dim = dims[format]; - const width = Math.round(dim[0] * resolution / 25.4); - const height = Math.round(dim[1] * resolution / 25.4); - const size = map.getSize(); - const viewResolution = map.getView().getResolution(); - - map.once('rendercomplete', function() { - const mapCanvas = document.createElement('canvas'); - mapCanvas.width = width; - mapCanvas.height = height; - const mapContext = mapCanvas.getContext('2d'); - Array.prototype.forEach.call(document.querySelectorAll('.ol-layer canvas'), function(canvas) { - if (canvas.width > 0) { - const opacity = canvas.parentNode.style.opacity; - mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity); - const transform = canvas.style.transform; - // Get the transform parameters from the style's transform matrix - const matrix = transform.match(/^matrix\(([^\(]*)\)$/)[1].split(',').map(Number); - // Apply the transform to the export map context - CanvasRenderingContext2D.prototype.setTransform.apply(mapContext, matrix); - mapContext.drawImage(canvas, 0, 0); - } + map.once('rendercomplete', function () { + const mapCanvas = document.createElement('canvas'); + mapCanvas.width = width; + mapCanvas.height = height; + const mapContext = mapCanvas.getContext('2d'); + Array.prototype.forEach.call( + document.querySelectorAll('.ol-layer canvas'), + function (canvas) { + if (canvas.width > 0) { + const opacity = canvas.parentNode.style.opacity; + mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity); + const transform = canvas.style.transform; + // Get the transform parameters from the style's transform matrix + const matrix = transform + .match(/^matrix\(([^\(]*)\)$/)[1] + .split(',') + .map(Number); + // Apply the transform to the export map context + CanvasRenderingContext2D.prototype.setTransform.apply( + mapContext, + matrix + ); + mapContext.drawImage(canvas, 0, 0); + } + } + ); + const pdf = new jsPDF('landscape', undefined, format); + pdf.addImage( + mapCanvas.toDataURL('image/jpeg'), + 'JPEG', + 0, + 0, + dim[0], + dim[1] + ); + pdf.save('map.pdf'); + // Reset original map size + map.setSize(size); + map.getView().setResolution(viewResolution); + exportButton.disabled = false; + document.body.style.cursor = 'auto'; }); - const pdf = new jsPDF('landscape', undefined, format); - pdf.addImage(mapCanvas.toDataURL('image/jpeg'), 'JPEG', 0, 0, dim[0], dim[1]); - pdf.save('map.pdf'); - // Reset original map size - map.setSize(size); - map.getView().setResolution(viewResolution); - exportButton.disabled = false; - document.body.style.cursor = 'auto'; - }); - // Set print size - const printSize = [width, height]; - map.setSize(printSize); - const scaling = Math.min(width / size[0], height / size[1]); - map.getView().setResolution(viewResolution / scaling); - -}, false); + // Set print size + const printSize = [width, height]; + map.setSize(printSize); + const scaling = Math.min(width / size[0], height / size[1]); + map.getView().setResolution(viewResolution / scaling); + }, + false +); diff --git a/examples/extent-constrained.js b/examples/extent-constrained.js index 70613dd536..1fbdb14ac9 100644 --- a/examples/extent-constrained.js +++ b/examples/extent-constrained.js @@ -1,25 +1,24 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; -import {defaults as defaultControls} from '../src/ol/control.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import ZoomSlider from '../src/ol/control/ZoomSlider.js'; +import {defaults as defaultControls} from '../src/ol/control.js'; const view = new View({ center: [328627.563458, 5921296.662223], zoom: 8, - extent: [-572513.341856, 5211017.966314, - 916327.095083, 6636950.728974] + extent: [-572513.341856, 5211017.966314, 916327.095083, 6636950.728974], }); new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], keyboardEventTarget: document, target: 'map', view: view, - controls: defaultControls().extend([new ZoomSlider()]) + controls: defaultControls().extend([new ZoomSlider()]), }); diff --git a/examples/extent-interaction.js b/examples/extent-interaction.js index 0925665abf..907e702f04 100644 --- a/examples/extent-interaction.js +++ b/examples/extent-interaction.js @@ -1,29 +1,29 @@ +import ExtentInteraction from '../src/ol/interaction/Extent.js'; +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import ExtentInteraction from '../src/ol/interaction/Extent.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const vectorSource = new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const extent = new ExtentInteraction(); @@ -31,12 +31,12 @@ map.addInteraction(extent); extent.setActive(false); //Enable interaction by holding shift -window.addEventListener('keydown', function(event) { +window.addEventListener('keydown', function (event) { if (event.keyCode == 16) { extent.setActive(true); } }); -window.addEventListener('keyup', function(event) { +window.addEventListener('keyup', function (event) { if (event.keyCode == 16) { extent.setActive(false); } diff --git a/examples/feature-animation.js b/examples/feature-animation.js index 27fcec3eed..c1391ff2a1 100644 --- a/examples/feature-animation.js +++ b/examples/feature-animation.js @@ -1,19 +1,19 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import {unByKey} from '../src/ol/Observable.js'; -import View from '../src/ol/View.js'; -import {easeOut} from '../src/ol/easing.js'; import Point from '../src/ol/geom/Point.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {fromLonLat} from '../src/ol/proj.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Stroke, Style} from '../src/ol/style.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {easeOut} from '../src/ol/easing.js'; +import {fromLonLat} from '../src/ol/proj.js'; import {getVectorContext} from '../src/ol/render.js'; +import {unByKey} from '../src/ol/Observable.js'; const tileLayer = new TileLayer({ source: new OSM({ - wrapX: false - }) + wrapX: false, + }), }); const map = new Map({ @@ -22,15 +22,15 @@ const map = new Map({ view: new View({ center: [0, 0], zoom: 1, - multiWorld: true - }) + multiWorld: true, + }), }); const source = new VectorSource({ - wrapX: false + wrapX: false, }); const vector = new VectorLayer({ - source: source + source: source, }); map.addLayer(vector); @@ -62,9 +62,9 @@ function flash(feature) { radius: radius, stroke: new Stroke({ color: 'rgba(255, 0, 0, ' + opacity + ')', - width: 0.25 + opacity - }) - }) + width: 0.25 + opacity, + }), + }), }); vectorContext.setStyle(style); @@ -78,7 +78,7 @@ function flash(feature) { } } -source.on('addfeature', function(e) { +source.on('addfeature', function (e) { flash(e.feature); }); diff --git a/examples/feature-move-animation.js b/examples/feature-move-animation.js index e3c38fdc9a..3210ad650d 100644 --- a/examples/feature-move-animation.js +++ b/examples/feature-move-animation.js @@ -1,12 +1,18 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.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 {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import XYZ from '../src/ol/source/XYZ.js'; +import Polyline from '../src/ol/format/Polyline.js'; import VectorSource from '../src/ol/source/Vector.js'; -import {Circle as CircleStyle, Fill, Icon, Stroke, Style} from '../src/ol/style.js'; +import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; +import { + Circle as CircleStyle, + Fill, + Icon, + Stroke, + Style, +} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {getVectorContext} from '../src/ol/render.js'; // This long string is placed here due to jsFiddle limitations. @@ -50,14 +56,16 @@ const polyline = [ 'ab@`CuOlC}YnAcV`@_^m@aeB}@yk@YuTuBg^uCkZiGk\\yGeY}Lu_@oOsZiTe[uWi[sl@', 'mo@soAauAsrBgzBqgAglAyd@ig@asAcyAklA}qAwHkGi{@s~@goAmsAyDeEirB_{B}IsJ', 'uEeFymAssAkdAmhAyTcVkFeEoKiH}l@kp@wg@sj@ku@ey@uh@kj@}EsFmG}Jk^_r@_f@m', - '~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL' + '~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL', ].join(''); -const route = /** @type {import("../src/ol/geom/LineString.js").default} */ (new Polyline({ - factor: 1e6 -}).readGeometry(polyline, { +const route = /** @type {import("../src/ol/geom/LineString.js").default} */ (new Polyline( + { + factor: 1e6, + } +).readGeometry(polyline, { dataProjection: 'EPSG:4326', - featureProjection: 'EPSG:3857' + featureProjection: 'EPSG:3857', })); const routeCoords = route.getCoordinates(); @@ -65,42 +73,46 @@ const routeLength = routeCoords.length; const routeFeature = new Feature({ type: 'route', - geometry: route + geometry: route, }); -const geoMarker = /** @type Feature */(new Feature({ - type: 'geoMarker', - geometry: new Point(routeCoords[0]) -})); +const geoMarker = /** @type Feature */ (new Feature( + { + type: 'geoMarker', + geometry: new Point(routeCoords[0]), + } +)); const startMarker = new Feature({ type: 'icon', - geometry: new Point(routeCoords[0]) + geometry: new Point(routeCoords[0]), }); const endMarker = new Feature({ type: 'icon', - geometry: new Point(routeCoords[routeLength - 1]) + geometry: new Point(routeCoords[routeLength - 1]), }); const styles = { 'route': new Style({ stroke: new Stroke({ - width: 6, color: [237, 212, 0, 0.8] - }) + width: 6, + color: [237, 212, 0, 0.8], + }), }), 'icon': new Style({ image: new Icon({ anchor: [0.5, 1], - src: 'data/icon.png' - }) + src: 'data/icon.png', + }), }), 'geoMarker': new Style({ image: new CircleStyle({ radius: 7, fill: new Fill({color: 'black'}), stroke: new Stroke({ - color: 'white', width: 2 - }) - }) - }) + color: 'white', + width: 2, + }), + }), + }), }; let animating = false; @@ -110,19 +122,20 @@ const startButton = document.getElementById('start-animation'); const vectorLayer = new VectorLayer({ source: new VectorSource({ - features: [routeFeature, geoMarker, startMarker, endMarker] + features: [routeFeature, geoMarker, startMarker, endMarker], }), - style: function(feature) { + style: function (feature) { // hide geoMarker if animation is active if (animating && feature.get('type') === 'geoMarker') { return null; } return styles[feature.get('type')]; - } + }, }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const center = [-5639523.95, -3501274.52]; @@ -132,21 +145,21 @@ const map = new Map({ center: center, zoom: 10, minZoom: 2, - maxZoom: 19 + maxZoom: 19, }), layers: [ new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/maps/hybrid/{z}/{x}/{y}.jpg?key=' + key, - tileSize: 512 - }) + tileSize: 512, + }), }), - vectorLayer - ] + vectorLayer, + ], }); -const moveFeature = function(event) { +const moveFeature = function (event) { const vectorContext = getVectorContext(event); const frameState = event.frameState; @@ -154,7 +167,7 @@ const moveFeature = function(event) { const elapsedTime = frameState.time - now; // here the trick to increase speed is to jump some indexes // on lineString coordinates - const index = Math.round(speed * elapsedTime / 1000); + const index = Math.round((speed * elapsedTime) / 1000); if (index >= routeLength) { stopAnimation(true); @@ -186,7 +199,6 @@ function startAnimation() { } } - /** * @param {boolean} ended end of animation. */ diff --git a/examples/filter-points-webgl.js b/examples/filter-points-webgl.js index b2d39f0bd6..2306684b78 100644 --- a/examples/filter-points-webgl.js +++ b/examples/filter-points-webgl.js @@ -1,61 +1,54 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import Feature from '../src/ol/Feature.js'; +import Map from '../src/ol/Map.js'; import Point from '../src/ol/geom/Point.js'; +import Stamen from '../src/ol/source/Stamen.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js'; import {Vector} from '../src/ol/source.js'; import {fromLonLat} from '../src/ol/proj.js'; -import Stamen from '../src/ol/source/Stamen.js'; -import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js'; const vectorSource = new Vector({ - attributions: 'NASA' + attributions: 'NASA', }); const oldColor = 'rgba(242,56,22,0.61)'; const newColor = '#ffe52c'; const period = 12; // animation period in seconds -const animRatio = - ['^', - ['/', - ['%', - ['+', - ['time'], - [ - 'interpolate', - ['linear'], - ['get', 'year'], - 1850, 0, - 2015, period - ] - ], - period +const animRatio = [ + '^', + [ + '/', + [ + '%', + [ + '+', + ['time'], + ['interpolate', ['linear'], ['get', 'year'], 1850, 0, 2015, period], ], - period + period, ], - 0.5 - ]; + period, + ], + 0.5, +]; const style = { variables: { minYear: 1850, - maxYear: 2015 + maxYear: 2015, }, filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']], symbol: { symbolType: 'circle', - size: ['*', + size: [ + '*', ['interpolate', ['linear'], ['get', 'mass'], 0, 8, 200000, 26], - ['-', 1.75, ['*', animRatio, 0.75]] + ['-', 1.75, ['*', animRatio, 0.75]], ], - color: ['interpolate', - ['linear'], - animRatio, - 0, newColor, - 1, oldColor - ], - opacity: ['-', 1.0, ['*', animRatio, 0.75]] - } + color: ['interpolate', ['linear'], animRatio, 0, newColor, 1, oldColor], + opacity: ['-', 1.0, ['*', animRatio, 0.75]], + }, }; // handle input values & events @@ -85,7 +78,7 @@ updateStatusText(); // load data const client = new XMLHttpRequest(); client.open('GET', 'data/csv/meteorite_landings.csv'); -client.onload = function() { +client.onload = function () { const csv = client.responseText; const features = []; @@ -102,11 +95,13 @@ client.onload = function() { continue; } - features.push(new Feature({ - mass: parseFloat(line[1]) || 0, - year: parseInt(line[2]) || 0, - geometry: new Point(coords) - })); + features.push( + new Feature({ + mass: parseFloat(line[1]) || 0, + year: parseInt(line[2]) || 0, + geometry: new Point(coords), + }) + ); } vectorSource.addFeatures(features); @@ -117,20 +112,20 @@ const map = new Map({ layers: [ new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }), new WebGLPointsLayer({ style: style, source: vectorSource, - disableHitDetection: true - }) + disableHitDetection: true, + }), ], target: document.getElementById('map'), view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); // animate the map diff --git a/examples/flight-animation.js b/examples/flight-animation.js index 9445a8d14b..932c579108 100644 --- a/examples/flight-animation.js +++ b/examples/flight-animation.js @@ -1,79 +1,81 @@ import Feature from '../src/ol/Feature.js'; -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import Map from '../src/ol/Map.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Stroke, Style} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {getVectorContext} from '../src/ol/render.js'; const tileLayer = new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }); const map = new Map({ - layers: [ - tileLayer - ], + layers: [tileLayer], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const style = new Style({ stroke: new Stroke({ color: '#EAE911', - width: 2 - }) + width: 2, + }), }); const flightsSource = new VectorSource({ wrapX: false, - attributions: 'Flight data by ' + - 'OpenFlights,', - loader: function() { + attributions: + 'Flight data by ' + + 'OpenFlights,', + loader: function () { const url = 'data/openflights/flights.json'; - fetch(url).then(function(response) { - return response.json(); - }).then(function(json) { - const flightsData = json.flights; - for (let i = 0; i < flightsData.length; i++) { - const flight = flightsData[i]; - const from = flight[0]; - const to = flight[1]; + fetch(url) + .then(function (response) { + return response.json(); + }) + .then(function (json) { + const flightsData = json.flights; + for (let i = 0; i < flightsData.length; i++) { + const flight = flightsData[i]; + const from = flight[0]; + const to = flight[1]; - // create an arc circle between the two locations - const arcGenerator = new arc.GreatCircle( - {x: from[1], y: from[0]}, - {x: to[1], y: to[0]}); + // create an arc circle between the two locations + const arcGenerator = new arc.GreatCircle( + {x: from[1], y: from[0]}, + {x: to[1], y: to[0]} + ); - const arcLine = arcGenerator.Arc(100, {offset: 10}); - if (arcLine.geometries.length === 1) { - const line = new LineString(arcLine.geometries[0].coords); - line.transform('EPSG:4326', 'EPSG:3857'); + const arcLine = arcGenerator.Arc(100, {offset: 10}); + if (arcLine.geometries.length === 1) { + const line = new LineString(arcLine.geometries[0].coords); + line.transform('EPSG:4326', 'EPSG:3857'); - const feature = new Feature({ - geometry: line, - finished: false - }); - // add the feature with a delay so that the animation - // for all features does not start at the same time - addLater(feature, i * 50); + const feature = new Feature({ + geometry: line, + finished: false, + }); + // add the feature with a delay so that the animation + // for all features does not start at the same time + addLater(feature, i * 50); + } } - } - tileLayer.on('postrender', animateFlights); - }); - } + tileLayer.on('postrender', animateFlights); + }); + }, }); const flightsLayer = new VectorLayer({ source: flightsSource, - style: function(feature) { + style: function (feature) { // if the animation is still active for a feature, do not // render the feature with the layer style if (feature.get('finished')) { @@ -81,7 +83,7 @@ const flightsLayer = new VectorLayer({ } else { return null; } - } + }, }); map.addLayer(flightsLayer); @@ -117,7 +119,7 @@ function animateFlights(event) { } function addLater(feature, timeout) { - window.setTimeout(function() { + window.setTimeout(function () { feature.set('start', new Date().getTime()); flightsSource.addFeature(feature); }, timeout); diff --git a/examples/fractal.js b/examples/fractal.js index 1953c417bd..d31f4ba1e5 100644 --- a/examples/fractal.js +++ b/examples/fractal.js @@ -1,9 +1,9 @@ import Feature from '../src/ol/Feature.js'; -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; const radius = 10e6; const cos30 = Math.cos(Math.PI / 6); @@ -12,15 +12,18 @@ const rise = radius * sin30; const run = radius * cos30; const triangle = new LineString([ - [0, radius], [run, -rise], [-run, -rise], [0, radius] + [0, radius], + [run, -rise], + [-run, -rise], + [0, radius], ]); const feature = new Feature(triangle); const layer = new VectorLayer({ source: new VectorSource({ - features: [feature] - }) + features: [feature], + }), }); const map = new Map({ @@ -28,8 +31,8 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); function makeFractal(depth) { @@ -59,19 +62,19 @@ function injectNodes(startNode) { // first point at 1/3 along the segment const firstNode = { - point: [start[0] + dx / 3, start[1] + dy / 3] + point: [start[0] + dx / 3, start[1] + dy / 3], }; // second point at peak of _/\_ const r = Math.sqrt(dx * dx + dy * dy) / (2 * cos30); const a = Math.atan2(dy, dx) + Math.PI / 6; const secondNode = { - point: [start[0] + r * Math.cos(a), start[1] + r * Math.sin(a)] + point: [start[0] + r * Math.cos(a), start[1] + r * Math.sin(a)], }; // third point at 2/3 along the segment const thirdNode = { - point: [end[0] - dx / 3, end[1] - dy / 3] + point: [end[0] - dx / 3, end[1] - dy / 3], }; startNode.next = firstNode; @@ -80,15 +83,14 @@ function injectNodes(startNode) { thirdNode.next = endNode; } - function coordsToGraph(coordinates) { const graph = { - point: coordinates[0] + point: coordinates[0], }; const length = coordinates.length; for (let level = 0, node = graph; level < length - 1; ++level) { node.next = { - point: coordinates[level + 1] + point: coordinates[level + 1], }; node = node.next; } @@ -111,12 +113,11 @@ function update() { let updateTimer; - /** * Regenerate fractal on depth change. Change events are debounced so updates * only occur every 200ms. */ -depthInput.onchange = function() { +depthInput.onchange = function () { window.clearTimeout(updateTimer); updateTimer = window.setTimeout(update, 200); }; diff --git a/examples/full-screen-drag-rotate-and-zoom.js b/examples/full-screen-drag-rotate-and-zoom.js index b393feac6f..10b447f739 100644 --- a/examples/full-screen-drag-rotate-and-zoom.js +++ b/examples/full-screen-drag-rotate-and-zoom.js @@ -1,35 +1,35 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, FullScreen} from '../src/ol/control.js'; -import {defaults as defaultInteractions, DragRotateAndZoom} from '../src/ol/interaction.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; - +import { + DragRotateAndZoom, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; +import {FullScreen, defaults as defaultControls} from '../src/ol/control.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const map = new Map({ - controls: defaultControls().extend([ - new FullScreen() - ]), - interactions: defaultInteractions().extend([ - new DragRotateAndZoom() - ]), + controls: defaultControls().extend([new FullScreen()]), + interactions: defaultInteractions().extend([new DragRotateAndZoom()]), layers: [ new TileLayer({ source: new XYZ({ attributions: attributions, - url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) - }) + url: + 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20, + }), + }), ], target: 'map', view: new View({ center: [-33519607, 5616436], rotation: -Math.PI / 8, - zoom: 8 - }) + zoom: 8, + }), }); diff --git a/examples/full-screen-source.js b/examples/full-screen-source.js index ef2f46b068..1abdaecd12 100644 --- a/examples/full-screen-source.js +++ b/examples/full-screen-source.js @@ -1,26 +1,25 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, FullScreen} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {FullScreen, defaults as defaultControls} from '../src/ol/control.js'; const view = new View({ center: [-9101767, 2822912], - zoom: 14 + zoom: 14, }); const map = new Map({ controls: defaultControls().extend([ new FullScreen({ - source: 'fullscreen' - }) + source: 'fullscreen', + }), ]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', - view: view + view: view, }); diff --git a/examples/full-screen.js b/examples/full-screen.js index d11a409817..d16fe12055 100644 --- a/examples/full-screen.js +++ b/examples/full-screen.js @@ -1,32 +1,31 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, FullScreen} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; - +import {FullScreen, defaults as defaultControls} from '../src/ol/control.js'; const view = new View({ center: [-9101767, 2822912], - zoom: 14 + zoom: 14, }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const map = new Map({ - controls: defaultControls().extend([ - new FullScreen() - ]), + controls: defaultControls().extend([new FullScreen()]), layers: [ new TileLayer({ source: new XYZ({ attributions: attributions, - url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) - }) + url: + 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20, + }), + }), ], target: 'map', - view: view + view: view, }); diff --git a/examples/geographic.js b/examples/geographic.js index 44adf0f95a..462847a43b 100644 --- a/examples/geographic.js +++ b/examples/geographic.js @@ -1,9 +1,9 @@ -import {useGeographic} from '../src/ol/proj.js'; -import {Map, View, Feature, Overlay} from '../src/ol/index.js'; -import {Point} from '../src/ol/geom.js'; -import {Vector as VectorLayer, Tile as TileLayer} from '../src/ol/layer.js'; +import {Circle, Fill, Style} from '../src/ol/style.js'; +import {Feature, Map, Overlay, View} from '../src/ol/index.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; -import {Style, Circle, Fill} from '../src/ol/style.js'; +import {Point} from '../src/ol/geom.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {useGeographic} from '../src/ol/proj.js'; useGeographic(); @@ -15,26 +15,24 @@ const map = new Map({ target: 'map', view: new View({ center: place, - zoom: 8 + zoom: 8, }), layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new VectorLayer({ source: new VectorSource({ - features: [ - new Feature(point) - ] + features: [new Feature(point)], }), style: new Style({ image: new Circle({ radius: 9, - fill: new Fill({color: 'red'}) - }) - }) - }) - ] + fill: new Fill({color: 'red'}), + }), + }), + }), + ], }); const element = document.getElementById('popup'); @@ -43,7 +41,7 @@ const popup = new Overlay({ element: element, positioning: 'bottom-center', stopEvent: false, - offset: [0, -10] + offset: [0, -10], }); map.addOverlay(popup); @@ -58,13 +56,13 @@ function formatCoordinate(coordinate) { } const info = document.getElementById('info'); -map.on('moveend', function() { +map.on('moveend', function () { const view = map.getView(); const center = view.getCenter(); info.innerHTML = formatCoordinate(center); }); -map.on('click', function(event) { +map.on('click', function (event) { const feature = map.getFeaturesAtPixel(event.pixel)[0]; if (feature) { const coordinate = feature.getGeometry().getCoordinates(); @@ -72,7 +70,7 @@ map.on('click', function(event) { $(element).popover({ placement: 'top', html: true, - content: formatCoordinate(coordinate) + content: formatCoordinate(coordinate), }); $(element).popover('show'); } else { @@ -80,7 +78,7 @@ map.on('click', function(event) { } }); -map.on('pointermove', function(event) { +map.on('pointermove', function (event) { if (map.hasFeatureAtPixel(event.pixel)) { map.getViewport().style.cursor = 'pointer'; } else { diff --git a/examples/geojson-vt.js b/examples/geojson-vt.js index a61ca1fd50..d5627d6f08 100644 --- a/examples/geojson-vt.js +++ b/examples/geojson-vt.js @@ -1,13 +1,16 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; -import VectorTileSource from '../src/ol/source/VectorTile.js'; -import {Tile as TileLayer, VectorTile as VectorTileLayer} from '../src/ol/layer.js'; import Projection from '../src/ol/proj/Projection.js'; +import VectorTileSource from '../src/ol/source/VectorTile.js'; +import View from '../src/ol/View.js'; +import { + Tile as TileLayer, + VectorTile as VectorTileLayer, +} from '../src/ol/layer.js'; // Converts geojson-vt data to GeoJSON -const replacer = function(key, value) { +const replacer = function (key, value) { if (value.geometry) { let type; const rawType = value.type; @@ -37,9 +40,9 @@ const replacer = function(key, value) { 'type': 'Feature', 'geometry': { 'type': type, - 'coordinates': geometry + 'coordinates': geometry, }, - 'properties': value.tags + 'properties': value.tags, }; } else { return value; @@ -49,44 +52,53 @@ const replacer = function(key, value) { const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const url = 'data/geojson/countries.geojson'; -fetch(url).then(function(response) { - return response.json(); -}).then(function(json) { - const tileIndex = geojsonvt(json, { - extent: 4096, - debug: 1 +fetch(url) + .then(function (response) { + return response.json(); + }) + .then(function (json) { + const tileIndex = geojsonvt(json, { + extent: 4096, + debug: 1, + }); + const vectorSource = new VectorTileSource({ + format: new GeoJSON({ + // Data returned from geojson-vt is in tile pixel units + dataProjection: new Projection({ + code: 'TILE_PIXELS', + units: 'tile-pixels', + extent: [0, 0, 4096, 4096], + }), + }), + tileUrlFunction: function (tileCoord) { + const data = tileIndex.getTile( + tileCoord[0], + tileCoord[1], + tileCoord[2] + ); + const geojson = JSON.stringify( + { + type: 'FeatureCollection', + features: data ? data.features : [], + }, + replacer + ); + return 'data:application/json;charset=UTF-8,' + geojson; + }, + }); + const vectorLayer = new VectorTileLayer({ + source: vectorSource, + }); + map.addLayer(vectorLayer); }); - const vectorSource = new VectorTileSource({ - format: new GeoJSON({ - // Data returned from geojson-vt is in tile pixel units - dataProjection: new Projection({ - code: 'TILE_PIXELS', - units: 'tile-pixels', - extent: [0, 0, 4096, 4096] - }) - }), - tileUrlFunction: function(tileCoord) { - const data = tileIndex.getTile(tileCoord[0], tileCoord[1], tileCoord[2]); - const geojson = JSON.stringify({ - type: 'FeatureCollection', - features: data ? data.features : [] - }, replacer); - return 'data:application/json;charset=UTF-8,' + geojson; - } - }); - const vectorLayer = new VectorTileLayer({ - source: vectorSource - }); - map.addLayer(vectorLayer); -}); diff --git a/examples/geojson.js b/examples/geojson.js index 28c69856c4..19d4b46f87 100644 --- a/examples/geojson.js +++ b/examples/geojson.js @@ -1,85 +1,84 @@ +import Circle from '../src/ol/geom/Circle.js'; import Feature from '../src/ol/Feature.js'; +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.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 {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; - +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const image = new CircleStyle({ radius: 5, fill: null, - stroke: new Stroke({color: 'red', width: 1}) + stroke: new Stroke({color: 'red', width: 1}), }); const styles = { 'Point': new Style({ - image: image + image: image, }), 'LineString': new Style({ stroke: new Stroke({ color: 'green', - width: 1 - }) + width: 1, + }), }), 'MultiLineString': new Style({ stroke: new Stroke({ color: 'green', - width: 1 - }) + width: 1, + }), }), 'MultiPoint': new Style({ - image: image + image: image, }), 'MultiPolygon': new Style({ stroke: new Stroke({ color: 'yellow', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(255, 255, 0, 0.1)' - }) + color: 'rgba(255, 255, 0, 0.1)', + }), }), 'Polygon': new Style({ stroke: new Stroke({ color: 'blue', lineDash: [4], - width: 3 + width: 3, }), fill: new Fill({ - color: 'rgba(0, 0, 255, 0.1)' - }) + color: 'rgba(0, 0, 255, 0.1)', + }), }), 'GeometryCollection': new Style({ stroke: new Stroke({ color: 'magenta', - width: 2 + width: 2, }), fill: new Fill({ - color: 'magenta' + color: 'magenta', }), image: new CircleStyle({ radius: 10, fill: null, stroke: new Stroke({ - color: 'magenta' - }) - }) + color: 'magenta', + }), + }), }), 'Circle': new Style({ stroke: new Stroke({ color: 'red', - width: 2 + width: 2, }), fill: new Fill({ - color: 'rgba(255,0,0,0.2)' - }) - }) + color: 'rgba(255,0,0,0.2)', + }), + }), }; -const styleFunction = function(feature) { +const styleFunction = function (feature) { return styles[feature.getGeometry().getType()]; }; @@ -88,93 +87,159 @@ const geojsonObject = { 'crs': { 'type': 'name', 'properties': { - 'name': 'EPSG:3857' - } + 'name': 'EPSG:3857', + }, }, - 'features': [{ - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [0, 0] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'LineString', - 'coordinates': [[4e6, -2e6], [8e6, 2e6]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'LineString', - 'coordinates': [[4e6, 2e6], [8e6, -2e6]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'Polygon', - 'coordinates': [[[-5e6, -1e6], [-4e6, 1e6], [-3e6, -1e6]]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'MultiLineString', - 'coordinates': [ - [[-1e6, -7.5e5], [-1e6, 7.5e5]], - [[1e6, -7.5e5], [1e6, 7.5e5]], - [[-7.5e5, -1e6], [7.5e5, -1e6]], - [[-7.5e5, 1e6], [7.5e5, 1e6]] - ] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'MultiPolygon', - 'coordinates': [ - [[[-5e6, 6e6], [-5e6, 8e6], [-3e6, 8e6], [-3e6, 6e6]]], - [[[-2e6, 6e6], [-2e6, 8e6], [0, 8e6], [0, 6e6]]], - [[[1e6, 6e6], [1e6, 8e6], [3e6, 8e6], [3e6, 6e6]]] - ] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'GeometryCollection', - 'geometries': [{ - 'type': 'LineString', - 'coordinates': [[-5e6, -5e6], [0, -5e6]] - }, { + 'features': [ + { + 'type': 'Feature', + 'geometry': { 'type': 'Point', - 'coordinates': [4e6, -5e6] - }, { + 'coordinates': [0, 0], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'LineString', + 'coordinates': [ + [4e6, -2e6], + [8e6, 2e6], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'LineString', + 'coordinates': [ + [4e6, 2e6], + [8e6, -2e6], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { 'type': 'Polygon', - 'coordinates': [[[1e6, -6e6], [2e6, -4e6], [3e6, -6e6]]] - }] - } - }] + 'coordinates': [ + [ + [-5e6, -1e6], + [-4e6, 1e6], + [-3e6, -1e6], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'MultiLineString', + 'coordinates': [ + [ + [-1e6, -7.5e5], + [-1e6, 7.5e5], + ], + [ + [1e6, -7.5e5], + [1e6, 7.5e5], + ], + [ + [-7.5e5, -1e6], + [7.5e5, -1e6], + ], + [ + [-7.5e5, 1e6], + [7.5e5, 1e6], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'MultiPolygon', + 'coordinates': [ + [ + [ + [-5e6, 6e6], + [-5e6, 8e6], + [-3e6, 8e6], + [-3e6, 6e6], + ], + ], + [ + [ + [-2e6, 6e6], + [-2e6, 8e6], + [0, 8e6], + [0, 6e6], + ], + ], + [ + [ + [1e6, 6e6], + [1e6, 8e6], + [3e6, 8e6], + [3e6, 6e6], + ], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'GeometryCollection', + 'geometries': [ + { + 'type': 'LineString', + 'coordinates': [ + [-5e6, -5e6], + [0, -5e6], + ], + }, + { + 'type': 'Point', + 'coordinates': [4e6, -5e6], + }, + { + 'type': 'Polygon', + 'coordinates': [ + [ + [1e6, -6e6], + [2e6, -4e6], + [3e6, -6e6], + ], + ], + }, + ], + }, + }, + ], }; const vectorSource = new VectorSource({ - features: (new GeoJSON()).readFeatures(geojsonObject) + features: new GeoJSON().readFeatures(geojsonObject), }); vectorSource.addFeature(new Feature(new Circle([5e6, 7e6], 1e6))); const vectorLayer = new VectorLayer({ source: vectorSource, - style: styleFunction + style: styleFunction, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), - vectorLayer + vectorLayer, ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/geolocation-orientation.js b/examples/geolocation-orientation.js index e8934cf56c..adbc9091d8 100644 --- a/examples/geolocation-orientation.js +++ b/examples/geolocation-orientation.js @@ -1,27 +1,27 @@ import Geolocation from '../src/ol/Geolocation.js'; -import Map from '../src/ol/Map.js'; -import Overlay from '../src/ol/Overlay.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 {fromLonLat} from '../src/ol/proj.js'; +import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; +import Overlay from '../src/ol/Overlay.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {fromLonLat} from '../src/ol/proj.js'; // creating the view const view = new View({ center: fromLonLat([5.8713, 45.6452]), - zoom: 19 + zoom: 19, }); const tileLayer = new TileLayer({ - source: new OSM() + source: new OSM(), }); // creating the map const map = new Map({ layers: [tileLayer], target: 'map', - view: view + view: view, }); // Geolocation marker @@ -29,7 +29,7 @@ const markerEl = document.getElementById('geolocation_marker'); const marker = new Overlay({ positioning: 'center-center', element: markerEl, - stopEvent: false + stopEvent: false, }); map.addOverlay(marker); @@ -44,14 +44,14 @@ const geolocation = new Geolocation({ trackingOptions: { maximumAge: 10000, enableHighAccuracy: true, - timeout: 600000 - } + timeout: 600000, + }, }); let deltaMean = 500; // the geolocation sampling period mean in ms // Listen to position changes -geolocation.on('change', function() { +geolocation.on('change', function () { const position = geolocation.getPosition(); const accuracy = geolocation.getAccuracy(); const heading = geolocation.getHeading() || 0; @@ -71,27 +71,27 @@ geolocation.on('change', function() { 'Accuracy: ' + accuracy, 'Heading: ' + Math.round(radToDeg(heading)) + '°', 'Speed: ' + (speed * 3.6).toFixed(1) + ' km/h', - 'Delta: ' + Math.round(deltaMean) + 'ms' + 'Delta: ' + Math.round(deltaMean) + 'ms', ].join('
    '); document.getElementById('info').innerHTML = html; }); -geolocation.on('error', function() { +geolocation.on('error', function () { alert('geolocation error'); // FIXME we should remove the coordinates in positions }); // convert radians to degrees function radToDeg(rad) { - return rad * 360 / (Math.PI * 2); + return (rad * 360) / (Math.PI * 2); } // convert degrees to radians function degToRad(deg) { - return deg * Math.PI * 2 / 360; + return (deg * Math.PI * 2) / 360; } // modulo for negative values function mod(n) { - return ((n % (2 * Math.PI)) + (2 * Math.PI)) % (2 * Math.PI); + return ((n % (2 * Math.PI)) + 2 * Math.PI) % (2 * Math.PI); } function addPosition(position, heading, m, speed) { @@ -105,7 +105,7 @@ function addPosition(position, heading, m, speed) { // force the rotation change to be less than 180° if (Math.abs(headingDiff) > Math.PI) { - const sign = (headingDiff >= 0) ? 1 : -1; + const sign = headingDiff >= 0 ? 1 : -1; headingDiff = -sign * (2 * Math.PI - Math.abs(headingDiff)); } heading = prevHeading + headingDiff; @@ -130,8 +130,8 @@ function getCenterWithHeading(position, rotation, resolution) { const height = size[1]; return [ - position[0] - Math.sin(rotation) * height * resolution * 1 / 4, - position[1] + Math.cos(rotation) * height * resolution * 1 / 4 + position[0] - (Math.sin(rotation) * height * resolution * 1) / 4, + position[1] + (Math.cos(rotation) * height * resolution * 1) / 4, ]; } @@ -153,56 +153,63 @@ function updateView() { // geolocate device const geolocateBtn = document.getElementById('geolocate'); -geolocateBtn.addEventListener('click', function() { - geolocation.setTracking(true); // Start position tracking +geolocateBtn.addEventListener( + 'click', + function () { + geolocation.setTracking(true); // Start position tracking - tileLayer.on('postrender', updateView); - map.render(); + tileLayer.on('postrender', updateView); + map.render(); - disableButtons(); -}, false); + disableButtons(); + }, + false +); // simulate device move let simulationData; const client = new XMLHttpRequest(); client.open('GET', 'data/geolocation-orientation.json'); - /** * Handle data loading. */ -client.onload = function() { +client.onload = function () { simulationData = JSON.parse(client.responseText).data; }; client.send(); const simulateBtn = document.getElementById('simulate'); -simulateBtn.addEventListener('click', function() { - const coordinates = simulationData; +simulateBtn.addEventListener( + 'click', + function () { + const coordinates = simulationData; - const first = coordinates.shift(); - simulatePositionChange(first); + const first = coordinates.shift(); + simulatePositionChange(first); - let prevDate = first.timestamp; - function geolocate() { - const position = coordinates.shift(); - if (!position) { - return; + let prevDate = first.timestamp; + function geolocate() { + const position = coordinates.shift(); + if (!position) { + return; + } + const newDate = position.timestamp; + simulatePositionChange(position); + window.setTimeout(function () { + prevDate = newDate; + geolocate(); + }, (newDate - prevDate) / 0.5); } - const newDate = position.timestamp; - simulatePositionChange(position); - window.setTimeout(function() { - prevDate = newDate; - geolocate(); - }, (newDate - prevDate) / 0.5); - } - geolocate(); + geolocate(); - tileLayer.on('postrender', updateView); - map.render(); + tileLayer.on('postrender', updateView); + map.render(); - disableButtons(); -}, false); + disableButtons(); + }, + false +); function simulatePositionChange(position) { const coords = position.coords; diff --git a/examples/geolocation.js b/examples/geolocation.js index 4ca461308f..625c25c682 100644 --- a/examples/geolocation.js +++ b/examples/geolocation.js @@ -1,45 +1,45 @@ import Feature from '../src/ol/Feature.js'; import Geolocation from '../src/ol/Geolocation.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const view = new View({ center: [0, 0], - zoom: 2 + zoom: 2, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', - view: view + view: view, }); const geolocation = new Geolocation({ // enableHighAccuracy must be set to true to have the heading value. trackingOptions: { - enableHighAccuracy: true + enableHighAccuracy: true, }, - projection: view.getProjection() + projection: view.getProjection(), }); function el(id) { return document.getElementById(id); } -el('track').addEventListener('change', function() { +el('track').addEventListener('change', function () { geolocation.setTracking(this.checked); }); // update the HTML page when the position changes. -geolocation.on('change', function() { +geolocation.on('change', function () { el('accuracy').innerText = geolocation.getAccuracy() + ' [m]'; el('altitude').innerText = geolocation.getAltitude() + ' [m]'; el('altitudeAccuracy').innerText = geolocation.getAltitudeAccuracy() + ' [m]'; @@ -48,40 +48,41 @@ geolocation.on('change', function() { }); // handle geolocation error. -geolocation.on('error', function(error) { +geolocation.on('error', function (error) { const info = document.getElementById('info'); info.innerHTML = error.message; info.style.display = ''; }); const accuracyFeature = new Feature(); -geolocation.on('change:accuracyGeometry', function() { +geolocation.on('change:accuracyGeometry', function () { accuracyFeature.setGeometry(geolocation.getAccuracyGeometry()); }); const positionFeature = new Feature(); -positionFeature.setStyle(new Style({ - image: new CircleStyle({ - radius: 6, - fill: new Fill({ - color: '#3399CC' +positionFeature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 6, + fill: new Fill({ + color: '#3399CC', + }), + stroke: new Stroke({ + color: '#fff', + width: 2, + }), }), - stroke: new Stroke({ - color: '#fff', - width: 2 - }) }) -})); +); -geolocation.on('change:position', function() { +geolocation.on('change:position', function () { const coordinates = geolocation.getPosition(); - positionFeature.setGeometry(coordinates ? - new Point(coordinates) : null); + positionFeature.setGeometry(coordinates ? new Point(coordinates) : null); }); new VectorLayer({ map: map, source: new VectorSource({ - features: [accuracyFeature, positionFeature] - }) + features: [accuracyFeature, positionFeature], + }), }); diff --git a/examples/getfeatureinfo-image.js b/examples/getfeatureinfo-image.js index 109b2eabea..aa2cc832d7 100644 --- a/examples/getfeatureinfo-image.js +++ b/examples/getfeatureinfo-image.js @@ -1,37 +1,39 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import ImageLayer from '../src/ol/layer/Image.js'; import ImageWMS from '../src/ol/source/ImageWMS.js'; - +import Map from '../src/ol/Map.js'; +import View from '../src/ol/View.js'; const wmsSource = new ImageWMS({ url: 'https://ahocevar.com/geoserver/wms', params: {'LAYERS': 'ne:ne'}, serverType: 'geoserver', - crossOrigin: 'anonymous' + crossOrigin: 'anonymous', }); const wmsLayer = new ImageLayer({ - source: wmsSource + source: wmsSource, }); const view = new View({ center: [0, 0], - zoom: 1 + zoom: 1, }); const map = new Map({ layers: [wmsLayer], target: 'map', - view: view + view: view, }); -map.on('singleclick', function(evt) { +map.on('singleclick', function (evt) { document.getElementById('info').innerHTML = ''; const viewResolution = /** @type {number} */ (view.getResolution()); const url = wmsSource.getFeatureInfoUrl( - evt.coordinate, viewResolution, 'EPSG:3857', - {'INFO_FORMAT': 'text/html'}); + evt.coordinate, + viewResolution, + 'EPSG:3857', + {'INFO_FORMAT': 'text/html'} + ); if (url) { fetch(url) .then((response) => response.text()) @@ -41,12 +43,12 @@ map.on('singleclick', function(evt) { } }); -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } const pixel = map.getEventPixel(evt.originalEvent); - const hit = map.forEachLayerAtPixel(pixel, function() { + const hit = map.forEachLayerAtPixel(pixel, function () { return true; }); map.getTargetElement().style.cursor = hit ? 'pointer' : ''; diff --git a/examples/getfeatureinfo-layers.js b/examples/getfeatureinfo-layers.js index f3e779bd9e..650ed91f55 100644 --- a/examples/getfeatureinfo-layers.js +++ b/examples/getfeatureinfo-layers.js @@ -1,23 +1,27 @@ import WMSGetFeatureInfo from '../src/ol/format/WMSGetFeatureInfo.js'; -fetch('data/wmsgetfeatureinfo/osm-restaurant-hotel.xml').then(function(response) { - return response.text(); -}).then(function(response) { +fetch('data/wmsgetfeatureinfo/osm-restaurant-hotel.xml') + .then(function (response) { + return response.text(); + }) + .then(function (response) { + // this is the standard way to read the features + const allFeatures = new WMSGetFeatureInfo().readFeatures(response); + document.getElementById('all').innerText = allFeatures.length.toString(); - // this is the standard way to read the features - const allFeatures = new WMSGetFeatureInfo().readFeatures(response); - document.getElementById('all').innerText = allFeatures.length.toString(); + // when specifying the 'layers' options, only the features of those + // layers are returned by the format + const hotelFeatures = new WMSGetFeatureInfo({ + layers: ['hotel'], + }).readFeatures(response); + document.getElementById( + 'hotel' + ).innerText = hotelFeatures.length.toString(); - // when specifying the 'layers' options, only the features of those - // layers are returned by the format - const hotelFeatures = new WMSGetFeatureInfo({ - layers: ['hotel'] - }).readFeatures(response); - document.getElementById('hotel').innerText = hotelFeatures.length.toString(); - - const restaurantFeatures = new WMSGetFeatureInfo({ - layers: ['restaurant'] - }).readFeatures(response); - document.getElementById('restaurant').innerText = restaurantFeatures.length.toString(); - -}); + const restaurantFeatures = new WMSGetFeatureInfo({ + layers: ['restaurant'], + }).readFeatures(response); + document.getElementById( + 'restaurant' + ).innerText = restaurantFeatures.length.toString(); + }); diff --git a/examples/getfeatureinfo-tile.js b/examples/getfeatureinfo-tile.js index 574535bbe4..db354c3808 100644 --- a/examples/getfeatureinfo-tile.js +++ b/examples/getfeatureinfo-tile.js @@ -1,37 +1,39 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; import TileWMS from '../src/ol/source/TileWMS.js'; - +import View from '../src/ol/View.js'; const wmsSource = new TileWMS({ url: 'https://ahocevar.com/geoserver/wms', params: {'LAYERS': 'ne:ne', 'TILED': true}, serverType: 'geoserver', - crossOrigin: 'anonymous' + crossOrigin: 'anonymous', }); const wmsLayer = new TileLayer({ - source: wmsSource + source: wmsSource, }); const view = new View({ center: [0, 0], - zoom: 1 + zoom: 1, }); const map = new Map({ layers: [wmsLayer], target: 'map', - view: view + view: view, }); -map.on('singleclick', function(evt) { +map.on('singleclick', function (evt) { document.getElementById('info').innerHTML = ''; const viewResolution = /** @type {number} */ (view.getResolution()); const url = wmsSource.getFeatureInfoUrl( - evt.coordinate, viewResolution, 'EPSG:3857', - {'INFO_FORMAT': 'text/html'}); + evt.coordinate, + viewResolution, + 'EPSG:3857', + {'INFO_FORMAT': 'text/html'} + ); if (url) { fetch(url) .then((response) => response.text()) @@ -41,12 +43,12 @@ map.on('singleclick', function(evt) { } }); -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } const pixel = map.getEventPixel(evt.originalEvent); - const hit = map.forEachLayerAtPixel(pixel, function() { + const hit = map.forEachLayerAtPixel(pixel, function () { return true; }); map.getTargetElement().style.cursor = hit ? 'pointer' : ''; diff --git a/examples/gpx.js b/examples/gpx.js index 7570048b55..60803a680b 100644 --- a/examples/gpx.js +++ b/examples/gpx.js @@ -1,58 +1,59 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GPX from '../src/ol/format/GPX.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import XYZ from '../src/ol/source/XYZ.js'; +import Map from '../src/ol/Map.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const raster = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); const style = { 'Point': new Style({ image: new CircleStyle({ fill: new Fill({ - color: 'rgba(255,255,0,0.4)' + color: 'rgba(255,255,0,0.4)', }), radius: 5, stroke: new Stroke({ color: '#ff0', - width: 1 - }) - }) + width: 1, + }), + }), }), 'LineString': new Style({ stroke: new Stroke({ color: '#f00', - width: 3 - }) + width: 3, + }), }), 'MultiLineString': new Style({ stroke: new Stroke({ color: '#0f0', - width: 3 - }) - }) + width: 3, + }), + }), }; const vector = new VectorLayer({ source: new VectorSource({ url: 'data/gpx/fells_loop.gpx', - format: new GPX() + format: new GPX(), }), - style: function(feature) { + style: function (feature) { return style[feature.getGeometry().getType()]; - } + }, }); const map = new Map({ @@ -60,13 +61,13 @@ const map = new Map({ target: document.getElementById('map'), view: new View({ center: [-7916041.528716288, 5228379.045749711], - zoom: 12 - }) + zoom: 12, + }), }); -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { const features = []; - map.forEachFeatureAtPixel(pixel, function(feature) { + map.forEachFeatureAtPixel(pixel, function (feature) { features.push(feature); }); if (features.length > 0) { @@ -83,7 +84,7 @@ const displayFeatureInfo = function(pixel) { } }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -91,6 +92,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(pixel); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/graticule.js b/examples/graticule.js index 32d2196b9b..812829c054 100644 --- a/examples/graticule.js +++ b/examples/graticule.js @@ -1,33 +1,32 @@ import Graticule from '../src/ol/layer/Graticule.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat} from '../src/ol/proj.js'; import OSM from '../src/ol/source/OSM.js'; import Stroke from '../src/ol/style/Stroke.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {fromLonLat} from '../src/ol/proj.js'; const map = new Map({ layers: [ new TileLayer({ source: new OSM({ - wrapX: false - }) + wrapX: false, + }), }), new Graticule({ // the style to use for the lines, optional. strokeStyle: new Stroke({ color: 'rgba(255,120,0,0.9)', width: 2, - lineDash: [0.5, 4] + lineDash: [0.5, 4], }), showLabels: true, - wrapX: false - }) + wrapX: false, + }), ], target: 'map', view: new View({ center: fromLonLat([4.8, 47.75]), - zoom: 5 - }) + zoom: 5, + }), }); diff --git a/examples/heatmap-earthquakes.js b/examples/heatmap-earthquakes.js index 93256ab1a8..c07661b088 100644 --- a/examples/heatmap-earthquakes.js +++ b/examples/heatmap-earthquakes.js @@ -1,9 +1,9 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; -import {Heatmap as HeatmapLayer, Tile as TileLayer} from '../src/ol/layer.js'; +import Map from '../src/ol/Map.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import {Heatmap as HeatmapLayer, Tile as TileLayer} from '../src/ol/layer.js'; const blur = document.getElementById('blur'); const radius = document.getElementById('radius'); @@ -12,25 +12,25 @@ const vector = new HeatmapLayer({ source: new VectorSource({ url: 'data/kml/2012_Earthquakes_Mag5.kml', format: new KML({ - extractStyles: false - }) + extractStyles: false, + }), }), blur: parseInt(blur.value, 10), radius: parseInt(radius.value, 10), - weight: function(feature) { + weight: function (feature) { // 2012_Earthquakes_Mag5.kml stores the magnitude of each earthquake in a // standards-violating tag in each Placemark. We extract it from // the Placemark's name instead. const name = feature.get('name'); const magnitude = parseFloat(name.substr(2)); return magnitude - 5; - } + }, }); const raster = new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }); new Map({ @@ -38,17 +38,17 @@ new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -const blurHandler = function() { +const blurHandler = function () { vector.setBlur(parseInt(blur.value, 10)); }; blur.addEventListener('input', blurHandler); blur.addEventListener('change', blurHandler); -const radiusHandler = function() { +const radiusHandler = function () { vector.setRadius(parseInt(radius.value, 10)); }; radius.addEventListener('input', radiusHandler); diff --git a/examples/here-maps.js b/examples/here-maps.js index 94112d64b1..341ae2bb10 100644 --- a/examples/here-maps.js +++ b/examples/here-maps.js @@ -1,6 +1,6 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; const appId = 'kDm0Jq1K4Ak7Bwtn8uvk'; @@ -11,60 +11,66 @@ const hereLayers = [ type: 'maptile', scheme: 'normal.day', app_id: appId, - app_code: appCode + app_code: appCode, }, { base: 'base', type: 'maptile', scheme: 'normal.day.transit', app_id: appId, - app_code: appCode + app_code: appCode, }, { base: 'base', type: 'maptile', scheme: 'pedestrian.day', app_id: appId, - app_code: appCode + app_code: appCode, }, { base: 'aerial', type: 'maptile', scheme: 'terrain.day', app_id: appId, - app_code: appCode + app_code: appCode, }, { base: 'aerial', type: 'maptile', scheme: 'satellite.day', app_id: appId, - app_code: appCode + app_code: appCode, }, { base: 'aerial', type: 'maptile', scheme: 'hybrid.day', app_id: appId, - app_code: appCode - } + app_code: appCode, + }, ]; -const urlTpl = 'https://{1-4}.{base}.maps.cit.api.here.com' + +const urlTpl = + 'https://{1-4}.{base}.maps.cit.api.here.com' + '/{type}/2.1/maptile/newest/{scheme}/{z}/{x}/{y}/256/png' + '?app_id={app_id}&app_code={app_code}'; const layers = []; let i, ii; for (i = 0, ii = hereLayers.length; i < ii; ++i) { const layerDesc = hereLayers[i]; - layers.push(new TileLayer({ - visible: false, - preload: Infinity, - source: new XYZ({ - url: createUrl(urlTpl, layerDesc), - attributions: 'Map Tiles © ' + new Date().getFullYear() + ' ' + - 'HERE' + layers.push( + new TileLayer({ + visible: false, + preload: Infinity, + source: new XYZ({ + url: createUrl(urlTpl, layerDesc), + attributions: + 'Map Tiles © ' + + new Date().getFullYear() + + ' ' + + 'HERE', + }), }) - })); + ); } const map = new Map({ @@ -72,8 +78,8 @@ const map = new Map({ target: 'map', view: new View({ center: [921371.9389, 6358337.7609], - zoom: 10 - }) + zoom: 10, + }), }); function createUrl(tpl, layerDesc) { diff --git a/examples/hit-tolerance.js b/examples/hit-tolerance.js index a337485f8e..443abb7ee5 100644 --- a/examples/hit-tolerance.js +++ b/examples/hit-tolerance.js @@ -1,29 +1,34 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import Feature from '../src/ol/Feature.js'; import LineString from '../src/ol/geom/LineString.js'; +import Map from '../src/ol/Map.js'; +import View from '../src/ol/View.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Stroke, Style} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const style = new Style({ stroke: new Stroke({ color: 'black', - width: 1 - }) + width: 1, + }), }); -const feature = new Feature(new LineString([[-4000000, 0], [4000000, 0]])); +const feature = new Feature( + new LineString([ + [-4000000, 0], + [4000000, 0], + ]) +); const vector = new VectorLayer({ source: new VectorSource({ - features: [feature] + features: [feature], }), - style: style + style: style, }); const map = new Map({ @@ -31,21 +36,25 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); let hitTolerance; const statusElement = document.getElementById('status'); -map.on('singleclick', function(e) { +map.on('singleclick', function (e) { let hit = false; - map.forEachFeatureAtPixel(e.pixel, function() { - hit = true; - }, { - hitTolerance: hitTolerance - }); + map.forEachFeatureAtPixel( + e.pixel, + function () { + hit = true; + }, + { + hitTolerance: hitTolerance, + } + ); if (hit) { style.getStroke().setColor('green'); statusElement.innerHTML = ' A feature got hit!'; @@ -59,7 +68,7 @@ map.on('singleclick', function(e) { const selectHitToleranceElement = document.getElementById('hitTolerance'); const circleCanvas = document.getElementById('circle'); -const changeHitTolerance = function() { +const changeHitTolerance = function () { hitTolerance = parseInt(selectHitToleranceElement.value, 10); const size = 2 * hitTolerance + 2; @@ -68,7 +77,13 @@ const changeHitTolerance = function() { const ctx = circleCanvas.getContext('2d'); ctx.clearRect(0, 0, size, size); ctx.beginPath(); - ctx.arc(hitTolerance + 1, hitTolerance + 1, hitTolerance + 0.5, 0, 2 * Math.PI); + ctx.arc( + hitTolerance + 1, + hitTolerance + 1, + hitTolerance + 0.5, + 0, + 2 * Math.PI + ); ctx.fill(); ctx.stroke(); }; diff --git a/examples/hitdetect-vector.js b/examples/hitdetect-vector.js index d09cc96c4e..df9620f014 100644 --- a/examples/hitdetect-vector.js +++ b/examples/hitdetect-vector.js @@ -1,40 +1,39 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style, Text} from '../src/ol/style.js'; - const style = new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 + width: 1, }), text: new Text({ font: '12px Calibri,sans-serif', fill: new Fill({ - color: '#000' + color: '#000', }), stroke: new Stroke({ color: '#fff', - width: 3 - }) - }) + width: 3, + }), + }), }); const vectorLayer = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: function(feature) { + style: function (feature) { style.getText().setText(feature.get('name')); return style; - } + }, }); const map = new Map({ @@ -42,43 +41,42 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); const highlightStyle = new Style({ stroke: new Stroke({ color: '#f00', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(255,0,0,0.1)' + color: 'rgba(255,0,0,0.1)', }), text: new Text({ font: '12px Calibri,sans-serif', fill: new Fill({ - color: '#000' + color: '#000', }), stroke: new Stroke({ color: '#f00', - width: 3 - }) - }) + width: 3, + }), + }), }); const featureOverlay = new VectorLayer({ source: new VectorSource(), map: map, - style: function(feature) { + style: function (feature) { highlightStyle.getText().setText(feature.get('name')); return highlightStyle; - } + }, }); let highlight; -const displayFeatureInfo = function(pixel) { - - vectorLayer.getFeatures(pixel).then(function(features) { +const displayFeatureInfo = function (pixel) { + vectorLayer.getFeatures(pixel).then(function (features) { const feature = features.length ? features[0] : undefined; const info = document.getElementById('info'); if (features.length) { @@ -97,10 +95,9 @@ const displayFeatureInfo = function(pixel) { highlight = feature; } }); - }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -108,6 +105,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(pixel); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/icon-color.js b/examples/icon-color.js index 11b30dd50e..098319a119 100644 --- a/examples/icon-color.js +++ b/examples/icon-color.js @@ -1,72 +1,76 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {fromLonLat} from '../src/ol/proj.js'; import TileJSON from '../src/ol/source/TileJSON.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Icon, Style} from '../src/ol/style.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {fromLonLat} from '../src/ol/proj.js'; const rome = new Feature({ - geometry: new Point(fromLonLat([12.5, 41.9])) + geometry: new Point(fromLonLat([12.5, 41.9])), }); const london = new Feature({ - geometry: new Point(fromLonLat([-0.12755, 51.507222])) + geometry: new Point(fromLonLat([-0.12755, 51.507222])), }); const madrid = new Feature({ - geometry: new Point(fromLonLat([-3.683333, 40.4])) + geometry: new Point(fromLonLat([-3.683333, 40.4])), }); -rome.setStyle(new Style({ - image: new Icon({ - color: '#8959A8', - crossOrigin: 'anonymous', - imgSize: [20, 20], - src: 'data/square.svg' +rome.setStyle( + new Style({ + image: new Icon({ + color: '#8959A8', + crossOrigin: 'anonymous', + imgSize: [20, 20], + src: 'data/square.svg', + }), }) -})); +); -london.setStyle(new Style({ - image: new Icon({ - color: '#4271AE', - crossOrigin: 'anonymous', - src: 'data/dot.png' +london.setStyle( + new Style({ + image: new Icon({ + color: '#4271AE', + crossOrigin: 'anonymous', + src: 'data/dot.png', + }), }) -})); +); -madrid.setStyle(new Style({ - image: new Icon({ - color: [113, 140, 0], - crossOrigin: 'anonymous', - src: 'data/dot.png' +madrid.setStyle( + new Style({ + image: new Icon({ + color: [113, 140, 0], + crossOrigin: 'anonymous', + src: 'data/dot.png', + }), }) -})); - +); const vectorSource = new VectorSource({ - features: [rome, london, madrid] + features: [rome, london, madrid], }); const vectorLayer = new VectorLayer({ - source: vectorSource + source: vectorSource, }); const rasterLayer = new TileLayer({ source: new TileJSON({ url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json', - crossOrigin: '' - }) + crossOrigin: '', + }), }); const map = new Map({ layers: [rasterLayer, vectorLayer], target: document.getElementById('map'), view: new View({ - center: fromLonLat([2.896372, 44.60240]), - zoom: 3 - }) + center: fromLonLat([2.896372, 44.6024]), + zoom: 3, + }), }); diff --git a/examples/icon-negative.js b/examples/icon-negative.js index dfa83db624..3380580d18 100644 --- a/examples/icon-negative.js +++ b/examples/icon-negative.js @@ -1,13 +1,12 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import Select from '../src/ol/interaction/Select.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Icon, Style} from '../src/ol/style.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; function createStyle(src, img) { return new Style({ @@ -16,8 +15,8 @@ function createStyle(src, img) { crossOrigin: 'anonymous', src: src, img: img, - imgSize: img ? [img.width, img.height] : undefined - }) + imgSize: img ? [img.width, img.height] : undefined, + }), }); } @@ -27,25 +26,25 @@ iconFeature.set('style', createStyle('data/icon.png', undefined)); const map = new Map({ layers: [ new TileLayer({ - source: new Stamen({layer: 'watercolor'}) + source: new Stamen({layer: 'watercolor'}), }), new VectorLayer({ - style: function(feature) { + style: function (feature) { return feature.get('style'); }, - source: new VectorSource({features: [iconFeature]}) - }) + source: new VectorSource({features: [iconFeature]}), + }), ], target: document.getElementById('map'), view: new View({ center: [0, 0], - zoom: 3 - }) + zoom: 3, + }), }); const selectStyle = {}; const select = new Select({ - style: function(feature) { + style: function (feature) { const image = feature.get('style').getImage().getImage(); if (!selectStyle[image.src]) { const canvas = document.createElement('canvas'); @@ -62,11 +61,12 @@ const select = new Select({ selectStyle[image.src] = createStyle(undefined, canvas); } return selectStyle[image.src]; - } + }, }); map.addInteraction(select); -map.on('pointermove', function(evt) { - map.getTargetElement().style.cursor = - map.hasFeatureAtPixel(evt.pixel) ? 'pointer' : ''; +map.on('pointermove', function (evt) { + map.getTargetElement().style.cursor = map.hasFeatureAtPixel(evt.pixel) + ? 'pointer' + : ''; }); diff --git a/examples/icon-sprite-webgl.js b/examples/icon-sprite-webgl.js index ce2adb7649..4a09fb18dc 100644 --- a/examples/icon-sprite-webgl.js +++ b/examples/icon-sprite-webgl.js @@ -1,34 +1,37 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import TileJSON from '../src/ol/source/TileJSON.js'; import Feature from '../src/ol/Feature.js'; +import Map from '../src/ol/Map.js'; import Point from '../src/ol/geom/Point.js'; +import TileJSON from '../src/ol/source/TileJSON.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js'; import {Vector} from '../src/ol/source.js'; import {fromLonLat} from '../src/ol/proj.js'; -import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js'; -const key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; +const key = + 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; const map = new Map({ layers: [ new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.world-dark.json?secure&access_token=' + key, - crossOrigin: 'anonymous' - }) - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.world-dark.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', + }), + }), ], target: document.getElementById('map'), view: new View({ center: [0, 4000000], - zoom: 2 - }) + zoom: 2, + }), }); const vectorSource = new Vector({ features: [], - attributions: 'National UFO Reporting Center' + attributions: 'National UFO Reporting Center', }); const oldColor = [255, 160, 110]; @@ -37,13 +40,13 @@ const size = 16; const style = { variables: { - filterShape: 'all' + filterShape: 'all', }, filter: [ 'case', ['!=', ['var', 'filterShape'], 'all'], ['==', ['get', 'shape'], ['var', 'filterShape']], - true + true, ], symbol: { symbolType: 'image', @@ -53,44 +56,51 @@ const style = { 'interpolate', ['linear'], ['get', 'year'], - 1950, oldColor, - 2013, newColor + 1950, + oldColor, + 2013, + newColor, ], rotateWithView: false, - offset: [ - 0, - 0 - ], + offset: [0, 0], textureCoord: [ 'match', ['get', 'shape'], - 'light', [0, 0, 0.25, 0.5], - 'sphere', [0.25, 0, 0.5, 0.5], - 'circle', [0.25, 0, 0.5, 0.5], - 'disc', [0.5, 0, 0.75, 0.5], - 'oval', [0.5, 0, 0.75, 0.5], - 'triangle', [0.75, 0, 1, 0.5], - 'fireball', [0, 0.5, 0.25, 1], - [0.75, 0.5, 1, 1] - ] - } + 'light', + [0, 0, 0.25, 0.5], + 'sphere', + [0.25, 0, 0.5, 0.5], + 'circle', + [0.25, 0, 0.5, 0.5], + 'disc', + [0.5, 0, 0.75, 0.5], + 'oval', + [0.5, 0, 0.75, 0.5], + 'triangle', + [0.75, 0, 1, 0.5], + 'fireball', + [0, 0.5, 0.25, 1], + [0.75, 0.5, 1, 1], + ], + }, }; // key is shape name, value is sightings count const shapeTypes = { - all: 0 + all: 0, }; const shapeSelect = document.getElementById('shape-filter'); -shapeSelect.addEventListener('input', function() { - style.variables.filterShape = shapeSelect.options[shapeSelect.selectedIndex].value; +shapeSelect.addEventListener('input', function () { + style.variables.filterShape = + shapeSelect.options[shapeSelect.selectedIndex].value; map.render(); }); function fillShapeSelect() { Object.keys(shapeTypes) - .sort(function(a, b) { + .sort(function (a, b) { return shapeTypes[b] - shapeTypes[a]; }) - .forEach(function(shape) { + .forEach(function (shape) { const option = document.createElement('option'); option.text = `${shape} (${shapeTypes[shape]} sightings)`; option.value = shape; @@ -100,7 +110,7 @@ function fillShapeSelect() { const client = new XMLHttpRequest(); client.open('GET', 'data/csv/ufo_sighting_data.csv'); -client.onload = function() { +client.onload = function () { const csv = client.responseText; const features = []; @@ -122,13 +132,15 @@ client.onload = function() { shapeTypes[shape] = (shapeTypes[shape] ? shapeTypes[shape] : 0) + 1; shapeTypes['all']++; - features.push(new Feature({ - datetime: line[0], - year: parseInt(/[0-9]{4}/.exec(line[0])[0]), // extract the year as int - shape: shape, - duration: line[3], - geometry: new Point(coords) - })); + features.push( + new Feature({ + datetime: line[0], + year: parseInt(/[0-9]{4}/.exec(line[0])[0]), // extract the year as int + shape: shape, + duration: line[3], + geometry: new Point(coords), + }) + ); } vectorSource.addFeatures(features); fillShapeSelect(); @@ -138,21 +150,28 @@ client.send(); map.addLayer( new WebGLPointsLayer({ source: vectorSource, - style: style + style: style, }) ); const info = document.getElementById('info'); -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (map.getView().getInteracting() || map.getView().getAnimating()) { return; } const pixel = evt.pixel; info.innerText = ''; - map.forEachFeatureAtPixel(pixel, function(feature) { + map.forEachFeatureAtPixel(pixel, function (feature) { const datetime = feature.get('datetime'); const duration = feature.get('duration'); const shape = feature.get('shape'); - info.innerText = 'On ' + datetime + ', lasted ' + duration + ' seconds and had a "' + shape + '" shape.'; + info.innerText = + 'On ' + + datetime + + ', lasted ' + + duration + + ' seconds and had a "' + + shape + + '" shape.'; }); }); diff --git a/examples/icon.js b/examples/icon.js index cb427a5984..1c9a79a0b3 100644 --- a/examples/icon.js +++ b/examples/icon.js @@ -1,19 +1,18 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; import Overlay from '../src/ol/Overlay.js'; -import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import TileJSON from '../src/ol/source/TileJSON.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Icon, Style} from '../src/ol/style.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const iconFeature = new Feature({ geometry: new Point([0, 0]), name: 'Null Island', population: 4000, - rainfall: 500 + rainfall: 500, }); const iconStyle = new Style({ @@ -21,25 +20,25 @@ const iconStyle = new Style({ anchor: [0.5, 46], anchorXUnits: 'fraction', anchorYUnits: 'pixels', - src: 'data/icon.png' - }) + src: 'data/icon.png', + }), }); iconFeature.setStyle(iconStyle); const vectorSource = new VectorSource({ - features: [iconFeature] + features: [iconFeature], }); const vectorLayer = new VectorLayer({ - source: vectorSource + source: vectorSource, }); const rasterLayer = new TileLayer({ source: new TileJSON({ url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json', - crossOrigin: '' - }) + crossOrigin: '', + }), }); const map = new Map({ @@ -47,8 +46,8 @@ const map = new Map({ target: document.getElementById('map'), view: new View({ center: [0, 0], - zoom: 3 - }) + zoom: 3, + }), }); const element = document.getElementById('popup'); @@ -57,23 +56,22 @@ const popup = new Overlay({ element: element, positioning: 'bottom-center', stopEvent: false, - offset: [0, -50] + offset: [0, -50], }); map.addOverlay(popup); // display popup on click -map.on('click', function(evt) { - const feature = map.forEachFeatureAtPixel(evt.pixel, - function(feature) { - return feature; - }); +map.on('click', function (evt) { + const feature = map.forEachFeatureAtPixel(evt.pixel, function (feature) { + return feature; + }); if (feature) { const coordinates = feature.getGeometry().getCoordinates(); popup.setPosition(coordinates); $(element).popover({ placement: 'top', html: true, - content: feature.get('name') + content: feature.get('name'), }); $(element).popover('show'); } else { @@ -82,7 +80,7 @@ map.on('click', function(evt) { }); // change mouse cursor when over marker -map.on('pointermove', function(e) { +map.on('pointermove', function (e) { if (e.dragging) { $(element).popover('destroy'); return; diff --git a/examples/igc.js b/examples/igc.js index 261108f59a..9fb6719696 100644 --- a/examples/igc.js +++ b/examples/igc.js @@ -1,33 +1,32 @@ import Feature from '../src/ol/Feature.js'; -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import IGC from '../src/ol/format/IGC.js'; -import {LineString, Point} from '../src/ol/geom.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import Map from '../src/ol/Map.js'; import OSM, {ATTRIBUTION} from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {LineString, Point} from '../src/ol/geom.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {getVectorContext} from '../src/ol/render.js'; - const colors = { 'Clement Latour': 'rgba(0, 0, 255, 0.7)', 'Damien de Baesnt': 'rgba(0, 215, 255, 0.7)', 'Sylvain Dhonneur': 'rgba(0, 165, 255, 0.7)', 'Tom Payne': 'rgba(0, 255, 255, 0.7)', - 'Ulrich Prinz': 'rgba(0, 215, 255, 0.7)' + 'Ulrich Prinz': 'rgba(0, 215, 255, 0.7)', }; const styleCache = {}; -const styleFunction = function(feature) { +const styleFunction = function (feature) { const color = colors[feature.get('PLT')]; let style = styleCache[color]; if (!style) { style = new Style({ stroke: new Stroke({ color: color, - width: 3 - }) + width: 3, + }), }); styleCache[color] = style; } @@ -41,13 +40,13 @@ const igcUrls = [ 'data/igc/Damien-de-Baenst.igc', 'data/igc/Sylvain-Dhonneur.igc', 'data/igc/Tom-Payne.igc', - 'data/igc/Ulrich-Prinz.igc' + 'data/igc/Ulrich-Prinz.igc', ]; function get(url, callback) { const client = new XMLHttpRequest(); client.open('GET', url); - client.onload = function() { + client.onload = function () { callback(client.responseText); }; client.send(); @@ -55,9 +54,10 @@ function get(url, callback) { const igcFormat = new IGC(); for (let i = 0; i < igcUrls.length; ++i) { - get(igcUrls[i], function(data) { - const features = igcFormat.readFeatures(data, - {featureProjection: 'EPSG:3857'}); + get(igcUrls[i], function (data) { + const features = igcFormat.readFeatures(data, { + featureProjection: 'EPSG:3857', + }); vectorSource.addFeatures(features); }); } @@ -65,9 +65,9 @@ for (let i = 0; i < igcUrls.length; ++i) { const time = { start: Infinity, stop: -Infinity, - duration: 0 + duration: 0, }; -vectorSource.on('addfeature', function(event) { +vectorSource.on('addfeature', function (event) { const geometry = event.feature.getGeometry(); time.start = Math.min(time.start, geometry.getFirstCoordinate()[2]); time.stop = Math.max(time.stop, geometry.getLastCoordinate()[2]); @@ -76,7 +76,7 @@ vectorSource.on('addfeature', function(event) { const vectorLayer = new VectorLayer({ source: vectorSource, - style: styleFunction + style: styleFunction, }); const map = new Map({ @@ -85,25 +85,25 @@ const map = new Map({ source: new OSM({ attributions: [ 'All maps © OpenCycleMap', - ATTRIBUTION + ATTRIBUTION, ], - url: 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + - '?apikey=0e6fc415256d4fbb9b5166a718591d71' - }) + url: + 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + + '?apikey=0e6fc415256d4fbb9b5166a718591d71', + }), }), - vectorLayer + vectorLayer, ], target: 'map', view: new View({ center: [703365.7089403362, 5714629.865071137], - zoom: 9 - }) + zoom: 9, + }), }); - let point = null; let line = null; -const displaySnap = function(coordinate) { +const displaySnap = function (coordinate) { const closestFeature = vectorSource.getClosestFeatureToCoordinate(coordinate); const info = document.getElementById('info'); if (closestFeature === null) { @@ -120,7 +120,7 @@ const displaySnap = function(coordinate) { } const date = new Date(closestPoint[2] * 1000); info.innerHTML = - closestFeature.get('PLT') + ' (' + date.toUTCString() + ')'; + closestFeature.get('PLT') + ' (' + date.toUTCString() + ')'; const coordinates = [coordinate, [closestPoint[0], closestPoint[1]]]; if (line === null) { line = new LineString(coordinates); @@ -131,7 +131,7 @@ const displaySnap = function(coordinate) { map.render(); }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -139,23 +139,23 @@ map.on('pointermove', function(evt) { displaySnap(coordinate); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displaySnap(evt.coordinate); }); const stroke = new Stroke({ color: 'rgba(255,0,0,0.9)', - width: 1 + width: 1, }); const style = new Style({ stroke: stroke, image: new CircleStyle({ radius: 5, fill: null, - stroke: stroke - }) + stroke: stroke, + }), }); -vectorLayer.on('postrender', function(evt) { +vectorLayer.on('postrender', function (evt) { const vectorContext = getVectorContext(evt); vectorContext.setStyle(style); if (point !== null) { @@ -173,16 +173,16 @@ const featureOverlay = new VectorLayer({ image: new CircleStyle({ radius: 5, fill: new Fill({ - color: 'rgba(255,0,0,0.9)' - }) - }) - }) + color: 'rgba(255,0,0,0.9)', + }), + }), + }), }); -document.getElementById('time').addEventListener('input', function() { +document.getElementById('time').addEventListener('input', function () { const value = parseInt(this.value, 10) / 100; - const m = time.start + (time.duration * value); - vectorSource.forEachFeature(function(feature) { + const m = time.start + time.duration * value; + vectorSource.forEachFeature(function (feature) { const geometry = /** @type {import("../src/ol/geom/LineString.js").default} */ (feature.getGeometry()); const coordinate = geometry.getCoordinateAtM(m, true); let highlight = feature.get('highlight'); diff --git a/examples/iiif.js b/examples/iiif.js index b2fc4e4e59..882e67fcbc 100644 --- a/examples/iiif.js +++ b/examples/iiif.js @@ -1,45 +1,53 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import IIIF from '../src/ol/source/IIIF.js'; import IIIFInfo from '../src/ol/format/IIIFInfo.js'; +import Map from '../src/ol/Map.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const layer = new TileLayer(), - map = new Map({ - layers: [layer], - target: 'map' - }), - notifyDiv = document.getElementById('iiif-notification'), - urlInput = document.getElementById('imageInfoUrl'), - displayButton = document.getElementById('display'); + map = new Map({ + layers: [layer], + target: 'map', + }), + notifyDiv = document.getElementById('iiif-notification'), + urlInput = document.getElementById('imageInfoUrl'), + displayButton = document.getElementById('display'); function refreshMap(imageInfoUrl) { - fetch(imageInfoUrl).then(function(response) { - response.json().then(function(imageInfo) { - const options = new IIIFInfo(imageInfo).getTileSourceOptions(); - if (options === undefined || options.version === undefined) { - notifyDiv.textContent = 'Data seems to be no valid IIIF image information.'; - return; - } - options.zDirection = -1; - const iiifTileSource = new IIIF(options); - layer.setSource(iiifTileSource); - map.setView(new View({ - resolutions: iiifTileSource.getTileGrid().getResolutions(), - extent: iiifTileSource.getTileGrid().getExtent(), - constrainOnlyCenter: true - })); - map.getView().fit(iiifTileSource.getTileGrid().getExtent()); - notifyDiv.textContent = ''; - }).catch(function(body) { - notifyDiv.textContent = 'Could not read image info json. ' + body; + fetch(imageInfoUrl) + .then(function (response) { + response + .json() + .then(function (imageInfo) { + const options = new IIIFInfo(imageInfo).getTileSourceOptions(); + if (options === undefined || options.version === undefined) { + notifyDiv.textContent = + 'Data seems to be no valid IIIF image information.'; + return; + } + options.zDirection = -1; + const iiifTileSource = new IIIF(options); + layer.setSource(iiifTileSource); + map.setView( + new View({ + resolutions: iiifTileSource.getTileGrid().getResolutions(), + extent: iiifTileSource.getTileGrid().getExtent(), + constrainOnlyCenter: true, + }) + ); + map.getView().fit(iiifTileSource.getTileGrid().getExtent()); + notifyDiv.textContent = ''; + }) + .catch(function (body) { + notifyDiv.textContent = 'Could not read image info json. ' + body; + }); + }) + .catch(function () { + notifyDiv.textContent = 'Could not read data from URL.'; }); - }).catch(function() { - notifyDiv.textContent = 'Could not read data from URL.'; - }); } -displayButton.addEventListener('click', function() { +displayButton.addEventListener('click', function () { refreshMap(urlInput.value); }); diff --git a/examples/image-filter.js b/examples/image-filter.js index db6a8105f6..d798f39e49 100644 --- a/examples/image-filter.js +++ b/examples/image-filter.js @@ -1,11 +1,12 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat} from '../src/ol/proj.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; +import {fromLonLat} from '../src/ol/proj.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const imagery = new TileLayer({ @@ -13,8 +14,8 @@ const imagery = new TileLayer({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, maxZoom: 20, - crossOrigin: '' - }) + crossOrigin: '', + }), }); const map = new Map({ @@ -22,52 +23,25 @@ const map = new Map({ target: 'map', view: new View({ center: fromLonLat([-120, 50]), - zoom: 6 - }) + zoom: 6, + }), }); const kernels = { - none: [ - 0, 0, 0, - 0, 1, 0, - 0, 0, 0 - ], - sharpen: [ - 0, -1, 0, - -1, 5, -1, - 0, -1, 0 - ], - sharpenless: [ - 0, -1, 0, - -1, 10, -1, - 0, -1, 0 - ], - blur: [ - 1, 1, 1, - 1, 1, 1, - 1, 1, 1 - ], - shadow: [ - 1, 2, 1, - 0, 1, 0, - -1, -2, -1 - ], - emboss: [ - -2, 1, 0, - -1, 1, 1, - 0, 1, 2 - ], - edge: [ - 0, 1, 0, - 1, -4, 1, - 0, 1, 0 - ] + none: [0, 0, 0, 0, 1, 0, 0, 0, 0], + sharpen: [0, -1, 0, -1, 5, -1, 0, -1, 0], + sharpenless: [0, -1, 0, -1, 10, -1, 0, -1, 0], + blur: [1, 1, 1, 1, 1, 1, 1, 1, 1], + shadow: [1, 2, 1, 0, 1, 0, -1, -2, -1], + emboss: [-2, 1, 0, -1, 1, 1, 0, 1, 2], + edge: [0, 1, 0, 1, -4, 1, 0, 1, 0], }; function normalize(kernel) { const len = kernel.length; const normal = new Array(len); - let i, sum = 0; + let i, + sum = 0; for (i = 0; i < len; ++i) { sum += kernel[i]; } @@ -86,24 +60,21 @@ function normalize(kernel) { const select = document.getElementById('kernel'); let selectedKernel = normalize(kernels[select.value]); - /** * Update the kernel and re-render on change. */ -select.onchange = function() { +select.onchange = function () { selectedKernel = normalize(kernels[select.value]); map.render(); }; - /** * Apply a filter on "postrender" events. */ -imagery.on('postrender', function(event) { +imagery.on('postrender', function (event) { convolve(event.context, selectedKernel); }); - /** * Apply a convolution kernel to canvas. This works for any size kernel, but * performance starts degrading above 3 x 3. @@ -126,14 +97,21 @@ function convolve(context, kernel) { for (let pixelY = 0; pixelY < height; ++pixelY) { const pixelsAbove = pixelY * width; for (let pixelX = 0; pixelX < width; ++pixelX) { - let r = 0, g = 0, b = 0, a = 0; + let r = 0, + g = 0, + b = 0, + a = 0; for (let kernelY = 0; kernelY < size; ++kernelY) { for (let kernelX = 0; kernelX < size; ++kernelX) { const weight = kernel[kernelY * size + kernelX]; const neighborY = Math.min( - height - 1, Math.max(0, pixelY + kernelY - half)); + height - 1, + Math.max(0, pixelY + kernelY - half) + ); const neighborX = Math.min( - width - 1, Math.max(0, pixelX + kernelX - half)); + width - 1, + Math.max(0, pixelX + kernelX - half) + ); const inputIndex = (neighborY * width + neighborX) * 4; r += inputData[inputIndex] * weight; g += inputData[inputIndex + 1] * weight; diff --git a/examples/image-load-events.js b/examples/image-load-events.js index 5d2518da22..7bc8725591 100644 --- a/examples/image-load-events.js +++ b/examples/image-load-events.js @@ -1,8 +1,7 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import ImageLayer from '../src/ol/layer/Image.js'; import ImageWMS from '../src/ol/source/ImageWMS.js'; - +import Map from '../src/ol/Map.js'; +import View from '../src/ol/View.js'; /** * Renders a progress bar. @@ -15,11 +14,10 @@ function Progress(el) { this.loaded = 0; } - /** * Increment the count of loading tiles. */ -Progress.prototype.addLoading = function() { +Progress.prototype.addLoading = function () { if (this.loading === 0) { this.show(); } @@ -27,48 +25,44 @@ Progress.prototype.addLoading = function() { this.update(); }; - /** * Increment the count of loaded tiles. */ -Progress.prototype.addLoaded = function() { +Progress.prototype.addLoaded = function () { const this_ = this; - setTimeout(function() { + setTimeout(function () { ++this_.loaded; this_.update(); }, 100); }; - /** * Update the progress bar. */ -Progress.prototype.update = function() { - const width = (this.loaded / this.loading * 100).toFixed(1) + '%'; +Progress.prototype.update = function () { + const width = ((this.loaded / this.loading) * 100).toFixed(1) + '%'; this.el.style.width = width; if (this.loading === this.loaded) { this.loading = 0; this.loaded = 0; const this_ = this; - setTimeout(function() { + setTimeout(function () { this_.hide(); }, 500); } }; - /** * Show the progress bar. */ -Progress.prototype.show = function() { +Progress.prototype.show = function () { this.el.style.visibility = 'visible'; }; - /** * Hide the progress bar. */ -Progress.prototype.hide = function() { +Progress.prototype.hide = function () { if (this.loading === this.loaded) { this.el.style.visibility = 'hidden'; this.el.style.width = 0; @@ -80,27 +74,25 @@ const progress = new Progress(document.getElementById('progress')); const source = new ImageWMS({ url: 'https://ahocevar.com/geoserver/wms', params: {'LAYERS': 'topp:states'}, - serverType: 'geoserver' + serverType: 'geoserver', }); -source.on('imageloadstart', function() { +source.on('imageloadstart', function () { progress.addLoading(); }); -source.on('imageloadend', function() { +source.on('imageloadend', function () { progress.addLoaded(); }); -source.on('imageloaderror', function() { +source.on('imageloaderror', function () { progress.addLoaded(); }); const map = new Map({ - layers: [ - new ImageLayer({source: source}) - ], + layers: [new ImageLayer({source: source})], target: 'map', view: new View({ center: [-10997148, 4569099], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/image-vector-layer.js b/examples/image-vector-layer.js index cd24c917b4..5339c43cbc 100644 --- a/examples/image-vector-layer.js +++ b/examples/image-vector-layer.js @@ -1,21 +1,20 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; import VectorImageLayer from '../src/ol/layer/VectorImage.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style, Text} from '../src/ol/style.js'; - const style = new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 + width: 1, }), - text: new Text() + text: new Text(), }); const map = new Map({ @@ -24,19 +23,19 @@ const map = new Map({ imageRatio: 2, source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: function(feature) { + style: function (feature) { style.getText().setText(feature.get('name')); return style; - } - }) + }, + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); const featureOverlay = new VectorLayer({ @@ -45,45 +44,48 @@ const featureOverlay = new VectorLayer({ style: new Style({ stroke: new Stroke({ color: '#f00', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(255,0,0,0.1)' - }) - }) + color: 'rgba(255,0,0,0.1)', + }), + }), }); let highlight; -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { + map + .getLayers() + .item(0) + .getFeatures(pixel) + .then(function (features) { + const feature = features.length > 0 ? features[0] : undefined; - map.getLayers().item(0).getFeatures(pixel).then(function(features) { - const feature = features.length > 0 ? features[0] : undefined; - - const info = document.getElementById('info'); - if (feature) { - info.innerHTML = feature.getId() + ': ' + feature.get('name'); - } else { - info.innerHTML = ' '; - } - - if (feature !== highlight) { - if (highlight) { - featureOverlay.getSource().removeFeature(highlight); - } + const info = document.getElementById('info'); if (feature) { - featureOverlay.getSource().addFeature(feature); + info.innerHTML = feature.getId() + ': ' + feature.get('name'); + } else { + info.innerHTML = ' '; } - highlight = feature; - } - }); + + if (feature !== highlight) { + if (highlight) { + featureOverlay.getSource().removeFeature(highlight); + } + if (feature) { + featureOverlay.getSource().addFeature(feature); + } + highlight = feature; + } + }); }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (!evt.dragging) { displayFeatureInfo(evt.pixel); } }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/immediate-geographic.js b/examples/immediate-geographic.js index 7c92cf0459..cc21f14383 100644 --- a/examples/immediate-geographic.js +++ b/examples/immediate-geographic.js @@ -1,18 +1,18 @@ +import Stamen from '../src/ol/source/Stamen.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import {Circle, Fill, Style} from '../src/ol/style.js'; import {Map, View} from '../src/ol/index.js'; import {Point} from '../src/ol/geom.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import Stamen from '../src/ol/source/Stamen.js'; -import {Circle, Fill, Style} from '../src/ol/style.js'; import {getVectorContext} from '../src/ol/render.js'; -import {useGeographic} from '../src/ol/proj.js'; import {upAndDown} from '../src/ol/easing.js'; +import {useGeographic} from '../src/ol/proj.js'; useGeographic(); const layer = new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }); const map = new Map({ @@ -20,17 +20,17 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const image = new Circle({ radius: 8, - fill: new Fill({color: 'rgb(255, 153, 0)'}) + fill: new Fill({color: 'rgb(255, 153, 0)'}), }); const style = new Style({ - image: image + image: image, }); const n = 1000; @@ -42,7 +42,7 @@ for (let i = 0; i < n; ++i) { geometries[i] = new Point([lon, lat]); } -layer.on('postrender', function(event) { +layer.on('postrender', function (event) { const vectorContext = getVectorContext(event); for (let i = 0; i < n; ++i) { diff --git a/examples/jsts.js b/examples/jsts.js index 1d64cc2281..ebe4af642a 100644 --- a/examples/jsts.js +++ b/examples/jsts.js @@ -1,43 +1,62 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {fromLonLat} from '../src/ol/proj.js'; +import LinearRing from '../src/ol/geom/LinearRing.js'; +import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; -import LinearRing from '../src/ol/geom/LinearRing.js'; -import {Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon} from '../src/ol/geom.js'; +import View from '../src/ol/View.js'; +import { + LineString, + MultiLineString, + MultiPoint, + MultiPolygon, + Point, + Polygon, +} from '../src/ol/geom.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {fromLonLat} from '../src/ol/proj.js'; const source = new VectorSource(); -fetch('data/geojson/roads-seoul.geojson').then(function(response) { - return response.json(); -}).then(function(json) { - const format = new GeoJSON(); - const features = format.readFeatures(json, {featureProjection: 'EPSG:3857'}); +fetch('data/geojson/roads-seoul.geojson') + .then(function (response) { + return response.json(); + }) + .then(function (json) { + const format = new GeoJSON(); + const features = format.readFeatures(json, { + featureProjection: 'EPSG:3857', + }); - const parser = new jsts.io.OL3Parser(); - parser.inject(Point, LineString, LinearRing, Polygon, MultiPoint, MultiLineString, MultiPolygon); + const parser = new jsts.io.OL3Parser(); + parser.inject( + Point, + LineString, + LinearRing, + Polygon, + MultiPoint, + MultiLineString, + MultiPolygon + ); - for (let i = 0; i < features.length; i++) { - const feature = features[i]; - // convert the OpenLayers geometry to a JSTS geometry - const jstsGeom = parser.read(feature.getGeometry()); + for (let i = 0; i < features.length; i++) { + const feature = features[i]; + // convert the OpenLayers geometry to a JSTS geometry + const jstsGeom = parser.read(feature.getGeometry()); - // create a buffer of 40 meters around each line - const buffered = jstsGeom.buffer(40); + // create a buffer of 40 meters around each line + const buffered = jstsGeom.buffer(40); - // convert back from JSTS and replace the geometry on the feature - feature.setGeometry(parser.write(buffered)); - } + // convert back from JSTS and replace the geometry on the feature + feature.setGeometry(parser.write(buffered)); + } - source.addFeatures(features); -}); + source.addFeatures(features); + }); const vectorLayer = new VectorLayer({ - source: source + source: source, }); const rasterLayer = new TileLayer({ - source: new OSM() + source: new OSM(), }); const map = new Map({ @@ -45,6 +64,6 @@ const map = new Map({ target: document.getElementById('map'), view: new View({ center: fromLonLat([126.979293, 37.528787]), - zoom: 15 - }) + zoom: 15, + }), }); diff --git a/examples/kml-earthquakes.js b/examples/kml-earthquakes.js index 3ccd3ae988..b2ea2b175d 100644 --- a/examples/kml-earthquakes.js +++ b/examples/kml-earthquakes.js @@ -1,14 +1,13 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import Map from '../src/ol/Map.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const styleCache = {}; -const styleFunction = function(feature) { +const styleFunction = function (feature) { // 2012_Earthquakes_Mag5.kml stores the magnitude of each earthquake in a // standards-violating tag in each Placemark. We extract it from // the Placemark's name instead. @@ -21,13 +20,13 @@ const styleFunction = function(feature) { image: new CircleStyle({ radius: radius, fill: new Fill({ - color: 'rgba(255, 153, 0, 0.4)' + color: 'rgba(255, 153, 0, 0.4)', }), stroke: new Stroke({ color: 'rgba(255, 204, 0, 0.2)', - width: 1 - }) - }) + width: 1, + }), + }), }); styleCache[radius] = style; } @@ -38,16 +37,16 @@ const vector = new VectorLayer({ source: new VectorSource({ url: 'data/kml/2012_Earthquakes_Mag5.kml', format: new KML({ - extractStyles: false - }) + extractStyles: false, + }), }), - style: styleFunction + style: styleFunction, }); const raster = new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }); const map = new Map({ @@ -55,26 +54,27 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const info = $('#info'); info.tooltip({ animation: false, - trigger: 'manual' + trigger: 'manual', }); -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { info.css({ left: pixel[0] + 'px', - top: (pixel[1] - 15) + 'px' + top: pixel[1] - 15 + 'px', }); - const feature = map.forEachFeatureAtPixel(pixel, function(feature) { + const feature = map.forEachFeatureAtPixel(pixel, function (feature) { return feature; }); if (feature) { - info.tooltip('hide') + info + .tooltip('hide') .attr('data-original-title', feature.get('name')) .tooltip('fixTitle') .tooltip('show'); @@ -83,7 +83,7 @@ const displayFeatureInfo = function(pixel) { } }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { info.tooltip('hide'); return; @@ -91,6 +91,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(map.getEventPixel(evt.originalEvent)); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/kml-timezones.js b/examples/kml-timezones.js index 7c60c0a01e..497cf87c47 100644 --- a/examples/kml-timezones.js +++ b/examples/kml-timezones.js @@ -1,11 +1,10 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import Map from '../src/ol/Map.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style} from '../src/ol/style.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; /* * Compute the style of the feature. Here we want the opacity of polygons to @@ -14,7 +13,7 @@ import {Fill, Stroke, Style} from '../src/ol/style.js'; * currently midnight would have an opacity of 0. This doesn't account for * daylight savings, so don't use it to plan your vacation. */ -const styleFunction = function(feature) { +const styleFunction = function (feature) { let offset = 0; const name = feature.get('name'); // e.g. GMT -08:30 const match = name.match(/([\-+]\d{2}):(\d{2})$/); @@ -24,21 +23,22 @@ const styleFunction = function(feature) { offset = 60 * hours + minutes; } const date = new Date(); - const local = new Date(date.getTime() + - (date.getTimezoneOffset() + offset) * 60000); + const local = new Date( + date.getTime() + (date.getTimezoneOffset() + offset) * 60000 + ); // offset from local noon (in hours) - let delta = Math.abs(12 - local.getHours() + (local.getMinutes() / 60)); + let delta = Math.abs(12 - local.getHours() + local.getMinutes() / 60); if (delta > 12) { delta = 24 - delta; } const opacity = 0.75 * (1 - delta / 12); return new Style({ fill: new Fill({ - color: [0xff, 0xff, 0x33, opacity] + color: [0xff, 0xff, 0x33, opacity], }), stroke: new Stroke({ - color: '#ffffff' - }) + color: '#ffffff', + }), }); }; @@ -46,16 +46,16 @@ const vector = new VectorLayer({ source: new VectorSource({ url: 'data/kml/timezones.kml', format: new KML({ - extractStyles: false - }) + extractStyles: false, + }), }), - style: styleFunction + style: styleFunction, }); const raster = new TileLayer({ source: new Stamen({ - layer: 'toner' - }) + layer: 'toner', + }), }); const map = new Map({ @@ -63,26 +63,27 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const info = $('#info'); info.tooltip({ animation: false, - trigger: 'manual' + trigger: 'manual', }); -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { info.css({ left: pixel[0] + 'px', - top: (pixel[1] - 15) + 'px' + top: pixel[1] - 15 + 'px', }); - const feature = map.forEachFeatureAtPixel(pixel, function(feature) { + const feature = map.forEachFeatureAtPixel(pixel, function (feature) { return feature; }); if (feature) { - info.tooltip('hide') + info + .tooltip('hide') .attr('data-original-title', feature.get('name')) .tooltip('fixTitle') .tooltip('show'); @@ -91,7 +92,7 @@ const displayFeatureInfo = function(pixel) { } }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { info.tooltip('hide'); return; @@ -99,6 +100,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(map.getEventPixel(evt.originalEvent)); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/kml.js b/examples/kml.js index 611cd5beaa..3d16eda6a8 100644 --- a/examples/kml.js +++ b/examples/kml.js @@ -1,27 +1,28 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import XYZ from '../src/ol/source/XYZ.js'; +import Map from '../src/ol/Map.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const raster = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); const vector = new VectorLayer({ source: new VectorSource({ url: 'data/kml/2012-02-10.kml', - format: new KML() - }) + format: new KML(), + }), }); const map = new Map({ @@ -30,13 +31,13 @@ const map = new Map({ view: new View({ center: [876970.8463461736, 5859807.853963373], projection: 'EPSG:3857', - zoom: 10 - }) + zoom: 10, + }), }); -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { const features = []; - map.forEachFeatureAtPixel(pixel, function(feature) { + map.forEachFeatureAtPixel(pixel, function (feature) { features.push(feature); }); if (features.length > 0) { @@ -53,7 +54,7 @@ const displayFeatureInfo = function(pixel) { } }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -61,6 +62,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(pixel); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/layer-clipping-vector.js b/examples/layer-clipping-vector.js index 13c416b477..46d922acbc 100644 --- a/examples/layer-clipping-vector.js +++ b/examples/layer-clipping-vector.js @@ -1,36 +1,35 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import VectorSource from '../src/ol/source/Vector.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; +import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Style} from '../src/ol/style.js'; -import {getVectorContext} from '../src/ol/render.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {fromLonLat} from '../src/ol/proj.js'; +import {getVectorContext} from '../src/ol/render.js'; const base = new TileLayer({ - source: new OSM() + source: new OSM(), }); const clipLayer = new VectorLayer({ style: null, source: new VectorSource({ - url: - './data/geojson/switzerland.geojson', - format: new GeoJSON() - }) + url: './data/geojson/switzerland.geojson', + format: new GeoJSON(), + }), }); const style = new Style({ fill: new Fill({ - color: 'black' - }) + color: 'black', + }), }); -base.on('postrender', function(e) { +base.on('postrender', function (e) { e.context.globalCompositeOperation = 'destination-in'; const vectorContext = getVectorContext(e); - clipLayer.getSource().forEachFeature(function(feature) { + clipLayer.getSource().forEachFeature(function (feature) { vectorContext.drawFeature(feature, style); }); e.context.globalCompositeOperation = 'source-over'; @@ -41,6 +40,6 @@ const map = new Map({ target: 'map', view: new View({ center: fromLonLat([8.23, 46.86]), - zoom: 7 - }) + zoom: 7, + }), }); diff --git a/examples/layer-clipping.js b/examples/layer-clipping.js index a6805fdac5..6bb1b6a25a 100644 --- a/examples/layer-clipping.js +++ b/examples/layer-clipping.js @@ -1,10 +1,10 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const osm = new TileLayer({ - source: new OSM() + source: new OSM(), }); const map = new Map({ @@ -12,16 +12,18 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -osm.on('prerender', function(event) { +osm.on('prerender', function (event) { const ctx = event.context; // calculate the pixel ratio and rotation of the canvas const matrix = event.inversePixelTransform; - const canvasPixelRatio = Math.sqrt(matrix[0] * matrix[0] + matrix[1] * matrix[1]); + const canvasPixelRatio = Math.sqrt( + matrix[0] * matrix[0] + matrix[1] * matrix[1] + ); const canvasRotation = -Math.atan2(matrix[1], matrix[0]); ctx.save(); // center the canvas and remove rotation to position clipping @@ -47,7 +49,7 @@ osm.on('prerender', function(event) { ctx.translate(-ctx.canvas.width / 2, -ctx.canvas.height / 2); }); -osm.on('postrender', function(event) { +osm.on('postrender', function (event) { const ctx = event.context; ctx.restore(); }); diff --git a/examples/layer-extent.js b/examples/layer-extent.js index 6aa6a45075..ae8c5ca411 100644 --- a/examples/layer-extent.js +++ b/examples/layer-extent.js @@ -1,8 +1,8 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {transformExtent} from '../src/ol/proj.js'; import TileJSON from '../src/ol/source/TileJSON.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {transformExtent} from '../src/ol/proj.js'; function transform(extent) { return transformExtent(extent, 'EPSG:4326', 'EPSG:3857'); @@ -12,24 +12,29 @@ const extents = { India: transform([68.17665, 7.96553, 97.40256, 35.49401]), Argentina: transform([-73.41544, -55.25, -53.62835, -21.83231]), Nigeria: transform([2.6917, 4.24059, 14.57718, 13.86592]), - Sweden: transform([11.02737, 55.36174, 23.90338, 69.10625]) + Sweden: transform([11.02737, 55.36174, 23.90338, 69.10625]), }; -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; const base = new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.world-light.json?secure&access_token=' + key, - crossOrigin: 'anonymous' - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.world-light.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', + }), }); const overlay = new TileLayer({ extent: extents.India, source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.world-black.json?secure&access_token=' + key, - crossOrigin: 'anonymous' - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.world-black.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', + }), }); const map = new Map({ @@ -37,12 +42,12 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); for (const key in extents) { - document.getElementById(key).onclick = function(event) { + document.getElementById(key).onclick = function (event) { overlay.setExtent(extents[event.target.id]); }; } diff --git a/examples/layer-group.js b/examples/layer-group.js index 112dc7d951..c6fd6b524b 100644 --- a/examples/layer-group.js +++ b/examples/layer-group.js @@ -1,62 +1,71 @@ import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; +import TileJSON from '../src/ol/source/TileJSON.js'; import View from '../src/ol/View.js'; import {Group as LayerGroup, Tile as TileLayer} from '../src/ol/layer.js'; import {fromLonLat} from '../src/ol/proj.js'; -import OSM from '../src/ol/source/OSM.js'; -import TileJSON from '../src/ol/source/TileJSON.js'; -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }), new LayerGroup({ + source: new OSM(), + }), + new LayerGroup({ layers: [ new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.20110804-hoa-foodinsecurity-3month.json?secure&access_token=' + key, - crossOrigin: 'anonymous' - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.20110804-hoa-foodinsecurity-3month.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', + }), }), new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.world-borders-light.json?secure&access_token=' + key, - crossOrigin: 'anonymous' - }) - }) - ] - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.world-borders-light.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', + }), + }), + ], + }), ], target: 'map', view: new View({ - center: fromLonLat([37.40570, 8.81566]), - zoom: 4 - }) + center: fromLonLat([37.4057, 8.81566]), + zoom: 4, + }), }); function bindInputs(layerid, layer) { const visibilityInput = $(layerid + ' input.visible'); - visibilityInput.on('change', function() { + visibilityInput.on('change', function () { layer.setVisible(this.checked); }); visibilityInput.prop('checked', layer.getVisible()); const opacityInput = $(layerid + ' input.opacity'); - opacityInput.on('input change', function() { + opacityInput.on('input change', function () { layer.setOpacity(parseFloat(this.value)); }); opacityInput.val(String(layer.getOpacity())); } -map.getLayers().forEach(function(layer, i) { +map.getLayers().forEach(function (layer, i) { bindInputs('#layer' + i, layer); if (layer instanceof LayerGroup) { - layer.getLayers().forEach(function(sublayer, j) { + layer.getLayers().forEach(function (sublayer, j) { bindInputs('#layer' + i + j, sublayer); }); } }); -$('#layertree li > span').click(function() { - $(this).siblings('fieldset').toggle(); -}).siblings('fieldset').hide(); +$('#layertree li > span') + .click(function () { + $(this).siblings('fieldset').toggle(); + }) + .siblings('fieldset') + .hide(); diff --git a/examples/layer-spy.js b/examples/layer-spy.js index 4418e7a5ca..bdb7d8f1cd 100644 --- a/examples/layer-spy.js +++ b/examples/layer-spy.js @@ -1,12 +1,13 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat} from '../src/ol/proj.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; +import {fromLonLat} from '../src/ol/proj.js'; import {getRenderPixel} from '../src/ol/render.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const roads = new TileLayer({ @@ -14,16 +15,16 @@ const roads = new TileLayer({ attributions: attributions, url: 'https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=' + key, tileSize: 512, - maxZoom: 22 - }) + maxZoom: 22, + }), }); const imagery = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); const container = document.getElementById('map'); @@ -33,12 +34,12 @@ const map = new Map({ target: container, view: new View({ center: fromLonLat([-109, 46.5]), - zoom: 6 - }) + zoom: 6, + }), }); let radius = 75; -document.addEventListener('keydown', function(evt) { +document.addEventListener('keydown', function (evt) { if (evt.which === 38) { radius = Math.min(radius + 5, 150); map.render(); @@ -53,28 +54,33 @@ document.addEventListener('keydown', function(evt) { // get the pixel position with every move let mousePosition = null; -container.addEventListener('mousemove', function(event) { +container.addEventListener('mousemove', function (event) { mousePosition = map.getEventPixel(event); map.render(); }); -container.addEventListener('mouseout', function() { +container.addEventListener('mouseout', function () { mousePosition = null; map.render(); }); // before rendering the layer, do some clipping -imagery.on('prerender', function(event) { +imagery.on('prerender', function (event) { const ctx = event.context; ctx.save(); ctx.beginPath(); if (mousePosition) { // only show a circle around the mouse const pixel = getRenderPixel(event, mousePosition); - const offset = getRenderPixel(event, [mousePosition[0] + radius, mousePosition[1]]); - const canvasRadius = Math.sqrt(Math.pow(offset[0] - pixel[0], 2) + Math.pow(offset[1] - pixel[1], 2)); + const offset = getRenderPixel(event, [ + mousePosition[0] + radius, + mousePosition[1], + ]); + const canvasRadius = Math.sqrt( + Math.pow(offset[0] - pixel[0], 2) + Math.pow(offset[1] - pixel[1], 2) + ); ctx.arc(pixel[0], pixel[1], canvasRadius, 0, 2 * Math.PI); - ctx.lineWidth = 5 * canvasRadius / radius; + ctx.lineWidth = (5 * canvasRadius) / radius; ctx.strokeStyle = 'rgba(0,0,0,0.5)'; ctx.stroke(); } @@ -82,7 +88,7 @@ imagery.on('prerender', function(event) { }); // after rendering the layer, restore the canvas context -imagery.on('postrender', function(event) { +imagery.on('postrender', function (event) { const ctx = event.context; ctx.restore(); }); diff --git a/examples/layer-swipe.js b/examples/layer-swipe.js index 5d6a20b274..cf457a4b94 100644 --- a/examples/layer-swipe.js +++ b/examples/layer-swipe.js @@ -1,24 +1,25 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; import {getRenderPixel} from '../src/ol/render.js'; const osm = new TileLayer({ - source: new OSM() + source: new OSM(), }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const aerial = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); const map = new Map({ @@ -26,13 +27,13 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const swipe = document.getElementById('swipe'); -aerial.on('prerender', function(event) { +aerial.on('prerender', function (event) { const ctx = event.context; const mapSize = map.getSize(); const width = mapSize[0] * (swipe.value / 100); @@ -51,11 +52,15 @@ aerial.on('prerender', function(event) { ctx.clip(); }); -aerial.on('postrender', function(event) { +aerial.on('postrender', function (event) { const ctx = event.context; ctx.restore(); }); -swipe.addEventListener('input', function() { - map.render(); -}, false); +swipe.addEventListener( + 'input', + function () { + map.render(); + }, + false +); diff --git a/examples/layer-z-index.js b/examples/layer-z-index.js index 12cbfc3b7c..8e967a30e5 100644 --- a/examples/layer-z-index.js +++ b/examples/layer-z-index.js @@ -1,12 +1,11 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, RegularShape, Stroke, Style} from '../src/ol/style.js'; - const stroke = new Stroke({color: 'black', width: 1}); const styles = { @@ -16,8 +15,8 @@ const styles = { stroke: stroke, points: 4, radius: 80, - angle: Math.PI / 4 - }) + angle: Math.PI / 4, + }), }), 'triangle': new Style({ image: new RegularShape({ @@ -26,8 +25,8 @@ const styles = { points: 3, radius: 80, rotation: Math.PI / 4, - angle: 0 - }) + angle: 0, + }), }), 'star': new Style({ image: new RegularShape({ @@ -36,22 +35,21 @@ const styles = { points: 5, radius: 80, radius2: 4, - angle: 0 - }) - }) + angle: 0, + }), + }), }; - function createLayer(coordinates, style, zIndex) { const feature = new Feature(new Point(coordinates)); feature.setStyle(style); const source = new VectorSource({ - features: [feature] + features: [feature], }); const vectorLayer = new VectorLayer({ - source: source + source: source, }); vectorLayer.setZIndex(zIndex); @@ -71,16 +69,15 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 18 - }) + zoom: 18, + }), }); layer0.setMap(map); - function bindInputs(id, layer) { const idxInput = document.getElementById('idx' + id); - idxInput.onchange = function() { + idxInput.onchange = function () { layer.setZIndex(parseInt(this.value, 10) || 0); }; idxInput.value = String(layer.getZIndex()); diff --git a/examples/layer-zoom-limits.js b/examples/layer-zoom-limits.js index 0fa5ab4ada..04eb24c786 100644 --- a/examples/layer-zoom-limits.js +++ b/examples/layer-zoom-limits.js @@ -1,9 +1,9 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; -import {transformExtent, fromLonLat} from '../src/ol/proj.js'; +import {fromLonLat, transformExtent} from '../src/ol/proj.js'; const mapExtent = [-112.261791, 35.983744, -112.113981, 36.132062]; @@ -12,22 +12,23 @@ const map = new Map({ layers: [ new TileLayer({ maxZoom: 14, // visible at zoom levels 14 and below - source: new OSM() + source: new OSM(), }), new TileLayer({ minZoom: 14, // visible at zoom levels above 14 source: new XYZ({ - attributions: 'Tiles © USGS, rendered with ' + - 'MapTiler', - url: 'https://tileserver.maptiler.com/grandcanyon/{z}/{x}/{y}.png' - }) - }) + attributions: + 'Tiles © USGS, rendered with ' + + 'MapTiler', + url: 'https://tileserver.maptiler.com/grandcanyon/{z}/{x}/{y}.png', + }), + }), ], view: new View({ center: fromLonLat([-112.18688965, 36.057944835]), zoom: 15, maxZoom: 18, extent: transformExtent(mapExtent, 'EPSG:4326', 'EPSG:3857'), - constrainOnlyCenter: true - }) + constrainOnlyCenter: true, + }), }); diff --git a/examples/lazy-source.js b/examples/lazy-source.js index 04a16fea66..8ab7821812 100644 --- a/examples/lazy-source.js +++ b/examples/lazy-source.js @@ -1,7 +1,7 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const source = new OSM(); @@ -12,14 +12,14 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); -document.getElementById('set-source').onclick = function() { +document.getElementById('set-source').onclick = function () { layer.setSource(source); }; -document.getElementById('unset-source').onclick = function() { +document.getElementById('unset-source').onclick = function () { layer.setSource(null); }; diff --git a/examples/line-arrows.js b/examples/line-arrows.js index e99b259d69..5d583ca97c 100644 --- a/examples/line-arrows.js +++ b/examples/line-arrows.js @@ -1,50 +1,52 @@ -import Map from '../src/ol/Map.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 {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import Map from '../src/ol/Map.js'; +import Point from '../src/ol/geom/Point.js'; +import View from '../src/ol/View.js'; import {Icon, Stroke, Style} from '../src/ol/style.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const source = new VectorSource(); -const styleFunction = function(feature) { +const styleFunction = function (feature) { const geometry = feature.getGeometry(); const styles = [ // linestring new Style({ stroke: new Stroke({ color: '#ffcc33', - width: 2 - }) - }) + width: 2, + }), + }), ]; - geometry.forEachSegment(function(start, end) { + geometry.forEachSegment(function (start, end) { const dx = end[0] - start[0]; const dy = end[1] - start[1]; const rotation = Math.atan2(dy, dx); // arrows - styles.push(new Style({ - geometry: new Point(end), - image: new Icon({ - src: 'data/arrow.png', - anchor: [0.75, 0.5], - rotateWithView: true, - rotation: -rotation + styles.push( + new Style({ + geometry: new Point(end), + image: new Icon({ + src: 'data/arrow.png', + anchor: [0.75, 0.5], + rotateWithView: true, + rotation: -rotation, + }), }) - })); + ); }); return styles; }; const vector = new VectorLayer({ source: source, - style: styleFunction + style: styleFunction, }); const map = new Map({ @@ -52,11 +54,13 @@ const map = new Map({ target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 4 - }) + zoom: 4, + }), }); -map.addInteraction(new Draw({ - source: source, - type: 'LineString' -})); +map.addInteraction( + new Draw({ + source: source, + type: 'LineString', + }) +); diff --git a/examples/localized-openstreetmap.js b/examples/localized-openstreetmap.js index a37db45fdd..2da7932a7e 100644 --- a/examples/localized-openstreetmap.js +++ b/examples/localized-openstreetmap.js @@ -1,41 +1,37 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM, {ATTRIBUTION} from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const openCycleMapLayer = new TileLayer({ source: new OSM({ attributions: [ 'All maps © OpenCycleMap', - ATTRIBUTION + ATTRIBUTION, ], - url: 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + - '?apikey=0e6fc415256d4fbb9b5166a718591d71' - }) + url: + 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + + '?apikey=0e6fc415256d4fbb9b5166a718591d71', + }), }); const openSeaMapLayer = new TileLayer({ source: new OSM({ attributions: [ 'All maps © OpenSeaMap', - ATTRIBUTION + ATTRIBUTION, ], opaque: false, - url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png' - }) + url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png', + }), }); - const map = new Map({ - layers: [ - openCycleMapLayer, - openSeaMapLayer - ], + layers: [openCycleMapLayer, openSeaMapLayer], target: 'map', view: new View({ maxZoom: 18, center: [-244780.24508882355, 5986452.183179816], - zoom: 15 - }) + zoom: 15, + }), }); diff --git a/examples/magnify.js b/examples/magnify.js index 17c3a6c963..4eafe2db1b 100644 --- a/examples/magnify.js +++ b/examples/magnify.js @@ -1,12 +1,13 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat} from '../src/ol/proj.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; +import {fromLonLat} from '../src/ol/proj.js'; import {getRenderPixel} from '../src/ol/render.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const imagery = new TileLayer({ @@ -14,8 +15,8 @@ const imagery = new TileLayer({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, maxZoom: 20, - crossOrigin: '' - }) + crossOrigin: '', + }), }); const container = document.getElementById('map'); @@ -25,12 +26,12 @@ const map = new Map({ target: container, view: new View({ center: fromLonLat([-109, 46.5]), - zoom: 6 - }) + zoom: 6, + }), }); let radius = 75; -document.addEventListener('keydown', function(evt) { +document.addEventListener('keydown', function (evt) { if (evt.which === 38) { radius = Math.min(radius + 5, 150); map.render(); @@ -45,22 +46,27 @@ document.addEventListener('keydown', function(evt) { // get the pixel position with every move let mousePosition = null; -container.addEventListener('mousemove', function(event) { +container.addEventListener('mousemove', function (event) { mousePosition = map.getEventPixel(event); map.render(); }); -container.addEventListener('mouseout', function() { +container.addEventListener('mouseout', function () { mousePosition = null; map.render(); }); // after rendering the layer, show an oversampled version around the pointer -imagery.on('postrender', function(event) { +imagery.on('postrender', function (event) { if (mousePosition) { const pixel = getRenderPixel(event, mousePosition); - const offset = getRenderPixel(event, [mousePosition[0] + radius, mousePosition[1]]); - const half = Math.sqrt(Math.pow(offset[0] - pixel[0], 2) + Math.pow(offset[1] - pixel[1], 2)); + const offset = getRenderPixel(event, [ + mousePosition[0] + radius, + mousePosition[1], + ]); + const half = Math.sqrt( + Math.pow(offset[0] - pixel[0], 2) + Math.pow(offset[1] - pixel[1], 2) + ); const context = event.context; const centerX = pixel[0]; const centerY = pixel[1]; @@ -91,7 +97,7 @@ imagery.on('postrender', function(event) { } context.beginPath(); context.arc(centerX, centerY, half, 0, 2 * Math.PI); - context.lineWidth = 3 * half / radius; + context.lineWidth = (3 * half) / radius; context.strokeStyle = 'rgba(255,255,255,0.5)'; context.putImageData(dest, originX, originY); context.stroke(); diff --git a/examples/mapbox-layer.js b/examples/mapbox-layer.js index 2bb3e4fa4c..5da67e8fb8 100644 --- a/examples/mapbox-layer.js +++ b/examples/mapbox-layer.js @@ -1,11 +1,11 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Layer from '../src/ol/layer/Layer.js'; -import {toLonLat, fromLonLat} from '../src/ol/proj.js'; -import {Stroke, Style} from '../src/ol/style.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; +import View from '../src/ol/View.js'; +import {Stroke, Style} from '../src/ol/style.js'; +import {fromLonLat, toLonLat} from '../src/ol/proj.js'; const center = [-98.8, 37.9]; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; @@ -23,11 +23,11 @@ const mbMap = new mapboxgl.Map({ keyboard: false, pitchWithRotate: false, scrollZoom: false, - touchZoomRotate: false + touchZoomRotate: false, }); const mbLayer = new Layer({ - render: function(frameState) { + render: function (frameState) { const canvas = mbMap.getCanvas(); const viewState = frameState.viewState; @@ -40,14 +40,14 @@ const mbLayer = new Layer({ // adjust view parameters in mapbox const rotation = viewState.rotation; if (rotation) { - mbMap.rotateTo(-rotation * 180 / Math.PI, { - animate: false + mbMap.rotateTo((-rotation * 180) / Math.PI, { + animate: false, }); } mbMap.jumpTo({ center: toLonLat(viewState.center), zoom: viewState.zoom - 1, - animate: false + animate: false, }); // cancel the scheduled update & trigger synchronous redraw @@ -60,29 +60,29 @@ const mbLayer = new Layer({ mbMap._render(); return canvas; - } + }, }); const style = new Style({ stroke: new Stroke({ color: '#319FD3', - width: 2 - }) + width: 2, + }), }); const vectorLayer = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: style + style: style, }); const map = new Map({ target: 'map', view: new View({ center: fromLonLat(center), - zoom: 4 + zoom: 4, }), - layers: [mbLayer, vectorLayer] + layers: [mbLayer, vectorLayer], }); diff --git a/examples/mapbox-style.js b/examples/mapbox-style.js index a774155526..03f712e594 100644 --- a/examples/mapbox-style.js +++ b/examples/mapbox-style.js @@ -1,6 +1,9 @@ -import apply from 'ol-mapbox-style'; import FullScreen from '../src/ol/control/FullScreen.js'; +import apply from 'ol-mapbox-style'; -apply('map', 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB').then(function(map) { +apply( + 'map', + 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB' +).then(function (map) { map.addControl(new FullScreen()); }); diff --git a/examples/mapbox-vector-tiles-advanced.js b/examples/mapbox-vector-tiles-advanced.js index f8b15fd20a..037b3f76eb 100644 --- a/examples/mapbox-vector-tiles-advanced.js +++ b/examples/mapbox-vector-tiles-advanced.js @@ -1,14 +1,14 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; -import VectorTileLayer from '../src/ol/layer/VectorTile.js'; -import {get as getProjection} from '../src/ol/proj.js'; -import VectorTileSource from '../src/ol/source/VectorTile.js'; -import {Fill, Icon, Stroke, Style, Text} from '../src/ol/style.js'; +import Map from '../src/ol/Map.js'; import TileGrid from '../src/ol/tilegrid/TileGrid.js'; +import VectorTileLayer from '../src/ol/layer/VectorTile.js'; +import VectorTileSource from '../src/ol/source/VectorTile.js'; +import View from '../src/ol/View.js'; +import {Fill, Icon, Stroke, Style, Text} from '../src/ol/style.js'; +import {get as getProjection} from '../src/ol/proj.js'; - -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; // Calculation of resolutions that match zoom levels 1, 3, 5, 7, 9, 11, 13, 15. const resolutions = []; @@ -17,37 +17,43 @@ for (let i = 0; i <= 8; ++i) { } // Calculation of tile urls for zoom levels 1, 3, 5, 7, 9, 11, 13, 15. function tileUrlFunction(tileCoord) { - return ('https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + - '{z}/{x}/{y}.vector.pbf?access_token=' + key) + return ( + 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + + '{z}/{x}/{y}.vector.pbf?access_token=' + + key + ) .replace('{z}', String(tileCoord[0] * 2 - 1)) .replace('{x}', String(tileCoord[1])) .replace('{y}', String(tileCoord[2])) - .replace('{a-d}', 'abcd'.substr( - ((tileCoord[1] << tileCoord[0]) + tileCoord[2]) % 4, 1)); + .replace( + '{a-d}', + 'abcd'.substr(((tileCoord[1] << tileCoord[0]) + tileCoord[2]) % 4, 1) + ); } const map = new Map({ layers: [ new VectorTileLayer({ source: new VectorTileSource({ - attributions: '© Mapbox ' + + attributions: + '© Mapbox ' + '© ' + 'OpenStreetMap contributors', format: new MVT(), tileGrid: new TileGrid({ extent: getProjection('EPSG:3857').getExtent(), resolutions: resolutions, - tileSize: 512 + tileSize: 512, }), - tileUrlFunction: tileUrlFunction + tileUrlFunction: tileUrlFunction, }), - style: createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text) - }) + style: createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text), + }), ], target: 'map', view: new View({ center: [0, 0], minZoom: 1, - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/mapbox-vector-tiles.js b/examples/mapbox-vector-tiles.js index ac5e796a61..f4aaea324c 100644 --- a/examples/mapbox-vector-tiles.js +++ b/examples/mapbox-vector-tiles.js @@ -1,31 +1,34 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; +import Map from '../src/ol/Map.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; +import View from '../src/ol/View.js'; import {Fill, Icon, Stroke, Style, Text} from '../src/ol/style.js'; - -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; const map = new Map({ layers: [ new VectorTileLayer({ declutter: true, source: new VectorTileSource({ - attributions: '© Mapbox ' + + attributions: + '© Mapbox ' + '© ' + 'OpenStreetMap contributors', format: new MVT(), - url: 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + - '{z}/{x}/{y}.vector.pbf?access_token=' + key + url: + 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + + '{z}/{x}/{y}.vector.pbf?access_token=' + + key, }), - style: createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text) - }) + style: createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/mapguide-untiled.js b/examples/mapguide-untiled.js index a9e3846cf4..474b0d3cd6 100644 --- a/examples/mapguide-untiled.js +++ b/examples/mapguide-untiled.js @@ -1,16 +1,15 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import ImageLayer from '../src/ol/layer/Image.js'; import ImageMapGuide from '../src/ol/source/ImageMapGuide.js'; +import Map from '../src/ol/Map.js'; +import View from '../src/ol/View.js'; const mdf = 'Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition'; -const agentUrl = - 'http://138.197.230.93:8008/mapguide/mapagent/mapagent.fcgi?'; +const agentUrl = 'http://138.197.230.93:8008/mapguide/mapagent/mapagent.fcgi?'; const bounds = [ -87.865114442365922, 43.665065564837931, -87.595394059497067, - 43.823852564430069 + 43.823852564430069, ]; const map = new Map({ layers: [ @@ -26,16 +25,16 @@ const map = new Map({ FORMAT: 'PNG', VERSION: '3.0.0', USERNAME: 'OLGuest', - PASSWORD: 'olguest' + PASSWORD: 'olguest', }, - ratio: 2 - }) - }) + ratio: 2, + }), + }), ], target: 'map', view: new View({ center: [-87.7302542509315, 43.744459064634], projection: 'EPSG:4326', - zoom: 12 - }) + zoom: 12, + }), }); diff --git a/examples/measure.js b/examples/measure.js index 37666f4251..6e4b1e2530 100644 --- a/examples/measure.js +++ b/examples/measure.js @@ -1,17 +1,16 @@ -import Map from '../src/ol/Map.js'; -import {unByKey} from '../src/ol/Observable.js'; -import Overlay from '../src/ol/Overlay.js'; -import {getArea, getLength} from '../src/ol/sphere.js'; -import View from '../src/ol/View.js'; -import {LineString, Polygon} from '../src/ol/geom.js'; import Draw from '../src/ol/interaction/Draw.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import Map from '../src/ol/Map.js'; +import Overlay from '../src/ol/Overlay.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; - +import {LineString, Polygon} from '../src/ol/geom.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {getArea, getLength} from '../src/ol/sphere.js'; +import {unByKey} from '../src/ol/Observable.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const source = new VectorSource(); @@ -20,76 +19,68 @@ const vector = new VectorLayer({ source: source, style: new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.2)' + color: 'rgba(255, 255, 255, 0.2)', }), stroke: new Stroke({ color: '#ffcc33', - width: 2 + width: 2, }), image: new CircleStyle({ radius: 7, fill: new Fill({ - color: '#ffcc33' - }) - }) - }) + color: '#ffcc33', + }), + }), + }), }); - /** * Currently drawn feature. * @type {import("../src/ol/Feature.js").default} */ let sketch; - /** * The help tooltip element. * @type {HTMLElement} */ let helpTooltipElement; - /** * Overlay to show the help messages. * @type {Overlay} */ let helpTooltip; - /** * The measure tooltip element. * @type {HTMLElement} */ let measureTooltipElement; - /** * Overlay to show the measurement. * @type {Overlay} */ let measureTooltip; - /** * Message to show when the user is drawing a polygon. * @type {string} */ const continuePolygonMsg = 'Click to continue drawing the polygon'; - /** * Message to show when the user is drawing a line. * @type {string} */ const continueLineMsg = 'Click to continue drawing the line'; - /** * Handle pointer move. * @param {import("../src/ol/MapBrowserEvent").default} evt The event. */ -const pointerMoveHandler = function(evt) { +const pointerMoveHandler = function (evt) { if (evt.dragging) { return; } @@ -111,19 +102,18 @@ const pointerMoveHandler = function(evt) { helpTooltipElement.classList.remove('hidden'); }; - const map = new Map({ layers: [raster, vector], target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 15 - }) + zoom: 15, + }), }); map.on('pointermove', pointerMoveHandler); -map.getViewport().addEventListener('mouseout', function() { +map.getViewport().addEventListener('mouseout', function () { helpTooltipElement.classList.add('hidden'); }); @@ -131,68 +121,62 @@ const typeSelect = document.getElementById('type'); let draw; // global so we can remove it later - /** * Format length output. * @param {LineString} line The line. * @return {string} The formatted length. */ -const formatLength = function(line) { +const formatLength = function (line) { const length = getLength(line); let output; if (length > 100) { - output = (Math.round(length / 1000 * 100) / 100) + - ' ' + 'km'; + output = Math.round((length / 1000) * 100) / 100 + ' ' + 'km'; } else { - output = (Math.round(length * 100) / 100) + - ' ' + 'm'; + output = Math.round(length * 100) / 100 + ' ' + 'm'; } return output; }; - /** * Format area output. * @param {Polygon} polygon The polygon. * @return {string} Formatted area. */ -const formatArea = function(polygon) { +const formatArea = function (polygon) { const area = getArea(polygon); let output; if (area > 10000) { - output = (Math.round(area / 1000000 * 100) / 100) + - ' ' + 'km2'; + output = Math.round((area / 1000000) * 100) / 100 + ' ' + 'km2'; } else { - output = (Math.round(area * 100) / 100) + - ' ' + 'm2'; + output = Math.round(area * 100) / 100 + ' ' + 'm2'; } return output; }; function addInteraction() { - const type = (typeSelect.value == 'area' ? 'Polygon' : 'LineString'); + const type = typeSelect.value == 'area' ? 'Polygon' : 'LineString'; draw = new Draw({ source: source, type: type, style: new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.2)' + color: 'rgba(255, 255, 255, 0.2)', }), stroke: new Stroke({ color: 'rgba(0, 0, 0, 0.5)', lineDash: [10, 10], - width: 2 + width: 2, }), image: new CircleStyle({ radius: 5, stroke: new Stroke({ - color: 'rgba(0, 0, 0, 0.7)' + color: 'rgba(0, 0, 0, 0.7)', }), fill: new Fill({ - color: 'rgba(255, 255, 255, 0.2)' - }) - }) - }) + color: 'rgba(255, 255, 255, 0.2)', + }), + }), + }), }); map.addInteraction(draw); @@ -200,43 +184,40 @@ function addInteraction() { createHelpTooltip(); let listener; - draw.on('drawstart', - function(evt) { - // set sketch - sketch = evt.feature; + draw.on('drawstart', function (evt) { + // set sketch + sketch = evt.feature; - /** @type {import("../src/ol/coordinate.js").Coordinate|undefined} */ - let tooltipCoord = evt.coordinate; + /** @type {import("../src/ol/coordinate.js").Coordinate|undefined} */ + let tooltipCoord = evt.coordinate; - listener = sketch.getGeometry().on('change', function(evt) { - const geom = evt.target; - let output; - if (geom instanceof Polygon) { - output = formatArea(geom); - tooltipCoord = geom.getInteriorPoint().getCoordinates(); - } else if (geom instanceof LineString) { - output = formatLength(geom); - tooltipCoord = geom.getLastCoordinate(); - } - measureTooltipElement.innerHTML = output; - measureTooltip.setPosition(tooltipCoord); - }); + listener = sketch.getGeometry().on('change', function (evt) { + const geom = evt.target; + let output; + if (geom instanceof Polygon) { + output = formatArea(geom); + tooltipCoord = geom.getInteriorPoint().getCoordinates(); + } else if (geom instanceof LineString) { + output = formatLength(geom); + tooltipCoord = geom.getLastCoordinate(); + } + measureTooltipElement.innerHTML = output; + measureTooltip.setPosition(tooltipCoord); }); + }); - draw.on('drawend', - function() { - measureTooltipElement.className = 'ol-tooltip ol-tooltip-static'; - measureTooltip.setOffset([0, -7]); - // unset sketch - sketch = null; - // unset tooltip so that a new one can be created - measureTooltipElement = null; - createMeasureTooltip(); - unByKey(listener); - }); + draw.on('drawend', function () { + measureTooltipElement.className = 'ol-tooltip ol-tooltip-static'; + measureTooltip.setOffset([0, -7]); + // unset sketch + sketch = null; + // unset tooltip so that a new one can be created + measureTooltipElement = null; + createMeasureTooltip(); + unByKey(listener); + }); } - /** * Creates a new help tooltip */ @@ -249,12 +230,11 @@ function createHelpTooltip() { helpTooltip = new Overlay({ element: helpTooltipElement, offset: [15, 0], - positioning: 'center-left' + positioning: 'center-left', }); map.addOverlay(helpTooltip); } - /** * Creates a new measure tooltip */ @@ -267,16 +247,15 @@ function createMeasureTooltip() { measureTooltip = new Overlay({ element: measureTooltipElement, offset: [0, -15], - positioning: 'bottom-center' + positioning: 'bottom-center', }); map.addOverlay(measureTooltip); } - /** * Let user change the geometry type. */ -typeSelect.onchange = function() { +typeSelect.onchange = function () { map.removeInteraction(draw); addInteraction(); }; diff --git a/examples/min-max-resolution.js b/examples/min-max-resolution.js index 062c22b837..27b67b6ab3 100644 --- a/examples/min-max-resolution.js +++ b/examples/min-max-resolution.js @@ -1,10 +1,11 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; import TileJSON from '../src/ol/source/TileJSON.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; /** * Create the map. @@ -14,20 +15,22 @@ const map = new Map({ new TileLayer({ source: new OSM(), minResolution: 200, - maxResolution: 2000 + maxResolution: 2000, }), new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.natural-earth-hypso-bathy.json?secure&access_token=' + key, - crossOrigin: 'anonymous' + url: + 'https://api.tiles.mapbox.com/v4/mapbox.natural-earth-hypso-bathy.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', }), minResolution: 2000, - maxResolution: 20000 - }) + maxResolution: 20000, + }), ], target: 'map', view: new View({ center: [653600, 5723680], - zoom: 5 - }) + zoom: 5, + }), }); diff --git a/examples/min-zoom.js b/examples/min-zoom.js index f37740f9ce..38b0260c93 100644 --- a/examples/min-zoom.js +++ b/examples/min-zoom.js @@ -1,7 +1,7 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const viewport = document.getElementById('map'); @@ -15,20 +15,20 @@ const initialZoom = getMinZoom(); const view = new View({ center: [0, 0], minZoom: initialZoom, - zoom: initialZoom + zoom: initialZoom, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', - view: view + view: view, }); -window.addEventListener('resize', function() { +window.addEventListener('resize', function () { const minZoom = getMinZoom(); if (minZoom !== view.getMinZoom()) { view.setMinZoom(minZoom); diff --git a/examples/mobile-full-screen.js b/examples/mobile-full-screen.js index 80d03d2a5f..1c3bbb701f 100644 --- a/examples/mobile-full-screen.js +++ b/examples/mobile-full-screen.js @@ -1,33 +1,33 @@ +import BingMaps from '../src/ol/source/BingMaps.js'; import Geolocation from '../src/ol/Geolocation.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; -import BingMaps from '../src/ol/source/BingMaps.js'; - +import View from '../src/ol/View.js'; const view = new View({ center: [0, 0], - zoom: 2 + zoom: 2, }); const map = new Map({ layers: [ new TileLayer({ source: new BingMaps({ - key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', - imagerySet: 'RoadOnDemand' - }) - }) + key: + 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', + imagerySet: 'RoadOnDemand', + }), + }), ], target: 'map', - view: view + view: view, }); const geolocation = new Geolocation({ projection: view.getProjection(), - tracking: true + tracking: true, }); -geolocation.once('change:position', function() { +geolocation.once('change:position', function () { view.setCenter(geolocation.getPosition()); view.setResolution(2.388657133911758); }); diff --git a/examples/modify-features.js b/examples/modify-features.js index 3be37f11dc..488508fe35 100644 --- a/examples/modify-features.js +++ b/examples/modify-features.js @@ -1,29 +1,32 @@ +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {defaults as defaultInteractions, Modify, Select} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import { + Modify, + Select, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; - +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const vector = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', format: new GeoJSON(), - wrapX: false - }) + wrapX: false, + }), }); const select = new Select({ - wrapX: false + wrapX: false, }); const modify = new Modify({ - features: select.getFeatures() + features: select.getFeatures(), }); const map = new Map({ @@ -32,6 +35,6 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/modify-test.js b/examples/modify-test.js index b816f467a3..ef141d096e 100644 --- a/examples/modify-test.js +++ b/examples/modify-test.js @@ -1,55 +1,58 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {defaults as defaultInteractions, Modify, Select} from '../src/ol/interaction.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import { + Modify, + Select, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; - -const styleFunction = (function() { +const styleFunction = (function () { const styles = {}; const image = new CircleStyle({ radius: 5, fill: null, - stroke: new Stroke({color: 'orange', width: 2}) + stroke: new Stroke({color: 'orange', width: 2}), }); styles['Point'] = new Style({image: image}); styles['Polygon'] = new Style({ stroke: new Stroke({ color: 'blue', - width: 3 + width: 3, }), fill: new Fill({ - color: 'rgba(0, 0, 255, 0.1)' - }) + color: 'rgba(0, 0, 255, 0.1)', + }), }); styles['MultiLineString'] = new Style({ stroke: new Stroke({ color: 'green', - width: 3 - }) + width: 3, + }), }); styles['MultiPolygon'] = new Style({ stroke: new Stroke({ color: 'yellow', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(255, 255, 0, 0.1)' - }) + color: 'rgba(255, 255, 0, 0.1)', + }), }); styles['default'] = new Style({ stroke: new Stroke({ color: 'red', - width: 3 + width: 3, }), fill: new Fill({ - color: 'rgba(255, 0, 0, 0.1)' + color: 'rgba(255, 0, 0, 0.1)', }), - image: image + image: image, }); - return function(feature) { + return function (feature) { return styles[feature.getGeometry().getType()] || styles['default']; }; })(); @@ -59,115 +62,198 @@ const geojsonObject = { 'crs': { 'type': 'name', 'properties': { - 'name': 'EPSG:3857' - } + 'name': 'EPSG:3857', + }, }, - 'features': [{ - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [0, 0] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'MultiPoint', - 'coordinates': [[-2e6, 0], [0, -2e6]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'LineString', - 'coordinates': [[4e6, -2e6], [8e6, 2e6], [9e6, 2e6]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'LineString', - 'coordinates': [[4e6, -2e6], [8e6, 2e6], [8e6, 3e6]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'Polygon', - 'coordinates': [[[-5e6, -1e6], [-4e6, 1e6], - [-3e6, -1e6], [-5e6, -1e6]], [[-4.5e6, -0.5e6], - [-3.5e6, -0.5e6], [-4e6, 0.5e6], [-4.5e6, -0.5e6]]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'MultiLineString', - 'coordinates': [ - [[-1e6, -7.5e5], [-1e6, 7.5e5]], - [[-1e6, -7.5e5], [-1e6, 7.5e5], [-5e5, 0], [-1e6, -7.5e5]], - [[1e6, -7.5e5], [15e5, 0], [15e5, 0], [1e6, 7.5e5]], - [[-7.5e5, -1e6], [7.5e5, -1e6]], - [[-7.5e5, 1e6], [7.5e5, 1e6]] - ] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'MultiPolygon', - 'coordinates': [ - [[[-5e6, 6e6], [-5e6, 8e6], [-3e6, 8e6], - [-3e6, 6e6], [-5e6, 6e6]]], - [[[-3e6, 6e6], [-2e6, 8e6], [0, 8e6], - [0, 6e6], [-3e6, 6e6]]], - [[[1e6, 6e6], [1e6, 8e6], [3e6, 8e6], - [3e6, 6e6], [1e6, 6e6]]] - ] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'GeometryCollection', - 'geometries': [{ - 'type': 'LineString', - 'coordinates': [[-5e6, -5e6], [0, -5e6]] - }, { + 'features': [ + { + 'type': 'Feature', + 'geometry': { 'type': 'Point', - 'coordinates': [4e6, -5e6] - }, { + 'coordinates': [0, 0], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'MultiPoint', + 'coordinates': [ + [-2e6, 0], + [0, -2e6], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'LineString', + 'coordinates': [ + [4e6, -2e6], + [8e6, 2e6], + [9e6, 2e6], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'LineString', + 'coordinates': [ + [4e6, -2e6], + [8e6, 2e6], + [8e6, 3e6], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { 'type': 'Polygon', 'coordinates': [ - [[1e6, -6e6], [2e6, -4e6], [3e6, -6e6], [1e6, -6e6]] - ] - }] - } - }] + [ + [-5e6, -1e6], + [-4e6, 1e6], + [-3e6, -1e6], + [-5e6, -1e6], + ], + [ + [-4.5e6, -0.5e6], + [-3.5e6, -0.5e6], + [-4e6, 0.5e6], + [-4.5e6, -0.5e6], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'MultiLineString', + 'coordinates': [ + [ + [-1e6, -7.5e5], + [-1e6, 7.5e5], + ], + [ + [-1e6, -7.5e5], + [-1e6, 7.5e5], + [-5e5, 0], + [-1e6, -7.5e5], + ], + [ + [1e6, -7.5e5], + [15e5, 0], + [15e5, 0], + [1e6, 7.5e5], + ], + [ + [-7.5e5, -1e6], + [7.5e5, -1e6], + ], + [ + [-7.5e5, 1e6], + [7.5e5, 1e6], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'MultiPolygon', + 'coordinates': [ + [ + [ + [-5e6, 6e6], + [-5e6, 8e6], + [-3e6, 8e6], + [-3e6, 6e6], + [-5e6, 6e6], + ], + ], + [ + [ + [-3e6, 6e6], + [-2e6, 8e6], + [0, 8e6], + [0, 6e6], + [-3e6, 6e6], + ], + ], + [ + [ + [1e6, 6e6], + [1e6, 8e6], + [3e6, 8e6], + [3e6, 6e6], + [1e6, 6e6], + ], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'GeometryCollection', + 'geometries': [ + { + 'type': 'LineString', + 'coordinates': [ + [-5e6, -5e6], + [0, -5e6], + ], + }, + { + 'type': 'Point', + 'coordinates': [4e6, -5e6], + }, + { + 'type': 'Polygon', + 'coordinates': [ + [ + [1e6, -6e6], + [2e6, -4e6], + [3e6, -6e6], + [1e6, -6e6], + ], + ], + }, + ], + }, + }, + ], }; const source = new VectorSource({ - features: (new GeoJSON()).readFeatures(geojsonObject) + features: new GeoJSON().readFeatures(geojsonObject), }); const layer = new VectorLayer({ source: source, - style: styleFunction + style: styleFunction, }); -const overlayStyle = (function() { +const overlayStyle = (function () { const styles = {}; styles['Polygon'] = [ new Style({ fill: new Fill({ - color: [255, 255, 255, 0.5] - }) + color: [255, 255, 255, 0.5], + }), }), new Style({ stroke: new Stroke({ color: [255, 255, 255, 1], - width: 5 - }) + width: 5, + }), }), new Style({ stroke: new Stroke({ color: [0, 153, 255, 1], - width: 3 - }) - }) + width: 3, + }), + }), ]; styles['MultiPolygon'] = styles['Polygon']; @@ -175,15 +261,15 @@ const overlayStyle = (function() { new Style({ stroke: new Stroke({ color: [255, 255, 255, 1], - width: 5 - }) + width: 5, + }), }), new Style({ stroke: new Stroke({ color: [0, 153, 255, 1], - width: 3 - }) - }) + width: 3, + }), + }), ]; styles['MultiLineString'] = styles['LineString']; @@ -192,38 +278,44 @@ const overlayStyle = (function() { image: new CircleStyle({ radius: 7, fill: new Fill({ - color: [0, 153, 255, 1] + color: [0, 153, 255, 1], }), stroke: new Stroke({ color: [255, 255, 255, 0.75], - width: 1.5 - }) + width: 1.5, + }), }), - zIndex: 100000 - }) + zIndex: 100000, + }), ]; styles['MultiPoint'] = styles['Point']; styles['GeometryCollection'] = styles['Polygon'].concat(styles['Point']); - return function(feature) { + return function (feature) { return styles[feature.getGeometry().getType()]; }; })(); const select = new Select({ - style: overlayStyle + style: overlayStyle, }); const modify = new Modify({ features: select.getFeatures(), style: overlayStyle, - insertVertexCondition: function() { + insertVertexCondition: function () { // prevent new vertices to be added to the polygons - return !select.getFeatures().getArray().every(function(feature) { - return feature.getGeometry().getType().match(/Polygon/); - }); - } + return !select + .getFeatures() + .getArray() + .every(function (feature) { + return feature + .getGeometry() + .getType() + .match(/Polygon/); + }); + }, }); const map = new Map({ @@ -233,6 +325,6 @@ const map = new Map({ view: new View({ center: [0, 1000000], zoom: 2, - multiWorld: true - }) + multiWorld: true, + }), }); diff --git a/examples/mouse-position.js b/examples/mouse-position.js index aaf4d51c89..5b198c3030 100644 --- a/examples/mouse-position.js +++ b/examples/mouse-position.js @@ -1,10 +1,10 @@ import Map from '../src/ol/Map.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 {createStringXY} from '../src/ol/coordinate.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {createStringXY} from '../src/ol/coordinate.js'; +import {defaults as defaultControls} from '../src/ol/control.js'; const mousePositionControl = new MousePosition({ coordinateFormat: createStringXY(4), @@ -13,30 +13,30 @@ const mousePositionControl = new MousePosition({ // be placed within the map. className: 'custom-mouse-position', target: document.getElementById('mouse-position'), - undefinedHTML: ' ' + undefinedHTML: ' ', }); const map = new Map({ controls: defaultControls().extend([mousePositionControl]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const projectionSelect = document.getElementById('projection'); -projectionSelect.addEventListener('change', function(event) { +projectionSelect.addEventListener('change', function (event) { mousePositionControl.setProjection(event.target.value); }); const precisionInput = document.getElementById('precision'); -precisionInput.addEventListener('change', function(event) { +precisionInput.addEventListener('change', function (event) { const format = createStringXY(event.target.valueAsNumber); mousePositionControl.setCoordinateFormat(format); }); diff --git a/examples/moveend.js b/examples/moveend.js index da762ed600..17d69ef0c2 100644 --- a/examples/moveend.js +++ b/examples/moveend.js @@ -1,22 +1,21 @@ import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; import {getBottomLeft, getTopRight} from '../src/ol/extent.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import {toLonLat} from '../src/ol/proj.js'; -import OSM from '../src/ol/source/OSM.js'; - const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); function display(id, value) { @@ -25,7 +24,7 @@ function display(id, value) { function wrapLon(value) { const worlds = Math.floor((value + 180) / 360); - return value - (worlds * 360); + return value - worlds * 360; } function onMoveEnd(evt) { diff --git a/examples/navigation-controls.js b/examples/navigation-controls.js index 9b4ed18b34..6d63b19139 100644 --- a/examples/navigation-controls.js +++ b/examples/navigation-controls.js @@ -1,27 +1,28 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, ZoomToExtent} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {ZoomToExtent, defaults as defaultControls} from '../src/ol/control.js'; const map = new Map({ controls: defaultControls().extend([ new ZoomToExtent({ extent: [ - 813079.7791264898, 5929220.284081122, - 848966.9639063801, 5936863.986909639 - ] - }) + 813079.7791264898, + 5929220.284081122, + 848966.9639063801, + 5936863.986909639, + ], + }), ]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/offscreen-canvas.js b/examples/offscreen-canvas.js index 180e5c990e..c70de0afcb 100644 --- a/examples/offscreen-canvas.js +++ b/examples/offscreen-canvas.js @@ -1,17 +1,22 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Layer from '../src/ol/layer/Layer.js'; +import Map from '../src/ol/Map.js'; +import Source from '../src/ol/source/Source.js'; +import View from '../src/ol/View.js'; import Worker from 'worker-loader!./offscreen-canvas.worker.js'; //eslint-disable-line +import stringify from 'json-stringify-safe'; +import {FullScreen} from '../src/ol/control.js'; import {compose, create} from '../src/ol/transform.js'; import {createTransformString} from '../src/ol/render/canvas.js'; import {createXYZ} from '../src/ol/tilegrid.js'; -import {FullScreen} from '../src/ol/control.js'; -import stringify from 'json-stringify-safe'; -import Source from '../src/ol/source/Source.js'; const worker = new Worker(); -let container, transformContainer, canvas, rendering, workerFrameState, mainThreadFrameState; +let container, + transformContainer, + canvas, + rendering, + workerFrameState, + mainThreadFrameState; // Transform the container to account for the differnece between the (newer) // main thread frameState and the (older) worker frameState @@ -29,12 +34,16 @@ function updateContainerTransform() { // Skip the extra transform for rotated views, because it will not work // correctly in that case if (!rotation) { - compose(transform, + compose( + transform, (renderedCenter[0] - center[0]) / resolution, (center[1] - renderedCenter[1]) / resolution, - renderedResolution / resolution, renderedResolution / resolution, + renderedResolution / resolution, + renderedResolution / resolution, rotation - renderedRotation, - 0, 0); + 0, + 0 + ); } transformContainer.style.transform = createTransformString(transform); } @@ -43,7 +52,7 @@ function updateContainerTransform() { const map = new Map({ layers: [ new Layer({ - render: function(frameState) { + render: function (frameState) { if (!container) { container = document.createElement('div'); container.style.position = 'absolute'; @@ -66,7 +75,7 @@ const map = new Map({ rendering = true; worker.postMessage({ action: 'render', - frameState: JSON.parse(stringify(frameState)) + frameState: JSON.parse(stringify(frameState)), }); } else { frameState.animate = true; @@ -76,34 +85,39 @@ const map = new Map({ source: new Source({ attributions: [ '© MapTiler', - '© OpenStreetMap contributors' - ] - }) - }) + '© OpenStreetMap contributors', + ], + }), + }), ], target: 'map', view: new View({ resolutions: createXYZ({tileSize: 512}).getResolutions89, center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); map.addControl(new FullScreen()); // Worker messaging and actions -worker.addEventListener('message', message => { +worker.addEventListener('message', (message) => { if (message.data.action === 'loadImage') { // Image loader for ol-mapbox-style const image = new Image(); image.crossOrigin = 'anonymous'; - image.addEventListener('load', function() { - createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => { - worker.postMessage({ - action: 'imageLoaded', - image: imageBitmap, - src: message.data.src - }, [imageBitmap]); - }); + image.addEventListener('load', function () { + createImageBitmap(image, 0, 0, image.width, image.height).then( + (imageBitmap) => { + worker.postMessage( + { + action: 'imageLoaded', + image: imageBitmap, + src: message.data.src, + }, + [imageBitmap] + ); + } + ); }); image.src = event.data.src; } else if (message.data.action === 'requestRender') { @@ -111,7 +125,7 @@ worker.addEventListener('message', message => { map.render(); } else if (canvas && message.data.action === 'rendered') { // Worker provies a new render frame - requestAnimationFrame(function() { + requestAnimationFrame(function () { const imageData = message.data.imageData; canvas.width = imageData.width; canvas.height = imageData.height; diff --git a/examples/offscreen-canvas.worker.js b/examples/offscreen-canvas.worker.js index b03f0be61d..ce33a656c5 100644 --- a/examples/offscreen-canvas.worker.js +++ b/examples/offscreen-canvas.worker.js @@ -1,13 +1,13 @@ +import MVT from '../src/ol/format/MVT.js'; +import TileQueue from '../src/ol/TileQueue.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; -import MVT from '../src/ol/format/MVT.js'; -import {Projection} from '../src/ol/proj.js'; -import TileQueue from '../src/ol/TileQueue.js'; -import {getTilePriority as tilePriorityFunction} from '../src/ol/TileQueue.js'; -import {renderDeclutterItems} from '../src/ol/render.js'; -import styleFunction from 'ol-mapbox-style/dist/stylefunction.js'; -import {inView} from '../src/ol/layer/Layer.js'; import stringify from 'json-stringify-safe'; +import styleFunction from 'ol-mapbox-style/dist/stylefunction.js'; +import {Projection} from '../src/ol/proj.js'; +import {inView} from '../src/ol/layer/Layer.js'; +import {renderDeclutterItems} from '../src/ol/render.js'; +import {getTilePriority as tilePriorityFunction} from '../src/ol/TileQueue.js'; /** @type {any} */ const worker = self; @@ -22,89 +22,113 @@ const sources = { landcover: new VectorTileSource({ maxZoom: 9, format: new MVT(), - url: 'https://api.maptiler.com/tiles/landcover/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' + url: + 'https://api.maptiler.com/tiles/landcover/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB', }), contours: new VectorTileSource({ minZoom: 9, maxZoom: 14, format: new MVT(), - url: 'https://api.maptiler.com/tiles/contours/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' + url: + 'https://api.maptiler.com/tiles/contours/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB', }), openmaptiles: new VectorTileSource({ format: new MVT(), maxZoom: 14, - url: 'https://api.maptiler.com/tiles/v3/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB' - }) + url: + 'https://api.maptiler.com/tiles/v3/{z}/{x}/{y}.pbf?key=get_your_own_D6rA4zTHduk6KOKTXzGB', + }), }; const layers = []; // Font replacement so we do not need to load web fonts in the worker function getFont(font) { - return font[0] - .replace('Noto Sans', 'serif') - .replace('Roboto', 'sans-serif'); + return font[0].replace('Noto Sans', 'serif').replace('Roboto', 'sans-serif'); } function loadStyles() { - const styleUrl = 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB'; + const styleUrl = + 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB'; - fetch(styleUrl).then(data => data.json()).then(styleJson => { - const buckets = []; - let currentSource; - styleJson.layers.forEach(layer => { - if (!layer.source) { - return; - } - if (currentSource !== layer.source) { - currentSource = layer.source; - buckets.push({ - source: layer.source, - layers: [] - }); - } - buckets[buckets.length - 1].layers.push(layer.id); - }); - - const spriteUrl = styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.json'; - const spriteImageUrl = styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.png'; - fetch(spriteUrl).then(data => data.json()).then(spriteJson => { - buckets.forEach(bucket => { - const source = sources[bucket.source]; - if (!source) { + fetch(styleUrl) + .then((data) => data.json()) + .then((styleJson) => { + const buckets = []; + let currentSource; + styleJson.layers.forEach((layer) => { + if (!layer.source) { return; } - const layer = new VectorTileLayer({ - declutter: true, - source, - minZoom: source.getTileGrid().getMinZoom() - }); - layer.getRenderer().useContainer = function(target, transform) { - this.containerReused = this.getLayer() !== layers[0]; - this.canvas = canvas; - this.context = context; - this.container = { - firstElementChild: canvas - }; - rendererTransform = transform; - }; - styleFunction(layer, styleJson, bucket.layers, undefined, spriteJson, spriteImageUrl, getFont); - layers.push(layer); + if (currentSource !== layer.source) { + currentSource = layer.source; + buckets.push({ + source: layer.source, + layers: [], + }); + } + buckets[buckets.length - 1].layers.push(layer.id); }); - worker.postMessage({action: 'requestRender'}); + + const spriteUrl = + styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.json'; + const spriteImageUrl = + styleJson.sprite + (pixelRatio > 1 ? '@2x' : '') + '.png'; + fetch(spriteUrl) + .then((data) => data.json()) + .then((spriteJson) => { + buckets.forEach((bucket) => { + const source = sources[bucket.source]; + if (!source) { + return; + } + const layer = new VectorTileLayer({ + declutter: true, + source, + minZoom: source.getTileGrid().getMinZoom(), + }); + layer.getRenderer().useContainer = function (target, transform) { + this.containerReused = this.getLayer() !== layers[0]; + this.canvas = canvas; + this.context = context; + this.container = { + firstElementChild: canvas, + }; + rendererTransform = transform; + }; + styleFunction( + layer, + styleJson, + bucket.layers, + undefined, + spriteJson, + spriteImageUrl, + getFont + ); + layers.push(layer); + }); + worker.postMessage({action: 'requestRender'}); + }); }); - }); } // Minimal map-like functionality for rendering const tileQueue = new TileQueue( - (tile, tileSourceKey, tileCenter, tileResolution) => tilePriorityFunction(frameState, tile, tileSourceKey, tileCenter, tileResolution), - () => worker.postMessage({action: 'requestRender'})); + (tile, tileSourceKey, tileCenter, tileResolution) => + tilePriorityFunction( + frameState, + tile, + tileSourceKey, + tileCenter, + tileResolution + ), + () => worker.postMessage({action: 'requestRender'}) +); const maxTotalLoading = 8; const maxNewLoads = 2; -worker.addEventListener('message', event => { +worker.addEventListener('message', (event) => { if (event.data.action !== 'render') { return; } @@ -115,7 +139,7 @@ worker.addEventListener('message', event => { } frameState.tileQueue = tileQueue; frameState.viewState.projection.__proto__ = Projection.prototype; - layers.forEach(layer => { + layers.forEach((layer) => { if (inView(layer.getLayerState(), frameState.viewState)) { const renderer = layer.getRenderer(); renderer.renderFrame(frameState, canvas); @@ -127,10 +151,13 @@ worker.addEventListener('message', event => { tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads); } const imageData = canvas.transferToImageBitmap(); - worker.postMessage({ - action: 'rendered', - imageData: imageData, - transform: rendererTransform, - frameState: JSON.parse(stringify(frameState)) - }, [imageData]); + worker.postMessage( + { + action: 'rendered', + imageData: imageData, + transform: rendererTransform, + frameState: JSON.parse(stringify(frameState)), + }, + [imageData] + ); }); diff --git a/examples/osm-vector-tiles.js b/examples/osm-vector-tiles.js index e7211986fd..5ca899ddc3 100644 --- a/examples/osm-vector-tiles.js +++ b/examples/osm-vector-tiles.js @@ -1,10 +1,10 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TopoJSON from '../src/ol/format/TopoJSON.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; -import {fromLonLat} from '../src/ol/proj.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style} from '../src/ol/style.js'; +import {fromLonLat} from '../src/ol/proj.js'; const key = 'uZNs91nMR-muUTP99MyBSg'; @@ -12,24 +12,24 @@ const roadStyleCache = {}; const roadColor = { 'major_road': '#776', 'minor_road': '#ccb', - 'highway': '#f39' + 'highway': '#f39', }; const buildingStyle = new Style({ fill: new Fill({ color: '#666', - opacity: 0.4 + opacity: 0.4, }), stroke: new Stroke({ color: '#444', - width: 1 - }) + width: 1, + }), }); const waterStyle = new Style({ fill: new Fill({ - color: '#9db9e8' - }) + color: '#9db9e8', + }), }); -const roadStyle = function(feature) { +const roadStyle = function (feature) { const kind = feature.get('kind'); const railway = feature.get('railway'); const sort_key = feature.get('sort_key'); @@ -47,9 +47,9 @@ const roadStyle = function(feature) { style = new Style({ stroke: new Stroke({ color: color, - width: width + width: width, }), - zIndex: sort_key + zIndex: sort_key, }); roadStyleCache[styleKey] = style; } @@ -60,29 +60,36 @@ const map = new Map({ layers: [ new VectorTileLayer({ source: new VectorTileSource({ - attributions: '© OpenStreetMap contributors, Who’s On First, ' + - 'Natural Earth, and openstreetmapdata.com', + attributions: + '© OpenStreetMap contributors, Who’s On First, ' + + 'Natural Earth, and openstreetmapdata.com', format: new TopoJSON({ layerName: 'layer', - layers: ['water', 'roads', 'buildings'] + layers: ['water', 'roads', 'buildings'], }), maxZoom: 19, - url: 'https://tile.nextzen.org/tilezen/vector/v1/all/{z}/{x}/{y}.topojson?api_key=' + key + url: + 'https://tile.nextzen.org/tilezen/vector/v1/all/{z}/{x}/{y}.topojson?api_key=' + + key, }), - style: function(feature, resolution) { + style: function (feature, resolution) { switch (feature.get('layer')) { - case 'water': return waterStyle; - case 'roads': return roadStyle(feature); - case 'buildings': return (resolution < 10) ? buildingStyle : null; - default: return null; + case 'water': + return waterStyle; + case 'roads': + return roadStyle(feature); + case 'buildings': + return resolution < 10 ? buildingStyle : null; + default: + return null; } - } - }) + }, + }), ], target: 'map', view: new View({ center: fromLonLat([-74.0064, 40.7142]), maxZoom: 19, - zoom: 15 - }) + zoom: 15, + }), }); diff --git a/examples/overlay.js b/examples/overlay.js index be9a65040d..6c1d2fd08a 100644 --- a/examples/overlay.js +++ b/examples/overlay.js @@ -1,14 +1,13 @@ import Map from '../src/ol/Map.js'; -import Overlay from '../src/ol/Overlay.js'; -import View from '../src/ol/View.js'; -import {toStringHDMS} from '../src/ol/coordinate.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat, toLonLat} from '../src/ol/proj.js'; import OSM from '../src/ol/source/OSM.js'; - +import Overlay from '../src/ol/Overlay.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {fromLonLat, toLonLat} from '../src/ol/proj.js'; +import {toStringHDMS} from '../src/ol/coordinate.js'; const layer = new TileLayer({ - source: new OSM() + source: new OSM(), }); const map = new Map({ @@ -16,8 +15,8 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const pos = fromLonLat([16.3725, 48.208889]); @@ -27,24 +26,24 @@ const marker = new Overlay({ position: pos, positioning: 'center-center', element: document.getElementById('marker'), - stopEvent: false + stopEvent: false, }); map.addOverlay(marker); // Vienna label const vienna = new Overlay({ position: pos, - element: document.getElementById('vienna') + element: document.getElementById('vienna'), }); map.addOverlay(vienna); // Popup showing the position the user clicked const popup = new Overlay({ - element: document.getElementById('popup') + element: document.getElementById('popup'), }); map.addOverlay(popup); -map.on('click', function(evt) { +map.on('click', function (evt) { const element = popup.getElement(); const coordinate = evt.coordinate; const hdms = toStringHDMS(toLonLat(coordinate)); @@ -55,7 +54,7 @@ map.on('click', function(evt) { placement: 'top', animation: false, html: true, - content: '

    The location you clicked was:

    ' + hdms + '' + content: '

    The location you clicked was:

    ' + hdms + '', }); $(element).popover('show'); }); diff --git a/examples/overviewmap-custom.js b/examples/overviewmap-custom.js index e82ff9ceb4..96844c83cc 100644 --- a/examples/overviewmap-custom.js +++ b/examples/overviewmap-custom.js @@ -1,10 +1,12 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, OverviewMap} from '../src/ol/control.js'; -import {defaults as defaultInteractions, DragRotateAndZoom} from '../src/ol/interaction.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import { + DragRotateAndZoom, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; +import {OverviewMap, defaults as defaultControls} from '../src/ol/control.js'; const rotateWithView = document.getElementById('rotateWithView'); @@ -14,35 +16,32 @@ const overviewMapControl = new OverviewMap({ layers: [ new TileLayer({ source: new OSM({ - 'url': 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + - '?apikey=0e6fc415256d4fbb9b5166a718591d71' - }) - }) + 'url': + 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + + '?apikey=0e6fc415256d4fbb9b5166a718591d71', + }), + }), ], collapseLabel: '\u00BB', label: '\u00AB', - collapsed: false + collapsed: false, }); -rotateWithView.addEventListener('change', function() { +rotateWithView.addEventListener('change', function () { overviewMapControl.setRotateWithView(this.checked); }); const map = new Map({ - controls: defaultControls().extend([ - overviewMapControl - ]), - interactions: defaultInteractions().extend([ - new DragRotateAndZoom() - ]), + controls: defaultControls().extend([overviewMapControl]), + interactions: defaultInteractions().extend([new DragRotateAndZoom()]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [500000, 6000000], - zoom: 7 - }) + zoom: 7, + }), }); diff --git a/examples/overviewmap.js b/examples/overviewmap.js index a740254a40..d468729bba 100644 --- a/examples/overviewmap.js +++ b/examples/overviewmap.js @@ -1,30 +1,28 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, OverviewMap} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {OverviewMap, defaults as defaultControls} from '../src/ol/control.js'; const source = new OSM(); const overviewMapControl = new OverviewMap({ layers: [ new TileLayer({ - source: source - }) - ] + source: source, + }), + ], }); const map = new Map({ - controls: defaultControls().extend([ - overviewMapControl - ]), + controls: defaultControls().extend([overviewMapControl]), layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], target: 'map', view: new View({ center: [500000, 6000000], - zoom: 7 - }) + zoom: 7, + }), }); diff --git a/examples/page-scroll.js b/examples/page-scroll.js index e128b8e9ec..3c60ab0748 100644 --- a/examples/page-scroll.js +++ b/examples/page-scroll.js @@ -1,18 +1,17 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/permalink.js b/examples/permalink.js index c41d25846a..c62ee3e4f7 100644 --- a/examples/permalink.js +++ b/examples/permalink.js @@ -1,7 +1,7 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; // default zoom, center and rotation let zoom = 2; @@ -14,10 +14,7 @@ if (window.location.hash !== '') { const parts = hash.split('/'); if (parts.length === 4) { zoom = parseInt(parts[0], 10); - center = [ - parseFloat(parts[1]), - parseFloat(parts[2]) - ]; + center = [parseFloat(parts[1]), parseFloat(parts[2])]; rotation = parseFloat(parts[3]); } } @@ -25,20 +22,20 @@ if (window.location.hash !== '') { const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: center, zoom: zoom, - rotation: rotation - }) + rotation: rotation, + }), }); let shouldUpdate = true; const view = map.getView(); -const updatePermalink = function() { +const updatePermalink = function () { if (!shouldUpdate) { // do not update the URL when the view was changed in the 'popstate' handler shouldUpdate = true; @@ -46,15 +43,19 @@ const updatePermalink = function() { } const center = view.getCenter(); - const hash = '#map=' + - view.getZoom() + '/' + - Math.round(center[0] * 100) / 100 + '/' + - Math.round(center[1] * 100) / 100 + '/' + - view.getRotation(); + const hash = + '#map=' + + view.getZoom() + + '/' + + Math.round(center[0] * 100) / 100 + + '/' + + Math.round(center[1] * 100) / 100 + + '/' + + view.getRotation(); const state = { zoom: view.getZoom(), center: view.getCenter(), - rotation: view.getRotation() + rotation: view.getRotation(), }; window.history.pushState(state, 'map', hash); }; @@ -63,7 +64,7 @@ map.on('moveend', updatePermalink); // restore the view state when navigating through the history, see // https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate -window.addEventListener('popstate', function(event) { +window.addEventListener('popstate', function (event) { if (event.state === null) { return; } diff --git a/examples/pinch-zoom.js b/examples/pinch-zoom.js index 0fba1794c9..0a750dc82f 100644 --- a/examples/pinch-zoom.js +++ b/examples/pinch-zoom.js @@ -1,23 +1,23 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultInteractions, PinchZoom} from '../src/ol/interaction.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import { + PinchZoom, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; const map = new Map({ - interactions: defaultInteractions().extend([ - new PinchZoom() - ]), + interactions: defaultInteractions().extend([new PinchZoom()]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], zoom: 2, - constrainResolution: true - }) + constrainResolution: true, + }), }); diff --git a/examples/polygon-styles.js b/examples/polygon-styles.js index 7f1a03e1c2..edc37b892f 100644 --- a/examples/polygon-styles.js +++ b/examples/polygon-styles.js @@ -1,9 +1,9 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; import MultiPoint from '../src/ol/geom/MultiPoint.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; const styles = [ @@ -17,25 +17,25 @@ const styles = [ new Style({ stroke: new Stroke({ color: 'blue', - width: 3 + width: 3, }), fill: new Fill({ - color: 'rgba(0, 0, 255, 0.1)' - }) + color: 'rgba(0, 0, 255, 0.1)', + }), }), new Style({ image: new CircleStyle({ radius: 5, fill: new Fill({ - color: 'orange' - }) + color: 'orange', + }), }), - geometry: function(feature) { + geometry: function (feature) { // return the coordinates of the first ring of the polygon const coordinates = feature.getGeometry().getCoordinates()[0]; return new MultiPoint(coordinates); - } - }) + }, + }), ]; const geojsonObject = { @@ -43,47 +43,79 @@ const geojsonObject = { 'crs': { 'type': 'name', 'properties': { - 'name': 'EPSG:3857' - } + 'name': 'EPSG:3857', + }, }, - 'features': [{ - 'type': 'Feature', - 'geometry': { - 'type': 'Polygon', - 'coordinates': [[[-5e6, 6e6], [-5e6, 8e6], [-3e6, 8e6], - [-3e6, 6e6], [-5e6, 6e6]]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'Polygon', - 'coordinates': [[[-2e6, 6e6], [-2e6, 8e6], [0, 8e6], - [0, 6e6], [-2e6, 6e6]]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'Polygon', - 'coordinates': [[[1e6, 6e6], [1e6, 8e6], [3e6, 8e6], - [3e6, 6e6], [1e6, 6e6]]] - } - }, { - 'type': 'Feature', - 'geometry': { - 'type': 'Polygon', - 'coordinates': [[[-2e6, -1e6], [-1e6, 1e6], - [0, -1e6], [-2e6, -1e6]]] - } - }] + 'features': [ + { + 'type': 'Feature', + 'geometry': { + 'type': 'Polygon', + 'coordinates': [ + [ + [-5e6, 6e6], + [-5e6, 8e6], + [-3e6, 8e6], + [-3e6, 6e6], + [-5e6, 6e6], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'Polygon', + 'coordinates': [ + [ + [-2e6, 6e6], + [-2e6, 8e6], + [0, 8e6], + [0, 6e6], + [-2e6, 6e6], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'Polygon', + 'coordinates': [ + [ + [1e6, 6e6], + [1e6, 8e6], + [3e6, 8e6], + [3e6, 6e6], + [1e6, 6e6], + ], + ], + }, + }, + { + 'type': 'Feature', + 'geometry': { + 'type': 'Polygon', + 'coordinates': [ + [ + [-2e6, -1e6], + [-1e6, 1e6], + [0, -1e6], + [-2e6, -1e6], + ], + ], + }, + }, + ], }; const source = new VectorSource({ - features: (new GeoJSON()).readFeatures(geojsonObject) + features: new GeoJSON().readFeatures(geojsonObject), }); const layer = new VectorLayer({ source: source, - style: styles + style: styles, }); const map = new Map({ @@ -91,6 +123,6 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 3000000], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/popup.js b/examples/popup.js index bb50da8fed..122e50f5dc 100644 --- a/examples/popup.js +++ b/examples/popup.js @@ -1,12 +1,13 @@ import Map from '../src/ol/Map.js'; import Overlay from '../src/ol/Overlay.js'; -import View from '../src/ol/View.js'; -import {toStringHDMS} from '../src/ol/coordinate.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {toLonLat} from '../src/ol/proj.js'; import TileJSON from '../src/ol/source/TileJSON.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {toLonLat} from '../src/ol/proj.js'; +import {toStringHDMS} from '../src/ol/coordinate.js'; -const key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; +const key = + 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; /** * Elements that make up the popup. @@ -15,7 +16,6 @@ const container = document.getElementById('popup'); const content = document.getElementById('popup-content'); const closer = document.getElementById('popup-closer'); - /** * Create an overlay to anchor the popup to the map. */ @@ -23,22 +23,20 @@ const overlay = new Overlay({ element: container, autoPan: true, autoPanAnimation: { - duration: 250 - } + duration: 250, + }, }); - /** * Add a click handler to hide the popup. * @return {boolean} Don't follow the href. */ -closer.onclick = function() { +closer.onclick = function () { overlay.setPosition(undefined); closer.blur(); return false; }; - /** * Create the map. */ @@ -46,28 +44,28 @@ const map = new Map({ layers: [ new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.natural-earth-hypso-bathy.json?access_token=' + key, - crossOrigin: 'anonymous' - }) - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.natural-earth-hypso-bathy.json?access_token=' + + key, + crossOrigin: 'anonymous', + }), + }), ], overlays: [overlay], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); - /** * Add a click handler to the map to render the popup. */ -map.on('singleclick', function(evt) { +map.on('singleclick', function (evt) { const coordinate = evt.coordinate; const hdms = toStringHDMS(toLonLat(coordinate)); - content.innerHTML = '

    You clicked here:

    ' + hdms + - ''; + content.innerHTML = '

    You clicked here:

    ' + hdms + ''; overlay.setPosition(coordinate); }); diff --git a/examples/preload.js b/examples/preload.js index 6bf91a82ad..4ee22ba30c 100644 --- a/examples/preload.js +++ b/examples/preload.js @@ -1,12 +1,11 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import BingMaps from '../src/ol/source/BingMaps.js'; - +import Map from '../src/ol/Map.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const view = new View({ center: [-4808600, -2620936], - zoom: 8 + zoom: 8, }); const map1 = new Map({ @@ -14,13 +13,14 @@ const map1 = new Map({ new TileLayer({ preload: Infinity, source: new BingMaps({ - key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', - imagerySet: 'Aerial' - }) - }) + key: + 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', + imagerySet: 'Aerial', + }), + }), ], target: 'map1', - view: view + view: view, }); const map2 = new Map({ @@ -28,11 +28,12 @@ const map2 = new Map({ new TileLayer({ preload: 0, // default value source: new BingMaps({ - key: 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', - imagerySet: 'AerialWithLabelsOnDemand' - }) - }) + key: + 'ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp ', + imagerySet: 'AerialWithLabelsOnDemand', + }), + }), ], target: 'map2', - view: view + view: view, }); diff --git a/examples/print-to-scale.js b/examples/print-to-scale.js index ec8ef2ae23..75f702ec99 100644 --- a/examples/print-to-scale.js +++ b/examples/print-to-scale.js @@ -1,18 +1,20 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, ScaleLine} from '../src/ol/control.js'; -import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; import TileLayer from '../src/ol/layer/Tile.js'; -import {get as getProjection, getPointResolution} from '../src/ol/proj.js'; -import {register} from '../src/ol/proj/proj4.js'; +import View from '../src/ol/View.js'; import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; +import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; import proj4 from 'proj4'; +import {ScaleLine, defaults as defaultControls} from '../src/ol/control.js'; +import {getPointResolution, get as getProjection} from '../src/ol/proj.js'; +import {register} from '../src/ol/proj/proj4.js'; - -proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + +proj4.defs( + 'EPSG:27700', + '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + '+x_0=400000 +y_0=-100000 +ellps=airy ' + '+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' + - '+units=m +no_defs'); + '+units=m +no_defs' +); register(proj4); @@ -21,55 +23,55 @@ proj27700.setExtent([0, 0, 700000, 1300000]); const raster = new TileLayer(); -const url = 'https://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/OS_Open_Raster/MapServer/WMTS'; +const url = + 'https://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/OS_Open_Raster/MapServer/WMTS'; fetch(url) - .then(function(response) { + .then(function (response) { return response.text(); }) - .then(function(text) { + .then(function (text) { const result = new WMTSCapabilities().read(text); const options = optionsFromCapabilities(result, { - layer: 'OS_Open_Raster' + layer: 'OS_Open_Raster', }); - options.attributions = 'Contains OS data © Crown Copyright and database right ' + new Date().getFullYear(); + options.attributions = + 'Contains OS data © Crown Copyright and database right ' + + new Date().getFullYear(); options.crossOrigin = ''; options.projection = proj27700; options.wrapX = false; raster.setSource(new WMTS(options)); }); - const map = new Map({ layers: [raster], controls: defaultControls({ - attributionOptions: {collapsible: false} + attributionOptions: {collapsible: false}, }), target: 'map', view: new View({ center: [373500, 436500], projection: proj27700, - zoom: 7 - }) + zoom: 7, + }), }); const scaleLine = new ScaleLine({bar: true, text: true, minWidth: 125}); map.addControl(scaleLine); - const dims = { a0: [1189, 841], a1: [841, 594], a2: [594, 420], a3: [420, 297], a4: [297, 210], - a5: [210, 148] + a5: [210, 148], }; - // export options for html-to-image. // See: https://github.com/bubkoo/html-to-image#options const exportOptions = { - filter: function(element) { + filter: function (element) { const className = element.className || ''; return ( className.indexOf('ol-control') === -1 || @@ -77,52 +79,58 @@ const exportOptions = { (className.indexOf('ol-attribution') > -1 && className.indexOf('ol-uncollapsible')) ); - } + }, }; const exportButton = document.getElementById('export-pdf'); -exportButton.addEventListener('click', function() { +exportButton.addEventListener( + 'click', + function () { + exportButton.disabled = true; + document.body.style.cursor = 'progress'; - exportButton.disabled = true; - document.body.style.cursor = 'progress'; + const format = document.getElementById('format').value; + const resolution = document.getElementById('resolution').value; + const scale = document.getElementById('scale').value; + const dim = dims[format]; + const width = Math.round((dim[0] * resolution) / 25.4); + const height = Math.round((dim[1] * resolution) / 25.4); + const viewResolution = map.getView().getResolution(); + const scaleResolution = + scale / + getPointResolution( + map.getView().getProjection(), + resolution / 25.4, + map.getView().getCenter() + ); - const format = document.getElementById('format').value; - const resolution = document.getElementById('resolution').value; - const scale = document.getElementById('scale').value; - const dim = dims[format]; - const width = Math.round(dim[0] * resolution / 25.4); - const height = Math.round(dim[1] * resolution / 25.4); - const viewResolution = map.getView().getResolution(); - const scaleResolution = scale / getPointResolution( - map.getView().getProjection(), - resolution / 25.4, - map.getView().getCenter() - ); - - map.once('rendercomplete', function() { - exportOptions.width = width; - exportOptions.height = height; - domtoimage.toJpeg(map.getViewport(), exportOptions).then(function(dataUrl) { - const pdf = new jsPDF('landscape', undefined, format); - pdf.addImage(dataUrl, 'JPEG', 0, 0, dim[0], dim[1]); - pdf.save('map.pdf'); - // Reset original map size - scaleLine.setDpi(); - map.getTargetElement().style.width = ''; - map.getTargetElement().style.height = ''; - map.updateSize(); - map.getView().setResolution(viewResolution); - exportButton.disabled = false; - document.body.style.cursor = 'auto'; + map.once('rendercomplete', function () { + exportOptions.width = width; + exportOptions.height = height; + domtoimage + .toJpeg(map.getViewport(), exportOptions) + .then(function (dataUrl) { + const pdf = new jsPDF('landscape', undefined, format); + pdf.addImage(dataUrl, 'JPEG', 0, 0, dim[0], dim[1]); + pdf.save('map.pdf'); + // Reset original map size + scaleLine.setDpi(); + map.getTargetElement().style.width = ''; + map.getTargetElement().style.height = ''; + map.updateSize(); + map.getView().setResolution(viewResolution); + exportButton.disabled = false; + document.body.style.cursor = 'auto'; + }); }); - }); - // Set print size - scaleLine.setDpi(resolution); - map.getTargetElement().style.width = width + 'px'; - map.getTargetElement().style.height = height + 'px'; - map.updateSize(); - map.getView().setResolution(scaleResolution); - -}, false); + // Set print size + scaleLine.setDpi(resolution); + map.getTargetElement().style.width = width + 'px'; + map.getTargetElement().style.height = height + 'px'; + map.updateSize(); + map.getView().setResolution(scaleResolution); + }, + false +); diff --git a/examples/raster.js b/examples/raster.js index b62bb8796d..2abdfd463a 100644 --- a/examples/raster.js +++ b/examples/raster.js @@ -1,14 +1,13 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import XYZ from '../src/ol/source/XYZ.js'; import RasterSource from '../src/ol/source/Raster.js'; +import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; +import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; const minVgi = 0; const maxVgi = 0.25; const bins = 10; - /** * Calculate the Vegetation Greenness Index (VGI) from an input pixel. This * is a rough estimate assuming that pixel values correspond to reflectance. @@ -22,7 +21,6 @@ function vgi(pixel) { return (2 * g - r - b) / (2 * g + r + b); } - /** * Summarize values for a histogram. * @param {numver} value A VGI value. @@ -42,23 +40,22 @@ function summarize(value, counts) { } } - /** * Use aerial imagery as the input data for the raster source. */ const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const aerial = new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, maxZoom: 20, - crossOrigin: '' + crossOrigin: '', }); - /** * Create a raster source where pixels with VGI values above a threshold will * be colored green. @@ -71,7 +68,7 @@ const raster = new RasterSource({ * @param {Object} data User data object. * @return {Array} The output pixel. */ - operation: function(pixels, data) { + operation: function (pixels, data) { const pixel = pixels[0]; const value = vgi(pixel); summarize(value, data.counts); @@ -87,8 +84,8 @@ const raster = new RasterSource({ }, lib: { vgi: vgi, - summarize: summarize - } + summarize: summarize, + }, }); raster.set('threshold', 0.1); @@ -101,38 +98,37 @@ function createCounts(min, max, num) { min: min, max: max, values: values, - delta: (max - min) / num + delta: (max - min) / num, }; } -raster.on('beforeoperations', function(event) { +raster.on('beforeoperations', function (event) { event.data.counts = createCounts(minVgi, maxVgi, bins); event.data.threshold = raster.get('threshold'); }); -raster.on('afteroperations', function(event) { +raster.on('afteroperations', function (event) { schedulePlot(event.resolution, event.data.counts, event.data.threshold); }); const map = new Map({ layers: [ new TileLayer({ - source: aerial + source: aerial, }), new ImageLayer({ - source: raster - }) + source: raster, + }), ], target: 'map', view: new View({ center: [-9651695, 4937351], zoom: 13, minZoom: 12, - maxZoom: 19 - }) + maxZoom: 19, + }), }); - let timer = null; function schedulePlot(resolution, counts, threshold) { if (timer) { @@ -144,17 +140,19 @@ function schedulePlot(resolution, counts, threshold) { const barWidth = 15; const plotHeight = 150; -const chart = d3.select('#plot').append('svg') +const chart = d3 + .select('#plot') + .append('svg') .attr('width', barWidth * bins) .attr('height', plotHeight); const chartRect = chart.node().getBoundingClientRect(); -const tip = d3.select(document.body).append('div') - .attr('class', 'tip'); +const tip = d3.select(document.body).append('div').attr('class', 'tip'); function plot(resolution, counts, threshold) { - const yScale = d3.scaleLinear() + const yScale = d3 + .scaleLinear() .domain([0, d3.max(counts.values)]) .range([0, plotHeight]); @@ -162,49 +160,61 @@ function plot(resolution, counts, threshold) { bar.enter().append('rect'); - bar.attr('class', function(count, index) { - const value = counts.min + (index * counts.delta); - return 'bar' + (value >= threshold ? ' selected' : ''); - }) + bar + .attr('class', function (count, index) { + const value = counts.min + index * counts.delta; + return 'bar' + (value >= threshold ? ' selected' : ''); + }) .attr('width', barWidth - 2); - bar.transition().attr('transform', function(value, index) { - return 'translate(' + (index * barWidth) + ', ' + - (plotHeight - yScale(value)) + ')'; - }) + bar + .transition() + .attr('transform', function (value, index) { + return ( + 'translate(' + + index * barWidth + + ', ' + + (plotHeight - yScale(value)) + + ')' + ); + }) .attr('height', yScale); - bar.on('mousemove', function(count, index) { - const threshold = counts.min + (index * counts.delta); + bar.on('mousemove', function (count, index) { + const threshold = counts.min + index * counts.delta; if (raster.get('threshold') !== threshold) { raster.set('threshold', threshold); raster.changed(); } }); - bar.on('mouseover', function(count, index) { + bar.on('mouseover', function (count, index) { let area = 0; for (let i = counts.values.length - 1; i >= index; --i) { area += resolution * resolution * counts.values[i]; } - tip.html(message(counts.min + (index * counts.delta), area)); + tip.html(message(counts.min + index * counts.delta, area)); tip.style('display', 'block'); tip.transition().style({ - left: (chartRect.left + (index * barWidth) + (barWidth / 2)) + 'px', - top: (d3.event.y - 60) + 'px', - opacity: 1 + left: chartRect.left + index * barWidth + barWidth / 2 + 'px', + top: d3.event.y - 60 + 'px', + opacity: 1, }); }); - bar.on('mouseout', function() { - tip.transition().style('opacity', 0).each('end', function() { - tip.style('display', 'none'); - }); + bar.on('mouseout', function () { + tip + .transition() + .style('opacity', 0) + .each('end', function () { + tip.style('display', 'none'); + }); }); - } function message(value, area) { - const acres = (area / 4046.86).toFixed(0).replace(/\B(?=(\d{3})+(?!\d))/g, ','); + const acres = (area / 4046.86) + .toFixed(0) + .replace(/\B(?=(\d{3})+(?!\d))/g, ','); return acres + ' acres at
    ' + value.toFixed(2) + ' VGI or above'; } diff --git a/examples/region-growing.js b/examples/region-growing.js index 9d0a9a3a26..c8e293b26e 100644 --- a/examples/region-growing.js +++ b/examples/region-growing.js @@ -1,9 +1,9 @@ import Map from '../src/ol/Map.js'; +import RasterSource from '../src/ol/source/Raster.js'; import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; import {fromLonLat} from '../src/ol/proj.js'; -import XYZ from '../src/ol/source/XYZ.js'; -import RasterSource from '../src/ol/source/Raster.js'; function growRegion(inputs, data) { const image = inputs[0]; @@ -43,8 +43,11 @@ function growRegion(inputs, data) { if (ca === 0) { continue; } - if (Math.abs(seedR - cr) < delta && Math.abs(seedG - cg) < delta && - Math.abs(seedB - cb) < delta) { + if ( + Math.abs(seedR - cr) < delta && + Math.abs(seedG - cg) < delta && + Math.abs(seedB - cb) < delta + ) { outputData[ci] = 255; outputData[ci + 1] = 0; outputData[ci + 2] = 0; @@ -68,12 +71,13 @@ function next4Edges(edge) { [x + 1, y], [x - 1, y], [x, y + 1], - [x, y - 1] + [x, y - 1], ]; } const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const imagery = new TileLayer({ @@ -81,8 +85,8 @@ const imagery = new TileLayer({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, maxZoom: 20, - crossOrigin: '' - }) + crossOrigin: '', + }), }); const raster = new RasterSource({ @@ -92,13 +96,13 @@ const raster = new RasterSource({ // Functions in the `lib` object will be available to the operation run in // the web worker. lib: { - next4Edges: next4Edges - } + next4Edges: next4Edges, + }, }); const rasterImage = new ImageLayer({ opacity: 0.7, - source: raster + source: raster, }); const map = new Map({ @@ -106,20 +110,20 @@ const map = new Map({ target: 'map', view: new View({ center: fromLonLat([-119.07, 47.65]), - zoom: 11 - }) + zoom: 11, + }), }); let coordinate; -map.on('click', function(event) { +map.on('click', function (event) { coordinate = event.coordinate; raster.changed(); }); const thresholdControl = document.getElementById('threshold'); -raster.on('beforeoperations', function(event) { +raster.on('beforeoperations', function (event) { // the event.data object will be passed to operations const data = event.data; data.delta = thresholdControl.value; @@ -133,7 +137,7 @@ function updateControlValue() { } updateControlValue(); -thresholdControl.addEventListener('input', function() { +thresholdControl.addEventListener('input', function () { updateControlValue(); raster.changed(); }); diff --git a/examples/regularshape.js b/examples/regularshape.js index 0c194892d3..83eab335d1 100644 --- a/examples/regularshape.js +++ b/examples/regularshape.js @@ -1,12 +1,11 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, RegularShape, Stroke, Style} from '../src/ol/style.js'; - const stroke = new Stroke({color: 'black', width: 2}); const fill = new Fill({color: 'red'}); @@ -17,8 +16,8 @@ const styles = { stroke: stroke, points: 4, radius: 10, - angle: Math.PI / 4 - }) + angle: Math.PI / 4, + }), }), 'triangle': new Style({ image: new RegularShape({ @@ -27,8 +26,8 @@ const styles = { points: 3, radius: 10, rotation: Math.PI / 4, - angle: 0 - }) + angle: 0, + }), }), 'star': new Style({ image: new RegularShape({ @@ -37,8 +36,8 @@ const styles = { points: 5, radius: 10, radius2: 4, - angle: 0 - }) + angle: 0, + }), }), 'cross': new Style({ image: new RegularShape({ @@ -47,8 +46,8 @@ const styles = { points: 4, radius: 10, radius2: 0, - angle: 0 - }) + angle: 0, + }), }), 'x': new Style({ image: new RegularShape({ @@ -57,8 +56,8 @@ const styles = { points: 4, radius: 10, radius2: 0, - angle: Math.PI / 4 - }) + angle: Math.PI / 4, + }), }), 'stacked': [ new Style({ @@ -68,8 +67,8 @@ const styles = { points: 4, radius: 5, angle: Math.PI / 4, - displacement: [0, 10] - }) + displacement: [0, 10], + }), }), new Style({ image: new RegularShape({ @@ -77,13 +76,12 @@ const styles = { stroke: stroke, points: 4, radius: 10, - angle: Math.PI / 4 - }) - }) - ] + angle: Math.PI / 4, + }), + }), + ], }; - const styleKeys = ['x', 'cross', 'star', 'triangle', 'square', 'stacked']; const count = 250; const features = new Array(count); @@ -95,20 +93,18 @@ for (let i = 0; i < count; ++i) { } const source = new VectorSource({ - features: features + features: features, }); const vectorLayer = new VectorLayer({ - source: source + source: source, }); const map = new Map({ - layers: [ - vectorLayer - ], + layers: [vectorLayer], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/render-geometry.js b/examples/render-geometry.js index d3e1be366a..f21c4d9308 100644 --- a/examples/render-geometry.js +++ b/examples/render-geometry.js @@ -1,7 +1,6 @@ +import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; import {LineString, Point, Polygon} from '../src/ol/geom.js'; import {toContext} from '../src/ol/render.js'; -import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; - const canvas = document.getElementById('canvas'); const vectorContext = toContext(canvas.getContext('2d'), {size: [100, 100]}); @@ -14,11 +13,25 @@ const style = new Style({ image: new CircleStyle({ radius: 10, fill: fill, - stroke: stroke - }) + stroke: stroke, + }), }); vectorContext.setStyle(style); -vectorContext.drawGeometry(new LineString([[10, 10], [90, 90]])); -vectorContext.drawGeometry(new Polygon([[[2, 2], [98, 2], [2, 98], [2, 2]]])); +vectorContext.drawGeometry( + new LineString([ + [10, 10], + [90, 90], + ]) +); +vectorContext.drawGeometry( + new Polygon([ + [ + [2, 2], + [98, 2], + [2, 98], + [2, 2], + ], + ]) +); vectorContext.drawGeometry(new Point([88, 88])); diff --git a/examples/reprojection-by-code.js b/examples/reprojection-by-code.js index 0f72fa3a48..2926a94486 100644 --- a/examples/reprojection-by-code.js +++ b/examples/reprojection-by-code.js @@ -1,44 +1,42 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {applyTransform} from '../src/ol/extent.js'; import Graticule from '../src/ol/layer/Graticule.js'; +import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; +import Stroke from '../src/ol/style/Stroke.js'; +import TileImage from '../src/ol/source/TileImage.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import proj4 from 'proj4'; +import {applyTransform} from '../src/ol/extent.js'; import {get as getProjection, getTransform} from '../src/ol/proj.js'; import {register} from '../src/ol/proj/proj4.js'; -import OSM from '../src/ol/source/OSM.js'; -import TileImage from '../src/ol/source/TileImage.js'; -import Stroke from '../src/ol/style/Stroke.js'; -import proj4 from 'proj4'; - const graticule = new Graticule({ // the style to use for the lines, optional. strokeStyle: new Stroke({ color: 'rgba(255,120,0,0.9)', width: 2, - lineDash: [0.5, 4] + lineDash: [0.5, 4], }), showLabels: true, visible: false, - wrapX: false + wrapX: false, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), - graticule + graticule, ], target: 'map', view: new View({ projection: 'EPSG:3857', center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); - const queryInput = document.getElementById('epsg-query'); const searchButton = document.getElementById('epsg-search'); const resultSpan = document.getElementById('epsg-result'); @@ -48,11 +46,13 @@ const showGraticuleCheckbox = document.getElementById('show-graticule'); 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 View({ - projection: 'EPSG:3857', - center: [0, 0], - zoom: 1 - })); + map.setView( + new View({ + projection: 'EPSG:3857', + center: [0, 0], + zoom: 1, + }) + ); return; } @@ -75,55 +75,60 @@ function setProjection(code, name, proj4def, bbox) { const extent = applyTransform(worldExtent, fromLonLat, undefined, 8); newProj.setExtent(extent); const newView = new View({ - projection: newProj + projection: newProj, }); map.setView(newView); newView.fit(extent); } - function search(query) { resultSpan.innerHTML = 'Searching ...'; - fetch('https://epsg.io/?format=json&q=' + query).then(function(response) { - return response.json(); - }).then(function(json) { - const results = json['results']; - if (results && results.length > 0) { - for (let i = 0, ii = results.length; i < ii; i++) { - const result = results[i]; - if (result) { - const code = result['code']; - const name = result['name']; - const proj4def = result['proj4']; - const bbox = result['bbox']; - if (code && code.length > 0 && proj4def && proj4def.length > 0 && - bbox && bbox.length == 4) { - setProjection(code, name, proj4def, bbox); - return; + fetch('https://epsg.io/?format=json&q=' + query) + .then(function (response) { + return response.json(); + }) + .then(function (json) { + const results = json['results']; + if (results && results.length > 0) { + for (let i = 0, ii = results.length; i < ii; i++) { + const result = results[i]; + if (result) { + const code = result['code']; + const name = result['name']; + const proj4def = result['proj4']; + const bbox = result['bbox']; + if ( + code && + code.length > 0 && + proj4def && + proj4def.length > 0 && + bbox && + bbox.length == 4 + ) { + setProjection(code, name, proj4def, bbox); + return; + } } } } - } - setProjection(null, null, null, null); - }); + setProjection(null, null, null, null); + }); } - /** * Handle click event. * @param {Event} event The event. */ -searchButton.onclick = function(event) { +searchButton.onclick = function (event) { search(queryInput.value); event.preventDefault(); }; - /** * Handle checkbox change event. */ -renderEdgesCheckbox.onchange = function() { - map.getLayers().forEach(function(layer) { +renderEdgesCheckbox.onchange = function () { + map.getLayers().forEach(function (layer) { if (layer instanceof TileLayer) { const source = layer.getSource(); if (source instanceof TileImage) { @@ -136,6 +141,6 @@ renderEdgesCheckbox.onchange = function() { /** * Handle checkbox change event. */ -showGraticuleCheckbox.onchange = function() { +showGraticuleCheckbox.onchange = function () { graticule.setVisible(showGraticuleCheckbox.checked); }; diff --git a/examples/reprojection-image.js b/examples/reprojection-image.js index 642ca466ee..2d6c815b03 100644 --- a/examples/reprojection-image.js +++ b/examples/reprojection-image.js @@ -1,17 +1,20 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getCenter} from '../src/ol/extent.js'; -import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import {transform} from '../src/ol/proj.js'; -import Static from '../src/ol/source/ImageStatic.js'; import OSM from '../src/ol/source/OSM.js'; -import {register} from '../src/ol/proj/proj4.js'; +import Static from '../src/ol/source/ImageStatic.js'; +import View from '../src/ol/View.js'; import proj4 from 'proj4'; +import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; +import {getCenter} from '../src/ol/extent.js'; +import {register} from '../src/ol/proj/proj4.js'; +import {transform} from '../src/ol/proj.js'; -proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + +proj4.defs( + 'EPSG:27700', + '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + '+x_0=400000 +y_0=-100000 +ellps=airy ' + '+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' + - '+units=m +no_defs'); + '+units=m +no_defs' +); register(proj4); const imageExtent = [0, 0, 700000, 1300000]; @@ -19,21 +22,22 @@ const imageExtent = [0, 0, 700000, 1300000]; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new ImageLayer({ source: new Static({ - url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/' + - 'British_National_Grid.svg/2000px-British_National_Grid.svg.png', + url: + 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/' + + 'British_National_Grid.svg/2000px-British_National_Grid.svg.png', crossOrigin: '', projection: 'EPSG:27700', - imageExtent: imageExtent - }) - }) + imageExtent: imageExtent, + }), + }), ], target: 'map', view: new View({ center: transform(getCenter(imageExtent), 'EPSG:27700', 'EPSG:3857'), - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/reprojection-wgs84.js b/examples/reprojection-wgs84.js index 0811ef85b3..e512bef6f8 100644 --- a/examples/reprojection-wgs84.js +++ b/examples/reprojection-wgs84.js @@ -1,18 +1,18 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ projection: 'EPSG:4326', center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/reprojection.js b/examples/reprojection.js index 0d4dd4d9a9..10146f47fc 100644 --- a/examples/reprojection.js +++ b/examples/reprojection.js @@ -1,44 +1,63 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getWidth, getCenter} from '../src/ol/extent.js'; -import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; +import TileGrid from '../src/ol/tilegrid/TileGrid.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; +import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; +import proj4 from 'proj4'; +import {OSM, TileImage, TileWMS, XYZ} from '../src/ol/source.js'; +import {getCenter, getWidth} from '../src/ol/extent.js'; import {get as getProjection} from '../src/ol/proj.js'; import {register} from '../src/ol/proj/proj4.js'; -import {OSM, TileImage, TileWMS, XYZ} from '../src/ol/source.js'; -import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; -import TileGrid from '../src/ol/tilegrid/TileGrid.js'; -import proj4 from 'proj4'; - -proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + +proj4.defs( + 'EPSG:27700', + '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + '+x_0=400000 +y_0=-100000 +ellps=airy ' + '+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' + - '+units=m +no_defs'); -proj4.defs('EPSG:23032', '+proj=utm +zone=32 +ellps=intl ' + - '+towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs'); -proj4.defs('EPSG:5479', '+proj=lcc +lat_1=-76.66666666666667 +lat_2=' + + '+units=m +no_defs' +); +proj4.defs( + 'EPSG:23032', + '+proj=utm +zone=32 +ellps=intl ' + + '+towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs' +); +proj4.defs( + 'EPSG:5479', + '+proj=lcc +lat_1=-76.66666666666667 +lat_2=' + '-79.33333333333333 +lat_0=-78 +lon_0=163 +x_0=7000000 +y_0=5000000 ' + - '+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'); -proj4.defs('EPSG:21781', '+proj=somerc +lat_0=46.95240555555556 ' + + '+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs' +); +proj4.defs( + 'EPSG:21781', + '+proj=somerc +lat_0=46.95240555555556 ' + '+lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel ' + - '+towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs'); -proj4.defs('EPSG:3413', '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 ' + - '+x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'); -proj4.defs('EPSG:2163', '+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 ' + - '+a=6370997 +b=6370997 +units=m +no_defs'); -proj4.defs('ESRI:54009', '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 ' + - '+units=m +no_defs'); + '+towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs' +); +proj4.defs( + 'EPSG:3413', + '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 ' + + '+x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' +); +proj4.defs( + 'EPSG:2163', + '+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 ' + + '+a=6370997 +b=6370997 +units=m +no_defs' +); +proj4.defs( + 'ESRI:54009', + '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 ' + '+units=m +no_defs' +); register(proj4); const proj27700 = getProjection('EPSG:27700'); proj27700.setExtent([0, 0, 700000, 1300000]); const proj23032 = getProjection('EPSG:23032'); -proj23032.setExtent([-1206118.71, 4021309.92, 1295389.00, 8051813.28]); +proj23032.setExtent([-1206118.71, 4021309.92, 1295389.0, 8051813.28]); const proj5479 = getProjection('EPSG:5479'); -proj5479.setExtent([6825737.53, 4189159.80, 9633741.96, 5782472.71]); +proj5479.setExtent([6825737.53, 4189159.8, 9633741.96, 5782472.71]); const proj21781 = getProjection('EPSG:21781'); proj21781.setExtent([485071.54, 75346.36, 828515.78, 299941.84]); @@ -47,16 +66,15 @@ const proj3413 = getProjection('EPSG:3413'); proj3413.setExtent([-4194304, -4194304, 4194304, 4194304]); const proj2163 = getProjection('EPSG:2163'); -proj2163.setExtent([-8040784.5135, -2577524.9210, 3668901.4484, 4785105.1096]); +proj2163.setExtent([-8040784.5135, -2577524.921, 3668901.4484, 4785105.1096]); const proj54009 = getProjection('ESRI:54009'); proj54009.setExtent([-18e6, -9e6, 18e6, 9e6]); - const layers = {}; layers['osm'] = new TileLayer({ - source: new OSM() + source: new OSM(), }); layers['wms4326'] = new TileLayer({ @@ -65,60 +83,68 @@ layers['wms4326'] = new TileLayer({ crossOrigin: '', params: { 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', - 'TILED': true + 'TILED': true, }, - projection: 'EPSG:4326' - }) + projection: 'EPSG:4326', + }), }); layers['wms21781'] = new TileLayer({ source: new TileWMS({ - attributions: '© Pixelmap 1:1000000 / geo.admin.ch', crossOrigin: 'anonymous', params: { 'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale', - 'FORMAT': 'image/jpeg' + 'FORMAT': 'image/jpeg', }, url: 'https://wms.geo.admin.ch/', - projection: 'EPSG:21781' - }) + projection: 'EPSG:21781', + }), }); const parser = new WMTSCapabilities(); layers['wmts3413'] = new TileLayer(); -const urlA = 'https://map1.vis.earthdata.nasa.gov/wmts-arctic/' + - 'wmts.cgi?SERVICE=WMTS&request=GetCapabilities'; -fetch(urlA).then(function(response) { - return response.text(); -}).then(function(text) { - const result = parser.read(text); - const options = optionsFromCapabilities(result, { - layer: 'OSM_Land_Mask', - matrixSet: 'EPSG3413_250m' +const urlA = + 'https://map1.vis.earthdata.nasa.gov/wmts-arctic/' + + 'wmts.cgi?SERVICE=WMTS&request=GetCapabilities'; +fetch(urlA) + .then(function (response) { + return response.text(); + }) + .then(function (text) { + const result = parser.read(text); + const options = optionsFromCapabilities(result, { + layer: 'OSM_Land_Mask', + matrixSet: 'EPSG3413_250m', + }); + options.crossOrigin = ''; + options.projection = 'EPSG:3413'; + options.wrapX = false; + layers['wmts3413'].setSource(new WMTS(options)); }); - options.crossOrigin = ''; - options.projection = 'EPSG:3413'; - options.wrapX = false; - layers['wmts3413'].setSource(new WMTS(options)); -}); layers['bng'] = new TileLayer(); -const urlB = 'https://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/OS_Open_Raster/MapServer/WMTS'; -fetch(urlB).then(function(response) { - return response.text(); -}).then(function(text) { - const result = parser.read(text); - const options = optionsFromCapabilities(result, { - layer: 'OS_Open_Raster' +const urlB = + 'https://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/OS_Open_Raster/MapServer/WMTS'; +fetch(urlB) + .then(function (response) { + return response.text(); + }) + .then(function (text) { + const result = parser.read(text); + const options = optionsFromCapabilities(result, { + layer: 'OS_Open_Raster', + }); + options.attributions = + 'Contains OS data © Crown Copyright and database right 2019'; + options.crossOrigin = ''; + options.projection = 'EPSG:27700'; + options.wrapX = false; + layers['bng'].setSource(new WMTS(options)); }); - options.attributions = 'Contains OS data © Crown Copyright and database right 2019'; - options.crossOrigin = ''; - options.projection = 'EPSG:27700'; - options.wrapX = false; - layers['bng'].setSource(new WMTS(options)); -}); layers['grandcanyon'] = new TileLayer({ source: new XYZ({ @@ -126,13 +152,13 @@ layers['grandcanyon'] = new TileLayer({ crossOrigin: '', tilePixelRatio: 2, maxZoom: 15, - attributions: 'Tiles © USGS, rendered with ' + - 'MapTiler' - }) + attributions: + 'Tiles © USGS, rendered with ' + + 'MapTiler', + }), }); -const startResolution = - getWidth(getProjection('EPSG:3857').getExtent()) / 256; +const startResolution = getWidth(getProjection('EPSG:3857').getExtent()) / 256; const resolutions = new Array(22); for (let i = 0, ii = resolutions.length; i < ii; ++i) { resolutions[i] = startResolution / Math.pow(2, i); @@ -147,27 +173,22 @@ layers['states'] = new TileLayer({ tileGrid: new TileGrid({ extent: [-13884991, 2870341, -7455066, 6338219], resolutions: resolutions, - tileSize: [512, 256] + tileSize: [512, 256], }), - projection: 'EPSG:3857' - }) + projection: 'EPSG:3857', + }), }); - const map = new Map({ - layers: [ - layers['osm'], - layers['bng'] - ], + layers: [layers['osm'], layers['bng']], target: 'map', view: new View({ projection: 'EPSG:3857', center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); - const baseLayerSelect = document.getElementById('base-layer'); const overlayLayerSelect = document.getElementById('overlay-layer'); const viewProjSelect = document.getElementById('view-projection'); @@ -181,7 +202,7 @@ function updateViewProjection() { projection: newProj, center: getCenter(newProjExtent || [0, 0, 0, 0]), zoom: 0, - extent: newProjExtent || undefined + extent: newProjExtent || undefined, }); map.setView(newView); @@ -193,17 +214,16 @@ function updateViewProjection() { } } - /** * Handle change event. */ -viewProjSelect.onchange = function() { +viewProjSelect.onchange = function () { updateViewProjection(); }; updateViewProjection(); -const updateRenderEdgesOnLayer = function(layer) { +const updateRenderEdgesOnLayer = function (layer) { if (layer instanceof TileLayer) { const source = layer.getSource(); if (source instanceof TileImage) { @@ -212,11 +232,10 @@ const updateRenderEdgesOnLayer = function(layer) { } }; - /** * Handle change event. */ -baseLayerSelect.onchange = function() { +baseLayerSelect.onchange = function () { const layer = layers[baseLayerSelect.value]; if (layer) { layer.setOpacity(1); @@ -225,11 +244,10 @@ baseLayerSelect.onchange = function() { } }; - /** * Handle change event. */ -overlayLayerSelect.onchange = function() { +overlayLayerSelect.onchange = function () { const layer = layers[overlayLayerSelect.value]; if (layer) { layer.setOpacity(0.7); @@ -238,13 +256,12 @@ overlayLayerSelect.onchange = function() { } }; - /** * Handle change event. */ -renderEdgesCheckbox.onchange = function() { +renderEdgesCheckbox.onchange = function () { renderEdges = renderEdgesCheckbox.checked; - map.getLayers().forEach(function(layer) { + map.getLayers().forEach(function (layer) { updateRenderEdgesOnLayer(layer); }); }; diff --git a/examples/reusable-source.js b/examples/reusable-source.js index 862ee919f9..516c4d268b 100644 --- a/examples/reusable-source.js +++ b/examples/reusable-source.js @@ -1,15 +1,20 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; const baseUrl = 'https://{a-c}.tiles.mapbox.com/v4'; const urls = [ baseUrl + '/mapbox.blue-marble-topo-jan/{z}/{x}/{y}.png?access_token=' + key, - baseUrl + '/mapbox.blue-marble-topo-bathy-jan/{z}/{x}/{y}.png?access_token=' + key, + baseUrl + + '/mapbox.blue-marble-topo-bathy-jan/{z}/{x}/{y}.png?access_token=' + + key, baseUrl + '/mapbox.blue-marble-topo-jul/{z}/{x}/{y}.png?access_token=' + key, - baseUrl + '/mapbox.blue-marble-topo-bathy-jul/{z}/{x}/{y}.png?access_token=' + key + baseUrl + + '/mapbox.blue-marble-topo-bathy-jul/{z}/{x}/{y}.png?access_token=' + + key, ]; const source = new XYZ(); @@ -18,16 +23,15 @@ const map = new Map({ target: 'map', layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); - function updateUrl(index) { source.setUrl(urls[index]); } diff --git a/examples/rotation.js b/examples/rotation.js index 4a1d8b6956..8ca856222a 100644 --- a/examples/rotation.js +++ b/examples/rotation.js @@ -1,19 +1,18 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [14200000, 4130000], rotation: Math.PI / 6, - zoom: 10 - }) + zoom: 10, + }), }); diff --git a/examples/scale-line.js b/examples/scale-line.js index 0fad817b12..d961b13d41 100644 --- a/examples/scale-line.js +++ b/examples/scale-line.js @@ -1,8 +1,8 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, ScaleLine} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {ScaleLine, defaults as defaultControls} from '../src/ol/control.js'; const unitsSelect = document.getElementById('units'); const typeSelect = document.getElementById('type'); @@ -18,7 +18,7 @@ let control; function scaleControl() { if (scaleType === 'scaleline') { control = new ScaleLine({ - units: unitsSelect.value + units: unitsSelect.value, }); return control; } @@ -27,24 +27,22 @@ function scaleControl() { bar: true, steps: scaleBarSteps, text: scaleBarText, - minWidth: 140 + minWidth: 140, }); return control; } const map = new Map({ - controls: defaultControls().extend([ - scaleControl() - ]), + controls: defaultControls().extend([scaleControl()]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); function onChange() { diff --git a/examples/scaleline-indiana-east.js b/examples/scaleline-indiana-east.js index b0c2aa3f07..af5173e0f7 100644 --- a/examples/scaleline-indiana-east.js +++ b/examples/scaleline-indiana-east.js @@ -1,13 +1,15 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {ScaleLine} from '../src/ol/control.js'; +import OSM from '../src/ol/source/OSM.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import proj4 from 'proj4'; +import {ScaleLine} from '../src/ol/control.js'; import {fromLonLat, transformExtent} from '../src/ol/proj.js'; import {register} from '../src/ol/proj/proj4.js'; -import OSM from '../src/ol/source/OSM.js'; -import proj4 from 'proj4'; -proj4.defs('Indiana-East', 'PROJCS["IN83-EF",GEOGCS["LL83",DATUM["NAD83",' + +proj4.defs( + 'Indiana-East', + 'PROJCS["IN83-EF",GEOGCS["LL83",DATUM["NAD83",' + 'SPHEROID["GRS1980",6378137.000,298.25722210]],PRIMEM["Greenwich",0],' + 'UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],' + 'PARAMETER["false_easting",328083.333],' + @@ -15,24 +17,28 @@ proj4.defs('Indiana-East', 'PROJCS["IN83-EF",GEOGCS["LL83",DATUM["NAD83",' + 'PARAMETER["scale_factor",0.999966666667],' + 'PARAMETER["central_meridian",-85.66666666666670],' + 'PARAMETER["latitude_of_origin",37.50000000000000],' + - 'UNIT["Foot_US",0.30480060960122]]'); + 'UNIT["Foot_US",0.30480060960122]]' +); register(proj4); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ projection: 'Indiana-East', center: fromLonLat([-85.685, 39.891], 'Indiana-East'), zoom: 7, - extent: transformExtent([-172.54, 23.81, -47.74, 86.46], - 'EPSG:4326', 'Indiana-East'), - minZoom: 6 - }) + extent: transformExtent( + [-172.54, 23.81, -47.74, 86.46], + 'EPSG:4326', + 'Indiana-East' + ), + minZoom: 6, + }), }); map.addControl(new ScaleLine({units: 'us'})); diff --git a/examples/sea-level.js b/examples/sea-level.js index f52cdb0aad..aeb5416684 100644 --- a/examples/sea-level.js +++ b/examples/sea-level.js @@ -1,14 +1,15 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import {fromLonLat} from '../src/ol/proj.js'; -import {Raster as RasterSource, TileJSON} from '../src/ol/source.js'; import XYZ from '../src/ol/source/XYZ.js'; +import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; +import {Raster as RasterSource, TileJSON} from '../src/ol/source.js'; +import {fromLonLat} from '../src/ol/proj.js'; function flood(pixels, data) { const pixel = pixels[0]; if (pixel[3]) { - const height = -10000 + ((pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1); + const height = + -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1; if (height <= data.level) { pixel[0] = 145; pixel[1] = 175; @@ -21,21 +22,24 @@ function flood(pixels, data) { return pixel; } -const key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; +const key = + 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; const elevation = new TileLayer({ source: new XYZ({ - url: 'https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}.pngraw?access_token=' + key, - crossOrigin: 'anonymous' - }) + url: + 'https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}.pngraw?access_token=' + + key, + crossOrigin: 'anonymous', + }), }); -elevation.on('prerender', function(evt) { +elevation.on('prerender', function (evt) { evt.context.imageSmoothingEnabled = false; evt.context.msImageSmoothingEnabled = false; }); const raster = new RasterSource({ sources: [elevation], - operation: flood + operation: flood, }); const map = new Map({ @@ -43,30 +47,32 @@ const map = new Map({ layers: [ new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.world-light.json?secure&access_token=' + key, - crossOrigin: 'anonymous' - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.world-light.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', + }), }), new ImageLayer({ opacity: 0.6, - source: raster - }) + source: raster, + }), ], view: new View({ center: fromLonLat([-122.3267, 37.8377]), - zoom: 11 - }) + zoom: 11, + }), }); const control = document.getElementById('level'); const output = document.getElementById('output'); -control.addEventListener('input', function() { +control.addEventListener('input', function () { output.innerText = control.value; raster.changed(); }); output.innerText = control.value; -raster.on('beforeoperations', function(event) { +raster.on('beforeoperations', function (event) { event.data.level = control.value; }); diff --git a/examples/select-features.js b/examples/select-features.js index 0303c58896..3196fe96f4 100644 --- a/examples/select-features.js +++ b/examples/select-features.js @@ -1,21 +1,21 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {click, pointerMove, altKeyOnly} from '../src/ol/events/condition.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import Select from '../src/ol/interaction/Select.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; +import Select from '../src/ol/interaction/Select.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {altKeyOnly, click, pointerMove} from '../src/ol/events/condition.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const vector = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() - }) + format: new GeoJSON(), + }), }); const map = new Map({ @@ -23,8 +23,8 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); let select = null; // ref to currently selected interaction @@ -34,23 +34,23 @@ const selectSingleClick = new Select(); // select interaction working on "click" const selectClick = new Select({ - condition: click + condition: click, }); // select interaction working on "pointermove" const selectPointerMove = new Select({ - condition: pointerMove + condition: pointerMove, }); const selectAltClick = new Select({ - condition: function(mapBrowserEvent) { + condition: function (mapBrowserEvent) { return click(mapBrowserEvent) && altKeyOnly(mapBrowserEvent); - } + }, }); const selectElement = document.getElementById('type'); -const changeInteraction = function() { +const changeInteraction = function () { if (select !== null) { map.removeInteraction(select); } @@ -68,16 +68,19 @@ const changeInteraction = function() { } if (select !== null) { map.addInteraction(select); - select.on('select', function(e) { - document.getElementById('status').innerHTML = ' ' + - e.target.getFeatures().getLength() + - ' selected features (last operation selected ' + e.selected.length + - ' and deselected ' + e.deselected.length + ' features)'; + select.on('select', function (e) { + document.getElementById('status').innerHTML = + ' ' + + e.target.getFeatures().getLength() + + ' selected features (last operation selected ' + + e.selected.length + + ' and deselected ' + + e.deselected.length + + ' features)'; }); } }; - /** * onchange callback on the select element. */ diff --git a/examples/select-hover-features.js b/examples/select-hover-features.js index 00a0ace04a..4244481382 100644 --- a/examples/select-hover-features.js +++ b/examples/select-hover-features.js @@ -1,32 +1,32 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import OSM from '../src/ol/source/OSM.js'; -import VectorSource from '../src/ol/source/Vector.js'; -import Style from '../src/ol/style/Style.js'; import Fill from '../src/ol/style/Fill.js'; +import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; import Stroke from '../src/ol/style/Stroke.js'; +import Style from '../src/ol/style/Style.js'; +import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const highlightStyle = new Style({ fill: new Fill({ - color: 'rgba(255,255,255,0.7)' + color: 'rgba(255,255,255,0.7)', }), stroke: new Stroke({ color: '#3399CC', - width: 3 - }) + width: 3, + }), }); const vector = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() - }) + format: new GeoJSON(), + }), }); const map = new Map({ @@ -34,20 +34,20 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); let selected = null; const status = document.getElementById('status'); -map.on('pointermove', function(e) { +map.on('pointermove', function (e) { if (selected !== null) { selected.setStyle(undefined); selected = null; } - map.forEachFeatureAtPixel(e.pixel, function(f) { + map.forEachFeatureAtPixel(e.pixel, function (f) { selected = f; f.setStyle(highlightStyle); return true; diff --git a/examples/select-multiple-features.js b/examples/select-multiple-features.js index e28864d637..49feaff100 100644 --- a/examples/select-multiple-features.js +++ b/examples/select-multiple-features.js @@ -1,32 +1,32 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import OSM from '../src/ol/source/OSM.js'; -import VectorSource from '../src/ol/source/Vector.js'; -import Style from '../src/ol/style/Style.js'; import Fill from '../src/ol/style/Fill.js'; +import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; import Stroke from '../src/ol/style/Stroke.js'; +import Style from '../src/ol/style/Style.js'; +import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const highlightStyle = new Style({ fill: new Fill({ - color: 'rgba(255,255,255,0.7)' + color: 'rgba(255,255,255,0.7)', }), stroke: new Stroke({ color: '#3399CC', - width: 3 - }) + width: 3, + }), }); const vector = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() - }) + format: new GeoJSON(), + }), }); const map = new Map({ @@ -35,16 +35,16 @@ const map = new Map({ view: new View({ center: [0, 0], zoom: 2, - multiWorld: true - }) + multiWorld: true, + }), }); const selected = []; const status = document.getElementById('status'); -map.on('singleclick', function(e) { - map.forEachFeatureAtPixel(e.pixel, function(f) { +map.on('singleclick', function (e) { + map.forEachFeatureAtPixel(e.pixel, function (f) { const selIndex = selected.indexOf(f); if (selIndex < 0) { selected.push(f); diff --git a/examples/semi-transparent-layer.js b/examples/semi-transparent-layer.js index e2ff9941b0..136cd65f1b 100644 --- a/examples/semi-transparent-layer.js +++ b/examples/semi-transparent-layer.js @@ -1,30 +1,33 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat} from '../src/ol/proj.js'; import OSM from '../src/ol/source/OSM.js'; import TileJSON from '../src/ol/source/TileJSON.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {fromLonLat} from '../src/ol/proj.js'; -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; const map = new Map({ layers: [ new TileLayer({ className: 'bw', - source: new OSM() + source: new OSM(), }), new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.va-quake-aug.json?secure&access_token=' + key, + url: + 'https://api.tiles.mapbox.com/v4/mapbox.va-quake-aug.json?secure&access_token=' + + key, crossOrigin: 'anonymous', // this layer has transparency, so do not fade tiles: - transition: 0 - }) - }) + transition: 0, + }), + }), ], target: 'map', view: new View({ center: fromLonLat([-77.93255, 37.9555]), - zoom: 7 - }) + zoom: 7, + }), }); diff --git a/examples/shaded-relief.js b/examples/shaded-relief.js index f0e2c4f796..d28545d6ae 100644 --- a/examples/shaded-relief.js +++ b/examples/shaded-relief.js @@ -3,7 +3,6 @@ import View from '../src/ol/View.js'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; import {OSM, Raster, XYZ} from '../src/ol/source.js'; - /** * Generates a shaded relief image given elevation data. Uses a 3x3 * neighborhood for determining slope and aspect. @@ -23,12 +22,25 @@ function shade(inputs, data) { const pixel = [0, 0, 0, 0]; const twoPi = 2 * Math.PI; const halfPi = Math.PI / 2; - const sunEl = Math.PI * data.sunEl / 180; - const sunAz = Math.PI * data.sunAz / 180; + const sunEl = (Math.PI * data.sunEl) / 180; + const sunAz = (Math.PI * data.sunAz) / 180; const cosSunEl = Math.cos(sunEl); const sinSunEl = Math.sin(sunEl); - let pixelX, pixelY, x0, x1, y0, y1, offset, - z0, z1, dzdx, dzdy, slope, aspect, cosIncidence, scaled; + let pixelX, + pixelY, + x0, + x1, + y0, + y1, + offset, + z0, + z1, + dzdx, + dzdy, + slope, + aspect, + cosIncidence, + scaled; for (pixelY = 0; pixelY <= maxY; ++pixelY) { y0 = pixelY === 0 ? 0 : pixelY - 1; y1 = pixelY === maxY ? maxY : pixelY + 1; @@ -83,8 +95,9 @@ function shade(inputs, data) { aspect = halfPi - aspect; } - cosIncidence = sinSunEl * Math.cos(slope) + - cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect); + cosIncidence = + sinSunEl * Math.cos(slope) + + cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect); offset = (pixelY * width + pixelX) * 4; scaled = 255 * cosIncidence; @@ -100,41 +113,41 @@ function shade(inputs, data) { const elevation = new XYZ({ url: 'https://{a-d}.tiles.mapbox.com/v3/aj.sf-dem/{z}/{x}/{y}.png', - crossOrigin: 'anonymous' + crossOrigin: 'anonymous', }); const raster = new Raster({ sources: [elevation], operationType: 'image', - operation: shade + operation: shade, }); const map = new Map({ target: 'map', layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new ImageLayer({ opacity: 0.3, - source: raster - }) + source: raster, + }), ], view: new View({ extent: [-13675026, 4439648, -13580856, 4580292], center: [-13615645, 4497969], minZoom: 10, maxZoom: 16, - zoom: 13 - }) + zoom: 13, + }), }); const controlIds = ['vert', 'sunEl', 'sunAz']; const controls = {}; -controlIds.forEach(function(id) { +controlIds.forEach(function (id) { const control = document.getElementById(id); const output = document.getElementById(id + 'Out'); - control.addEventListener('input', function() { + control.addEventListener('input', function () { output.innerText = control.value; raster.changed(); }); @@ -142,7 +155,7 @@ controlIds.forEach(function(id) { controls[id] = control; }); -raster.on('beforeoperations', function(event) { +raster.on('beforeoperations', function (event) { // the event.data object will be passed to operations const data = event.data; data.resolution = event.resolution; diff --git a/examples/side-by-side.js b/examples/side-by-side.js index 3c8883e3e1..60a445fa0b 100644 --- a/examples/side-by-side.js +++ b/examples/side-by-side.js @@ -1,10 +1,11 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const roadLayer = new TileLayer({ @@ -12,31 +13,31 @@ const roadLayer = new TileLayer({ attributions: attributions, url: 'https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=' + key, tileSize: 512, - maxZoom: 22 - }) + maxZoom: 22, + }), }); const aerialLayer = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); const view = new View({ center: [-6655.5402445057125, 6709968.258934638], - zoom: 13 + zoom: 13, }); const map1 = new Map({ target: 'roadMap', layers: [roadLayer], - view: view + view: view, }); const map2 = new Map({ target: 'aerialMap', layers: [aerialLayer], - view: view + view: view, }); diff --git a/examples/simple.js b/examples/simple.js index e128b8e9ec..3c60ab0748 100644 --- a/examples/simple.js +++ b/examples/simple.js @@ -1,18 +1,17 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/snap.js b/examples/snap.js index ab5d16d24c..80cf489d11 100644 --- a/examples/snap.js +++ b/examples/snap.js @@ -1,31 +1,31 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import {Draw, Modify, Select, Snap} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {Draw, Modify, Select, Snap} from '../src/ol/interaction.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const vector = new VectorLayer({ source: new VectorSource(), style: new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.2)' + color: 'rgba(255, 255, 255, 0.2)', }), stroke: new Stroke({ color: '#ffcc33', - width: 2 + width: 2, }), image: new CircleStyle({ radius: 7, fill: new Fill({ - color: '#ffcc33' - }) - }) - }) + color: '#ffcc33', + }), + }), + }), }); const map = new Map({ @@ -33,42 +33,42 @@ const map = new Map({ target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 4 - }) + zoom: 4, + }), }); const ExampleModify = { - init: function() { + init: function () { this.select = new Select(); map.addInteraction(this.select); this.modify = new Modify({ - features: this.select.getFeatures() + features: this.select.getFeatures(), }); map.addInteraction(this.modify); this.setEvents(); }, - setEvents: function() { + setEvents: function () { const selectedFeatures = this.select.getFeatures(); - this.select.on('change:active', function() { - selectedFeatures.forEach(function(each) { + this.select.on('change:active', function () { + selectedFeatures.forEach(function (each) { selectedFeatures.remove(each); }); }); }, - setActive: function(active) { + setActive: function (active) { this.select.setActive(active); this.modify.setActive(active); - } + }, }; ExampleModify.init(); const optionsForm = document.getElementById('options-form'); const ExampleDraw = { - init: function() { + init: function () { map.addInteraction(this.Point); this.Point.setActive(false); map.addInteraction(this.LineString); @@ -80,24 +80,24 @@ const ExampleDraw = { }, Point: new Draw({ source: vector.getSource(), - type: 'Point' + type: 'Point', }), LineString: new Draw({ source: vector.getSource(), - type: 'LineString' + type: 'LineString', }), Polygon: new Draw({ source: vector.getSource(), - type: 'Polygon' + type: 'Polygon', }), Circle: new Draw({ source: vector.getSource(), - type: 'Circle' + type: 'Circle', }), - getActive: function() { + getActive: function () { return this.activeType ? this[this.activeType].getActive() : false; }, - setActive: function(active) { + setActive: function (active) { const type = optionsForm.elements['draw-type'].value; if (active) { this.activeType && this[this.activeType].setActive(false); @@ -107,16 +107,15 @@ const ExampleDraw = { this.activeType && this[this.activeType].setActive(false); this.activeType = null; } - } + }, }; ExampleDraw.init(); - /** * Let user change the geometry type. * @param {Event} e Change event. */ -optionsForm.onchange = function(e) { +optionsForm.onchange = function (e) { const type = e.target.getAttribute('name'); const value = e.target.value; if (type == 'draw-type') { @@ -139,6 +138,6 @@ ExampleModify.setActive(false); // in order for its map browser event handlers to be fired first. Its handlers // are responsible of doing the snapping. const snap = new Snap({ - source: vector.getSource() + source: vector.getSource(), }); map.addInteraction(snap); diff --git a/examples/sphere-mollweide.js b/examples/sphere-mollweide.js index 83fc6adcc4..b96b8dec46 100644 --- a/examples/sphere-mollweide.js +++ b/examples/sphere-mollweide.js @@ -1,25 +1,31 @@ +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Graticule from '../src/ol/layer/Graticule.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import VectorLayer from '../src/ol/layer/Vector.js'; import Projection from '../src/ol/proj/Projection.js'; +import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; -import {register} from '../src/ol/proj/proj4.js'; +import View from '../src/ol/View.js'; import proj4 from 'proj4'; +import {register} from '../src/ol/proj/proj4.js'; - -proj4.defs('ESRI:53009', '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +a=6371000 ' + - '+b=6371000 +units=m +no_defs'); +proj4.defs( + 'ESRI:53009', + '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +a=6371000 ' + + '+b=6371000 +units=m +no_defs' +); register(proj4); // Configure the Sphere Mollweide projection object with an extent, // and a world extent. These are required for the Graticule. const sphereMollweideProjection = new Projection({ code: 'ESRI:53009', - extent: [-18019909.21177587, -9009954.605703328, - 18019909.21177587, 9009954.605703328], - worldExtent: [-179, -89.99, 179, 89.99] + extent: [ + -18019909.21177587, + -9009954.605703328, + 18019909.21177587, + 9009954.605703328, + ], + worldExtent: [-179, -89.99, 179, 89.99], }); const map = new Map({ @@ -28,15 +34,15 @@ const map = new Map({ new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries-110m.geojson', - format: new GeoJSON() - }) + format: new GeoJSON(), + }), }), - new Graticule() + new Graticule(), ], target: 'map', view: new View({ center: [0, 0], projection: sphereMollweideProjection, - zoom: 1 - }) + zoom: 1, + }), }); diff --git a/examples/stamen.js b/examples/stamen.js index 6b68a0eee1..5335eb8928 100644 --- a/examples/stamen.js +++ b/examples/stamen.js @@ -1,26 +1,25 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat} from '../src/ol/proj.js'; import Stamen from '../src/ol/source/Stamen.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {fromLonLat} from '../src/ol/proj.js'; const map = new Map({ layers: [ new TileLayer({ source: new Stamen({ - layer: 'watercolor' - }) + layer: 'watercolor', + }), }), new TileLayer({ source: new Stamen({ - layer: 'terrain-labels' - }) - }) + layer: 'terrain-labels', + }), + }), ], target: 'map', view: new View({ center: fromLonLat([-122.416667, 37.783333]), - zoom: 12 - }) + zoom: 12, + }), }); diff --git a/examples/static-image.js b/examples/static-image.js index 5c937e7e97..79930d648f 100644 --- a/examples/static-image.js +++ b/examples/static-image.js @@ -1,10 +1,9 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getCenter} from '../src/ol/extent.js'; import ImageLayer from '../src/ol/layer/Image.js'; +import Map from '../src/ol/Map.js'; import Projection from '../src/ol/proj/Projection.js'; import Static from '../src/ol/source/ImageStatic.js'; - +import View from '../src/ol/View.js'; +import {getCenter} from '../src/ol/extent.js'; // Map views always need a projection. Here we just want to map image // coordinates directly to map coordinates, so we create a projection that uses @@ -13,7 +12,7 @@ const extent = [0, 0, 1024, 968]; const projection = new Projection({ code: 'xkcd-image', units: 'pixels', - extent: extent + extent: extent, }); const map = new Map({ @@ -23,15 +22,15 @@ const map = new Map({ attributions: '© xkcd', url: 'https://imgs.xkcd.com/comics/online_communities.png', projection: projection, - imageExtent: extent - }) - }) + imageExtent: extent, + }), + }), ], target: 'map', view: new View({ projection: projection, center: getCenter(extent), zoom: 2, - maxZoom: 8 - }) + maxZoom: 8, + }), }); diff --git a/examples/street-labels.js b/examples/street-labels.js index c3b7910f18..7e07d4026e 100644 --- a/examples/street-labels.js +++ b/examples/street-labels.js @@ -1,50 +1,55 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getCenter} from '../src/ol/extent.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import XYZ from '../src/ol/source/XYZ.js'; +import Map from '../src/ol/Map.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; import {Fill, Style, Text} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {getCenter} from '../src/ol/extent.js'; const style = new Style({ text: new Text({ font: 'bold 11px "Open Sans", "Arial Unicode MS", "sans-serif"', placement: 'line', fill: new Fill({ - color: 'white' - }) - }) + color: 'white', + }), + }), }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const viewExtent = [1817379, 6139595, 1827851, 6143616]; const map = new Map({ - layers: [new TileLayer({ - source: new XYZ({ - attributions: attributions, - url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) - }), new VectorLayer({ - declutter: true, - source: new VectorSource({ - format: new GeoJSON(), - url: 'data/geojson/vienna-streets.geojson' + layers: [ + new TileLayer({ + source: new XYZ({ + attributions: attributions, + url: + 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20, + }), }), - style: function(feature) { - style.getText().setText(feature.get('name')); - return style; - } - })], + new VectorLayer({ + declutter: true, + source: new VectorSource({ + format: new GeoJSON(), + url: 'data/geojson/vienna-streets.geojson', + }), + style: function (feature) { + style.getText().setText(feature.get('name')); + return style; + }, + }), + ], target: 'map', view: new View({ extent: viewExtent, center: getCenter(viewExtent), zoom: 17, - minZoom: 14 - }) + minZoom: 14, + }), }); diff --git a/examples/svg-layer.js b/examples/svg-layer.js index 6c56a53706..c6f2b9028a 100644 --- a/examples/svg-layer.js +++ b/examples/svg-layer.js @@ -1,6 +1,6 @@ +import Layer from '../src/ol/layer/Layer.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import Layer from '../src/ol/layer/Layer.js'; import {composeCssTransform} from '../src/ol/transform.js'; const map = new Map({ @@ -9,14 +9,14 @@ const map = new Map({ center: [0, 0], extent: [-180, -90, 180, 90], projection: 'EPSG:4326', - zoom: 2 - }) + zoom: 2, + }), }); const svgContainer = document.createElement('div'); const xhr = new XMLHttpRequest(); xhr.open('GET', 'data/world.svg'); -xhr.addEventListener('load', function() { +xhr.addEventListener('load', function () { const svg = xhr.responseXML.documentElement; svgContainer.ownerDocument.importNode(svg); svgContainer.appendChild(svg); @@ -31,18 +31,24 @@ svgContainer.style.height = height + 'px'; svgContainer.style.transformOrigin = 'top left'; svgContainer.className = 'svg-layer'; -map.addLayer(new Layer({ - render: function(frameState) { - const scale = svgResolution / frameState.viewState.resolution; - const center = frameState.viewState.center; - const size = frameState.size; - const cssTransform = composeCssTransform( - size[0] / 2, size[1] / 2, - scale, scale, - frameState.viewState.rotation, - -center[0] / svgResolution - width / 2, center[1] / svgResolution - height / 2); - svgContainer.style.transform = cssTransform; - svgContainer.style.opacity = this.getOpacity(); - return svgContainer; - } -})); +map.addLayer( + new Layer({ + render: function (frameState) { + const scale = svgResolution / frameState.viewState.resolution; + const center = frameState.viewState.center; + const size = frameState.size; + const cssTransform = composeCssTransform( + size[0] / 2, + size[1] / 2, + scale, + scale, + frameState.viewState.rotation, + -center[0] / svgResolution - width / 2, + center[1] / svgResolution - height / 2 + ); + svgContainer.style.transform = cssTransform; + svgContainer.style.opacity = this.getOpacity(); + return svgContainer; + }, + }) +); diff --git a/examples/synthetic-lines.js b/examples/synthetic-lines.js index c2ae45df83..f6a1291855 100644 --- a/examples/synthetic-lines.js +++ b/examples/synthetic-lines.js @@ -1,12 +1,11 @@ import Feature from '../src/ol/Feature.js'; -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import LineString from '../src/ol/geom/LineString.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Stroke, Style} from '../src/ol/style.js'; - const count = 10000; const features = new Array(count); @@ -30,7 +29,7 @@ for (i = 0; i < count; ++i) { deltaY = delta * signY; endPoint = [startPoint[0] + deltaX, startPoint[1] + deltaY]; features[i] = new Feature({ - 'geometry': new LineString([startPoint, endPoint]) + 'geometry': new LineString([startPoint, endPoint]), }); startPoint = endPoint; } @@ -38,23 +37,23 @@ for (i = 0; i < count; ++i) { const vector = new VectorLayer({ source: new VectorSource({ features: features, - wrapX: false + wrapX: false, }), style: new Style({ stroke: new Stroke({ color: '#666666', - width: 1 - }) - }) + width: 1, + }), + }), }); const view = new View({ center: [0, 0], - zoom: 0 + zoom: 0, }); const map = new Map({ layers: [vector], target: 'map', - view: view + view: view, }); diff --git a/examples/synthetic-points.js b/examples/synthetic-points.js index 1eceb86fdf..4c92d24c2e 100644 --- a/examples/synthetic-points.js +++ b/examples/synthetic-points.js @@ -1,22 +1,23 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {LineString, Point} from '../src/ol/geom.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; +import {LineString, Point} from '../src/ol/geom.js'; import {getVectorContext} from '../src/ol/render.js'; - const count = 20000; const features = new Array(count); const e = 18000000; for (let i = 0; i < count; ++i) { features[i] = new Feature({ - 'geometry': new Point( - [2 * e * Math.random() - e, 2 * e * Math.random() - e]), + 'geometry': new Point([ + 2 * e * Math.random() - e, + 2 * e * Math.random() - e, + ]), 'i': i, - 'size': i % 2 ? 10 : 20 + 'size': i % 2 ? 10 : 20, }); } @@ -25,27 +26,27 @@ const styles = { image: new CircleStyle({ radius: 5, fill: new Fill({color: '#666666'}), - stroke: new Stroke({color: '#bada55', width: 1}) - }) + stroke: new Stroke({color: '#bada55', width: 1}), + }), }), '20': new Style({ image: new CircleStyle({ radius: 10, fill: new Fill({color: '#666666'}), - stroke: new Stroke({color: '#bada55', width: 1}) - }) - }) + stroke: new Stroke({color: '#bada55', width: 1}), + }), + }), }; const vectorSource = new VectorSource({ features: features, - wrapX: false + wrapX: false, }); const vector = new VectorLayer({ source: vectorSource, - style: function(feature) { + style: function (feature) { return styles[feature.get('size')]; - } + }, }); const map = new Map({ @@ -53,13 +54,13 @@ const map = new Map({ target: document.getElementById('map'), view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); let point = null; let line = null; -const displaySnap = function(coordinate) { +const displaySnap = function (coordinate) { const closestFeature = vectorSource.getClosestFeatureToCoordinate(coordinate); if (closestFeature === null) { point = null; @@ -81,7 +82,7 @@ const displaySnap = function(coordinate) { map.render(); }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -89,23 +90,23 @@ map.on('pointermove', function(evt) { displaySnap(coordinate); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displaySnap(evt.coordinate); }); const stroke = new Stroke({ color: 'rgba(255,255,0,0.9)', - width: 3 + width: 3, }); const style = new Style({ stroke: stroke, image: new CircleStyle({ radius: 10, - stroke: stroke - }) + stroke: stroke, + }), }); -vector.on('postrender', function(evt) { +vector.on('postrender', function (evt) { const vectorContext = getVectorContext(evt); vectorContext.setStyle(style); if (point !== null) { @@ -116,7 +117,7 @@ vector.on('postrender', function(evt) { } }); -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } diff --git a/examples/teleport.js b/examples/teleport.js index 3a8aa60d08..1336d68b8e 100644 --- a/examples/teleport.js +++ b/examples/teleport.js @@ -1,26 +1,29 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); map.setTarget('map1'); const teleportButton = document.getElementById('teleport'); -teleportButton.addEventListener('click', function() { - const target = map.getTarget() === 'map1' ? 'map2' : 'map1'; - map.setTarget(target); -}, false); +teleportButton.addEventListener( + 'click', + function () { + const target = map.getTarget() === 'map1' ? 'map2' : 'map1'; + map.setTarget(target); + }, + false +); diff --git a/examples/tile-load-events.js b/examples/tile-load-events.js index 80244d455e..3e0f4a4fad 100644 --- a/examples/tile-load-events.js +++ b/examples/tile-load-events.js @@ -1,8 +1,7 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import TileJSON from '../src/ol/source/TileJSON.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; /** * Renders a progress bar. @@ -15,11 +14,10 @@ function Progress(el) { this.loaded = 0; } - /** * Increment the count of loading tiles. */ -Progress.prototype.addLoading = function() { +Progress.prototype.addLoading = function () { if (this.loading === 0) { this.show(); } @@ -27,48 +25,44 @@ Progress.prototype.addLoading = function() { this.update(); }; - /** * Increment the count of loaded tiles. */ -Progress.prototype.addLoaded = function() { +Progress.prototype.addLoaded = function () { const this_ = this; - setTimeout(function() { + setTimeout(function () { ++this_.loaded; this_.update(); }, 100); }; - /** * Update the progress bar. */ -Progress.prototype.update = function() { - const width = (this.loaded / this.loading * 100).toFixed(1) + '%'; +Progress.prototype.update = function () { + const width = ((this.loaded / this.loading) * 100).toFixed(1) + '%'; this.el.style.width = width; if (this.loading === this.loaded) { this.loading = 0; this.loaded = 0; const this_ = this; - setTimeout(function() { + setTimeout(function () { this_.hide(); }, 500); } }; - /** * Show the progress bar. */ -Progress.prototype.show = function() { +Progress.prototype.show = function () { this.el.style.visibility = 'visible'; }; - /** * Hide the progress bar. */ -Progress.prototype.hide = function() { +Progress.prototype.hide = function () { if (this.loading === this.loaded) { this.el.style.visibility = 'hidden'; this.el.style.width = 0; @@ -77,30 +71,31 @@ Progress.prototype.hide = function() { const progress = new Progress(document.getElementById('progress')); -const key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; +const key = + 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; const source = new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.world-bright.json?secure&access_token=' + key, - crossOrigin: 'anonymous' + url: + 'https://api.tiles.mapbox.com/v4/mapbox.world-bright.json?secure&access_token=' + + key, + crossOrigin: 'anonymous', }); -source.on('tileloadstart', function() { +source.on('tileloadstart', function () { progress.addLoading(); }); -source.on('tileloadend', function() { +source.on('tileloadend', function () { progress.addLoaded(); }); -source.on('tileloaderror', function() { +source.on('tileloaderror', function () { progress.addLoaded(); }); const map = new Map({ - layers: [ - new TileLayer({source: source}) - ], + layers: [new TileLayer({source: source})], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/tile-transitions.js b/examples/tile-transitions.js index b2b1721d3b..59bd1cd030 100644 --- a/examples/tile-transitions.js +++ b/examples/tile-transitions.js @@ -1,18 +1,21 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; -const key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; -const url = 'https://{a-c}.tiles.mapbox.com/v4/mapbox.world-bright/{z}/{x}/{y}.png?access_token=' + key; +const key = + 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; +const url = + 'https://{a-c}.tiles.mapbox.com/v4/mapbox.world-bright/{z}/{x}/{y}.png?access_token=' + + key; const withTransition = new TileLayer({ - source: new XYZ({url: url}) + source: new XYZ({url: url}), }); const withoutTransition = new TileLayer({ source: new XYZ({url: url, transition: 0}), - visible: false + visible: false, }); const map = new Map({ @@ -21,12 +24,14 @@ const map = new Map({ view: new View({ center: [0, 0], zoom: 2, - maxZoom: 11 - }) + maxZoom: 11, + }), }); -document.getElementById('transition').addEventListener('change', function(event) { - const transition = event.target.checked; - withTransition.setVisible(transition); - withoutTransition.setVisible(!transition); -}); +document + .getElementById('transition') + .addEventListener('change', function (event) { + const transition = event.target.checked; + withTransition.setVisible(transition); + withoutTransition.setVisible(!transition); + }); diff --git a/examples/tilejson.js b/examples/tilejson.js index 684b25aca3..7b17267828 100644 --- a/examples/tilejson.js +++ b/examples/tilejson.js @@ -1,21 +1,20 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import TileJSON from '../src/ol/source/TileJSON.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; const map = new Map({ layers: [ new TileLayer({ source: new TileJSON({ url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json', - crossOrigin: 'anonymous' - }) - }) + crossOrigin: 'anonymous', + }), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/tissot.js b/examples/tissot.js index c5ecf3a123..6388b0cfeb 100644 --- a/examples/tissot.js +++ b/examples/tissot.js @@ -1,17 +1,17 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {circular as circularPolygon} from '../src/ol/geom/Polygon.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import TileWMS from '../src/ol/source/TileWMS.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import {circular as circularPolygon} from '../src/ol/geom/Polygon.js'; const vectorLayer4326 = new VectorLayer({ - source: new VectorSource() + source: new VectorSource(), }); const vectorLayer3857 = new VectorLayer({ - source: new VectorSource() + source: new VectorSource(), }); const map4326 = new Map({ @@ -21,18 +21,18 @@ const map4326 = new Map({ url: 'https://ahocevar.com/geoserver/wms', params: { 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', - 'TILED': true - } - }) + 'TILED': true, + }, + }), }), - vectorLayer4326 + vectorLayer4326, ], target: 'map4326', view: new View({ projection: 'EPSG:4326', center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const map3857 = new Map({ @@ -42,17 +42,17 @@ const map3857 = new Map({ url: 'https://ahocevar.com/geoserver/wms', params: { 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', - 'TILED': true - } - }) + 'TILED': true, + }, + }), }), - vectorLayer3857 + vectorLayer3857, ], target: 'map3857', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const radius = 800000; diff --git a/examples/topojson.js b/examples/topojson.js index d60c8ba316..4ddb63689b 100644 --- a/examples/topojson.js +++ b/examples/topojson.js @@ -1,26 +1,29 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TopoJSON from '../src/ol/format/TopoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import TileJSON from '../src/ol/source/TileJSON.js'; +import TopoJSON from '../src/ol/format/TopoJSON.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -const key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; +const key = + 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; const raster = new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.world-dark.json?secure&access_token=' + key - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.world-dark.json?secure&access_token=' + + key, + }), }); const style = new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 - }) + width: 1, + }), }); const vector = new VectorLayer({ @@ -29,11 +32,11 @@ const vector = new VectorLayer({ format: new TopoJSON({ // don't want to render the full world polygon (stored as 'land' layer), // which repeats all countries - layers: ['countries'] + layers: ['countries'], }), - overlaps: false + overlaps: false, }), - style: style + style: style, }); const map = new Map({ @@ -41,6 +44,6 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); diff --git a/examples/topolis.js b/examples/topolis.js index 71102b20cf..823026477b 100644 --- a/examples/topolis.js +++ b/examples/topolis.js @@ -1,73 +1,79 @@ import Feature from '../src/ol/Feature.js'; import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {Point, LineString, Polygon} from '../src/ol/geom.js'; -import {Draw, Snap} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; -import {Fill, Circle as CircleStyle, Stroke, Style, Text} from '../src/ol/style.js'; import MousePosition from '../src/ol/control/MousePosition.js'; +import View from '../src/ol/View.js'; +import { + Circle as CircleStyle, + Fill, + Stroke, + Style, + Text, +} from '../src/ol/style.js'; +import {Draw, Snap} from '../src/ol/interaction.js'; +import {LineString, Point, Polygon} from '../src/ol/geom.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const nodes = new VectorSource({wrapX: false}); const nodesLayer = new VectorLayer({ source: nodes, - style: function(f) { + style: function (f) { const style = new Style({ image: new CircleStyle({ radius: 8, fill: new Fill({color: 'rgba(255, 0, 0, 0.2)'}), - stroke: new Stroke({color: 'red', width: 1}) + stroke: new Stroke({color: 'red', width: 1}), }), text: new Text({ text: f.get('node').id.toString(), fill: new Fill({color: 'red'}), stroke: new Stroke({ color: 'white', - width: 3 - }) - }) + width: 3, + }), + }), }); return [style]; - } + }, }); const edges = new VectorSource({wrapX: false}); const edgesLayer = new VectorLayer({ source: edges, - style: function(f) { + style: function (f) { const style = new Style({ stroke: new Stroke({ color: 'blue', - width: 1 + width: 1, }), text: new Text({ text: f.get('edge').id.toString(), fill: new Fill({color: 'blue'}), stroke: new Stroke({ color: 'white', - width: 2 - }) - }) + width: 2, + }), + }), }); return [style]; - } + }, }); const faces = new VectorSource({wrapX: false}); const facesLayer = new VectorLayer({ source: faces, - style: function(f) { + style: function (f) { const style = new Style({ stroke: new Stroke({ color: 'black', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(0, 255, 0, 0.2)' + color: 'rgba(0, 255, 0, 0.2)', }), text: new Text({ font: 'bold 12px sans-serif', @@ -75,12 +81,12 @@ const facesLayer = new VectorLayer({ fill: new Fill({color: 'green'}), stroke: new Stroke({ color: 'white', - width: 2 - }) - }) + width: 2, + }), + }), }); return [style]; - } + }, }); const map = new Map({ @@ -88,26 +94,26 @@ const map = new Map({ target: 'map', view: new View({ center: [-11000000, 4600000], - zoom: 16 - }) + zoom: 16, + }), }); const topo = topolis.createTopology(); topo.on('addnode', nodeToFeature); -topo.on('removenode', function(e) { +topo.on('removenode', function (e) { removeElementFeature(nodes, e); }); topo.on('addedge', edgeToFeature); -topo.on('modedge', function(e) { +topo.on('modedge', function (e) { const feature = edges.getFeatureById(e.id); feature.setGeometry(new LineString(e.coordinates)); }); -topo.on('removeedge', function(e) { +topo.on('removeedge', function (e) { removeElementFeature(edges, e); }); topo.on('addface', faceToFeature); -topo.on('removeface', function(e) { +topo.on('removeface', function (e) { removeElementFeature(faces, e); }); @@ -119,7 +125,7 @@ function removeElementFeature(source, element) { function nodeToFeature(node) { const feature = new Feature({ geometry: new Point(node.coordinate), - node: node + node: node, }); feature.setId(node.id); nodes.addFeature(feature); @@ -128,7 +134,7 @@ function nodeToFeature(node) { function edgeToFeature(edge) { const feature = new Feature({ geometry: new LineString(edge.coordinates), - edge: edge + edge: edge, }); feature.setId(edge.id); edges.addFeature(feature); @@ -138,7 +144,7 @@ function faceToFeature(face) { const coordinates = topo.getFaceGeometry(face); const feature = new Feature({ geometry: new Polygon(coordinates), - face: face + face: face, }); feature.setId(face.id); faces.addFeature(feature); @@ -166,7 +172,13 @@ function onDrawend(e) { const edgesAtStart = topo.getEdgeByPoint(startCoord, 5); const edgesAtEnd = topo.getEdgeByPoint(endCoord, 5); const crossing = topo.getEdgesByLine(edgeGeom); - if (crossing.length === 1 && !start && !end && edgesAtStart.length === 0 && edgesAtEnd.length === 0) { + if ( + crossing.length === 1 && + !start && + !end && + edgesAtStart.length === 0 && + edgesAtEnd.length === 0 + ) { topo.remEdgeNewFace(crossing[0]); start = crossing[0].start; if (start.face) { @@ -193,12 +205,12 @@ function onDrawend(e) { } const draw = new Draw({ - type: 'LineString' + type: 'LineString', }); draw.on('drawend', onDrawend); map.addInteraction(draw); const snap = new Snap({ - source: edges + source: edges, }); map.addInteraction(snap); map.addControl(new MousePosition()); diff --git a/examples/tracing.js b/examples/tracing.js index 3379631b0c..87b3fa19f8 100644 --- a/examples/tracing.js +++ b/examples/tracing.js @@ -1,28 +1,31 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import Draw from '../src/ol/interaction/Draw.js'; -import Snap from '../src/ol/interaction/Snap.js'; -import Style from '../src/ol/style/Style.js'; -import Stroke from '../src/ol/style/Stroke.js'; +import Feature from '../src/ol/Feature.js'; import Fill from '../src/ol/style/Fill.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import LineString from '../src/ol/geom/LineString.js'; -import Feature from '../src/ol/Feature.js'; +import Map from '../src/ol/Map.js'; +import Snap from '../src/ol/interaction/Snap.js'; +import Stroke from '../src/ol/style/Stroke.js'; +import Style from '../src/ol/style/Style.js'; +import View from '../src/ol/View.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; // math utilities // coordinates; will return the length of the [a, b] segment function length(a, b) { - return Math.sqrt((b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1])); + return Math.sqrt( + (b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1]) + ); } // coordinates; will return true if c is on the [a, b] segment function isOnSegment(c, a, b) { const lengthAc = length(a, c); const lengthAb = length(a, b); - const dot = ((c[0] - a[0]) * (b[0] - a[0]) + (c[1] - a[1]) * (b[1] - a[1])) / lengthAb; + const dot = + ((c[0] - a[0]) * (b[0] - a[0]) + (c[1] - a[1]) * (b[1] - a[1])) / lengthAb; return Math.abs(lengthAc - dot) < 1e-6 && lengthAc < lengthAb; } @@ -41,7 +44,10 @@ function getPartialRingCoords(feature, startPoint, endPoint) { } const ringCoords = polygon.getLinearRing().getCoordinates(); - let i, pointA, pointB, startSegmentIndex = -1; + let i, + pointA, + pointB, + startSegmentIndex = -1; for (i = 0; i < ringCoords.length; i++) { pointA = ringCoords[i]; pointB = ringCoords[mod(i + 1, ringCoords.length)]; @@ -60,7 +66,10 @@ function getPartialRingCoords(feature, startPoint, endPoint) { // build clockwise coordinates for (i = 0; i < ringCoords.length; i++) { - pointA = i === 0 ? startPoint : ringCoords[mod(i + startSegmentIndex, ringCoords.length)]; + pointA = + i === 0 + ? startPoint + : ringCoords[mod(i + startSegmentIndex, ringCoords.length)]; pointB = ringCoords[mod(i + startSegmentIndex + 1, ringCoords.length)]; cwCoordinates.push(pointA); @@ -76,7 +85,10 @@ function getPartialRingCoords(feature, startPoint, endPoint) { // build counter-clockwise coordinates for (i = 0; i < ringCoords.length; i++) { pointA = ringCoords[mod(startSegmentIndex - i, ringCoords.length)]; - pointB = i === 0 ? startPoint : ringCoords[mod(startSegmentIndex - i + 1, ringCoords.length)]; + pointB = + i === 0 + ? startPoint + : ringCoords[mod(startSegmentIndex - i + 1, ringCoords.length)]; ccwCoordinates.push(pointB); if (isOnSegment(endPoint, pointA, pointB)) { @@ -92,19 +104,19 @@ function getPartialRingCoords(feature, startPoint, endPoint) { return ccwLength < cwLength ? ccwCoordinates : cwCoordinates; } - // layers definition const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); // features in this layer will be snapped to const baseVector = new VectorLayer({ source: new VectorSource({ format: new GeoJSON(), - url: 'https://ahocevar.com/geoserver/wfs?service=wfs&request=getfeature&typename=topp:states&cql_filter=STATE_NAME=\'Idaho\'&outputformat=application/json' - }) + url: + "https://ahocevar.com/geoserver/wfs?service=wfs&request=getfeature&typename=topp:states&cql_filter=STATE_NAME='Idaho'&outputformat=application/json", + }), }); // this is were the drawn features go @@ -113,28 +125,28 @@ const drawVector = new VectorLayer({ style: new Style({ stroke: new Stroke({ color: 'rgba(100, 255, 0, 1)', - width: 2 + width: 2, }), fill: new Fill({ - color: 'rgba(100, 255, 0, 0.3)' - }) - }) + color: 'rgba(100, 255, 0, 0.3)', + }), + }), }); // this line only appears when we're tracing a feature outer ring const previewLine = new Feature({ - geometry: new LineString([]) + geometry: new LineString([]), }); const previewVector = new VectorLayer({ source: new VectorSource({ - features: [previewLine] + features: [previewLine], }), style: new Style({ stroke: new Stroke({ color: 'rgba(255, 0, 0, 1)', - width: 2 - }) - }) + width: 2, + }), + }), }); const map = new Map({ @@ -142,8 +154,8 @@ const map = new Map({ target: 'map', view: new View({ center: [-12986427, 5678422], - zoom: 5 - }) + zoom: 5, + }), }); let drawInteraction, tracingFeature, startPoint, endPoint; @@ -153,7 +165,7 @@ const getFeatureOptions = { hitTolerance: 10, layerFilter: (layer) => { return layer === baseVector; - } + }, }; // the click event is used to start/end tracing around a feature @@ -176,7 +188,11 @@ map.on('click', (event) => { // second click on the tracing feature: append the ring coordinates if (feature === tracingFeature) { endPoint = tracingFeature.getGeometry().getClosestPoint(coord); - const appendCoords = getPartialRingCoords(tracingFeature, startPoint, endPoint); + const appendCoords = getPartialRingCoords( + tracingFeature, + startPoint, + endPoint + ); drawInteraction.removeLastPoint(); drawInteraction.appendCoordinates(appendCoords); tracingFeature = null; @@ -213,14 +229,18 @@ map.on('pointermove', (event) => { let previewCoords = []; if (coord) { endPoint = tracingFeature.getGeometry().getClosestPoint(coord); - previewCoords = getPartialRingCoords(tracingFeature, startPoint, endPoint); + previewCoords = getPartialRingCoords( + tracingFeature, + startPoint, + endPoint + ); } previewLine.getGeometry().setCoordinates(previewCoords); } }); const snapInteraction = new Snap({ - source: baseVector.getSource() + source: baseVector.getSource(), }); const typeSelect = document.getElementById('type'); @@ -230,7 +250,7 @@ function addInteraction() { if (value !== 'None') { drawInteraction = new Draw({ source: drawVector.getSource(), - type: typeSelect.value + type: typeSelect.value, }); drawInteraction.on('drawstart', () => { drawing = true; @@ -245,7 +265,7 @@ function addInteraction() { } } -typeSelect.onchange = function() { +typeSelect.onchange = function () { map.removeInteraction(drawInteraction); map.removeInteraction(snapInteraction); addInteraction(); diff --git a/examples/translate-features.js b/examples/translate-features.js index fa2aa4d57a..29d9965726 100644 --- a/examples/translate-features.js +++ b/examples/translate-features.js @@ -1,27 +1,30 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {defaults as defaultInteractions, Select, Translate} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; - +import View from '../src/ol/View.js'; +import { + Select, + Translate, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); const vector = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() - }) + format: new GeoJSON(), + }), }); const select = new Select(); const translate = new Translate({ - features: select.getFeatures() + features: select.getFeatures(), }); const map = new Map({ @@ -30,6 +33,6 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/turf.js b/examples/turf.js index a9e3fa6f35..0d245cdc14 100644 --- a/examples/turf.js +++ b/examples/turf.js @@ -1,52 +1,53 @@ +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; +import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {fromLonLat} from '../src/ol/proj.js'; -import {OSM, Vector as VectorSource} from '../src/ol/source.js'; - const source = new VectorSource(); -fetch('data/geojson/roads-seoul.geojson').then(function(response) { - return response.json(); -}).then(function(json) { - const format = new GeoJSON(); - const features = format.readFeatures(json); - const street = features[0]; +fetch('data/geojson/roads-seoul.geojson') + .then(function (response) { + return response.json(); + }) + .then(function (json) { + const format = new GeoJSON(); + const features = format.readFeatures(json); + const street = features[0]; - // convert to a turf.js feature - const turfLine = format.writeFeatureObject(street); + // convert to a turf.js feature + const turfLine = format.writeFeatureObject(street); - // show a marker every 200 meters - const distance = 0.2; + // show a marker every 200 meters + const distance = 0.2; - // get the line length in kilometers - const length = turf.lineDistance(turfLine, 'kilometers'); - for (let i = 1; i <= length / distance; i++) { - const turfPoint = turf.along(turfLine, i * distance, 'kilometers'); + // get the line length in kilometers + const length = turf.lineDistance(turfLine, 'kilometers'); + for (let i = 1; i <= length / distance; i++) { + const turfPoint = turf.along(turfLine, i * distance, 'kilometers'); - // convert the generated point to a OpenLayers feature - const marker = format.readFeature(turfPoint); - marker.getGeometry().transform('EPSG:4326', 'EPSG:3857'); - source.addFeature(marker); - } + // convert the generated point to a OpenLayers feature + const marker = format.readFeature(turfPoint); + marker.getGeometry().transform('EPSG:4326', 'EPSG:3857'); + source.addFeature(marker); + } - street.getGeometry().transform('EPSG:4326', 'EPSG:3857'); - source.addFeature(street); -}); + street.getGeometry().transform('EPSG:4326', 'EPSG:3857'); + source.addFeature(street); + }); const vectorLayer = new VectorLayer({ - source: source + source: source, }); const rasterLayer = new TileLayer({ - source: new OSM() + source: new OSM(), }); const map = new Map({ layers: [rasterLayer, vectorLayer], target: document.getElementById('map'), view: new View({ - center: fromLonLat([126.980366, 37.526540]), - zoom: 15 - }) + center: fromLonLat([126.980366, 37.52654]), + zoom: 15, + }), }); diff --git a/examples/two-finger-pan-scroll.js b/examples/two-finger-pan-scroll.js index 1207d28799..09eef263ab 100644 --- a/examples/two-finger-pan-scroll.js +++ b/examples/two-finger-pan-scroll.js @@ -1,29 +1,29 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; -import {defaults, DragPan, MouseWheelZoom} from '../src/ol/interaction.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; +import {DragPan, MouseWheelZoom, defaults} from '../src/ol/interaction.js'; import {platformModifierKeyOnly} from '../src/ol/events/condition.js'; const map = new Map({ interactions: defaults({dragPan: false, mouseWheelZoom: false}).extend([ new DragPan({ - condition: function(event) { + condition: function (event) { return this.getPointerCount() === 2 || platformModifierKeyOnly(event); - } + }, }), new MouseWheelZoom({ - condition: platformModifierKeyOnly - }) + condition: platformModifierKeyOnly, + }), ]), layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/utfgrid.js b/examples/utfgrid.js index 92b117c100..86a05ca6e7 100644 --- a/examples/utfgrid.js +++ b/examples/utfgrid.js @@ -1,35 +1,39 @@ import Map from '../src/ol/Map.js'; import Overlay from '../src/ol/Overlay.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import TileJSON from '../src/ol/source/TileJSON.js'; +import TileLayer from '../src/ol/layer/Tile.js'; import UTFGrid from '../src/ol/source/UTFGrid.js'; +import View from '../src/ol/View.js'; -const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; +const key = + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q'; const mapLayer = new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.geography-class.json?secure&access_token=' + key - }) + url: + 'https://api.tiles.mapbox.com/v4/mapbox.geography-class.json?secure&access_token=' + + key, + }), }); - const gridSource = new UTFGrid({ - url: 'https://api.tiles.mapbox.com/v4/mapbox.geography-class.json?secure&access_token=' + key + url: + 'https://api.tiles.mapbox.com/v4/mapbox.geography-class.json?secure&access_token=' + + key, }); const gridLayer = new TileLayer({source: gridSource}); const view = new View({ center: [0, 0], - zoom: 1 + zoom: 1, }); const mapElement = document.getElementById('map'); const map = new Map({ layers: [mapLayer, gridLayer], target: mapElement, - view: view + view: view, }); const infoElement = document.getElementById('country-info'); @@ -39,14 +43,16 @@ const nameElement = document.getElementById('country-name'); const infoOverlay = new Overlay({ element: infoElement, offset: [15, 15], - stopEvent: false + stopEvent: false, }); map.addOverlay(infoOverlay); -const displayCountryInfo = function(coordinate) { +const displayCountryInfo = function (coordinate) { const viewResolution = /** @type {number} */ (view.getResolution()); - gridSource.forDataAtCoordinateAndResolution(coordinate, viewResolution, - function(data) { + gridSource.forDataAtCoordinateAndResolution( + coordinate, + viewResolution, + function (data) { // If you want to use the template from the TileJSON, // load the mustache.js library separately and call // info.innerHTML = Mustache.render(gridSource.getTemplate(), data); @@ -56,10 +62,11 @@ const displayCountryInfo = function(coordinate) { nameElement.innerHTML = data['admin']; } infoOverlay.setPosition(data ? coordinate : undefined); - }); + } + ); }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -67,6 +74,6 @@ map.on('pointermove', function(evt) { displayCountryInfo(coordinate); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayCountryInfo(evt.coordinate); }); diff --git a/examples/vector-esri-edit.js b/examples/vector-esri-edit.js index 6fa31162f4..41837a5713 100644 --- a/examples/vector-esri-edit.js +++ b/examples/vector-esri-edit.js @@ -1,66 +1,91 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import EsriJSON from '../src/ol/format/EsriJSON.js'; -import {defaults as defaultInteractions, Draw, Modify, Select} from '../src/ol/interaction.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {tile as tileStrategy} from '../src/ol/loadingstrategy.js'; -import {fromLonLat} from '../src/ol/proj.js'; +import Map from '../src/ol/Map.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; +import { + Draw, + Modify, + Select, + defaults as defaultInteractions, +} from '../src/ol/interaction.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {createXYZ} from '../src/ol/tilegrid.js'; +import {fromLonLat} from '../src/ol/proj.js'; +import {tile as tileStrategy} from '../src/ol/loadingstrategy.js'; - -const serviceUrl = 'https://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/' + - 'services/PDX_Pedestrian_Districts/FeatureServer/'; +const serviceUrl = + 'https://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/' + + 'services/PDX_Pedestrian_Districts/FeatureServer/'; const layer = '0'; const esrijsonFormat = new EsriJSON(); const vectorSource = new VectorSource({ - loader: function(extent, resolution, projection) { - const url = serviceUrl + layer + '/query/?f=json&' + - 'returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=' + - encodeURIComponent('{"xmin":' + extent[0] + ',"ymin":' + - extent[1] + ',"xmax":' + extent[2] + ',"ymax":' + extent[3] + - ',"spatialReference":{"wkid":102100}}') + - '&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*' + - '&outSR=102100'; - $.ajax({url: url, dataType: 'jsonp', success: function(response) { - if (response.error) { - alert(response.error.message + '\n' + - response.error.details.join('\n')); - } else { - // dataProjection will be read from document - const features = esrijsonFormat.readFeatures(response, { - featureProjection: projection - }); - if (features.length > 0) { - vectorSource.addFeatures(features); + loader: function (extent, resolution, projection) { + const url = + serviceUrl + + layer + + '/query/?f=json&' + + 'returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=' + + encodeURIComponent( + '{"xmin":' + + extent[0] + + ',"ymin":' + + extent[1] + + ',"xmax":' + + extent[2] + + ',"ymax":' + + extent[3] + + ',"spatialReference":{"wkid":102100}}' + ) + + '&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*' + + '&outSR=102100'; + $.ajax({ + url: url, + dataType: 'jsonp', + success: function (response) { + if (response.error) { + alert( + response.error.message + '\n' + response.error.details.join('\n') + ); + } else { + // dataProjection will be read from document + const features = esrijsonFormat.readFeatures(response, { + featureProjection: projection, + }); + if (features.length > 0) { + vectorSource.addFeatures(features); + } } - } - }}); + }, + }); }, - strategy: tileStrategy(createXYZ({ - tileSize: 512 - })) + strategy: tileStrategy( + createXYZ({ + tileSize: 512, + }) + ), }); const vector = new VectorLayer({ - source: vectorSource + source: vectorSource, }); const raster = new TileLayer({ source: new XYZ({ - attributions: 'Tiles © ArcGIS', - url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' + - 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}' - }) + attributions: + 'Tiles © ArcGIS', + url: + 'https://server.arcgisonline.com/ArcGIS/rest/services/' + + 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}', + }), }); const draw = new Draw({ source: vectorSource, - type: 'Polygon' + type: 'Polygon', }); const select = new Select(); @@ -68,7 +93,7 @@ select.setActive(false); const selected = select.getFeatures(); const modify = new Modify({ - features: selected + features: selected, }); modify.setActive(false); @@ -78,17 +103,16 @@ const map = new Map({ target: document.getElementById('map'), view: new View({ center: fromLonLat([-122.619, 45.512]), - zoom: 12 - }) + zoom: 12, + }), }); const typeSelect = document.getElementById('type'); - /** * Let user change the interaction type. */ -typeSelect.onchange = function() { +typeSelect.onchange = function () { draw.setActive(typeSelect.value === 'DRAW'); select.setActive(typeSelect.value === 'MODIFY'); modify.setActive(typeSelect.value === 'MODIFY'); @@ -96,22 +120,25 @@ typeSelect.onchange = function() { const dirty = {}; -selected.on('add', function(evt) { +selected.on('add', function (evt) { const feature = evt.element; - feature.on('change', function(evt) { + feature.on('change', function (evt) { dirty[evt.target.getId()] = true; }); }); -selected.on('remove', function(evt) { +selected.on('remove', function (evt) { const feature = evt.element; const fid = feature.getId(); if (dirty[fid] === true) { - const payload = '[' + esrijsonFormat.writeFeature(feature, { - featureProjection: map.getView().getProjection() - }) + ']'; + const payload = + '[' + + esrijsonFormat.writeFeature(feature, { + featureProjection: map.getView().getProjection(), + }) + + ']'; const url = serviceUrl + layer + '/updateFeatures'; - $.post(url, {f: 'json', features: payload}).done(function(data) { + $.post(url, {f: 'json', features: payload}).done(function (data) { const result = JSON.parse(data); if (result.updateResults && result.updateResults.length > 0) { if (result.updateResults[0].success !== true) { @@ -125,13 +152,16 @@ selected.on('remove', function(evt) { } }); -draw.on('drawend', function(evt) { +draw.on('drawend', function (evt) { const feature = evt.feature; - const payload = '[' + esrijsonFormat.writeFeature(feature, { - featureProjection: map.getView().getProjection() - }) + ']'; + const payload = + '[' + + esrijsonFormat.writeFeature(feature, { + featureProjection: map.getView().getProjection(), + }) + + ']'; const url = serviceUrl + layer + '/addFeatures'; - $.post(url, {f: 'json', features: payload}).done(function(data) { + $.post(url, {f: 'json', features: payload}).done(function (data) { const result = JSON.parse(data); if (result.addResults && result.addResults.length > 0) { if (result.addResults[0].success === true) { diff --git a/examples/vector-esri.js b/examples/vector-esri.js index 729387a186..cb28556a4d 100644 --- a/examples/vector-esri.js +++ b/examples/vector-esri.js @@ -1,17 +1,17 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import EsriJSON from '../src/ol/format/EsriJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {tile as tileStrategy} from '../src/ol/loadingstrategy.js'; -import {fromLonLat} from '../src/ol/proj.js'; +import Map from '../src/ol/Map.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; import {Fill, Stroke, Style} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {createXYZ} from '../src/ol/tilegrid.js'; +import {fromLonLat} from '../src/ol/proj.js'; +import {tile as tileStrategy} from '../src/ol/loadingstrategy.js'; - -const serviceUrl = 'https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/' + - 'Petroleum/KSFields/FeatureServer/'; +const serviceUrl = + 'https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/' + + 'Petroleum/KSFields/FeatureServer/'; const layer = '0'; const esrijsonFormat = new EsriJSON(); @@ -19,86 +19,106 @@ const esrijsonFormat = new EsriJSON(); const styleCache = { 'ABANDONED': new Style({ fill: new Fill({ - color: 'rgba(225, 225, 225, 255)' + color: 'rgba(225, 225, 225, 255)', }), stroke: new Stroke({ color: 'rgba(0, 0, 0, 255)', - width: 0.4 - }) + width: 0.4, + }), }), 'GAS': new Style({ fill: new Fill({ - color: 'rgba(255, 0, 0, 255)' + color: 'rgba(255, 0, 0, 255)', }), stroke: new Stroke({ color: 'rgba(110, 110, 110, 255)', - width: 0.4 - }) + width: 0.4, + }), }), 'OIL': new Style({ fill: new Fill({ - color: 'rgba(56, 168, 0, 255)' + color: 'rgba(56, 168, 0, 255)', }), stroke: new Stroke({ color: 'rgba(110, 110, 110, 255)', - width: 0 - }) + width: 0, + }), }), 'OILGAS': new Style({ fill: new Fill({ - color: 'rgba(168, 112, 0, 255)' + color: 'rgba(168, 112, 0, 255)', }), stroke: new Stroke({ color: 'rgba(110, 110, 110, 255)', - width: 0.4 - }) - }) + width: 0.4, + }), + }), }; const vectorSource = new VectorSource({ - loader: function(extent, resolution, projection) { - const url = serviceUrl + layer + '/query/?f=json&' + - 'returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=' + - encodeURIComponent('{"xmin":' + extent[0] + ',"ymin":' + - extent[1] + ',"xmax":' + extent[2] + ',"ymax":' + extent[3] + - ',"spatialReference":{"wkid":102100}}') + - '&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*' + - '&outSR=102100'; - $.ajax({url: url, dataType: 'jsonp', success: function(response) { - if (response.error) { - alert(response.error.message + '\n' + - response.error.details.join('\n')); - } else { - // dataProjection will be read from document - const features = esrijsonFormat.readFeatures(response, { - featureProjection: projection - }); - if (features.length > 0) { - vectorSource.addFeatures(features); + loader: function (extent, resolution, projection) { + const url = + serviceUrl + + layer + + '/query/?f=json&' + + 'returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=' + + encodeURIComponent( + '{"xmin":' + + extent[0] + + ',"ymin":' + + extent[1] + + ',"xmax":' + + extent[2] + + ',"ymax":' + + extent[3] + + ',"spatialReference":{"wkid":102100}}' + ) + + '&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*' + + '&outSR=102100'; + $.ajax({ + url: url, + dataType: 'jsonp', + success: function (response) { + if (response.error) { + alert( + response.error.message + '\n' + response.error.details.join('\n') + ); + } else { + // dataProjection will be read from document + const features = esrijsonFormat.readFeatures(response, { + featureProjection: projection, + }); + if (features.length > 0) { + vectorSource.addFeatures(features); + } } - } - }}); + }, + }); }, - strategy: tileStrategy(createXYZ({ - tileSize: 512 - })) + strategy: tileStrategy( + createXYZ({ + tileSize: 512, + }) + ), }); const vector = new VectorLayer({ source: vectorSource, - style: function(feature) { + style: function (feature) { const classify = feature.get('activeprod'); return styleCache[classify]; - } + }, }); const raster = new TileLayer({ source: new XYZ({ - attributions: 'Tiles © ArcGIS', - url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' + - 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}' - }) + attributions: + 'Tiles © ArcGIS', + url: + 'https://server.arcgisonline.com/ArcGIS/rest/services/' + + 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}', + }), }); const map = new Map({ @@ -106,13 +126,13 @@ const map = new Map({ target: document.getElementById('map'), view: new View({ center: fromLonLat([-97.6114, 38.8403]), - zoom: 7 - }) + zoom: 7, + }), }); -const displayFeatureInfo = function(pixel) { +const displayFeatureInfo = function (pixel) { const features = []; - map.forEachFeatureAtPixel(pixel, function(feature) { + map.forEachFeatureAtPixel(pixel, function (feature) { features.push(feature); }); if (features.length > 0) { @@ -129,7 +149,7 @@ const displayFeatureInfo = function(pixel) { } }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -137,6 +157,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(pixel); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/vector-label-decluttering.js b/examples/vector-label-decluttering.js index 5f8ad18bf3..9048e17523 100644 --- a/examples/vector-label-decluttering.js +++ b/examples/vector-label-decluttering.js @@ -1,16 +1,16 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style, Text} from '../src/ol/style.js'; const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); const labelStyle = new Style({ @@ -18,35 +18,35 @@ const labelStyle = new Style({ font: '12px Calibri,sans-serif', overflow: true, fill: new Fill({ - color: '#000' + color: '#000', }), stroke: new Stroke({ color: '#fff', - width: 3 - }) - }) + width: 3, + }), + }), }); const countryStyle = new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 - }) + width: 1, + }), }); const style = [countryStyle, labelStyle]; const vectorLayer = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: function(feature) { + style: function (feature) { labelStyle.getText().setText(feature.get('name')); return style; }, - declutter: true + declutter: true, }); map.addLayer(vectorLayer); diff --git a/examples/vector-labels.js b/examples/vector-labels.js index 9867b04dc6..2ee2625054 100644 --- a/examples/vector-labels.js +++ b/examples/vector-labels.js @@ -1,9 +1,15 @@ +import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; -import GeoJSON from '../src/ol/format/GeoJSON.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; +import { + Circle as CircleStyle, + Fill, + Stroke, + Style, + Text, +} from '../src/ol/style.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; -import {Circle as CircleStyle, Fill, Stroke, Style, Text} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; let openSansAdded = false; @@ -22,7 +28,7 @@ const myDom = { color: document.getElementById('points-color'), outline: document.getElementById('points-outline'), outlineWidth: document.getElementById('points-outline-width'), - maxreso: document.getElementById('points-maxreso') + maxreso: document.getElementById('points-maxreso'), }, lines: { text: document.getElementById('lines-text'), @@ -41,7 +47,7 @@ const myDom = { color: document.getElementById('lines-color'), outline: document.getElementById('lines-outline'), outlineWidth: document.getElementById('lines-outline-width'), - maxreso: document.getElementById('lines-maxreso') + maxreso: document.getElementById('lines-maxreso'), }, polygons: { text: document.getElementById('polygons-text'), @@ -60,11 +66,11 @@ const myDom = { color: document.getElementById('polygons-color'), outline: document.getElementById('polygons-outline'), outlineWidth: document.getElementById('polygons-outline-width'), - maxreso: document.getElementById('polygons-maxreso') - } + maxreso: document.getElementById('polygons-maxreso'), + }, }; -const getText = function(feature, resolution, dom) { +const getText = function (feature, resolution, dom) { const type = dom.text.value; const maxResolution = dom.maxreso.value; let text = feature.get('name'); @@ -75,15 +81,17 @@ const getText = function(feature, resolution, dom) { text = ''; } else if (type == 'shorten') { text = text.trunc(12); - } else if (type == 'wrap' && (!dom.placement || dom.placement.value != 'line')) { + } else if ( + type == 'wrap' && + (!dom.placement || dom.placement.value != 'line') + ) { text = stringDivider(text, 16, '\n'); } return text; }; - -const createTextStyle = function(feature, resolution, dom) { +const createTextStyle = function (feature, resolution, dom) { const align = dom.align.value; const baseline = dom.baseline.value; const size = dom.size.value; @@ -93,9 +101,9 @@ const createTextStyle = function(feature, resolution, dom) { const weight = dom.weight.value; const placement = dom.placement ? dom.placement.value : undefined; const maxAngle = dom.maxangle ? parseFloat(dom.maxangle.value) : undefined; - const overflow = dom.overflow ? (dom.overflow.value == 'true') : undefined; + const overflow = dom.overflow ? dom.overflow.value == 'true' : undefined; const rotation = parseFloat(dom.rotation.value); - if (dom.font.value == '\'Open Sans\'' && !openSansAdded) { + if (dom.font.value == "'Open Sans'" && !openSansAdded) { const openSans = document.createElement('link'); openSans.href = 'https://fonts.googleapis.com/css?family=Open+Sans'; openSans.rel = 'stylesheet'; @@ -119,121 +127,118 @@ const createTextStyle = function(feature, resolution, dom) { placement: placement, maxAngle: maxAngle, overflow: overflow, - rotation: rotation + rotation: rotation, }); }; - // Polygons function polygonStyleFunction(feature, resolution) { return new Style({ stroke: new Stroke({ color: 'blue', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(0, 0, 255, 0.1)' + color: 'rgba(0, 0, 255, 0.1)', }), - text: createTextStyle(feature, resolution, myDom.polygons) + text: createTextStyle(feature, resolution, myDom.polygons), }); } const vectorPolygons = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/polygon-samples.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: polygonStyleFunction + style: polygonStyleFunction, }); - // Lines function lineStyleFunction(feature, resolution) { return new Style({ stroke: new Stroke({ color: 'green', - width: 2 + width: 2, }), - text: createTextStyle(feature, resolution, myDom.lines) + text: createTextStyle(feature, resolution, myDom.lines), }); } const vectorLines = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/line-samples.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: lineStyleFunction + style: lineStyleFunction, }); - // Points function pointStyleFunction(feature, resolution) { return new Style({ image: new CircleStyle({ radius: 10, fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}), - stroke: new Stroke({color: 'red', width: 1}) + stroke: new Stroke({color: 'red', width: 1}), }), - text: createTextStyle(feature, resolution, myDom.points) + text: createTextStyle(feature, resolution, myDom.points), }); } const vectorPoints = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/point-samples.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: pointStyleFunction + style: pointStyleFunction, }); const map = new Map({ layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), vectorPolygons, vectorLines, - vectorPoints + vectorPoints, ], target: 'map', view: new View({ center: [-8161939, 6095025], - zoom: 8 - }) + zoom: 8, + }), }); -document.getElementById('refresh-points') - .addEventListener('click', function() { +document + .getElementById('refresh-points') + .addEventListener('click', function () { vectorPoints.setStyle(pointStyleFunction); }); -document.getElementById('refresh-lines') - .addEventListener('click', function() { - vectorLines.setStyle(lineStyleFunction); - }); +document.getElementById('refresh-lines').addEventListener('click', function () { + vectorLines.setStyle(lineStyleFunction); +}); -document.getElementById('refresh-polygons') - .addEventListener('click', function() { +document + .getElementById('refresh-polygons') + .addEventListener('click', function () { vectorPolygons.setStyle(polygonStyleFunction); }); - /** * @param {number} n The max number of characters to keep. * @return {string} Truncated string. */ -String.prototype.trunc = String.prototype.trunc || - function(n) { - return this.length > n ? this.substr(0, n - 1) + '...' : this.substr(0); - }; - +String.prototype.trunc = + String.prototype.trunc || + function (n) { + return this.length > n ? this.substr(0, n - 1) + '...' : this.substr(0); + }; // http://stackoverflow.com/questions/14484787/wrap-text-in-javascript function stringDivider(str, width, spaceReplacer) { if (str.length > width) { let p = width; - while (p > 0 && (str[p] != ' ' && str[p] != '-')) { + while (p > 0 && str[p] != ' ' && str[p] != '-') { p--; } if (p > 0) { diff --git a/examples/vector-layer.js b/examples/vector-layer.js index 7e2e72c539..2c1606cfc8 100644 --- a/examples/vector-layer.js +++ b/examples/vector-layer.js @@ -1,40 +1,39 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style, Text} from '../src/ol/style.js'; - const style = new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 + width: 1, }), text: new Text({ font: '12px Calibri,sans-serif', fill: new Fill({ - color: '#000' + color: '#000', }), stroke: new Stroke({ color: '#fff', - width: 3 - }) - }) + width: 3, + }), + }), }); const vectorLayer = new VectorLayer({ source: new VectorSource({ url: 'data/geojson/countries.geojson', - format: new GeoJSON() + format: new GeoJSON(), }), - style: function(feature) { + style: function (feature) { style.getText().setText(feature.get('name')); return style; - } + }, }); const map = new Map({ @@ -42,43 +41,42 @@ const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); const highlightStyle = new Style({ stroke: new Stroke({ color: '#f00', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(255,0,0,0.1)' + color: 'rgba(255,0,0,0.1)', }), text: new Text({ font: '12px Calibri,sans-serif', fill: new Fill({ - color: '#000' + color: '#000', }), stroke: new Stroke({ color: '#f00', - width: 3 - }) - }) + width: 3, + }), + }), }); const featureOverlay = new VectorLayer({ source: new VectorSource(), map: map, - style: function(feature) { + style: function (feature) { highlightStyle.getText().setText(feature.get('name')); return highlightStyle; - } + }, }); let highlight; -const displayFeatureInfo = function(pixel) { - - const feature = map.forEachFeatureAtPixel(pixel, function(feature) { +const displayFeatureInfo = function (pixel) { + const feature = map.forEachFeatureAtPixel(pixel, function (feature) { return feature; }); @@ -98,10 +96,9 @@ const displayFeatureInfo = function(pixel) { } highlight = feature; } - }; -map.on('pointermove', function(evt) { +map.on('pointermove', function (evt) { if (evt.dragging) { return; } @@ -109,6 +106,6 @@ map.on('pointermove', function(evt) { displayFeatureInfo(pixel); }); -map.on('click', function(evt) { +map.on('click', function (evt) { displayFeatureInfo(evt.pixel); }); diff --git a/examples/vector-osm.js b/examples/vector-osm.js index d67d520205..a5ad295b26 100644 --- a/examples/vector-osm.js +++ b/examples/vector-osm.js @@ -1,12 +1,12 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import OSMXML from '../src/ol/format/OSMXML.js'; +import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; +import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {bbox as bboxStrategy} from '../src/ol/loadingstrategy.js'; import {transformExtent} from '../src/ol/proj.js'; -import XYZ from '../src/ol/source/XYZ.js'; -import VectorSource from '../src/ol/source/Vector.js'; -import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; let map = null; @@ -15,87 +15,93 @@ const styles = { 'parking': new Style({ stroke: new Stroke({ color: 'rgba(170, 170, 170, 1.0)', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(170, 170, 170, 0.3)' - }) - }) + color: 'rgba(170, 170, 170, 0.3)', + }), + }), }, 'building': { '.*': new Style({ zIndex: 100, stroke: new Stroke({ color: 'rgba(246, 99, 79, 1.0)', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(246, 99, 79, 0.3)' - }) - }) + color: 'rgba(246, 99, 79, 0.3)', + }), + }), }, 'highway': { 'service': new Style({ stroke: new Stroke({ color: 'rgba(255, 255, 255, 1.0)', - width: 2 - }) + width: 2, + }), }), '.*': new Style({ stroke: new Stroke({ color: 'rgba(255, 255, 255, 1.0)', - width: 3 - }) - }) + width: 3, + }), + }), }, 'landuse': { 'forest|grass|allotments': new Style({ stroke: new Stroke({ color: 'rgba(140, 208, 95, 1.0)', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(140, 208, 95, 0.3)' - }) - }) + color: 'rgba(140, 208, 95, 0.3)', + }), + }), }, 'natural': { 'tree': new Style({ image: new CircleStyle({ radius: 2, fill: new Fill({ - color: 'rgba(140, 208, 95, 1.0)' + color: 'rgba(140, 208, 95, 1.0)', }), - stroke: null - }) - }) - } + stroke: null, + }), + }), + }, }; const vectorSource = new VectorSource({ format: new OSMXML(), - loader: function(extent, resolution, projection) { + loader: function (extent, resolution, projection) { const epsg4326Extent = transformExtent(extent, projection, 'EPSG:4326'); const client = new XMLHttpRequest(); client.open('POST', 'https://overpass-api.de/api/interpreter'); - client.addEventListener('load', function() { + client.addEventListener('load', function () { const features = new OSMXML().readFeatures(client.responseText, { - featureProjection: map.getView().getProjection() + featureProjection: map.getView().getProjection(), }); vectorSource.addFeatures(features); }); - const query = '(node(' + - epsg4326Extent[1] + ',' + Math.max(epsg4326Extent[0], -180) + ',' + - epsg4326Extent[3] + ',' + Math.min(epsg4326Extent[2], 180) + - ');rel(bn)->.foo;way(bn);node(w)->.foo;rel(bw););out meta;'; + const query = + '(node(' + + epsg4326Extent[1] + + ',' + + Math.max(epsg4326Extent[0], -180) + + ',' + + epsg4326Extent[3] + + ',' + + Math.min(epsg4326Extent[2], 180) + + ');rel(bn)->.foo;way(bn);node(w)->.foo;rel(bw););out meta;'; client.send(query); }, - strategy: bboxStrategy + strategy: bboxStrategy, }); const vector = new VectorLayer({ source: vectorSource, - style: function(feature) { + style: function (feature) { for (const key in styles) { const value = feature.get(key); if (value !== undefined) { @@ -107,19 +113,20 @@ const vector = new VectorLayer({ } } return null; - } + }, }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const raster = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); map = new Map({ @@ -128,6 +135,6 @@ map = new Map({ view: new View({ center: [739218, 5906096], maxZoom: 19, - zoom: 17 - }) + zoom: 17, + }), }); diff --git a/examples/vector-tile-info.js b/examples/vector-tile-info.js index 18a7aafd6d..8ac28f9996 100644 --- a/examples/vector-tile-info.js +++ b/examples/vector-tile-info.js @@ -1,21 +1,24 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; +import Map from '../src/ol/Map.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; +import View from '../src/ol/View.js'; const map = new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 2 + zoom: 2, }), - layers: [new VectorTileLayer({ - source: new VectorTileSource({ - format: new MVT(), - url: 'https://basemaps.arcgis.com/v1/arcgis/rest/services/World_Basemap/VectorTileServer/tile/{z}/{y}/{x}.pbf' - }) - })] + layers: [ + new VectorTileLayer({ + source: new VectorTileSource({ + format: new MVT(), + url: + 'https://basemaps.arcgis.com/v1/arcgis/rest/services/World_Basemap/VectorTileServer/tile/{z}/{y}/{x}.pbf', + }), + }), + ], }); map.on('pointermove', showInfo); diff --git a/examples/vector-tile-selection.js b/examples/vector-tile-selection.js index 79cf73cd7a..57325b7e4d 100644 --- a/examples/vector-tile-selection.js +++ b/examples/vector-tile-selection.js @@ -1,8 +1,8 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; +import Map from '../src/ol/Map.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; +import View from '../src/ol/View.js'; import {Fill, Stroke, Style} from '../src/ol/style.js'; // lookup for selection objects @@ -11,20 +11,20 @@ let selection = {}; const country = new Style({ stroke: new Stroke({ color: 'gray', - width: 1 + width: 1, }), fill: new Fill({ - color: 'rgba(20,20,20,0.9)' - }) + color: 'rgba(20,20,20,0.9)', + }), }); const selectedCountry = new Style({ stroke: new Stroke({ color: 'rgba(200,20,20,0.8)', - width: 2 + width: 2, }), fill: new Fill({ - color: 'rgba(200,20,20,0.4)' - }) + color: 'rgba(200,20,20,0.4)', + }), }); const vtLayer = new VectorTileLayer({ @@ -32,24 +32,23 @@ const vtLayer = new VectorTileLayer({ source: new VectorTileSource({ maxZoom: 15, format: new MVT({ - idProperty: 'iso_a3' + idProperty: 'iso_a3', }), - url: 'https://ahocevar.com/geoserver/gwc/service/tms/1.0.0/' + - 'ne:ne_10m_admin_0_countries@EPSG%3A900913@pbf/{z}/{x}/{-y}.pbf' + url: + 'https://ahocevar.com/geoserver/gwc/service/tms/1.0.0/' + + 'ne:ne_10m_admin_0_countries@EPSG%3A900913@pbf/{z}/{x}/{-y}.pbf', }), - style: country + style: country, }); const map = new Map({ - layers: [ - vtLayer - ], + layers: [vtLayer], target: 'map', view: new View({ center: [0, 0], zoom: 2, - multiWorld: true - }) + multiWorld: true, + }), }); // Selection @@ -57,21 +56,25 @@ const selectionLayer = new VectorTileLayer({ map: map, renderMode: 'vector', source: vtLayer.getSource(), - style: function(feature) { + style: function (feature) { if (feature.getId() in selection) { return selectedCountry; } - } + }, }); const selectElement = document.getElementById('type'); -map.on(['click', 'pointermove'], function(event) { - if (selectElement.value === 'singleselect-hover' && event.type !== 'pointermove' || - selectElement.value !== 'singleselect-hover' && event.type === 'pointermove') { +map.on(['click', 'pointermove'], function (event) { + if ( + (selectElement.value === 'singleselect-hover' && + event.type !== 'pointermove') || + (selectElement.value !== 'singleselect-hover' && + event.type === 'pointermove') + ) { return; } - vtLayer.getFeatures(event.pixel).then(function(features) { + vtLayer.getFeatures(event.pixel).then(function (features) { if (!features.length) { selection = {}; selectionLayer.changed(); diff --git a/examples/vector-tiles-4326.js b/examples/vector-tiles-4326.js index eeb0f4ab67..d527140ea9 100644 --- a/examples/vector-tiles-4326.js +++ b/examples/vector-tiles-4326.js @@ -1,7 +1,7 @@ -import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; -import VectorTileSource from '../src/ol/source/VectorTile.js'; import TileGrid from '../src/ol/tilegrid/TileGrid.js'; +import VectorTileSource from '../src/ol/source/VectorTile.js'; +import View from '../src/ol/View.js'; import olms from 'ol-mapbox-style'; import {defaultResolutions} from 'ol-mapbox-style/dist/util.js'; @@ -15,36 +15,41 @@ for (let i = 0; i < 14; ++i) { defaultResolutions[i] = maxResolution / Math.pow(2, i + 1); } -olms('map', 'https://api.maptiler.com/maps/basic-4326/style.json?key=' + key).then(function(map) { - +olms( + 'map', + 'https://api.maptiler.com/maps/basic-4326/style.json?key=' + key +).then(function (map) { // Custom tile grid for the EPSG:4326 projection const tileGrid = new TileGrid({ extent: [-180, -90, 180, 90], tileSize: 512, - resolutions: defaultResolutions + resolutions: defaultResolutions, }); const mapboxStyle = map.get('mapbox-style'); // Replace the source with a EPSG:4326 projection source for each vector tile layer - map.getLayers().forEach(function(layer) { + map.getLayers().forEach(function (layer) { const mapboxSource = layer.get('mapbox-source'); if (mapboxSource && mapboxStyle.sources[mapboxSource].type === 'vector') { const source = layer.getSource(); - layer.setSource(new VectorTileSource({ - format: new MVT(), - projection: 'EPSG:4326', - urls: source.getUrls(), - tileGrid: tileGrid - })); + layer.setSource( + new VectorTileSource({ + format: new MVT(), + projection: 'EPSG:4326', + urls: source.getUrls(), + tileGrid: tileGrid, + }) + ); } }); // Configure the map with a view with EPSG:4326 projection - map.setView(new View({ - projection: 'EPSG:4326', - zoom: mapboxStyle.zoom, - center: mapboxStyle.center - })); - + map.setView( + new View({ + projection: 'EPSG:4326', + zoom: mapboxStyle.zoom, + center: mapboxStyle.center, + }) + ); }); diff --git a/examples/vector-wfs-getfeature.js b/examples/vector-wfs-getfeature.js index 6f7a3e88f4..791648e9f7 100644 --- a/examples/vector-wfs-getfeature.js +++ b/examples/vector-wfs-getfeature.js @@ -1,16 +1,15 @@ import Map from '../src/ol/Map.js'; +import VectorSource from '../src/ol/source/Vector.js'; import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; +import {GeoJSON, WFS} from '../src/ol/format.js'; +import {Stroke, Style} from '../src/ol/style.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import { + and as andFilter, equalTo as equalToFilter, like as likeFilter, - and as andFilter } from '../src/ol/format/filter.js'; -import {WFS, GeoJSON} from '../src/ol/format.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import XYZ from '../src/ol/source/XYZ.js'; -import VectorSource from '../src/ol/source/Vector.js'; -import {Stroke, Style} from '../src/ol/style.js'; - const vectorSource = new VectorSource(); const vector = new VectorLayer({ @@ -18,21 +17,22 @@ const vector = new VectorLayer({ style: new Style({ stroke: new Stroke({ color: 'rgba(0, 0, 255, 1.0)', - width: 2 - }) - }) + width: 2, + }), + }), }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const raster = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); const map = new Map({ @@ -41,8 +41,8 @@ const map = new Map({ view: new View({ center: [-8908887.277395891, 5381918.072437216], maxZoom: 19, - zoom: 12 - }) + zoom: 12, + }), }); // generate a GetFeature request @@ -55,17 +55,19 @@ const featureRequest = new WFS().writeGetFeature({ filter: andFilter( likeFilter('name', 'Mississippi*'), equalToFilter('waterway', 'riverbank') - ) + ), }); // then post the request and add the received features to a layer fetch('https://ahocevar.com/geoserver/wfs', { method: 'POST', - body: new XMLSerializer().serializeToString(featureRequest) -}).then(function(response) { - return response.json(); -}).then(function(json) { - const features = new GeoJSON().readFeatures(json); - vectorSource.addFeatures(features); - map.getView().fit(vectorSource.getExtent()); -}); + body: new XMLSerializer().serializeToString(featureRequest), +}) + .then(function (response) { + return response.json(); + }) + .then(function (json) { + const features = new GeoJSON().readFeatures(json); + vectorSource.addFeatures(features); + map.getView().fit(vectorSource.getExtent()); + }); diff --git a/examples/vector-wfs.js b/examples/vector-wfs.js index fdf003beb9..546806bc4a 100644 --- a/examples/vector-wfs.js +++ b/examples/vector-wfs.js @@ -1,45 +1,48 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; +import Map from '../src/ol/Map.js'; +import VectorSource from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import XYZ from '../src/ol/source/XYZ.js'; +import {Stroke, Style} from '../src/ol/style.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {bbox as bboxStrategy} from '../src/ol/loadingstrategy.js'; -import XYZ from '../src/ol/source/XYZ.js'; -import VectorSource from '../src/ol/source/Vector.js'; -import {Stroke, Style} from '../src/ol/style.js'; - const vectorSource = new VectorSource({ format: new GeoJSON(), - url: function(extent) { - return 'https://ahocevar.com/geoserver/wfs?service=WFS&' + - 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' + - 'outputFormat=application/json&srsname=EPSG:3857&' + - 'bbox=' + extent.join(',') + ',EPSG:3857'; + url: function (extent) { + return ( + 'https://ahocevar.com/geoserver/wfs?service=WFS&' + + 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' + + 'outputFormat=application/json&srsname=EPSG:3857&' + + 'bbox=' + + extent.join(',') + + ',EPSG:3857' + ); }, - strategy: bboxStrategy + strategy: bboxStrategy, }); - const vector = new VectorLayer({ source: vectorSource, style: new Style({ stroke: new Stroke({ color: 'rgba(0, 0, 255, 1.0)', - width: 2 - }) - }) + width: 2, + }), + }), }); const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const raster = new TileLayer({ source: new XYZ({ attributions: attributions, url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, - maxZoom: 20 - }) + maxZoom: 20, + }), }); const map = new Map({ @@ -48,6 +51,6 @@ const map = new Map({ view: new View({ center: [-8908887.277395891, 5381918.072437216], maxZoom: 19, - zoom: 12 - }) + zoom: 12, + }), }); diff --git a/examples/webgl-points-layer.js b/examples/webgl-points-layer.js index 1db76814c4..efcde2a0d2 100644 --- a/examples/webgl-points-layer.js +++ b/examples/webgl-points-layer.js @@ -1,14 +1,14 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; -import Vector from '../src/ol/source/Vector.js'; +import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import Vector from '../src/ol/source/Vector.js'; +import View from '../src/ol/View.js'; +import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js'; const vectorSource = new Vector({ url: 'data/geojson/world-cities.geojson', - format: new GeoJSON() + format: new GeoJSON(), }); const predefinedStyles = { @@ -19,8 +19,8 @@ const predefinedStyles = { size: [18, 28], color: 'lightyellow', rotateWithView: false, - offset: [0, 9] - } + offset: [0, 9], + }, }, 'triangles': { symbol: { @@ -30,11 +30,13 @@ const predefinedStyles = { 'interpolate', ['linear'], ['get', 'population'], - 20000, '#5aca5b', - 300000, '#ff6a19' + 20000, + '#5aca5b', + 300000, + '#ff6a19', ], - rotateWithView: true - } + rotateWithView: true, + }, }, 'triangles-latitude': { symbol: { @@ -43,21 +45,27 @@ const predefinedStyles = { 'interpolate', ['linear'], ['get', 'population'], - 40000, 12, - 2000000, 24 + 40000, + 12, + 2000000, + 24, ], color: [ 'interpolate', ['linear'], ['get', 'latitude'], - -60, '#ff14c3', - -20, '#ff621d', - 20, '#ffed02', - 60, '#00ff67' + -60, + '#ff14c3', + -20, + '#ff621d', + 20, + '#ffed02', + 60, + '#00ff67', ], offset: [0, 0], - opacity: 0.95 - } + opacity: 0.95, + }, }, 'circles': { symbol: { @@ -66,8 +74,10 @@ const predefinedStyles = { 'interpolate', ['linear'], ['get', 'population'], - 40000, 8, - 2000000, 28 + 40000, + 8, + 2000000, + 28, ], color: '#006688', rotateWithView: false, @@ -76,68 +86,76 @@ const predefinedStyles = { 'interpolate', ['linear'], ['get', 'population'], - 40000, 0.6, - 2000000, 0.92 - ] - } + 40000, + 0.6, + 2000000, + 0.92, + ], + }, }, 'circles-zoom': { symbol: { symbolType: 'circle', - size: [ - 'interpolate', - ['exponential', 2.5], - ['zoom'], - 2, 1, - 14, 32 - ], + size: ['interpolate', ['exponential', 2.5], ['zoom'], 2, 1, 14, 32], color: '#240572', offset: [0, 0], - opacity: 0.95 - } + opacity: 0.95, + }, }, 'rotating-bars': { symbol: { symbolType: 'square', - rotation: ['*', [ - 'time' - ], 0.1], - size: ['array', 4, [ - 'interpolate', - ['linear'], - ['get', 'population'], - 20000, 4, - 300000, 28] + rotation: ['*', ['time'], 0.1], + size: [ + 'array', + 4, + [ + 'interpolate', + ['linear'], + ['get', 'population'], + 20000, + 4, + 300000, + 28, + ], ], color: [ 'interpolate', ['linear'], ['get', 'population'], - 20000, '#ffdc00', - 300000, '#ff5b19' + 20000, + '#ffdc00', + 300000, + '#ff5b19', ], - offset: ['array', 0, [ - 'interpolate', - ['linear'], - ['get', 'population'], - 20000, 2, - 300000, 14] - ] - } - } + offset: [ + 'array', + 0, + [ + 'interpolate', + ['linear'], + ['get', 'population'], + 20000, + 2, + 300000, + 14, + ], + ], + }, + }, }; const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: document.getElementById('map'), view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); let literalStyle; @@ -147,7 +165,7 @@ function refreshLayer(newStyle) { pointsLayer = new WebGLPointsLayer({ source: vectorSource, style: newStyle, - disableHitDetection: true + disableHitDetection: true, }); map.addLayer(pointsLayer); @@ -168,7 +186,7 @@ function setStyleStatus(errorMsg) { } const editor = document.getElementById('style-editor'); -editor.addEventListener('input', function() { +editor.addEventListener('input', function () { const textStyle = editor.value; try { const newLiteralStyle = JSON.parse(textStyle); diff --git a/examples/webpack/config.js b/examples/webpack/config.js index 5ff92a550d..e6e7bc7a80 100644 --- a/examples/webpack/config.js +++ b/examples/webpack/config.js @@ -6,12 +6,13 @@ const path = require('path'); const src = path.join(__dirname, '..'); -const examples = fs.readdirSync(src) - .filter(name => /^(?!index).*\.html$/.test(name)) - .map(name => name.replace(/\.html$/, '')); +const examples = fs + .readdirSync(src) + .filter((name) => /^(?!index).*\.html$/.test(name)) + .map((name) => name.replace(/\.html$/, '')); const entry = {}; -examples.forEach(example => { +examples.forEach((example) => { entry[example] = `./${example}.js`; }); @@ -21,67 +22,68 @@ module.exports = { entry: entry, stats: 'minimal', module: { - rules: [{ - test: /^((?!es2015-)[\s\S])*\.js$/, - use: { - loader: 'buble-loader' + rules: [ + { + test: /^((?!es2015-)[\s\S])*\.js$/, + use: { + loader: 'buble-loader', + }, + include: [ + path.join(__dirname, '..', '..', 'src'), + path.join(__dirname, '..'), + ], }, - include: [ - path.join(__dirname, '..', '..', 'src'), - path.join(__dirname, '..') - ] - }, { - test: /\.js$/, - use: { - loader: path.join(__dirname, './worker-loader.js') + { + test: /\.js$/, + use: { + loader: path.join(__dirname, './worker-loader.js'), + }, + include: [path.join(__dirname, '../../src/ol/worker')], }, - include: [ - path.join(__dirname, '../../src/ol/worker') - ] - }] + ], }, optimization: { minimizer: [ new TerserPlugin({ sourceMap: true, // Do not minify examples that inject code into workers - exclude: [/(color-manipulation|region-growing|raster)\.js/] - }) + exclude: [/(color-manipulation|region-growing|raster)\.js/], + }), ], runtimeChunk: { - name: 'common' + name: 'common', }, splitChunks: { name: 'common', chunks: 'initial', - minChunks: 2 - } + minChunks: 2, + }, }, plugins: [ new ExampleBuilder({ templates: path.join(__dirname, '..', 'templates'), - common: 'common' + common: 'common', }), new CopyPlugin([ {from: '../src/ol/ol.css', to: 'css'}, {from: 'data', to: 'data'}, {from: 'resources', to: 'resources'}, {from: 'Jugl.js', to: 'Jugl.js'}, - {from: 'index.html', to: 'index.html'} - ]) + {from: 'index.html', to: 'index.html'}, + ]), ], devtool: 'source-map', output: { filename: '[name].js', - path: path.join(__dirname, '..', '..', 'build', 'examples') + path: path.join(__dirname, '..', '..', 'build', 'examples'), }, node: { - fs: 'empty' // required by ol-mapbox-stlye + fs: 'empty', // required by ol-mapbox-stlye }, resolve: { alias: { // allow imports from 'ol/module' instead of specifiying the source path - ol: path.join(__dirname, '..', '..', 'src', 'ol') - } - } + ol: path.join(__dirname, '..', '..', 'src', 'ol'), + }, + }, }; diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js index 37148fb303..6af08b69ad 100644 --- a/examples/webpack/example-builder.js +++ b/examples/webpack/example-builder.js @@ -12,7 +12,10 @@ const isCssRegEx = /\.css$/; const isJsRegEx = /\.js(\?.*)?$/; const importRegEx = /^import .* from '(.*)';$/; -handlebars.registerHelper('md', str => new handlebars.SafeString(marked(str))); +handlebars.registerHelper( + 'md', + (str) => new handlebars.SafeString(marked(str)) +); handlebars.registerHelper('indent', (text, options) => { if (!text) { @@ -20,7 +23,10 @@ handlebars.registerHelper('indent', (text, options) => { } const count = options.hash.spaces || 2; const spaces = new Array(count + 1).join(' '); - return text.split('\n').map(line => line ? spaces + line : '').join('\n'); + return text + .split('\n') + .map((line) => (line ? spaces + line : '')) + .join('\n'); }); /** @@ -34,13 +40,13 @@ function createWordIndex(exampleData) { const index = {}; const keys = ['shortdesc', 'title', 'tags']; exampleData.forEach((data, i) => { - keys.forEach(key => { + keys.forEach((key) => { let text = data[key]; if (Array.isArray(text)) { text = text.join(' '); } const words = text ? text.split(/\W+/) : []; - words.forEach(word => { + words.forEach((word) => { if (word) { word = word.toLowerCase(); let counts = index[word]; @@ -92,7 +98,7 @@ function getJsSource(chunk, jsName) { function getDependencies(jsSource) { const lines = jsSource.split('\n'); const dependencies = { - ol: pkg.version + ol: pkg.version, }; for (let i = 0, ii = lines.length; i < ii; ++i) { const line = lines[i]; @@ -116,202 +122,225 @@ function getDependencies(jsSource) { return dependencies; } -/** - * A webpack plugin that builds the html files for our examples. - * @param {Object} config Plugin configuration. Requires a `templates` property - * with the path to templates and a `common` property with the name of the - * common chunk. - * @constructor - */ -function ExampleBuilder(config) { - this.templates = config.templates; - this.common = config.common; -} +class ExampleBuilder { + /** + * A webpack plugin that builds the html files for our examples. + * @param {Object} config Plugin configuration. Requires a `templates` property + * with the path to templates and a `common` property with the name of the + * common chunk. + */ + constructor(config) { + this.templates = config.templates; + this.common = config.common; + } -/** - * Called by webpack. - * @param {Object} compiler The webpack compiler. - */ -ExampleBuilder.prototype.apply = function(compiler) { - compiler.hooks.emit.tapPromise('ExampleBuilder', async (compilation) => { - const chunks = compilation.getStats().toJson().chunks - .filter(chunk => chunk.names[0] !== this.common); + /** + * Called by webpack. + * @param {Object} compiler The webpack compiler. + */ + apply(compiler) { + compiler.hooks.emit.tapPromise('ExampleBuilder', async (compilation) => { + const chunks = compilation + .getStats() + .toJson() + .chunks.filter((chunk) => chunk.names[0] !== this.common); - const exampleData = []; - const uniqueTags = new Set(); - const promises = chunks.map(async chunk => { - const [assets, data] = await this.render(compiler.context, chunk); + const exampleData = []; + const uniqueTags = new Set(); + const promises = chunks.map(async (chunk) => { + const [assets, data] = await this.render(compiler.context, chunk); - // collect tags for main page... TODO: implement index tag links - data.tags.forEach(tag => uniqueTags.add(tag)); + // collect tags for main page... TODO: implement index tag links + data.tags.forEach((tag) => uniqueTags.add(tag)); - exampleData.push({ - link: data.filename, - example: data.filename, - title: data.title, - shortdesc: data.shortdesc, - tags: data.tags + exampleData.push({ + link: data.filename, + example: data.filename, + title: data.title, + shortdesc: data.shortdesc, + tags: data.tags, + }); + + for (const file in assets) { + compilation.assets[file] = new RawSource(assets[file]); + } }); - for (const file in assets) { - compilation.assets[file] = new RawSource(assets[file]); - } + await Promise.all(promises); + + const info = { + examples: exampleData, + index: createWordIndex(exampleData), + tags: Array.from(uniqueTags), + }; + + const indexSource = `var info = ${JSON.stringify(info)}`; + compilation.assets['index.js'] = new RawSource(indexSource); }); - - await Promise.all(promises); - - const info = { - examples: exampleData, - index: createWordIndex(exampleData), - tags: Array.from(uniqueTags) - }; - - const indexSource = `var info = ${JSON.stringify(info)}`; - compilation.assets['index.js'] = new RawSource(indexSource); - }); -}; - -ExampleBuilder.prototype.render = async function(dir, chunk) { - const name = chunk.names[0]; - - const assets = {}; - const readOptions = {encoding: 'utf8'}; - - const htmlName = `${name}.html`; - const htmlPath = path.join(dir, htmlName); - const htmlSource = await readFile(htmlPath, readOptions); - - const {attributes, body} = frontMatter(htmlSource); - const data = Object.assign(attributes, {contents: body}); - - data.olVersion = pkg.version; - data.filename = htmlName; - - // process tags - if (data.tags) { - data.tags = data.tags.replace(/[\s"]+/g, '').split(','); - } else { - data.tags = []; } - // add in script tag - const jsName = `${name}.js`; - let jsSource = getJsSource(chunk, path.join('.', jsName)); - if (!jsSource) { - throw new Error(`No .js source for ${jsName}`); - } - // remove "../src/" prefix and ".js" to have the same import syntax as the documentation - jsSource = jsSource.replace(/'\.\.\/src\//g, '\''); - jsSource = jsSource.replace(/\.js';/g, '\';'); - if (data.cloak) { - for (const entry of data.cloak) { - jsSource = jsSource.replace(new RegExp(entry.key, 'g'), entry.value); + async render(dir, chunk) { + const name = chunk.names[0]; + + const assets = {}; + const readOptions = {encoding: 'utf8'}; + + const htmlName = `${name}.html`; + const htmlPath = path.join(dir, htmlName); + const htmlSource = await readFile(htmlPath, readOptions); + + const {attributes, body} = frontMatter(htmlSource); + const data = Object.assign(attributes, {contents: body}); + + data.olVersion = pkg.version; + data.filename = htmlName; + + // process tags + if (data.tags) { + data.tags = data.tags.replace(/[\s"]+/g, '').split(','); + } else { + data.tags = []; } - } - // Remove worker loader import and modify `new Worker()` to add source - jsSource = jsSource.replace(/import Worker from 'worker-loader![^\n]*\n/g, ''); - jsSource = jsSource.replace('new Worker()', 'new Worker(\'./worker.js\')'); - data.js = { - tag: ``, - source: jsSource - }; - - if (data.experimental) { - const prelude = ''; - data.js.tag = prelude + data.js.tag; - } - - // check for worker js - const workerName = `${name}.worker.js`; - const workerPath = path.join(dir, workerName); - let workerSource; - try { - workerSource = await readFile(workerPath, readOptions); - } catch (err) { - // pass - } - if (workerSource) { + // add in script tag + const jsName = `${name}.js`; + let jsSource = getJsSource(chunk, path.join('.', jsName)); + if (!jsSource) { + throw new Error(`No .js source for ${jsName}`); + } // remove "../src/" prefix and ".js" to have the same import syntax as the documentation - workerSource = workerSource.replace(/'\.\.\/src\//g, '\''); - workerSource = workerSource.replace(/\.js';/g, '\';'); + jsSource = jsSource.replace(/'\.\.\/src\//g, "'"); + jsSource = jsSource.replace(/\.js';/g, "';"); if (data.cloak) { for (const entry of data.cloak) { - workerSource = workerSource.replace(new RegExp(entry.key, 'g'), entry.value); + jsSource = jsSource.replace(new RegExp(entry.key, 'g'), entry.value); } } - data.worker = { - source: workerSource - }; - assets[workerName] = workerSource; - } + // Remove worker loader import and modify `new Worker()` to add source + jsSource = jsSource.replace( + /import Worker from 'worker-loader![^\n]*\n/g, + '' + ); + jsSource = jsSource.replace('new Worker()', "new Worker('./worker.js')"); - data.pkgJson = JSON.stringify({ - name: name, - dependencies: getDependencies(jsSource + (workerSource ? `\n${workerSource}` : '')), - devDependencies: { - parcel: '1.11.0' - }, - scripts: { - start: 'parcel index.html', - build: 'parcel build --experimental-scope-hoisting --public-url . index.html' + data.js = { + tag: ``, + source: jsSource, + }; + + if (data.experimental) { + const prelude = ''; + data.js.tag = prelude + data.js.tag; } - }, null, 2); - // check for example css - const cssName = `${name}.css`; - const cssPath = path.join(dir, cssName); - let cssSource; - try { - cssSource = await readFile(cssPath, readOptions); - } catch (err) { - // pass - } - if (cssSource) { - data.css = { - tag: ``, - source: cssSource - }; - assets[cssName] = cssSource; - } - - // add additional resources - if (data.resources) { - const resources = []; - const remoteResources = []; - const codePenResources = []; - for (let i = 0, ii = data.resources.length; i < ii; ++i) { - const resource = data.resources[i]; - const remoteResource = resource.indexOf('//') === -1 ? - `https://openlayers.org/en/v${pkg.version}/examples/${resource}` : resource; - codePenResources[i] = remoteResource; - if (isJsRegEx.test(resource)) { - resources[i] = ``; - remoteResources[i] = ``; - } else if (isCssRegEx.test(resource)) { - if (resource.indexOf('bootstrap.min.css') === -1) { - resources[i] = ''; + // check for worker js + const workerName = `${name}.worker.js`; + const workerPath = path.join(dir, workerName); + let workerSource; + try { + workerSource = await readFile(workerPath, readOptions); + } catch (err) { + // pass + } + if (workerSource) { + // remove "../src/" prefix and ".js" to have the same import syntax as the documentation + workerSource = workerSource.replace(/'\.\.\/src\//g, "'"); + workerSource = workerSource.replace(/\.js';/g, "';"); + if (data.cloak) { + for (const entry of data.cloak) { + workerSource = workerSource.replace( + new RegExp(entry.key, 'g'), + entry.value + ); } - remoteResources[i] = ''; - } else { - throw new Error('Invalid value for resource: ' + - resource + ' is not .js or .css: ' + htmlName); } + data.worker = { + source: workerSource, + }; + assets[workerName] = workerSource; } - data.extraHead = { - local: resources.join('\n'), - remote: remoteResources.join('\n') - }; - data.extraResources = data.resources.length ? - ',' + codePenResources.join(',') : ''; + + data.pkgJson = JSON.stringify( + { + name: name, + dependencies: getDependencies( + jsSource + (workerSource ? `\n${workerSource}` : '') + ), + devDependencies: { + parcel: '1.11.0', + }, + scripts: { + start: 'parcel index.html', + build: + 'parcel build --experimental-scope-hoisting --public-url . index.html', + }, + }, + null, + 2 + ); + + // check for example css + const cssName = `${name}.css`; + const cssPath = path.join(dir, cssName); + let cssSource; + try { + cssSource = await readFile(cssPath, readOptions); + } catch (err) { + // pass + } + if (cssSource) { + data.css = { + tag: ``, + source: cssSource, + }; + assets[cssName] = cssSource; + } + + // add additional resources + if (data.resources) { + const resources = []; + const remoteResources = []; + const codePenResources = []; + for (let i = 0, ii = data.resources.length; i < ii; ++i) { + const resource = data.resources[i]; + const remoteResource = + resource.indexOf('//') === -1 + ? `https://openlayers.org/en/v${pkg.version}/examples/${resource}` + : resource; + codePenResources[i] = remoteResource; + if (isJsRegEx.test(resource)) { + resources[i] = ``; + remoteResources[i] = ``; + } else if (isCssRegEx.test(resource)) { + if (resource.indexOf('bootstrap.min.css') === -1) { + resources[i] = ''; + } + remoteResources[i] = + ''; + } else { + throw new Error( + 'Invalid value for resource: ' + + resource + + ' is not .js or .css: ' + + htmlName + ); + } + } + data.extraHead = { + local: resources.join('\n'), + remote: remoteResources.join('\n'), + }; + data.extraResources = data.resources.length + ? ',' + codePenResources.join(',') + : ''; + } + + const templatePath = path.join(this.templates, attributes.layout); + const templateSource = await readFile(templatePath, readOptions); + + assets[htmlName] = handlebars.compile(templateSource)(data); + return [assets, data]; } - - const templatePath = path.join(this.templates, attributes.layout); - const templateSource = await readFile(templatePath, readOptions); - - assets[htmlName] = handlebars.compile(templateSource)(data); - return [assets, data]; -}; +} module.exports = ExampleBuilder; diff --git a/examples/webpack/worker-loader.js b/examples/webpack/worker-loader.js index d03e126a32..cdaa577f07 100644 --- a/examples/webpack/worker-loader.js +++ b/examples/webpack/worker-loader.js @@ -5,7 +5,7 @@ function loader() { const minify = this.mode === 'production'; build(this.resource, {minify}) - .then(chunk => { + .then((chunk) => { for (const filePath in chunk.modules) { this.addDependency(filePath); } diff --git a/examples/wkt.js b/examples/wkt.js index ced8bb4242..8dcece066c 100644 --- a/examples/wkt.js +++ b/examples/wkt.js @@ -1,28 +1,29 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import WKT from '../src/ol/format/WKT.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; +import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; const raster = new TileLayer({ - source: new OSM() + source: new OSM(), }); -const wkt = 'POLYGON((10.689 -25.092, 34.595 ' + - '-20.170, 38.814 -35.639, 13.502 ' + - '-39.155, 10.689 -25.092))'; +const wkt = + 'POLYGON((10.689 -25.092, 34.595 ' + + '-20.170, 38.814 -35.639, 13.502 ' + + '-39.155, 10.689 -25.092))'; const format = new WKT(); const feature = format.readFeature(wkt, { dataProjection: 'EPSG:4326', - featureProjection: 'EPSG:3857' + featureProjection: 'EPSG:3857', }); const vector = new VectorLayer({ source: new VectorSource({ - features: [feature] - }) + features: [feature], + }), }); const map = new Map({ @@ -30,6 +31,6 @@ const map = new Map({ target: 'map', view: new View({ center: [2952104.0199, -3277504.823], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/wms-capabilities.js b/examples/wms-capabilities.js index 22ff6ab91c..07bc4115d1 100644 --- a/examples/wms-capabilities.js +++ b/examples/wms-capabilities.js @@ -2,9 +2,11 @@ import WMSCapabilities from '../src/ol/format/WMSCapabilities.js'; const parser = new WMSCapabilities(); -fetch('data/ogcsample.xml').then(function(response) { - return response.text(); -}).then(function(text) { - const result = parser.read(text); - document.getElementById('log').innerText = JSON.stringify(result, null, 2); -}); +fetch('data/ogcsample.xml') + .then(function (response) { + return response.text(); + }) + .then(function (text) { + const result = parser.read(text); + document.getElementById('log').innerText = JSON.stringify(result, null, 2); + }); diff --git a/examples/wms-custom-proj.js b/examples/wms-custom-proj.js index 7b5d09c134..21f5611400 100644 --- a/examples/wms-custom-proj.js +++ b/examples/wms-custom-proj.js @@ -1,11 +1,14 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, ScaleLine} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {addProjection, addCoordinateTransforms, transform} from '../src/ol/proj.js'; import Projection from '../src/ol/proj/Projection.js'; +import TileLayer from '../src/ol/layer/Tile.js'; import TileWMS from '../src/ol/source/TileWMS.js'; - +import View from '../src/ol/View.js'; +import {ScaleLine, defaults as defaultControls} from '../src/ol/control.js'; +import { + addCoordinateTransforms, + addProjection, + transform, +} from '../src/ol/proj.js'; // By default OpenLayers does not know about the EPSG:21781 (Swiss) projection. // So we create a projection instance for EPSG:21781 and pass it to @@ -17,7 +20,7 @@ const projection = new Projection({ // The extent is used to determine zoom level 0. Recommended values for a // projection's validity extent can be found at https://epsg.io/. extent: [485869.5728, 76443.1884, 837076.5648, 299941.7864], - units: 'm' + units: 'm', }); addProjection(projection); @@ -25,19 +28,22 @@ addProjection(projection); // are necessary for the ScaleLine control and when calling ol/proj~transform // for setting the view's initial center (see below). -addCoordinateTransforms('EPSG:4326', projection, - function(coordinate) { +addCoordinateTransforms( + 'EPSG:4326', + projection, + function (coordinate) { return [ WGStoCHy(coordinate[1], coordinate[0]), - WGStoCHx(coordinate[1], coordinate[0]) + WGStoCHx(coordinate[1], coordinate[0]), ]; }, - function(coordinate) { + function (coordinate) { return [ CHtoWGSlng(coordinate[0], coordinate[1]), - CHtoWGSlat(coordinate[0], coordinate[1]) + CHtoWGSlat(coordinate[0], coordinate[1]), ]; - }); + } +); const extent = [420000, 30000, 900000, 350000]; const layers = [ @@ -46,33 +52,35 @@ const layers = [ source: new TileWMS({ url: 'https://wms.geo.admin.ch/', crossOrigin: 'anonymous', - attributions: '© Pixelmap 1:1000000 / geo.admin.ch', + attributions: + '© Pixelmap 1:1000000 / geo.admin.ch', params: { 'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale', - 'FORMAT': 'image/jpeg' + 'FORMAT': 'image/jpeg', }, - serverType: 'mapserver' - }) + serverType: 'mapserver', + }), }), new TileLayer({ extent: extent, source: new TileWMS({ url: 'https://wms.geo.admin.ch/', crossOrigin: 'anonymous', - attributions: '© National parks / geo.admin.ch', + attributions: + '© National parks / geo.admin.ch', params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'}, - serverType: 'mapserver' - }) - }) + serverType: 'mapserver', + }), + }), ]; const map = new Map({ controls: defaultControls().extend([ new ScaleLine({ - units: 'metric' - }) + units: 'metric', + }), ]), layers: layers, target: 'map', @@ -80,11 +88,10 @@ const map = new Map({ projection: projection, center: transform([8.23, 46.86], 'EPSG:4326', 'EPSG:21781'), extent: extent, - zoom: 2 - }) + zoom: 2, + }), }); - /* * Swiss projection transform functions downloaded from * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/software/products/skripts.html @@ -92,7 +99,6 @@ const map = new Map({ // Convert WGS lat/long (° dec) to CH y function WGStoCHy(lat, lng) { - // Converts degrees dec to sex lat = DECtoSEX(lat); lng = DECtoSEX(lng); @@ -106,18 +112,18 @@ function WGStoCHy(lat, lng) { const lng_aux = (lng - 26782.5) / 10000; // Process Y - const y = 600072.37 + - 211455.93 * lng_aux - - 10938.51 * lng_aux * lat_aux - - 0.36 * lng_aux * Math.pow(lat_aux, 2) - - 44.54 * Math.pow(lng_aux, 3); + const y = + 600072.37 + + 211455.93 * lng_aux - + 10938.51 * lng_aux * lat_aux - + 0.36 * lng_aux * Math.pow(lat_aux, 2) - + 44.54 * Math.pow(lng_aux, 3); return y; } // Convert WGS lat/long (° dec) to CH x function WGStoCHx(lat, lng) { - // Converts degrees dec to sex lat = DECtoSEX(lat); lng = DECtoSEX(lng); @@ -131,84 +137,77 @@ function WGStoCHx(lat, lng) { const lng_aux = (lng - 26782.5) / 10000; // Process X - const x = 200147.07 + - 308807.95 * lat_aux + - 3745.25 * Math.pow(lng_aux, 2) + - 76.63 * Math.pow(lat_aux, 2) - - 194.56 * Math.pow(lng_aux, 2) * lat_aux + - 119.79 * Math.pow(lat_aux, 3); + const x = + 200147.07 + + 308807.95 * lat_aux + + 3745.25 * Math.pow(lng_aux, 2) + + 76.63 * Math.pow(lat_aux, 2) - + 194.56 * Math.pow(lng_aux, 2) * lat_aux + + 119.79 * Math.pow(lat_aux, 3); return x; - } - // Convert CH y/x to WGS lat function CHtoWGSlat(y, x) { - // Converts militar to civil and to unit = 1000km // Axiliary values (% Bern) const y_aux = (y - 600000) / 1000000; const x_aux = (x - 200000) / 1000000; // Process lat - let lat = 16.9023892 + - 3.238272 * x_aux - - 0.270978 * Math.pow(y_aux, 2) - - 0.002528 * Math.pow(x_aux, 2) - - 0.0447 * Math.pow(y_aux, 2) * x_aux - - 0.0140 * Math.pow(x_aux, 3); + let lat = + 16.9023892 + + 3.238272 * x_aux - + 0.270978 * Math.pow(y_aux, 2) - + 0.002528 * Math.pow(x_aux, 2) - + 0.0447 * Math.pow(y_aux, 2) * x_aux - + 0.014 * Math.pow(x_aux, 3); // Unit 10000" to 1 " and converts seconds to degrees (dec) - lat = lat * 100 / 36; + lat = (lat * 100) / 36; return lat; - } // Convert CH y/x to WGS long function CHtoWGSlng(y, x) { - // Converts militar to civil and to unit = 1000km // Axiliary values (% Bern) const y_aux = (y - 600000) / 1000000; const x_aux = (x - 200000) / 1000000; // Process long - let lng = 2.6779094 + - 4.728982 * y_aux + - 0.791484 * y_aux * x_aux + - 0.1306 * y_aux * Math.pow(x_aux, 2) - - 0.0436 * Math.pow(y_aux, 3); + let lng = + 2.6779094 + + 4.728982 * y_aux + + 0.791484 * y_aux * x_aux + + 0.1306 * y_aux * Math.pow(x_aux, 2) - + 0.0436 * Math.pow(y_aux, 3); // Unit 10000" to 1 " and converts seconds to degrees (dec) - lng = lng * 100 / 36; + lng = (lng * 100) / 36; return lng; - } - // Convert DEC angle to SEX DMS function DECtoSEX(angle) { - // Extract DMS const deg = parseInt(angle, 10); const min = parseInt((angle - deg) * 60, 10); - const sec = (((angle - deg) * 60) - min) * 60; + const sec = ((angle - deg) * 60 - min) * 60; // Result in degrees sex (dd.mmss) return deg + min / 100 + sec / 10000; - } // Convert Degrees angle to seconds function DEGtoSEC(angle) { - // Extract DMS const deg = parseInt(angle, 10); let min = parseInt((angle - deg) * 100, 10); - let sec = (((angle - deg) * 100) - min) * 100; + let sec = ((angle - deg) * 100 - min) * 100; // Avoid rounding problems with seconds=0 const parts = String(angle).split('.'); @@ -219,5 +218,4 @@ function DEGtoSEC(angle) { // Result in degrees sex (dd.mmss) return sec + min * 60 + deg * 3600; - } diff --git a/examples/wms-custom-tilegrid-512x256.js b/examples/wms-custom-tilegrid-512x256.js index cdffd2d696..cc2b5a7d07 100644 --- a/examples/wms-custom-tilegrid-512x256.js +++ b/examples/wms-custom-tilegrid-512x256.js @@ -1,12 +1,11 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getWidth} from '../src/ol/extent.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {get as getProjection} from '../src/ol/proj.js'; import OSM from '../src/ol/source/OSM.js'; -import TileWMS from '../src/ol/source/TileWMS.js'; import TileGrid from '../src/ol/tilegrid/TileGrid.js'; - +import TileLayer from '../src/ol/layer/Tile.js'; +import TileWMS from '../src/ol/source/TileWMS.js'; +import View from '../src/ol/View.js'; +import {get as getProjection} from '../src/ol/proj.js'; +import {getWidth} from '../src/ol/extent.js'; const projExtent = getProjection('EPSG:3857').getExtent(); const startResolution = getWidth(projExtent) / 256; @@ -17,27 +16,27 @@ for (let i = 0, ii = resolutions.length; i < ii; ++i) { const tileGrid = new TileGrid({ extent: [-13884991, 2870341, -7455066, 6338219], resolutions: resolutions, - tileSize: [512, 256] + tileSize: [512, 256], }); const layers = [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ source: new TileWMS({ url: 'https://ahocevar.com/geoserver/wms', params: {'LAYERS': 'topp:states', 'TILED': true}, serverType: 'geoserver', - tileGrid: tileGrid - }) - }) + tileGrid: tileGrid, + }), + }), ]; const map = new Map({ layers: layers, target: 'map', view: new View({ center: [-10997148, 4569099], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/wms-getlegendgraphic.js b/examples/wms-getlegendgraphic.js index 76b847874f..2181307f61 100644 --- a/examples/wms-getlegendgraphic.js +++ b/examples/wms-getlegendgraphic.js @@ -1,17 +1,17 @@ +import ImageWMS from '../src/ol/source/ImageWMS.js'; import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; import View from '../src/ol/View.js'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import ImageWMS from '../src/ol/source/ImageWMS.js'; -import OSM from '../src/ol/source/OSM.js'; const wmsSource = new ImageWMS({ url: 'https://ahocevar.com/geoserver/wms', params: {'LAYERS': 'topp:states'}, ratio: 1, - serverType: 'geoserver' + serverType: 'geoserver', }); -const updateLegend = function(resolution) { +const updateLegend = function (resolution) { const graphicUrl = wmsSource.getLegendUrl(resolution); const img = document.getElementById('legend'); img.src = graphicUrl; @@ -19,12 +19,12 @@ const updateLegend = function(resolution) { const layers = [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new ImageLayer({ extent: [-13884991, 2870341, -7455066, 6338219], - source: wmsSource - }) + source: wmsSource, + }), ]; const map = new Map({ @@ -32,8 +32,8 @@ const map = new Map({ target: 'map', view: new View({ center: [-10997148, 4569099], - zoom: 4 - }) + zoom: 4, + }), }); // Initial legend @@ -41,7 +41,7 @@ const resolution = map.getView().getResolution(); updateLegend(resolution); // Update the legend when the resolution changes -map.getView().on('change:resolution', function(event) { +map.getView().on('change:resolution', function (event) { const resolution = event.target.getResolution(); updateLegend(resolution); }); diff --git a/examples/wms-image-custom-proj.js b/examples/wms-image-custom-proj.js index 9637b5d357..a52125d80a 100644 --- a/examples/wms-image-custom-proj.js +++ b/examples/wms-image-custom-proj.js @@ -1,13 +1,12 @@ -import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {defaults as defaultControls, ScaleLine} from '../src/ol/control.js'; import ImageLayer from '../src/ol/layer/Image.js'; -import {fromLonLat} from '../src/ol/proj.js'; -import Projection from '../src/ol/proj/Projection.js'; import ImageWMS from '../src/ol/source/ImageWMS.js'; -import {register} from '../src/ol/proj/proj4.js'; +import Map from '../src/ol/Map.js'; +import Projection from '../src/ol/proj/Projection.js'; +import View from '../src/ol/View.js'; import proj4 from 'proj4'; - +import {ScaleLine, defaults as defaultControls} from '../src/ol/control.js'; +import {fromLonLat} from '../src/ol/proj.js'; +import {register} from '../src/ol/proj/proj4.js'; // Transparent Proj4js support: // @@ -22,15 +21,17 @@ import proj4 from 'proj4'; // determine the view resolution for zoom level 0. Recommended values for a // projection's validity extent can be found at https://epsg.io/. -proj4.defs('EPSG:21781', +proj4.defs( + 'EPSG:21781', '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 ' + '+x_0=600000 +y_0=200000 +ellps=bessel ' + - '+towgs84=660.077,13.551,369.344,2.484,1.783,2.939,5.66 +units=m +no_defs'); + '+towgs84=660.077,13.551,369.344,2.484,1.783,2.939,5.66 +units=m +no_defs' +); register(proj4); const projection = new Projection({ code: 'EPSG:21781', - extent: [485869.5728, 76443.1884, 837076.5648, 299941.7864] + extent: [485869.5728, 76443.1884, 837076.5648, 299941.7864], }); const extent = [420000, 30000, 900000, 350000]; @@ -40,38 +41,38 @@ const layers = [ source: new ImageWMS({ url: 'https://wms.geo.admin.ch/', crossOrigin: 'anonymous', - attributions: '© Pixelmap 1:1000000 / geo.admin.ch', + attributions: + '© Pixelmap 1:1000000 / geo.admin.ch', params: { 'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale', - 'FORMAT': 'image/jpeg' + 'FORMAT': 'image/jpeg', }, - serverType: 'mapserver' - }) + serverType: 'mapserver', + }), }), new ImageLayer({ extent: extent, source: new ImageWMS({ url: 'https://wms.geo.admin.ch/', crossOrigin: 'anonymous', - attributions: '© National parks / geo.admin.ch', + attributions: + '© National parks / geo.admin.ch', params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'}, - serverType: 'mapserver' - }) - }) + serverType: 'mapserver', + }), + }), ]; const map = new Map({ - controls: defaultControls().extend([ - new ScaleLine() - ]), + controls: defaultControls().extend([new ScaleLine()]), layers: layers, target: 'map', view: new View({ projection: projection, center: fromLonLat([8.23, 46.86], projection), extent: extent, - zoom: 2 - }) + zoom: 2, + }), }); diff --git a/examples/wms-image.js b/examples/wms-image.js index ebadd9351d..1f19d1e334 100644 --- a/examples/wms-image.js +++ b/examples/wms-image.js @@ -1,13 +1,12 @@ +import ImageWMS from '../src/ol/source/ImageWMS.js'; import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; import View from '../src/ol/View.js'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import ImageWMS from '../src/ol/source/ImageWMS.js'; -import OSM from '../src/ol/source/OSM.js'; - const layers = [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new ImageLayer({ extent: [-13884991, 2870341, -7455066, 6338219], @@ -15,15 +14,15 @@ const layers = [ url: 'https://ahocevar.com/geoserver/wms', params: {'LAYERS': 'topp:states'}, ratio: 1, - serverType: 'geoserver' - }) - }) + serverType: 'geoserver', + }), + }), ]; const map = new Map({ layers: layers, target: 'map', view: new View({ center: [-10997148, 4569099], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/wms-no-proj.js b/examples/wms-no-proj.js index ca1d270fff..2f515f8d3d 100644 --- a/examples/wms-no-proj.js +++ b/examples/wms-no-proj.js @@ -1,34 +1,35 @@ +import ImageWMS from '../src/ol/source/ImageWMS.js'; import Map from '../src/ol/Map.js'; +import Projection from '../src/ol/proj/Projection.js'; +import TileWMS from '../src/ol/source/TileWMS.js'; import View from '../src/ol/View.js'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import Projection from '../src/ol/proj/Projection.js'; -import ImageWMS from '../src/ol/source/ImageWMS.js'; -import TileWMS from '../src/ol/source/TileWMS.js'; - const layers = [ new TileLayer({ source: new TileWMS({ - attributions: '© Pixelmap 1:1000000 / geo.admin.ch', + attributions: + '© Pixelmap 1:1000000 / geo.admin.ch', crossOrigin: 'anonymous', params: { 'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale', - 'FORMAT': 'image/jpeg' + 'FORMAT': 'image/jpeg', }, - url: 'https://wms.geo.admin.ch/' - }) + url: 'https://wms.geo.admin.ch/', + }), }), new ImageLayer({ source: new ImageWMS({ - attributions: '© National parks / geo.admin.ch', + attributions: + '© National parks / geo.admin.ch', crossOrigin: 'anonymous', params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'}, serverType: 'mapserver', - url: 'https://wms.geo.admin.ch/' - }) - }) + url: 'https://wms.geo.admin.ch/', + }), + }), ]; // A minimal projection object is configured with only the SRS code and the map @@ -38,7 +39,7 @@ const layers = [ // coordinates relate to latitude or longitude. const projection = new Projection({ code: 'EPSG:21781', - units: 'm' + units: 'm', }); const map = new Map({ @@ -47,6 +48,6 @@ const map = new Map({ view: new View({ center: [660000, 190000], projection: projection, - zoom: 9 - }) + zoom: 9, + }), }); diff --git a/examples/wms-tiled-wrap-180.js b/examples/wms-tiled-wrap-180.js index 07ec52ac71..4463ae4c54 100644 --- a/examples/wms-tiled-wrap-180.js +++ b/examples/wms-tiled-wrap-180.js @@ -1,27 +1,26 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; import TileWMS from '../src/ol/source/TileWMS.js'; - +import View from '../src/ol/View.js'; const layers = [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ source: new TileWMS({ url: 'https://ahocevar.com/geoserver/ne/wms', params: {'LAYERS': 'ne:ne_10m_admin_0_countries', 'TILED': true}, - serverType: 'geoserver' - }) - }) + serverType: 'geoserver', + }), + }), ]; const map = new Map({ layers: layers, target: 'map', view: new View({ center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); diff --git a/examples/wms-tiled.js b/examples/wms-tiled.js index a7aacd5105..5bc7ce85b7 100644 --- a/examples/wms-tiled.js +++ b/examples/wms-tiled.js @@ -1,13 +1,12 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; import TileWMS from '../src/ol/source/TileWMS.js'; - +import View from '../src/ol/View.js'; const layers = [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ extent: [-13884991, 2870341, -7455066, 6338219], @@ -16,15 +15,15 @@ const layers = [ params: {'LAYERS': 'topp:states', 'TILED': true}, serverType: 'geoserver', // Countries have transparency, so do not fade tiles: - transition: 0 - }) - }) + transition: 0, + }), + }), ]; const map = new Map({ layers: layers, target: 'map', view: new View({ center: [-10997148, 4569099], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/wms-time.js b/examples/wms-time.js index 18bce02a25..356634a31a 100644 --- a/examples/wms-time.js +++ b/examples/wms-time.js @@ -1,10 +1,10 @@ import Map from '../src/ol/Map.js'; +import Stamen from '../src/ol/source/Stamen.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import TileWMS from '../src/ol/source/TileWMS.js'; import View from '../src/ol/View.js'; import {getCenter} from '../src/ol/extent.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import {transformExtent} from '../src/ol/proj.js'; -import Stamen from '../src/ol/source/Stamen.js'; -import TileWMS from '../src/ol/source/TileWMS.js'; function threeHoursAgo() { return new Date(Math.round(Date.now() / 3600000) * 3600000 - 3600000 * 3); @@ -18,25 +18,25 @@ let animationId = null; const layers = [ new TileLayer({ source: new Stamen({ - layer: 'terrain' - }) + layer: 'terrain', + }), }), new TileLayer({ extent: extent, source: new TileWMS({ attributions: ['Iowa State University'], url: 'https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi', - params: {'LAYERS': 'nexrad-n0r-wmst'} - }) - }) + params: {'LAYERS': 'nexrad-n0r-wmst'}, + }), + }), ]; const map = new Map({ layers: layers, target: 'map', view: new View({ center: getCenter(extent), - zoom: 4 - }) + zoom: 4, + }), }); function updateInfo() { @@ -54,14 +54,14 @@ function setTime() { } setTime(); -const stop = function() { +const stop = function () { if (animationId !== null) { window.clearInterval(animationId); animationId = null; } }; -const play = function() { +const play = function () { stop(); animationId = window.setInterval(setTime, 1000 / frameRate); }; diff --git a/examples/wmts-capabilities.js b/examples/wmts-capabilities.js index c22f3c3c99..8650b863b3 100644 --- a/examples/wmts-capabilities.js +++ b/examples/wmts-capabilities.js @@ -2,9 +2,11 @@ import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; const parser = new WMTSCapabilities(); -fetch('data/WMTSCapabilities.xml').then(function(response) { - return response.text(); -}).then(function(text) { - const result = parser.read(text); - document.getElementById('log').innerText = JSON.stringify(result, null, 2); -}); +fetch('data/WMTSCapabilities.xml') + .then(function (response) { + return response.text(); + }) + .then(function (text) { + const result = parser.read(text); + document.getElementById('log').innerText = JSON.stringify(result, null, 2); + }); diff --git a/examples/wmts-dimensions.js b/examples/wmts-dimensions.js index f29313ac4d..6e1afc9e75 100644 --- a/examples/wmts-dimensions.js +++ b/examples/wmts-dimensions.js @@ -1,12 +1,11 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getWidth, getTopLeft} from '../src/ol/extent.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {get as getProjection} from '../src/ol/proj.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import WMTS from '../src/ol/source/WMTS.js'; import WMTSTileGrid from '../src/ol/tilegrid/WMTS.js'; - +import {get as getProjection} from '../src/ol/proj.js'; +import {getTopLeft, getWidth} from '../src/ol/extent.js'; // create the WMTS tile grid in the google projection const projection = getProjection('EPSG:3857'); @@ -21,7 +20,7 @@ for (let i = 0; i <= 14; i++) { const tileGrid = new WMTSTileGrid({ origin: getTopLeft(projection.getExtent()), resolutions: resolutions, - matrixIds: matrixIds + matrixIds: matrixIds, }); const scalgoToken = 'CC5BF28A7D96B320C7DFBFD1236B5BEB'; @@ -34,13 +33,13 @@ const wmtsSource = new WMTS({ attributions: [ 'SCALGO', 'CGIAR-CSI SRTM' + 'srtm-90m-digital-elevation-database-v4-1">CGIAR-CSI SRTM', ], tileGrid: tileGrid, style: 'default', dimensions: { - 'threshold': 100 - } + 'threshold': 100, + }, }); const map = new Map({ @@ -48,26 +47,26 @@ const map = new Map({ view: new View({ projection: projection, center: [-9871995, 3566245], - zoom: 6 + zoom: 6, }), layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ opacity: 0.5, - source: wmtsSource - }) - ] + source: wmtsSource, + }), + ], }); -const updateSourceDimension = function(source, sliderVal) { +const updateSourceDimension = function (source, sliderVal) { source.updateDimensions({'threshold': sliderVal}); document.getElementById('theinfo').innerHTML = sliderVal + ' meters'; }; updateSourceDimension(wmtsSource, 10); -document.getElementById('slider').addEventListener('input', function() { +document.getElementById('slider').addEventListener('input', function () { updateSourceDimension(wmtsSource, this.value); }); diff --git a/examples/wmts-hidpi.js b/examples/wmts-hidpi.js index 99766071e0..535fd8d0c0 100644 --- a/examples/wmts-hidpi.js +++ b/examples/wmts-hidpi.js @@ -1,12 +1,12 @@ import Map from '../src/ol/Map.js'; +import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; +import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; import {DEVICE_PIXEL_RATIO} from '../src/ol/has.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; - -const capabilitiesUrl = 'https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml'; +const capabilitiesUrl = + 'https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml'; // HiDPI support: // * Use 'bmaphidpi' layer (pixel ratio 2) for device pixel ratio > 1 @@ -19,21 +19,25 @@ const map = new Map({ target: 'map', view: new View({ center: [1823849, 6143760], - zoom: 11 - }) + zoom: 11, + }), }); -fetch(capabilitiesUrl).then(function(response) { - return response.text(); -}).then(function(text) { - const result = new WMTSCapabilities().read(text); - const options = optionsFromCapabilities(result, { - layer: layer, - matrixSet: 'google3857', - style: 'normal' +fetch(capabilitiesUrl) + .then(function (response) { + return response.text(); + }) + .then(function (text) { + const result = new WMTSCapabilities().read(text); + const options = optionsFromCapabilities(result, { + layer: layer, + matrixSet: 'google3857', + style: 'normal', + }); + options.tilePixelRatio = tilePixelRatio; + map.addLayer( + new TileLayer({ + source: new WMTS(options), + }) + ); }); - options.tilePixelRatio = tilePixelRatio; - map.addLayer(new TileLayer({ - source: new WMTS(options) - })); -}); diff --git a/examples/wmts-ign.js b/examples/wmts-ign.js index 1c3f415485..7082640b96 100644 --- a/examples/wmts-ign.js +++ b/examples/wmts-ign.js @@ -1,18 +1,17 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getWidth} from '../src/ol/extent.js'; import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat, get as getProjection} from '../src/ol/proj.js'; +import View from '../src/ol/View.js'; import WMTS from '../src/ol/source/WMTS.js'; import WMTSTileGrid from '../src/ol/tilegrid/WMTS.js'; - +import {fromLonLat, get as getProjection} from '../src/ol/proj.js'; +import {getWidth} from '../src/ol/extent.js'; const map = new Map({ target: 'map', view: new View({ zoom: 5, - center: fromLonLat([5, 45]) - }) + center: fromLonLat([5, 45]), + }), }); const resolutions = []; @@ -28,7 +27,7 @@ for (let i = 0; i < 18; i++) { const tileGrid = new WMTSTileGrid({ origin: [-20037508, 20037508], resolutions: resolutions, - matrixIds: matrixIds + matrixIds: matrixIds, }); // For more information about the IGN API key see @@ -42,13 +41,14 @@ const ign_source = new WMTS({ projection: 'EPSG:3857', tileGrid: tileGrid, style: 'normal', - attributions: '' + - '' + attributions: + '' + + '', }); const ign = new TileLayer({ - source: ign_source + source: ign_source, }); map.addLayer(ign); diff --git a/examples/wmts-layer-from-capabilities.js b/examples/wmts-layer-from-capabilities.js index 4faa8953f9..5ffc86ba44 100644 --- a/examples/wmts-layer-from-capabilities.js +++ b/examples/wmts-layer-from-capabilities.js @@ -1,37 +1,39 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; +import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; const parser = new WMTSCapabilities(); let map; -fetch('data/WMTSCapabilities.xml').then(function(response) { - return response.text(); -}).then(function(text) { - const result = parser.read(text); - const options = optionsFromCapabilities(result, { - layer: 'layer-7328', - matrixSet: 'EPSG:3857' - }); +fetch('data/WMTSCapabilities.xml') + .then(function (response) { + return response.text(); + }) + .then(function (text) { + const result = parser.read(text); + const options = optionsFromCapabilities(result, { + layer: 'layer-7328', + matrixSet: 'EPSG:3857', + }); - map = new Map({ - layers: [ - new TileLayer({ - source: new OSM(), - opacity: 0.7 + map = new Map({ + layers: [ + new TileLayer({ + source: new OSM(), + opacity: 0.7, + }), + new TileLayer({ + opacity: 1, + source: new WMTS(options), + }), + ], + target: 'map', + view: new View({ + center: [19412406.33, -5050500.21], + zoom: 5, }), - new TileLayer({ - opacity: 1, - source: new WMTS(options) - }) - ], - target: 'map', - view: new View({ - center: [19412406.33, -5050500.21], - zoom: 5 - }) + }); }); -}); diff --git a/examples/wmts.js b/examples/wmts.js index 597c3d423b..be6e0e4f86 100644 --- a/examples/wmts.js +++ b/examples/wmts.js @@ -1,12 +1,11 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import {getWidth, getTopLeft} from '../src/ol/extent.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import {get as getProjection} from '../src/ol/proj.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import WMTS from '../src/ol/source/WMTS.js'; import WMTSTileGrid from '../src/ol/tilegrid/WMTS.js'; - +import {get as getProjection} from '../src/ol/proj.js'; +import {getTopLeft, getWidth} from '../src/ol/extent.js'; const projection = getProjection('EPSG:3857'); const projectionExtent = projection.getExtent(); @@ -23,15 +22,17 @@ const map = new Map({ layers: [ new TileLayer({ source: new OSM(), - opacity: 0.7 + opacity: 0.7, }), new TileLayer({ opacity: 0.7, source: new WMTS({ - attributions: 'Tiles © ArcGIS', - url: 'https://services.arcgisonline.com/arcgis/rest/' + - 'services/Demographics/USA_Population_Density/MapServer/WMTS/', + attributions: + 'Tiles © ArcGIS', + url: + 'https://services.arcgisonline.com/arcgis/rest/' + + 'services/Demographics/USA_Population_Density/MapServer/WMTS/', layer: '0', matrixSet: 'EPSG:3857', format: 'image/png', @@ -39,16 +40,16 @@ const map = new Map({ tileGrid: new WMTSTileGrid({ origin: getTopLeft(projectionExtent), resolutions: resolutions, - matrixIds: matrixIds + matrixIds: matrixIds, }), style: 'default', - wrapX: true - }) - }) + wrapX: true, + }), + }), ], target: 'map', view: new View({ center: [-11158582, 4813697], - zoom: 4 - }) + zoom: 4, + }), }); diff --git a/examples/worker.js b/examples/worker.js index 3a0d212570..736d346a51 100644 --- a/examples/worker.js +++ b/examples/worker.js @@ -1,35 +1,34 @@ /* eslint-disable no-console */ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; -import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import {create as createVersionWorker} from '../src/ol/worker/version.js'; - const map = new Map({ layers: [ new TileLayer({ - source: new OSM() - }) + source: new OSM(), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const worker = createVersionWorker(); -worker.addEventListener('error', function(error) { +worker.addEventListener('error', function (error) { console.error('worker error', error); }); -worker.addEventListener('message', function(event) { +worker.addEventListener('message', function (event) { console.log('message from worker:', event.data); }); -map.on('moveend', function(event) { +map.on('moveend', function (event) { const state = event.frameState.viewState; worker.postMessage({zoom: state.zoom, center: state.center}); }); diff --git a/examples/xyz-esri-4326-512.js b/examples/xyz-esri-4326-512.js index 407e2e3e6e..67ea904866 100644 --- a/examples/xyz-esri-4326-512.js +++ b/examples/xyz-esri-4326-512.js @@ -1,6 +1,6 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; const map = new Map({ @@ -9,20 +9,21 @@ const map = new Map({ new TileLayer({ source: new XYZ({ attributions: 'Copyright:© 2013 ESRI, i-cubed, GeoEye', - url: 'https://services.arcgisonline.com/arcgis/rest/services/' + - 'ESRI_Imagery_World_2D/MapServer/tile/{z}/{y}/{x}', + url: + 'https://services.arcgisonline.com/arcgis/rest/services/' + + 'ESRI_Imagery_World_2D/MapServer/tile/{z}/{y}/{x}', maxZoom: 15, projection: 'EPSG:4326', tileSize: 512, // the tile size supported by the ArcGIS tile service maxResolution: 180 / 512, // Esri's tile grid fits 180 degrees on one 512 px tile - wrapX: true - }) - }) + wrapX: true, + }), + }), ], view: new View({ center: [0, 0], projection: 'EPSG:4326', zoom: 2, - minZoom: 2 - }) + minZoom: 2, + }), }); diff --git a/examples/xyz-esri.js b/examples/xyz-esri.js index 3e2ed8989d..2f6bbae7c0 100644 --- a/examples/xyz-esri.js +++ b/examples/xyz-esri.js @@ -1,24 +1,25 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; -import {fromLonLat} from '../src/ol/proj.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; - +import {fromLonLat} from '../src/ol/proj.js'; const map = new Map({ target: 'map', layers: [ new TileLayer({ source: new XYZ({ - attributions: 'Tiles © ArcGIS', - url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' + - 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}' - }) - }) + attributions: + 'Tiles © ArcGIS', + url: + 'https://server.arcgisonline.com/ArcGIS/rest/services/' + + 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}', + }), + }), ], view: new View({ center: fromLonLat([-121.1, 47.5]), - zoom: 7 - }) + zoom: 7, + }), }); diff --git a/examples/xyz-retina.js b/examples/xyz-retina.js index da93d9b099..05a2196f0b 100644 --- a/examples/xyz-retina.js +++ b/examples/xyz-retina.js @@ -1,9 +1,9 @@ import Map from '../src/ol/Map.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 OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; +import {transform, transformExtent} from '../src/ol/proj.js'; const mapMinZoom = 1; const mapMaxZoom = 15; @@ -13,24 +13,24 @@ const map = new Map({ target: 'map', layers: [ new TileLayer({ - source: new OSM() + source: new OSM(), }), new TileLayer({ extent: transformExtent(mapExtent, 'EPSG:4326', 'EPSG:3857'), source: new XYZ({ - attributions: 'Tiles © USGS, rendered with ' + - 'MapTiler', + attributions: + 'Tiles © USGS, rendered with ' + + 'MapTiler', url: 'https://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png', tilePixelRatio: 2, // THIS IS IMPORTANT minZoom: mapMinZoom, - maxZoom: mapMaxZoom - }) - }) + maxZoom: mapMaxZoom, + }), + }), ], view: new View({ projection: 'EPSG:3857', - center: transform([-112.18688965, 36.057944835], - 'EPSG:4326', 'EPSG:3857'), - zoom: 12 - }) + center: transform([-112.18688965, 36.057944835], 'EPSG:4326', 'EPSG:3857'), + zoom: 12, + }), }); diff --git a/examples/xyz.js b/examples/xyz.js index d687f69685..89f2d02271 100644 --- a/examples/xyz.js +++ b/examples/xyz.js @@ -1,21 +1,21 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; - const map = new Map({ target: 'map', layers: [ new TileLayer({ source: new XYZ({ - url: 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + - '?apikey=0e6fc415256d4fbb9b5166a718591d71' - }) - }) + url: + 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' + + '?apikey=0e6fc415256d4fbb9b5166a718591d71', + }), + }), ], view: new View({ center: [-472202, 7530279], - zoom: 12 - }) + zoom: 12, + }), }); diff --git a/examples/zoom-constrained.js b/examples/zoom-constrained.js index dab35e096e..d0e1f08743 100644 --- a/examples/zoom-constrained.js +++ b/examples/zoom-constrained.js @@ -1,11 +1,11 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; - const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; -const attributions = '© MapTiler ' + +const attributions = + '© MapTiler ' + '© OpenStreetMap contributors'; const map = new Map({ @@ -14,14 +14,15 @@ const map = new Map({ new TileLayer({ source: new XYZ({ attributions: attributions, - url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key - }) - }) + url: + 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + }), + }), ], view: new View({ center: [-13553864, 5918250], zoom: 11, minZoom: 9, - maxZoom: 13 - }) + maxZoom: 13, + }), }); diff --git a/examples/zoomify.js b/examples/zoomify.js index 47a32ae0db..74011f2cb1 100644 --- a/examples/zoomify.js +++ b/examples/zoomify.js @@ -1,6 +1,6 @@ import Map from '../src/ol/Map.js'; -import View from '../src/ol/View.js'; import TileLayer from '../src/ol/layer/Tile.js'; +import View from '../src/ol/View.js'; import Zoomify from '../src/ol/source/Zoomify.js'; const imgWidth = 4000; @@ -12,7 +12,7 @@ const source = new Zoomify({ url: zoomifyUrl, size: [imgWidth, imgHeight], crossOrigin: 'anonymous', - zDirection: -1 // Ensure we get a tile with the screen resolution or higher + zDirection: -1, // Ensure we get a tile with the screen resolution or higher }); const extent = source.getTileGrid().getExtent(); @@ -23,11 +23,11 @@ const retinaSource = new Zoomify({ crossOrigin: 'anonymous', zDirection: -1, // Ensure we get a tile with the screen resolution or higher tilePixelRatio: retinaPixelRatio, // Display retina tiles - tileSize: 256 / retinaPixelRatio // from a higher zoom level + tileSize: 256 / retinaPixelRatio, // from a higher zoom level }); const layer = new TileLayer({ - source: source + source: source, }); const map = new Map({ @@ -38,13 +38,13 @@ const map = new Map({ resolutions: layer.getSource().getTileGrid().getResolutions(), // constrain the center: center cannot be set outside this extent extent: extent, - constrainOnlyCenter: true - }) + constrainOnlyCenter: true, + }), }); map.getView().fit(extent); const control = document.getElementById('zoomifyProtocol'); -control.addEventListener('change', function(event) { +control.addEventListener('change', function (event) { const value = event.currentTarget.value; if (value === 'zoomify') { layer.setSource(source); @@ -52,5 +52,3 @@ control.addEventListener('change', function(event) { layer.setSource(retinaSource); } }); - - diff --git a/examples/zoomslider.js b/examples/zoomslider.js index 1e8f3b0ba9..5bc313e4bf 100644 --- a/examples/zoomslider.js +++ b/examples/zoomslider.js @@ -1,9 +1,8 @@ import Map from '../src/ol/Map.js'; +import OSM from '../src/ol/source/OSM.js'; +import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; import {ZoomSlider} from '../src/ol/control.js'; -import TileLayer from '../src/ol/layer/Tile.js'; -import OSM from '../src/ol/source/OSM.js'; - /** * Helper method for map-creation. @@ -14,15 +13,15 @@ import OSM from '../src/ol/source/OSM.js'; function createMap(divId) { const source = new OSM(); const layer = new TileLayer({ - source: source + source: source, }); const map = new Map({ layers: [layer], target: divId, view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const zoomslider = new ZoomSlider(); map.addControl(zoomslider); diff --git a/package-lock.json b/package-lock.json index ac66522a85..e563f43b51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,12 +5,12 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" } }, "@babel/compat-data": { @@ -877,13 +877,13 @@ } }, "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.9.0", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, @@ -2103,12 +2103,20 @@ "dev": true }, "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } } }, "ansi-html": { @@ -2202,13 +2210,14 @@ "dev": true }, "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" } }, "array-union": { @@ -2232,6 +2241,16 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, + "array.prototype.flat": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", @@ -2749,6 +2768,16 @@ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -3024,6 +3053,12 @@ "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", "dev": true }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, "buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", @@ -4288,17 +4323,84 @@ } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + }, + "dependencies": { + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + } } }, "es-to-primitive": { @@ -4429,18 +4531,18 @@ } }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" } }, "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "requires": { "type-fest": "^0.8.1" @@ -4482,30 +4584,43 @@ } }, "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", "dev": true } } }, "eslint-config-openlayers": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-openlayers/-/eslint-config-openlayers-13.0.0.tgz", - "integrity": "sha512-FlhPbUhrgh9nyIrcf6jX8cZHLOxl2Z4rmLnMrhwBhE+KQK2n3hywXpkNvUROWV9TQpxavzaA7punYHL4ggUpig==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-openlayers/-/eslint-config-openlayers-14.0.0.tgz", + "integrity": "sha512-/+dcW3RW5oVWSLNvAPlsx+sfDfyPMTvQV3oCmZjKcoa8PIzzby3J/gjAHdFiQsMzxPULcr/Q/GQKxSm0GxYroA==", "dev": true, "requires": { - "eslint-plugin-import": "^2.18.2" + "eslint-config-prettier": "^6.10.1", + "eslint-plugin-import": "^2.20.2", + "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-sort-imports-es6-autofix": "^0.5.0", + "prettier": "^2.0.2" + } + }, + "eslint-config-prettier": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", + "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" } }, "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", + "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", "dev": true, "requires": { "debug": "^2.6.9", - "resolve": "^1.5.0" + "resolve": "^1.13.1" }, "dependencies": { "debug": { @@ -4522,16 +4637,25 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } } } }, "eslint-module-utils": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", - "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", "dev": true, "requires": { - "debug": "^2.6.8", + "debug": "^2.6.9", "pkg-dir": "^2.0.0" }, "dependencies": { @@ -4605,22 +4729,23 @@ } }, "eslint-plugin-import": { - "version": "2.18.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", - "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "version": "2.20.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", + "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", "dev": true, "requires": { "array-includes": "^3.0.3", + "array.prototype.flat": "^1.2.1", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.0", + "eslint-module-utils": "^2.4.1", "has": "^1.0.3", "minimatch": "^3.0.4", "object.values": "^1.1.0", "read-pkg-up": "^2.0.0", - "resolve": "^1.11.0" + "resolve": "^1.12.0" }, "dependencies": { "debug": { @@ -4649,9 +4774,9 @@ "dev": true }, "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -4659,6 +4784,24 @@ } } }, + "eslint-plugin-prettier": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz", + "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-sort-imports-es6-autofix": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-imports-es6-autofix/-/eslint-plugin-sort-imports-es6-autofix-0.5.0.tgz", + "integrity": "sha512-KEX2Uz6bAs67jDYiH/OT1xz1E7AzIJJOIRg1F7OnFAfUVlpws3ldSZj5oZySRHfoVkWqDX9GGExYxckdLrWhwg==", + "dev": true, + "requires": { + "eslint": "^6.2.2" + } + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -4685,13 +4828,13 @@ "dev": true }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", "dev": true, "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" }, "dependencies": { @@ -4700,12 +4843,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true - }, - "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", - "dev": true } } }, @@ -4716,12 +4853,20 @@ "dev": true }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz", + "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.0.0" + }, + "dependencies": { + "estraverse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz", + "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==", + "dev": true + } } }, "esrecurse": { @@ -5057,15 +5202,15 @@ } }, "extract-zip": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", - "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", + "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", "dev": true, "requires": { - "concat-stream": "1.6.2", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "yauzl": "2.4.1" + "concat-stream": "^1.6.2", + "debug": "^2.6.9", + "mkdirp": "^0.5.4", + "yauzl": "^2.10.0" }, "dependencies": { "debug": { @@ -5097,6 +5242,12 @@ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "fast-glob": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.1.tgz", @@ -5195,9 +5346,9 @@ } }, "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, "requires": { "pend": "~1.2.0" @@ -5210,9 +5361,9 @@ "dev": true }, "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -5227,6 +5378,13 @@ "flat-cache": "^2.0.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fileset": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", @@ -5521,41 +5679,38 @@ "dev": true }, "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", + "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" + "node-pre-gyp": "*" }, "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "bundled": true, "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "bundled": true, "dev": true, "optional": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "bundled": true, "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5565,15 +5720,13 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "bundled": true, "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5582,44 +5735,38 @@ } }, "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "version": "1.1.4", + "bundled": true, "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "bundled": true, "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "bundled": true, "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "bundled": true, "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "bundled": true, "dev": true, "optional": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "3.2.6", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5628,46 +5775,40 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "bundled": true, "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bundled": true, "dev": true, "optional": true }, "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "version": "1.2.7", + "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.6.0" } }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5682,9 +5823,8 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.6", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5698,15 +5838,13 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5714,9 +5852,8 @@ } }, "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "version": "3.0.3", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5725,8 +5862,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5735,23 +5871,20 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "version": "2.0.4", + "bundled": true, "dev": true, "optional": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "bundled": true, "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5760,15 +5893,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5776,16 +5907,14 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "1.2.5", + "bundled": true, "dev": true, "optional": true }, "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "version": "2.9.0", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5794,48 +5923,43 @@ } }, "minizlib": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "version": "1.3.3", + "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.9.0" } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.3", + "bundled": true, "dev": true, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "bundled": true, "dev": true, "optional": true }, "needle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", - "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", + "version": "2.3.3", + "bundled": true, "dev": true, "optional": true, "requires": { - "debug": "^4.1.0", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", - "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", + "version": "0.14.0", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5848,13 +5972,12 @@ "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", - "tar": "^4" + "tar": "^4.4.2" } }, "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "version": "4.0.3", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5863,27 +5986,34 @@ } }, "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", + "version": "1.4.8", + "bundled": true, "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5895,22 +6025,19 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "bundled": true, "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5919,22 +6046,19 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "bundled": true, "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5944,22 +6068,19 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "dev": true, "optional": true }, "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "version": "2.0.1", + "bundled": true, "dev": true, "optional": true }, "rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5967,21 +6088,11 @@ "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true, - "optional": true - } } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5995,9 +6106,8 @@ } }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6006,50 +6116,43 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "bundled": true, "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "bundled": true, "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "bundled": true, "dev": true, "optional": true }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "5.7.1", + "bundled": true, "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6060,8 +6163,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6070,8 +6172,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6080,38 +6181,34 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "bundled": true, "dev": true, "optional": true }, "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "version": "4.4.13", + "bundled": true, "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "bundled": true, "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6120,15 +6217,13 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "bundled": true, "dev": true, "optional": true }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "version": "3.1.1", + "bundled": true, "dev": true, "optional": true } @@ -6158,6 +6253,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -6494,9 +6595,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "hpack.js": { @@ -6685,23 +6786,23 @@ "dev": true }, "inquirer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz", - "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", "lodash": "^4.17.15", "mute-stream": "0.0.8", - "run-async": "^2.2.0", + "run-async": "^2.4.0", "rxjs": "^6.5.3", "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", + "strip-ansi": "^6.0.0", "through": "^2.3.6" }, "dependencies": { @@ -6711,12 +6812,53 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -6732,34 +6874,24 @@ "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } @@ -7042,6 +7174,12 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, "is-symbol": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", @@ -8315,20 +8453,12 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } + "minimist": "^1.2.5" } }, "mocha": { @@ -8636,9 +8766,9 @@ "dev": true }, "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "dev": true, "optional": true }, @@ -8999,13 +9129,13 @@ } }, "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", "dev": true, "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", + "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" } @@ -9499,6 +9629,21 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prettier": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", + "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -10308,9 +10453,9 @@ } }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", "dev": true, "requires": { "is-promise": "^2.1.0" @@ -10338,9 +10483,9 @@ "dev": true }, "rxjs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", - "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -11119,9 +11264,9 @@ } }, "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, "spdy": { @@ -11358,6 +11503,16 @@ } } }, + "string.prototype.trimend": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz", + "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "string.prototype.trimleft": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", @@ -11378,6 +11533,16 @@ "function-bind": "^1.1.1" } }, + "string.prototype.trimstart": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz", + "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -11436,12 +11601,12 @@ }, "dependencies": { "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -11453,6 +11618,12 @@ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -13099,12 +13270,13 @@ } }, "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "dev": true, "requires": { - "fd-slicer": "~1.0.1" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } }, "yeast": { diff --git a/package.json b/package.json index f3ae5a60d7..94075c7973 100644 --- a/package.json +++ b/package.json @@ -61,8 +61,8 @@ "clean-css-cli": "4.3.0", "copy-webpack-plugin": "^5.0.4", "coveralls": "3.0.11", - "eslint": "^6.0.0", - "eslint-config-openlayers": "^13.0.0", + "eslint": "^6.8.0", + "eslint-config-openlayers": "^14.0.0", "expect.js": "0.3.1", "front-matter": "^3.0.2", "fs-extra": "^9.0.0", diff --git a/rendering/cases/circle-style/main.js b/rendering/cases/circle-style/main.js index d4f743a627..7f9ac70aa7 100644 --- a/rendering/cases/circle-style/main.js +++ b/rendering/cases/circle-style/main.js @@ -1,29 +1,28 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import Circle from '../../../src/ol/style/Circle.js'; import Feature from '../../../src/ol/Feature.js'; +import Map from '../../../src/ol/Map.js'; import Point from '../../../src/ol/geom/Point.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Circle from '../../../src/ol/style/Circle.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); vectorSource.addFeatures([ new Feature({ geometry: new Point([-50, 50]), - radius: 10 + radius: 10, }), new Feature({ geometry: new Point([50, -50]), - radius: 20 + radius: 20, }), new Feature({ geometry: new Point([50, 50]), - radius: 30 - }) + radius: 30, + }), ]); const style = new Style({ @@ -31,9 +30,9 @@ const style = new Style({ radius: 1, stroke: new Stroke({ color: '#00f', - width: 3 - }) - }) + width: 3, + }), + }), }); new Map({ @@ -41,17 +40,17 @@ new Map({ layers: [ new VectorLayer({ source: vectorSource, - style: function(feature) { + style: function (feature) { style.getImage().setRadius(feature.get('radius')); return style; - } - }) + }, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/geometry-geographic/main.js b/rendering/cases/geometry-geographic/main.js index 3c1cd68523..bb6418d329 100644 --- a/rendering/cases/geometry-geographic/main.js +++ b/rendering/cases/geometry-geographic/main.js @@ -1,9 +1,12 @@ -import {Map, View, Feature} from '../../../src/ol/index.js'; +import {Circle, Fill, Style} from '../../../src/ol/style.js'; +import {Feature, Map, View} from '../../../src/ol/index.js'; import {Point} from '../../../src/ol/geom.js'; -import {Tile as TileLayer, Vector as VectorLayer} from '../../../src/ol/layer.js'; +import { + Tile as TileLayer, + Vector as VectorLayer, +} from '../../../src/ol/layer.js'; +import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; import {useGeographic} from '../../../src/ol/proj.js'; -import {XYZ, Vector as VectorSource} from '../../../src/ol/source.js'; -import {Style, Circle, Fill} from '../../../src/ol/style.js'; useGeographic(); @@ -16,28 +19,26 @@ new Map({ new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 - }) + transition: 0, + }), }), new VectorLayer({ source: new VectorSource({ - features: [ - new Feature(point) - ] + features: [new Feature(point)], }), style: new Style({ image: new Circle({ radius: 5, - fill: new Fill({color: 'red'}) - }) - }) - }) + fill: new Fill({color: 'red'}), + }), + }), + }), ], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/heatmap-layer/main.js b/rendering/cases/heatmap-layer/main.js index 151744432c..4f74275760 100644 --- a/rendering/cases/heatmap-layer/main.js +++ b/rendering/cases/heatmap-layer/main.js @@ -1,23 +1,23 @@ +import KML from '../../../src/ol/format/KML.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; +import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; import {Heatmap as HeatmapLayer} from '../../../src/ol/layer.js'; -import VectorSource from '../../../src/ol/source/Vector.js'; -import KML from '../../../src/ol/format/KML.js'; const vector = new HeatmapLayer({ source: new VectorSource({ url: '/data/2012_Earthquakes_Mag5.kml', format: new KML({ - extractStyles: false - }) + extractStyles: false, + }), }), blur: 3, - radius: 3 + radius: 3, }); -vector.getSource().on('addfeature', function(event) { +vector.getSource().on('addfeature', function (event) { const name = event.feature.get('name'); const magnitude = parseFloat(name.substr(2)); event.feature.set('weight', magnitude - 5); @@ -26,8 +26,8 @@ vector.getSource().on('addfeature', function(event) { const raster = new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 - }) + transition: 0, + }), }); new Map({ @@ -35,10 +35,10 @@ new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 0 - }) + zoom: 0, + }), }); render({ - message: 'Heatmap layer renders properly using webgl' + message: 'Heatmap layer renders properly using webgl', }); diff --git a/rendering/cases/icon-opacity/main.js b/rendering/cases/icon-opacity/main.js index e6f0ce4627..5ed35d0515 100644 --- a/rendering/cases/icon-opacity/main.js +++ b/rendering/cases/icon-opacity/main.js @@ -1,11 +1,14 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import {Vector as VectorLayer, Tile as TileLayer} from '../../../src/ol/layer.js'; -import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; -import Point from '../../../src/ol/geom/Point.js'; import Feature from '../../../src/ol/Feature.js'; +import Map from '../../../src/ol/Map.js'; +import Point from '../../../src/ol/geom/Point.js'; +import View from '../../../src/ol/View.js'; +import {Icon, Style} from '../../../src/ol/style.js'; +import { + Tile as TileLayer, + Vector as VectorLayer, +} from '../../../src/ol/layer.js'; +import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; import {fromLonLat} from '../../../src/ol/proj.js'; -import {Style, Icon} from '../../../src/ol/style.js'; const center = fromLonLat([8.6, 50.1]); @@ -13,35 +16,31 @@ new Map({ layers: [ new TileLayer({ source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), }), new VectorLayer({ - style: function() { + style: function () { return new Style({ image: new Icon({ opacity: 0.5, src: '/data/icon.png', anchor: [0.5, 46], anchorXUnits: 'fraction', - anchorYUnits: 'pixels' - }) + anchorYUnits: 'pixels', + }), }); }, source: new VectorSource({ - features: [ - new Feature( - new Point(center) - ) - ] - }) - }) + features: [new Feature(new Point(center))], + }), + }), ], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/icon-symbol-svg/main.js b/rendering/cases/icon-symbol-svg/main.js index 312fa67f8c..355f72a499 100644 --- a/rendering/cases/icon-symbol-svg/main.js +++ b/rendering/cases/icon-symbol-svg/main.js @@ -1,11 +1,14 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import {Vector as VectorLayer, Tile as TileLayer} from '../../../src/ol/layer.js'; -import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; -import Point from '../../../src/ol/geom/Point.js'; import Feature from '../../../src/ol/Feature.js'; +import Map from '../../../src/ol/Map.js'; +import Point from '../../../src/ol/geom/Point.js'; +import View from '../../../src/ol/View.js'; +import {Icon, Style} from '../../../src/ol/style.js'; +import { + Tile as TileLayer, + Vector as VectorLayer, +} from '../../../src/ol/layer.js'; +import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; import {fromLonLat} from '../../../src/ol/proj.js'; -import {Style, Icon} from '../../../src/ol/style.js'; const center = fromLonLat([8, 50]); @@ -14,59 +17,65 @@ let feature; // scales svg correctly feature = new Feature({ - geometry: new Point(fromLonLat([3, 45])) + geometry: new Point(fromLonLat([3, 45])), }); -feature.setStyle(new Style({ - image: new Icon({ - src: '/data/me0.svg', - scale: 2 +feature.setStyle( + new Style({ + image: new Icon({ + src: '/data/me0.svg', + scale: 2, + }), }) -})); +); vectorSource.addFeature(feature); // uses offset correctly feature = new Feature({ - geometry: new Point(fromLonLat([3, 55])) + geometry: new Point(fromLonLat([3, 55])), }); -feature.setStyle(new Style({ - image: new Icon({ - src: '/data/me0.svg', - offset: [16, 0], - scale: 2 +feature.setStyle( + new Style({ + image: new Icon({ + src: '/data/me0.svg', + offset: [16, 0], + scale: 2, + }), }) -})); +); vectorSource.addFeature(feature); // uses offset correctly if it is larger than size feature = new Feature({ - geometry: new Point(fromLonLat([8, 55])) + geometry: new Point(fromLonLat([8, 55])), }); -feature.setStyle(new Style({ - image: new Icon({ - src: '/data/me0.svg', - offsetOrigin: 'bottom-left', - offset: [16, 0], - size: [64, 40] +feature.setStyle( + new Style({ + image: new Icon({ + src: '/data/me0.svg', + offsetOrigin: 'bottom-left', + offset: [16, 0], + size: [64, 40], + }), }) -})); +); vectorSource.addFeature(feature); new Map({ layers: [ new TileLayer({ source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), }), new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/icon-symbol/main.js b/rendering/cases/icon-symbol/main.js index 53fd2a59c2..0dcaf38dca 100644 --- a/rendering/cases/icon-symbol/main.js +++ b/rendering/cases/icon-symbol/main.js @@ -1,11 +1,14 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import {Vector as VectorLayer, Tile as TileLayer} from '../../../src/ol/layer.js'; -import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; -import Point from '../../../src/ol/geom/Point.js'; import Feature from '../../../src/ol/Feature.js'; +import Map from '../../../src/ol/Map.js'; +import Point from '../../../src/ol/geom/Point.js'; +import View from '../../../src/ol/View.js'; +import {Icon, Style} from '../../../src/ol/style.js'; +import { + Tile as TileLayer, + Vector as VectorLayer, +} from '../../../src/ol/layer.js'; +import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; import {fromLonLat} from '../../../src/ol/proj.js'; -import {Style, Icon} from '../../../src/ol/style.js'; const center = fromLonLat([8.6, 50.1]); @@ -13,34 +16,30 @@ new Map({ layers: [ new TileLayer({ source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), }), new VectorLayer({ - style: function() { + style: function () { return new Style({ image: new Icon({ src: '/data/icon.png', anchor: [0.5, 46], anchorXUnits: 'fraction', - anchorYUnits: 'pixels' - }) + anchorYUnits: 'pixels', + }), }); }, source: new VectorSource({ - features: [ - new Feature( - new Point(center) - ) - ] - }) - }) + features: [new Feature(new Point(center))], + }), + }), ], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/immediate-geographic/main.js b/rendering/cases/immediate-geographic/main.js index c877a7728e..82f6935737 100644 --- a/rendering/cases/immediate-geographic/main.js +++ b/rendering/cases/immediate-geographic/main.js @@ -1,10 +1,10 @@ +import TileLayer from '../../../src/ol/layer/Tile.js'; +import XYZ from '../../../src/ol/source/XYZ.js'; +import {Circle, Fill, Style} from '../../../src/ol/style.js'; import {Map, View} from '../../../src/ol/index.js'; import {Point} from '../../../src/ol/geom.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; -import {useGeographic} from '../../../src/ol/proj.js'; -import XYZ from '../../../src/ol/source/XYZ.js'; -import {Style, Circle, Fill} from '../../../src/ol/style.js'; import {getVectorContext} from '../../../src/ol/render.js'; +import {useGeographic} from '../../../src/ol/proj.js'; useGeographic(); @@ -13,18 +13,20 @@ const center = [8.6, 50.1]; const layer = new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 - }) + transition: 0, + }), }); -layer.on('postrender', event => { +layer.on('postrender', (event) => { const context = getVectorContext(event); - context.setStyle(new Style({ - image: new Circle({ - radius: 5, - fill: new Fill({color: 'red'}) + context.setStyle( + new Style({ + image: new Circle({ + radius: 5, + fill: new Fill({color: 'red'}), + }), }) - })); + ); context.drawGeometry(new Point(center)); }); @@ -33,8 +35,8 @@ new Map({ layers: [layer], view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/layer-clipping/main.js b/rendering/cases/layer-clipping/main.js index 5b220936fe..23c1a27829 100644 --- a/rendering/cases/layer-clipping/main.js +++ b/rendering/cases/layer-clipping/main.js @@ -1,34 +1,50 @@ import Map from '../../../src/ol/Map.js'; +import MultiPolygon from '../../../src/ol/geom/MultiPolygon.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; -import MultiPolygon from '../../../src/ol/geom/MultiPolygon.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; import {getVectorContext} from '../../../src/ol/render.js'; const source = new XYZ({ url: '/data/tiles/osm/{z}/{x}/{y}.png', - transition: 0 + transition: 0, }); const layer = new TileLayer({ - source: source + source: source, }); const geometry = new MultiPolygon([ - [[[-80, -40], [-40, 0], [-80, 40], [-120, 0], [-80, -40]]], - [[[80, -40], [120, 0], [80, 40], [40, 0], [80, -40]]] + [ + [ + [-80, -40], + [-40, 0], + [-80, 40], + [-120, 0], + [-80, -40], + ], + ], + [ + [ + [80, -40], + [120, 0], + [80, 40], + [40, 0], + [80, -40], + ], + ], ]).transform('EPSG:4326', 'EPSG:3857'); const style = new Style({ stroke: new Stroke({ width: 2, - color: 'blue' - }) + color: 'blue', + }), }); -layer.on('prerender', function(event) { +layer.on('prerender', function (event) { const context = event.context; context.save(); @@ -39,7 +55,7 @@ layer.on('prerender', function(event) { context.clip(); }); -layer.on('postrender', function(event) { +layer.on('postrender', function (event) { const context = event.context; context.restore(); @@ -54,8 +70,8 @@ new Map({ layers: [layer], view: new View({ center: [0, 0], - zoom: 0 - }) + zoom: 0, + }), }); render(); diff --git a/rendering/cases/layer-group/main.js b/rendering/cases/layer-group/main.js index a6fae1260e..d61b52e2ac 100644 --- a/rendering/cases/layer-group/main.js +++ b/rendering/cases/layer-group/main.js @@ -1,13 +1,13 @@ import Map from '../../../src/ol/Map.js'; import View from '../../../src/ol/View.js'; -import {Group as LayerGroup, Tile as TileLayer} from '../../../src/ol/layer.js'; import XYZ from '../../../src/ol/source/XYZ.js'; +import {Group as LayerGroup, Tile as TileLayer} from '../../../src/ol/layer.js'; new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 3 + zoom: 3, }), layers: new LayerGroup({ opacity: 0.75, @@ -15,16 +15,16 @@ new Map({ new TileLayer({ opacity: 0.25, source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), }), new TileLayer({ source: new XYZ({ - url: '/data/tiles/stamen-labels/{z}/{x}/{y}.png' - }) - }) - ] - }) + url: '/data/tiles/stamen-labels/{z}/{x}/{y}.png', + }), + }), + ], + }), }); render(); diff --git a/rendering/cases/layer-image-extent-rotation-geographic/main.js b/rendering/cases/layer-image-extent-rotation-geographic/main.js index 41a59fffa4..3a3018e7fc 100644 --- a/rendering/cases/layer-image-extent-rotation-geographic/main.js +++ b/rendering/cases/layer-image-extent-rotation-geographic/main.js @@ -1,12 +1,12 @@ +import ImageLayer from '../../../src/ol/layer/Image.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Static from '../../../src/ol/source/ImageStatic.js'; +import View from '../../../src/ol/View.js'; import { get as getProjection, transformExtent, - useGeographic + useGeographic, } from '../../../src/ol/proj.js'; -import ImageLayer from '../../../src/ol/layer/Image.js'; useGeographic(); @@ -16,19 +16,25 @@ const extent = [-123.1, 37.1, -122.1, 37.9]; new Map({ pixelRatio: 1, target: 'map', - layers: [new ImageLayer({ - source: new Static({ - url: '/data/tiles/osm/5/5/12.png', - imageExtent: transformExtent([-123, 37, -122, 38], 'EPSG:4326', 'EPSG:3857'), - projection: getProjection('EPSG:3857') + layers: [ + new ImageLayer({ + source: new Static({ + url: '/data/tiles/osm/5/5/12.png', + imageExtent: transformExtent( + [-123, 37, -122, 38], + 'EPSG:4326', + 'EPSG:3857' + ), + projection: getProjection('EPSG:3857'), + }), + extent, }), - extent - })], + ], view: new View({ center, zoom: 8, - rotation: Math.PI / 4 - }) + rotation: Math.PI / 4, + }), }); render(); diff --git a/rendering/cases/layer-image-extent-rotation/main.js b/rendering/cases/layer-image-extent-rotation/main.js index 2736a5beb3..43f505970c 100644 --- a/rendering/cases/layer-image-extent-rotation/main.js +++ b/rendering/cases/layer-image-extent-rotation/main.js @@ -1,31 +1,41 @@ +import ImageLayer from '../../../src/ol/layer/Image.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Static from '../../../src/ol/source/ImageStatic.js'; +import View from '../../../src/ol/View.js'; import { get as getProjection, transform, - transformExtent + transformExtent, } from '../../../src/ol/proj.js'; -import ImageLayer from '../../../src/ol/layer/Image.js'; const center = transform([-122.416667, 37.783333], 'EPSG:4326', 'EPSG:3857'); -const extent = transformExtent([-123.1, 37.1, -122.1, 37.9], 'EPSG:4326', 'EPSG:3857'); +const extent = transformExtent( + [-123.1, 37.1, -122.1, 37.9], + 'EPSG:4326', + 'EPSG:3857' +); new Map({ pixelRatio: 1, target: 'map', - layers: [new ImageLayer({ - source: new Static({ - url: '/data/tiles/osm/5/5/12.png', - imageExtent: transformExtent([-123, 37, -122, 38], 'EPSG:4326', 'EPSG:3857'), - projection: getProjection('EPSG:3857') + layers: [ + new ImageLayer({ + source: new Static({ + url: '/data/tiles/osm/5/5/12.png', + imageExtent: transformExtent( + [-123, 37, -122, 38], + 'EPSG:4326', + 'EPSG:3857' + ), + projection: getProjection('EPSG:3857'), + }), + extent, }), - extent - })], + ], view: new View({ center, zoom: 8, - rotation: Math.PI / 4 - }) + rotation: Math.PI / 4, + }), }); render(); diff --git a/rendering/cases/layer-image/main.js b/rendering/cases/layer-image/main.js index 14de5cd377..1582be0eda 100644 --- a/rendering/cases/layer-image/main.js +++ b/rendering/cases/layer-image/main.js @@ -1,28 +1,34 @@ +import ImageLayer from '../../../src/ol/layer/Image.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Static from '../../../src/ol/source/ImageStatic.js'; +import View from '../../../src/ol/View.js'; import { get as getProjection, transform, - transformExtent + transformExtent, } from '../../../src/ol/proj.js'; -import ImageLayer from '../../../src/ol/layer/Image.js'; const center = transform([-122.416667, 37.783333], 'EPSG:4326', 'EPSG:3857'); new Map({ pixelRatio: 1, target: 'map', - layers: [new ImageLayer({ - source: new Static({ - url: '/data/tiles/osm/5/5/12.png', - imageExtent: transformExtent([-123, 37, -122, 38], 'EPSG:4326', 'EPSG:3857'), - projection: getProjection('EPSG:3857') - }) - })], + layers: [ + new ImageLayer({ + source: new Static({ + url: '/data/tiles/osm/5/5/12.png', + imageExtent: transformExtent( + [-123, 37, -122, 38], + 'EPSG:4326', + 'EPSG:3857' + ), + projection: getProjection('EPSG:3857'), + }), + }), + ], view: new View({ center, - zoom: 8 - }) + zoom: 8, + }), }); render(); diff --git a/rendering/cases/layer-tile-extent-geographic/main.js b/rendering/cases/layer-tile-extent-geographic/main.js index ea56577f79..d7bd2c4d5d 100644 --- a/rendering/cases/layer-tile-extent-geographic/main.js +++ b/rendering/cases/layer-tile-extent-geographic/main.js @@ -3,8 +3,8 @@ */ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; import {useGeographic} from '../../../src/ol/proj.js'; @@ -17,25 +17,25 @@ new Map({ target: 'map', view: new View({ center: center, - zoom: 3 + zoom: 3, }), layers: [ new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - maxZoom: 3 + maxZoom: 3, }), - extent: extent + extent: extent, }), new TileLayer({ source: new XYZ({ url: '/data/tiles/stamen-labels/{z}/{x}/{y}.png', minZoom: 3, - maxZoom: 5 + maxZoom: 5, }), - extent: extent - }) - ] + extent: extent, + }), + ], }); render(); diff --git a/rendering/cases/layer-tile-extent/main.js b/rendering/cases/layer-tile-extent/main.js index bb987178aa..04821c4aee 100644 --- a/rendering/cases/layer-tile-extent/main.js +++ b/rendering/cases/layer-tile-extent/main.js @@ -3,11 +3,11 @@ */ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; +import View from '../../../src/ol/View.js'; +import XYZ from '../../../src/ol/source/XYZ.js'; import {fromLonLat} from '../../../src/ol/proj.js'; import {transformExtent} from '../../../src/ol/proj.js'; -import XYZ from '../../../src/ol/source/XYZ.js'; const center = fromLonLat([7, 50]); const extent = transformExtent([2, 47, 10, 53], 'EPSG:4326', 'EPSG:3857'); @@ -16,25 +16,25 @@ new Map({ target: 'map', view: new View({ center: center, - zoom: 3 + zoom: 3, }), layers: [ new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - maxZoom: 3 + maxZoom: 3, }), - extent: extent + extent: extent, }), new TileLayer({ source: new XYZ({ url: '/data/tiles/stamen-labels/{z}/{x}/{y}.png', minZoom: 3, - maxZoom: 5 + maxZoom: 5, }), - extent: extent - }) - ] + extent: extent, + }), + ], }); render(); diff --git a/rendering/cases/layer-tile-none-square/main.js b/rendering/cases/layer-tile-none-square/main.js index 70a8782eab..a4766ed4d2 100644 --- a/rendering/cases/layer-tile-none-square/main.js +++ b/rendering/cases/layer-tile-none-square/main.js @@ -1,6 +1,6 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; import {createXYZ} from '../../../src/ol/tilegrid.js'; @@ -10,10 +10,10 @@ const layer = new TileLayer({ source: new XYZ({ url: '/data/tiles/512x256/{z}/{x}/{y}.png', tileGrid: createXYZ({ - tileSize: [512, 256] + tileSize: [512, 256], }), - transition: 0 - }) + transition: 0, + }), }); const map = new Map({ @@ -21,8 +21,8 @@ const map = new Map({ pixelRatio: 1, view: new View({ center: center, - zoom: 5 - }) + zoom: 5, + }), }); map.addLayer(layer); diff --git a/rendering/cases/layer-tile-opacity/main.js b/rendering/cases/layer-tile-opacity/main.js index 9d96801692..de389c55c9 100644 --- a/rendering/cases/layer-tile-opacity/main.js +++ b/rendering/cases/layer-tile-opacity/main.js @@ -1,8 +1,8 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; -import {fromLonLat} from '../../../src/ol/proj.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; +import {fromLonLat} from '../../../src/ol/proj.js'; const center = fromLonLat([8.6, 50.1]); @@ -11,16 +11,16 @@ new Map({ new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 + transition: 0, }), - opacity: 0.2 - }) + opacity: 0.2, + }), ], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/layer-tile-render-listener/main.js b/rendering/cases/layer-tile-render-listener/main.js index b5daf36b6a..2472a6a5c0 100644 --- a/rendering/cases/layer-tile-render-listener/main.js +++ b/rendering/cases/layer-tile-render-listener/main.js @@ -1,12 +1,12 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; -import {transform, fromLonLat} from '../../../src/ol/proj.js'; -import XYZ from '../../../src/ol/source/XYZ.js'; import CircleStyle from '../../../src/ol/style/Circle.js'; import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; +import Map from '../../../src/ol/Map.js'; import Point from '../../../src/ol/geom/Point.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; +import View from '../../../src/ol/View.js'; +import XYZ from '../../../src/ol/source/XYZ.js'; +import {fromLonLat, transform} from '../../../src/ol/proj.js'; import {getVectorContext} from '../../../src/ol/render.js'; const center = fromLonLat([8.6, 50.1]); @@ -14,32 +14,34 @@ const center = fromLonLat([8.6, 50.1]); const layer = new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 - }) + transition: 0, + }), }); -const onRender = function(event) { +const onRender = function (event) { const context = event.context; context.restore(); const vectorContext = getVectorContext(event); - vectorContext.setImageStyle(new CircleStyle({ - radius: 12, - fill: new Fill({color: 'yellow'}), - stroke: new Stroke({color: 'red', width: 1}) - })); - vectorContext.drawPoint(new Point( - transform([13, 37], 'EPSG:4326', 'EPSG:3857'))); + vectorContext.setImageStyle( + new CircleStyle({ + radius: 12, + fill: new Fill({color: 'yellow'}), + stroke: new Stroke({color: 'red', width: 1}), + }) + ); + vectorContext.drawPoint( + new Point(transform([13, 37], 'EPSG:4326', 'EPSG:3857')) + ); }; layer.on('postrender', onRender); const map = new Map({ - layers: [ - ], + layers: [], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); map.addLayer(layer); diff --git a/rendering/cases/layer-tile-simple/main.js b/rendering/cases/layer-tile-simple/main.js index 02505651d1..0a329ac78e 100644 --- a/rendering/cases/layer-tile-simple/main.js +++ b/rendering/cases/layer-tile-simple/main.js @@ -1,8 +1,8 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; -import {fromLonLat} from '../../../src/ol/proj.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; +import {fromLonLat} from '../../../src/ol/proj.js'; const center = fromLonLat([8.6, 50.1]); @@ -11,15 +11,15 @@ new Map({ new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 - }) - }) + transition: 0, + }), + }), ], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/layer-tile-transition/main.js b/rendering/cases/layer-tile-transition/main.js index 20835bfb23..846fdb888a 100644 --- a/rendering/cases/layer-tile-transition/main.js +++ b/rendering/cases/layer-tile-transition/main.js @@ -1,8 +1,8 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; -import {fromLonLat} from '../../../src/ol/proj.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; +import {fromLonLat} from '../../../src/ol/proj.js'; const center = fromLonLat([8.6, 50.1]); @@ -10,15 +10,15 @@ new Map({ layers: [ new TileLayer({ source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), + }), ], target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/layer-tile-two-layers/main.js b/rendering/cases/layer-tile-two-layers/main.js index 84da9a005f..d316596210 100644 --- a/rendering/cases/layer-tile-two-layers/main.js +++ b/rendering/cases/layer-tile-two-layers/main.js @@ -1,23 +1,23 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; -import {fromLonLat} from '../../../src/ol/proj.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; +import {fromLonLat} from '../../../src/ol/proj.js'; const center = fromLonLat([8.6, 50.1]); const layer1 = new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 + transition: 0, }), - opacity: 0.2 + opacity: 0.2, }); const layer2 = new TileLayer({ source: new XYZ({ url: '/data/tiles/stamen-labels/{z}/{x}/{y}.png', - transition: 0 - }) + transition: 0, + }), }); const map = new Map({ @@ -26,8 +26,8 @@ const map = new Map({ target: 'map', view: new View({ center: center, - zoom: 3 - }) + zoom: 3, + }), }); map.getView().setRotation(Math.PI / 2); diff --git a/rendering/cases/layer-vector-decluttering/main.js b/rendering/cases/layer-vector-decluttering/main.js index d551f268dc..528e9cadd4 100644 --- a/rendering/cases/layer-vector-decluttering/main.js +++ b/rendering/cases/layer-vector-decluttering/main.js @@ -1,15 +1,15 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorSource from '../../../src/ol/source/Vector.js'; -import VectorLayer from '../../../src/ol/layer/Vector.js'; +import CircleStyle from '../../../src/ol/style/Circle.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; import Point from '../../../src/ol/geom/Point.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; import Style from '../../../src/ol/style/Style.js'; import Text from '../../../src/ol/style/Text.js'; -import CircleStyle from '../../../src/ol/style/Circle.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import LineString from '../../../src/ol/geom/LineString.js'; +import VectorLayer from '../../../src/ol/layer/Vector.js'; +import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; let center = [1825927.7316762917, 6143091.089223046]; const map = new Map({ @@ -17,56 +17,60 @@ const map = new Map({ target: 'map', view: new View({ center: center, - zoom: 13 - }) + zoom: 13, + }), }); const source1 = new VectorSource(); const layer1 = new VectorLayer({ declutter: true, - source: source1 + source: source1, }); const source2 = new VectorSource(); const layer2 = new VectorLayer({ declutter: true, - source: source2 + source: source2, }); const source3 = new VectorSource(); const layer3 = new VectorLayer({ declutter: true, - source: source3 + source: source3, }); const source4 = new VectorSource(); const layer4 = new VectorLayer({ declutter: true, - source: source4 + source: source4, }); const feature1 = new Feature({ geometry: new Point(center), - zIndex: 2 + zIndex: 2, }); source1.addFeature(feature1); -source1.addFeature(new Feature({ - geometry: new Point([center[0] - 540, center[1]]), - zIndex: 3 -})); -source1.addFeature(new Feature({ - geometry: new Point([center[0] + 540, center[1]]), - zIndex: 1 -})); -layer1.setStyle(function(feature) { +source1.addFeature( + new Feature({ + geometry: new Point([center[0] - 540, center[1]]), + zIndex: 3, + }) +); +source1.addFeature( + new Feature({ + geometry: new Point([center[0] + 540, center[1]]), + zIndex: 1, + }) +); +layer1.setStyle(function (feature) { return new Style({ zIndex: feature.get('zIndex'), image: new CircleStyle({ radius: 15, fill: new Fill({ - color: 'blue' - }) - }) + color: 'blue', + }), + }), }); }); map.addLayer(layer1); @@ -75,91 +79,107 @@ center = [center[0] + 500, center[1] + 700]; const feature2 = new Feature({ geometry: new Point(center), text: 'center', - zIndex: 2 + zIndex: 2, }); source2.addFeature(feature2); -source2.addFeature(new Feature({ - geometry: new Point([center[0] - 540, center[1]]), - text: 'west', - zIndex: 3 -})); -source2.addFeature(new Feature({ - geometry: new Point([center[0] + 540, center[1]]), - text: 'east', - zIndex: 1 -})); -layer2.setStyle(function(feature) { +source2.addFeature( + new Feature({ + geometry: new Point([center[0] - 540, center[1]]), + text: 'west', + zIndex: 3, + }) +); +source2.addFeature( + new Feature({ + geometry: new Point([center[0] + 540, center[1]]), + text: 'east', + zIndex: 1, + }) +); +layer2.setStyle(function (feature) { return new Style({ zIndex: feature.get('zIndex'), text: new Text({ text: feature.get('text'), - font: 'italic bold 18px Ubuntu' - }) + font: 'italic bold 18px Ubuntu', + }), }); }); map.addLayer(layer2); center = [center[0] + 500, center[1] + 300]; -source3.addFeature(new Feature({ - geometry: new Point(center), - text: 'center' -})); -source3.addFeature(new Feature({ - geometry: new Point([center[0] - 540, center[1]]), - text: 'west' -})); -source3.addFeature(new Feature({ - geometry: new Point([center[0] + 540, center[1]]), - text: 'east' -})); -layer3.setStyle(function(feature) { +source3.addFeature( + new Feature({ + geometry: new Point(center), + text: 'center', + }) +); +source3.addFeature( + new Feature({ + geometry: new Point([center[0] - 540, center[1]]), + text: 'west', + }) +); +source3.addFeature( + new Feature({ + geometry: new Point([center[0] + 540, center[1]]), + text: 'east', + }) +); +layer3.setStyle(function (feature) { return new Style({ image: new CircleStyle({ radius: 10, stroke: new Stroke({ color: 'red', - width: 8 - }) + width: 8, + }), }), text: new Text({ text: feature.get('text'), font: 'italic bold 18px Ubuntu', textBaseline: 'bottom', - offsetY: -12 - }) + offsetY: -12, + }), }); }); map.addLayer(layer3); center = [center[0] - 2000, center[1] - 2000]; const point = new Feature(new Point(center)); -point.setStyle(new Style({ - zIndex: 1, - image: new CircleStyle({ - radius: 8, +point.setStyle( + new Style({ + zIndex: 1, + image: new CircleStyle({ + radius: 8, + stroke: new Stroke({ + color: 'blue', + width: 4, + }), + }), + }) +); +const line = new Feature( + new LineString([ + [center[0] - 650, center[1] - 200], + [center[0] + 650, center[1] - 200], + ]) +); +line.setStyle( + new Style({ + zIndex: 2, stroke: new Stroke({ - color: 'blue', - width: 4 - }) + color: '#CCC', + width: 12, + }), + text: new Text({ + placement: 'line', + text: 'east-west', + font: 'italic bold 18px Ubuntu', + overflow: true, + }), }) -})); -const line = new Feature(new LineString([ - [center[0] - 650, center[1] - 200], - [center[0] + 650, center[1] - 200] -])); -line.setStyle(new Style({ - zIndex: 2, - stroke: new Stroke({ - color: '#CCC', - width: 12 - }), - text: new Text({ - placement: 'line', - text: 'east-west', - font: 'italic bold 18px Ubuntu', - overflow: true - }) -})); +); source4.addFeature(point); source4.addFeature(line); map.addLayer(layer4); diff --git a/rendering/cases/layer-vector-extent-geographic/main.js b/rendering/cases/layer-vector-extent-geographic/main.js index e726a1c0c8..f24061bfe6 100644 --- a/rendering/cases/layer-vector-extent-geographic/main.js +++ b/rendering/cases/layer-vector-extent-geographic/main.js @@ -1,8 +1,8 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import GeoJSON from '../../../src/ol/format/GeoJSON.js'; +import Map from '../../../src/ol/Map.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; import {useGeographic} from '../../../src/ol/proj.js'; useGeographic(); @@ -11,17 +11,17 @@ new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 1 + zoom: 1, }), layers: [ new VectorLayer({ extent: [-50, -45, 50, 45], source: new VectorSource({ url: '/data/countries.json', - format: new GeoJSON() - }) - }) - ] + format: new GeoJSON(), + }), + }), + ], }); render(); diff --git a/rendering/cases/layer-vector-multigeometry-decluttering/main.js b/rendering/cases/layer-vector-multigeometry-decluttering/main.js index 5e903d8532..e8de340739 100644 --- a/rendering/cases/layer-vector-multigeometry-decluttering/main.js +++ b/rendering/cases/layer-vector-multigeometry-decluttering/main.js @@ -1,16 +1,16 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import GeoJSON from '../../../src/ol/format/GeoJSON.js'; +import Map from '../../../src/ol/Map.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; import {Fill, Stroke, Style, Text} from '../../../src/ol/style.js'; const map = new Map({ target: 'map', view: new View({ center: [-17465028, 2331736], - zoom: 5 - }) + zoom: 5, + }), }); const labelStyle = new Style({ @@ -18,38 +18,37 @@ const labelStyle = new Style({ font: '16px Ubuntu', overflow: true, fill: new Fill({ - color: '#000' + color: '#000', }), stroke: new Stroke({ color: '#fff', - width: 3 - }) - }) + width: 3, + }), + }), }); const countryStyle = new Style({ fill: new Fill({ - color: 'rgba(255, 255, 255, 0.6)' + color: 'rgba(255, 255, 255, 0.6)', }), stroke: new Stroke({ color: '#319FD3', - width: 1 - }) + width: 1, + }), }); const style = [countryStyle, labelStyle]; const vectorLayer = new VectorLayer({ source: new VectorSource({ url: '/data/countries.json', - format: new GeoJSON() + format: new GeoJSON(), }), - style: function(feature) { + style: function (feature) { labelStyle.getText().setText(feature.get('name')); return style; }, - declutter: true + declutter: true, }); map.addLayer(vectorLayer); - render({tolerance: 0.007}); diff --git a/rendering/cases/layer-vector-polygon-partial/main.js b/rendering/cases/layer-vector-polygon-partial/main.js index b953ea3130..c35ab43021 100644 --- a/rendering/cases/layer-vector-polygon-partial/main.js +++ b/rendering/cases/layer-vector-polygon-partial/main.js @@ -1,30 +1,38 @@ +import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import Polygon from '../../../src/ol/geom/Polygon.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Feature from '../../../src/ol/Feature.js'; -import Polygon from '../../../src/ol/geom/Polygon.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import Fill from '../../../src/ol/style/Fill.js'; +import View from '../../../src/ol/View.js'; const src = new VectorSource({ features: [ - new Feature(new Polygon([[ - [-22, 18], - [-22, 78], - [-9, 78], - [-9, 18], - [-22, 18] - ]])), - new Feature(new Polygon([[ - [-9, 18], - [-9, 78], - [4, 78], - [4, 18], - [-9, 18] - ]])) - ] + new Feature( + new Polygon([ + [ + [-22, 18], + [-22, 78], + [-9, 78], + [-9, 18], + [-22, 18], + ], + ]) + ), + new Feature( + new Polygon([ + [ + [-9, 18], + [-9, 78], + [4, 78], + [4, 18], + [-9, 18], + ], + ]) + ), + ], }); const layer = new VectorLayer({ renderBuffer: 0, @@ -32,24 +40,24 @@ const layer = new VectorLayer({ style: new Style({ stroke: new Stroke({ color: [0, 0, 0, 1], - width: 2 + width: 2, }), fill: new Fill({ - color: [255, 0, 0, 1] - }) - }) + color: [255, 0, 0, 1], + }), + }), }); const view = new View({ center: [-9.5, 78], zoom: 2, projection: 'EPSG:4326', - multiWorld: true + multiWorld: true, }); new Map({ pixelRatio: 1, layers: [layer], target: 'map', - view: view + view: view, }); render(); diff --git a/rendering/cases/layer-vector-polygon/main.js b/rendering/cases/layer-vector-polygon/main.js index 811c6d7673..22a16666bf 100644 --- a/rendering/cases/layer-vector-polygon/main.js +++ b/rendering/cases/layer-vector-polygon/main.js @@ -1,43 +1,59 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorLayer from '../../../src/ol/layer/Vector.js'; -import VectorSource from '../../../src/ol/source/Vector.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import Map from '../../../src/ol/Map.js'; import Polygon from '../../../src/ol/geom/Polygon.js'; import Style from '../../../src/ol/style/Style.js'; -import Fill from '../../../src/ol/style/Fill.js'; +import VectorLayer from '../../../src/ol/layer/Vector.js'; +import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; const feature = new Feature({ geometry: new Polygon([ - [[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]], - [[0, 60], [-17.6336, 24.2705], [-57.0634, 18.5410], [-28.5317, -9.2705], [-35.2671, -48.5410], [0, -30], [35.2671, -48.5410], [28.5317, -9.2705], [57.0634, 18.5410], [17.6336, 24.2705], [0, 60]] - ]) + [ + [-180, -90], + [180, -90], + [180, 90], + [-180, 90], + [-180, -90], + ], + [ + [0, 60], + [-17.6336, 24.2705], + [-57.0634, 18.541], + [-28.5317, -9.2705], + [-35.2671, -48.541], + [0, -30], + [35.2671, -48.541], + [28.5317, -9.2705], + [57.0634, 18.541], + [17.6336, 24.2705], + [0, 60], + ], + ]), }); const src = new VectorSource({ - features: [ - feature - ] + features: [feature], }); const layer = new VectorLayer({ renderBuffer: 0, source: src, style: new Style({ fill: new Fill({ - color: 'blue' - }) - }) + color: 'blue', + }), + }), }); const view = new View({ center: [0, 0], zoom: 1, - projection: 'EPSG:4326' + projection: 'EPSG:4326', }); new Map({ pixelRatio: 1, layers: [layer], target: 'map', - view: view + view: view, }); render(); diff --git a/rendering/cases/layer-vector/main.js b/rendering/cases/layer-vector/main.js index 2b178d5351..db8448e67d 100644 --- a/rendering/cases/layer-vector/main.js +++ b/rendering/cases/layer-vector/main.js @@ -1,13 +1,13 @@ +import Circle from '../../../src/ol/geom/Circle.js'; import Feature from '../../../src/ol/Feature.js'; +import LineString from '../../../src/ol/geom/LineString.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import Polygon from '../../../src/ol/geom/Polygon.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import Polygon from '../../../src/ol/geom/Polygon.js'; -import Circle from '../../../src/ol/geom/Circle.js'; -import LineString from '../../../src/ol/geom/LineString.js'; +import View from '../../../src/ol/View.js'; const center = [1825927.7316762917, 6143091.089223046]; @@ -18,13 +18,13 @@ const vectorLayer1 = new VectorLayer({ style: new Style({ stroke: new Stroke({ color: '#3399CC', - width: 1.25 - }) - }) + width: 1.25, + }), + }), }); const vectorLayer2 = new VectorLayer({ source: source2, - opacity: 0.6 + opacity: 0.6, }); function addCircle(r, source) { @@ -32,25 +32,33 @@ function addCircle(r, source) { } function addPolygon(r, source) { - source.addFeature(new Feature(new Polygon([ - [ - [center[0] - r, center[1] - r], - [center[0] + r, center[1] - r], - [center[0] + r, center[1] + r], - [center[0] - r, center[1] + r], - [center[0] - r, center[1] - r] - ] - ]))); + source.addFeature( + new Feature( + new Polygon([ + [ + [center[0] - r, center[1] - r], + [center[0] + r, center[1] - r], + [center[0] + r, center[1] + r], + [center[0] - r, center[1] + r], + [center[0] - r, center[1] - r], + ], + ]) + ) + ); } -const smallLine = new Feature(new LineString([ - [center[0], center[1] - 1], - [center[0], center[1] + 1] -])); -smallLine.setStyle(new Style({ - zIndex: -99, - stroke: new Stroke({width: 75, color: 'red'}) -})); +const smallLine = new Feature( + new LineString([ + [center[0], center[1] - 1], + [center[0], center[1] + 1], + ]) +); +smallLine.setStyle( + new Style({ + zIndex: -99, + stroke: new Stroke({width: 75, color: 'red'}), + }) +); smallLine.getGeometry().translate(-1000, 1000); source1.addFeature(smallLine); addPolygon(100, source1); @@ -60,32 +68,36 @@ addCircle(500, source1); addPolygon(600, source1); addPolygon(720, source1); -const smallLine2 = new Feature(new LineString([ - [center[0], center[1] - 1000], - [center[0], center[1] + 1000] -])); +const smallLine2 = new Feature( + new LineString([ + [center[0], center[1] - 1000], + [center[0], center[1] + 1000], + ]) +); smallLine2.setStyle([ new Style({ - stroke: new Stroke({width: 35, color: 'blue'}) + stroke: new Stroke({width: 35, color: 'blue'}), }), new Style({ - stroke: new Stroke({width: 15, color: 'green'}) - }) + stroke: new Stroke({width: 15, color: 'green'}), + }), ]); smallLine2.getGeometry().translate(1000, 1000); source1.addFeature(smallLine2); -const smallLine3 = new Feature(new LineString([ - [center[0], center[1] - 1], - [center[0], center[1] + 1] -])); +const smallLine3 = new Feature( + new LineString([ + [center[0], center[1] - 1], + [center[0], center[1] + 1], + ]) +); smallLine3.setStyle([ new Style({ - stroke: new Stroke({width: 75, color: 'red'}) + stroke: new Stroke({width: 75, color: 'red'}), }), new Style({ - stroke: new Stroke({width: 45, color: 'white'}) - }) + stroke: new Stroke({width: 45, color: 'white'}), + }), ]); smallLine3.getGeometry().translate(-1000, -1000); @@ -94,15 +106,12 @@ addCircle(400, source2); source2.addFeature(smallLine3); const map = new Map({ - layers: [ - vectorLayer1, - vectorLayer2 - ], + layers: [vectorLayer1, vectorLayer2], target: 'map', view: new View({ center: center, - zoom: 13 - }) + zoom: 13, + }), }); map.getView().setRotation(Math.PI + Math.PI / 4); diff --git a/rendering/cases/layer-vectorimage-decluttering/main.js b/rendering/cases/layer-vectorimage-decluttering/main.js index 83428d97f0..e0c23c9e4b 100644 --- a/rendering/cases/layer-vectorimage-decluttering/main.js +++ b/rendering/cases/layer-vectorimage-decluttering/main.js @@ -1,15 +1,15 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorSource from '../../../src/ol/source/Vector.js'; -import VectorImageLayer from '../../../src/ol/layer/VectorImage.js'; +import CircleStyle from '../../../src/ol/style/Circle.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; import Point from '../../../src/ol/geom/Point.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; import Style from '../../../src/ol/style/Style.js'; import Text from '../../../src/ol/style/Text.js'; -import CircleStyle from '../../../src/ol/style/Circle.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import LineString from '../../../src/ol/geom/LineString.js'; +import VectorImageLayer from '../../../src/ol/layer/VectorImage.js'; +import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; let center = [1825927.7316762917, 6143091.089223046]; const map = new Map({ @@ -17,56 +17,60 @@ const map = new Map({ target: 'map', view: new View({ center: center, - zoom: 13 - }) + zoom: 13, + }), }); const source1 = new VectorSource(); const layer1 = new VectorImageLayer({ declutter: true, - source: source1 + source: source1, }); const source2 = new VectorSource(); const layer2 = new VectorImageLayer({ declutter: true, - source: source2 + source: source2, }); const source3 = new VectorSource(); const layer3 = new VectorImageLayer({ declutter: true, - source: source3 + source: source3, }); const source4 = new VectorSource(); const layer4 = new VectorImageLayer({ declutter: true, - source: source4 + source: source4, }); const feature1 = new Feature({ geometry: new Point(center), - zIndex: 2 + zIndex: 2, }); source1.addFeature(feature1); -source1.addFeature(new Feature({ - geometry: new Point([center[0] - 540, center[1]]), - zIndex: 3 -})); -source1.addFeature(new Feature({ - geometry: new Point([center[0] + 540, center[1]]), - zIndex: 1 -})); -layer1.setStyle(function(feature) { +source1.addFeature( + new Feature({ + geometry: new Point([center[0] - 540, center[1]]), + zIndex: 3, + }) +); +source1.addFeature( + new Feature({ + geometry: new Point([center[0] + 540, center[1]]), + zIndex: 1, + }) +); +layer1.setStyle(function (feature) { return new Style({ zIndex: feature.get('zIndex'), image: new CircleStyle({ radius: 15, fill: new Fill({ - color: 'blue' - }) - }) + color: 'blue', + }), + }), }); }); map.addLayer(layer1); @@ -75,91 +79,107 @@ center = [center[0] + 500, center[1] + 700]; const feature2 = new Feature({ geometry: new Point(center), text: 'center', - zIndex: 2 + zIndex: 2, }); source2.addFeature(feature2); -source2.addFeature(new Feature({ - geometry: new Point([center[0] - 540, center[1]]), - text: 'west', - zIndex: 3 -})); -source2.addFeature(new Feature({ - geometry: new Point([center[0] + 540, center[1]]), - text: 'east', - zIndex: 1 -})); -layer2.setStyle(function(feature) { +source2.addFeature( + new Feature({ + geometry: new Point([center[0] - 540, center[1]]), + text: 'west', + zIndex: 3, + }) +); +source2.addFeature( + new Feature({ + geometry: new Point([center[0] + 540, center[1]]), + text: 'east', + zIndex: 1, + }) +); +layer2.setStyle(function (feature) { return new Style({ zIndex: feature.get('zIndex'), text: new Text({ text: feature.get('text'), - font: 'italic bold 18px Ubuntu' - }) + font: 'italic bold 18px Ubuntu', + }), }); }); map.addLayer(layer2); center = [center[0] + 500, center[1] + 300]; -source3.addFeature(new Feature({ - geometry: new Point(center), - text: 'center' -})); -source3.addFeature(new Feature({ - geometry: new Point([center[0] - 540, center[1]]), - text: 'west' -})); -source3.addFeature(new Feature({ - geometry: new Point([center[0] + 540, center[1]]), - text: 'east' -})); -layer3.setStyle(function(feature) { +source3.addFeature( + new Feature({ + geometry: new Point(center), + text: 'center', + }) +); +source3.addFeature( + new Feature({ + geometry: new Point([center[0] - 540, center[1]]), + text: 'west', + }) +); +source3.addFeature( + new Feature({ + geometry: new Point([center[0] + 540, center[1]]), + text: 'east', + }) +); +layer3.setStyle(function (feature) { return new Style({ image: new CircleStyle({ radius: 10, stroke: new Stroke({ color: 'red', - width: 8 - }) + width: 8, + }), }), text: new Text({ text: feature.get('text'), font: 'italic bold 18px Ubuntu', textBaseline: 'bottom', - offsetY: -12 - }) + offsetY: -12, + }), }); }); map.addLayer(layer3); center = [center[0] - 2000, center[1] - 2000]; const point = new Feature(new Point(center)); -point.setStyle(new Style({ - zIndex: 1, - image: new CircleStyle({ - radius: 8, +point.setStyle( + new Style({ + zIndex: 1, + image: new CircleStyle({ + radius: 8, + stroke: new Stroke({ + color: 'blue', + width: 4, + }), + }), + }) +); +const line = new Feature( + new LineString([ + [center[0] - 650, center[1] - 200], + [center[0] + 650, center[1] - 200], + ]) +); +line.setStyle( + new Style({ + zIndex: 2, stroke: new Stroke({ - color: 'blue', - width: 4 - }) + color: '#CCC', + width: 12, + }), + text: new Text({ + placement: 'line', + text: 'east-west', + font: 'italic bold 18px Ubuntu', + overflow: true, + }), }) -})); -const line = new Feature(new LineString([ - [center[0] - 650, center[1] - 200], - [center[0] + 650, center[1] - 200] -])); -line.setStyle(new Style({ - zIndex: 2, - stroke: new Stroke({ - color: '#CCC', - width: 12 - }), - text: new Text({ - placement: 'line', - text: 'east-west', - font: 'italic bold 18px Ubuntu', - overflow: true - }) -})); +); source4.addFeature(point); source4.addFeature(line); map.addLayer(layer4); diff --git a/rendering/cases/layer-vectorimage/main.js b/rendering/cases/layer-vectorimage/main.js index e14f3eaa2c..9719125c93 100644 --- a/rendering/cases/layer-vectorimage/main.js +++ b/rendering/cases/layer-vectorimage/main.js @@ -1,13 +1,13 @@ -import Feature from '../../../src/ol/Feature.js'; -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import Polygon from '../../../src/ol/geom/Polygon.js'; import Circle from '../../../src/ol/geom/Circle.js'; +import Feature from '../../../src/ol/Feature.js'; import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Polygon from '../../../src/ol/geom/Polygon.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorImageLayer from '../../../src/ol/layer/VectorImage.js'; +import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; const center = [1825927.7316762917, 6143091.089223046]; @@ -18,13 +18,13 @@ const vectorLayer1 = new VectorImageLayer({ style: new Style({ stroke: new Stroke({ color: '#3399CC', - width: 1.25 - }) - }) + width: 1.25, + }), + }), }); const vectorLayer2 = new VectorImageLayer({ source: source2, - opacity: 0.6 + opacity: 0.6, }); function addCircle(r, source) { @@ -32,25 +32,33 @@ function addCircle(r, source) { } function addPolygon(r, source) { - source.addFeature(new Feature(new Polygon([ - [ - [center[0] - r, center[1] - r], - [center[0] + r, center[1] - r], - [center[0] + r, center[1] + r], - [center[0] - r, center[1] + r], - [center[0] - r, center[1] - r] - ] - ]))); + source.addFeature( + new Feature( + new Polygon([ + [ + [center[0] - r, center[1] - r], + [center[0] + r, center[1] - r], + [center[0] + r, center[1] + r], + [center[0] - r, center[1] + r], + [center[0] - r, center[1] - r], + ], + ]) + ) + ); } -const smallLine = new Feature(new LineString([ - [center[0], center[1] - 1], - [center[0], center[1] + 1] -])); -smallLine.setStyle(new Style({ - zIndex: -99, - stroke: new Stroke({width: 75, color: 'red'}) -})); +const smallLine = new Feature( + new LineString([ + [center[0], center[1] - 1], + [center[0], center[1] + 1], + ]) +); +smallLine.setStyle( + new Style({ + zIndex: -99, + stroke: new Stroke({width: 75, color: 'red'}), + }) +); smallLine.getGeometry().translate(-1000, 1000); source1.addFeature(smallLine); addPolygon(100, source1); @@ -60,32 +68,36 @@ addCircle(500, source1); addPolygon(600, source1); addPolygon(720, source1); -const smallLine2 = new Feature(new LineString([ - [center[0], center[1] - 1000], - [center[0], center[1] + 1000] -])); +const smallLine2 = new Feature( + new LineString([ + [center[0], center[1] - 1000], + [center[0], center[1] + 1000], + ]) +); smallLine2.setStyle([ new Style({ - stroke: new Stroke({width: 35, color: 'blue'}) + stroke: new Stroke({width: 35, color: 'blue'}), }), new Style({ - stroke: new Stroke({width: 15, color: 'green'}) - }) + stroke: new Stroke({width: 15, color: 'green'}), + }), ]); smallLine2.getGeometry().translate(1000, 1000); source1.addFeature(smallLine2); -const smallLine3 = new Feature(new LineString([ - [center[0], center[1] - 1], - [center[0], center[1] + 1] -])); +const smallLine3 = new Feature( + new LineString([ + [center[0], center[1] - 1], + [center[0], center[1] + 1], + ]) +); smallLine3.setStyle([ new Style({ - stroke: new Stroke({width: 75, color: 'red'}) + stroke: new Stroke({width: 75, color: 'red'}), }), new Style({ - stroke: new Stroke({width: 45, color: 'white'}) - }) + stroke: new Stroke({width: 45, color: 'white'}), + }), ]); smallLine3.getGeometry().translate(-1000, -1000); @@ -94,15 +106,12 @@ addCircle(1000, source2); source2.addFeature(smallLine3); const map = new Map({ - layers: [ - vectorLayer1, - vectorLayer2 - ], + layers: [vectorLayer1, vectorLayer2], target: 'map', view: new View({ center: center, - zoom: 13 - }) + zoom: 13, + }), }); map.getView().setRotation(Math.PI + Math.PI / 4); diff --git a/rendering/cases/layer-vectortile-rendermode-vector/main.js b/rendering/cases/layer-vectortile-rendermode-vector/main.js index 0d136106df..e0c41558d9 100644 --- a/rendering/cases/layer-vectortile-rendermode-vector/main.js +++ b/rendering/cases/layer-vectortile-rendermode-vector/main.js @@ -1,10 +1,10 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorTileSource from '../../../src/ol/source/VectorTile.js'; import MVT from '../../../src/ol/format/MVT.js'; -import {createXYZ} from '../../../src/ol/tilegrid.js'; +import Map from '../../../src/ol/Map.js'; import VectorTileLayer from '../../../src/ol/layer/VectorTile.js'; import VectorTileRenderType from '../../../src/ol/layer/VectorTileRenderType.js'; +import VectorTileSource from '../../../src/ol/source/VectorTile.js'; +import View from '../../../src/ol/View.js'; +import {createXYZ} from '../../../src/ol/tilegrid.js'; new Map({ layers: [ @@ -14,18 +14,18 @@ new Map({ format: new MVT(), tileGrid: createXYZ(), url: '/data/tiles/mapbox-streets-v6/{z}/{x}/{y}.vector.pbf', - transition: 0 - }) - }) + transition: 0, + }), + }), ], target: 'map', view: new View({ center: [1825927.7316762917, 6143091.089223046], - zoom: 14 - }) + zoom: 14, + }), }); render({ message: 'Vector tile layer renders with vector render mode', - tolerance: 0.01 + tolerance: 0.01, }); diff --git a/rendering/cases/layer-vectortile-rotate-hidpi/main.js b/rendering/cases/layer-vectortile-rotate-hidpi/main.js index 8fee48b26b..67ed651a06 100644 --- a/rendering/cases/layer-vectortile-rotate-hidpi/main.js +++ b/rendering/cases/layer-vectortile-rotate-hidpi/main.js @@ -1,9 +1,9 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorTileSource from '../../../src/ol/source/VectorTile.js'; import MVT from '../../../src/ol/format/MVT.js'; -import {createXYZ} from '../../../src/ol/tilegrid.js'; +import Map from '../../../src/ol/Map.js'; import VectorTileLayer from '../../../src/ol/layer/VectorTile.js'; +import VectorTileSource from '../../../src/ol/source/VectorTile.js'; +import View from '../../../src/ol/View.js'; +import {createXYZ} from '../../../src/ol/tilegrid.js'; const map = new Map({ pixelRatio: 2, @@ -13,19 +13,19 @@ const map = new Map({ format: new MVT(), tileGrid: createXYZ(), url: '/data/tiles/mapbox-streets-v6/{z}/{x}/{y}.vector.pbf', - transition: 0 - }) - }) + transition: 0, + }), + }), ], target: 'map', view: new View({ center: [1825927.7316762917, 6143091.089223046], - zoom: 14 - }) + zoom: 14, + }), }); map.getView().setRotation(Math.PI / 4); render({ message: 'Vector tile layer rotates (hidip)', - tolerance: 0.01 + tolerance: 0.01, }); diff --git a/rendering/cases/layer-vectortile-rotate-vector/main.js b/rendering/cases/layer-vectortile-rotate-vector/main.js index 1b0cb77ee0..a7febf5779 100644 --- a/rendering/cases/layer-vectortile-rotate-vector/main.js +++ b/rendering/cases/layer-vectortile-rotate-vector/main.js @@ -1,21 +1,19 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorTileSource from '../../../src/ol/source/VectorTile.js'; -import MVT from '../../../src/ol/format/MVT.js'; -import {createXYZ} from '../../../src/ol/tilegrid.js'; -import VectorTileLayer from '../../../src/ol/layer/VectorTile.js'; -import VectorSource from '../../../src/ol/source/Vector.js'; -import Feature from '../../../src/ol/Feature.js'; -import Point from '../../../src/ol/geom/Point.js'; -import VectorLayer from '../../../src/ol/layer/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; import CircleStyle from '../../../src/ol/style/Circle.js'; +import Feature from '../../../src/ol/Feature.js'; import Fill from '../../../src/ol/style/Fill.js'; +import MVT from '../../../src/ol/format/MVT.js'; +import Map from '../../../src/ol/Map.js'; +import Point from '../../../src/ol/geom/Point.js'; +import Style from '../../../src/ol/style/Style.js'; +import VectorLayer from '../../../src/ol/layer/Vector.js'; +import VectorSource from '../../../src/ol/source/Vector.js'; +import VectorTileLayer from '../../../src/ol/layer/VectorTile.js'; +import VectorTileSource from '../../../src/ol/source/VectorTile.js'; +import View from '../../../src/ol/View.js'; +import {createXYZ} from '../../../src/ol/tilegrid.js'; const vectorSource = new VectorSource({ - features: [ - new Feature(new Point([1825727.7316762917, 6143091.089223046])) - ] + features: [new Feature(new Point([1825727.7316762917, 6143091.089223046]))], }); const layer = new VectorLayer({ zIndex: 1, @@ -24,10 +22,10 @@ const layer = new VectorLayer({ image: new CircleStyle({ radius: 10, fill: new Fill({ - color: 'red' - }) - }) - }) + color: 'red', + }), + }), + }), }); new Map({ @@ -38,16 +36,16 @@ new Map({ format: new MVT(), tileGrid: createXYZ(), url: '/data/tiles/mapbox-streets-v6/{z}/{x}/{y}.vector.pbf', - transition: 0 - }) - }) + transition: 0, + }), + }), ], target: 'map', view: new View({ center: [1825927.7316762917, 6143091.089223046], zoom: 14, - rotation: Math.PI / 4 - }) + rotation: Math.PI / 4, + }), }); render({message: 'Vector tile layer rotates with vector layer on top'}); diff --git a/rendering/cases/layer-vectortile-rotate/main.js b/rendering/cases/layer-vectortile-rotate/main.js index 3c81eac1f9..c8aa853f0e 100644 --- a/rendering/cases/layer-vectortile-rotate/main.js +++ b/rendering/cases/layer-vectortile-rotate/main.js @@ -1,9 +1,9 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorTileSource from '../../../src/ol/source/VectorTile.js'; import MVT from '../../../src/ol/format/MVT.js'; -import {createXYZ} from '../../../src/ol/tilegrid.js'; +import Map from '../../../src/ol/Map.js'; import VectorTileLayer from '../../../src/ol/layer/VectorTile.js'; +import VectorTileSource from '../../../src/ol/source/VectorTile.js'; +import View from '../../../src/ol/View.js'; +import {createXYZ} from '../../../src/ol/tilegrid.js'; const map = new Map({ layers: [ @@ -12,15 +12,15 @@ const map = new Map({ format: new MVT(), tileGrid: createXYZ(), url: '/data/tiles/mapbox-streets-v6/{z}/{x}/{y}.vector.pbf', - transition: 0 - }) - }) + transition: 0, + }), + }), ], target: 'map', view: new View({ center: [1825927.7316762917, 6143091.089223046], - zoom: 14 - }) + zoom: 14, + }), }); map.getView().setRotation(Math.PI / 4); diff --git a/rendering/cases/layer-vectortile-simple/main.js b/rendering/cases/layer-vectortile-simple/main.js index e074fdfd13..8062f51340 100644 --- a/rendering/cases/layer-vectortile-simple/main.js +++ b/rendering/cases/layer-vectortile-simple/main.js @@ -1,9 +1,9 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import VectorTileSource from '../../../src/ol/source/VectorTile.js'; import MVT from '../../../src/ol/format/MVT.js'; -import {createXYZ} from '../../../src/ol/tilegrid.js'; +import Map from '../../../src/ol/Map.js'; import VectorTileLayer from '../../../src/ol/layer/VectorTile.js'; +import VectorTileSource from '../../../src/ol/source/VectorTile.js'; +import View from '../../../src/ol/View.js'; +import {createXYZ} from '../../../src/ol/tilegrid.js'; new Map({ layers: [ @@ -12,18 +12,18 @@ new Map({ format: new MVT(), tileGrid: createXYZ(), url: '/data/tiles/mapbox-streets-v6/{z}/{x}/{y}.vector.pbf', - transition: 0 - }) - }) + transition: 0, + }), + }), ], target: 'map', view: new View({ center: [1825927.7316762917, 6143091.089223046], - zoom: 14 - }) + zoom: 14, + }), }); render({ message: 'Vector tile layer renders', - tolerance: 0.01 + tolerance: 0.01, }); diff --git a/rendering/cases/linestring-style-css-filter/main.js b/rendering/cases/linestring-style-css-filter/main.js index 654a021118..ed5b469d36 100644 --- a/rendering/cases/linestring-style-css-filter/main.js +++ b/rendering/cases/linestring-style-css-filter/main.js @@ -1,70 +1,86 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; feature = new Feature({ - geometry: new LineString([[-60, 60], [45, 60]]) + geometry: new LineString([ + [-60, 60], + [45, 60], + ]), }); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-60, -50], [30, 10]]) + geometry: new LineString([ + [-60, -50], + [30, 10], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({color: '#f00', width: 3}) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new LineString([[-110, -100], [0, 100], [100, -90]]) -}); -feature.setStyle(new Style({ - stroke: new Stroke({ - color: 'rgba(55, 55, 55, 0.75)', - width: 5, - lineCap: 'square', - lineDash: [4, 8], - lineJoin: 'round' +feature.setStyle( + new Style({ + stroke: new Stroke({color: '#f00', width: 3}), }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-80, 80], [80, 80], [-40, -90]]) + geometry: new LineString([ + [-110, -100], + [0, 100], + [100, -90], + ]), +}); +feature.setStyle( + new Style({ + stroke: new Stroke({ + color: 'rgba(55, 55, 55, 0.75)', + width: 5, + lineCap: 'square', + lineDash: [4, 8], + lineJoin: 'round', + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new LineString([ + [-80, 80], + [80, 80], + [-40, -90], + ]), }); feature.setStyle([ new Style({ - stroke: new Stroke({color: '#F2F211', width: 5}) + stroke: new Stroke({color: '#F2F211', width: 5}), }), new Style({ - stroke: new Stroke({color: '#292921', width: 1}) - }) + stroke: new Stroke({color: '#292921', width: 1}), + }), ]); vectorSource.addFeature(feature); - new Map({ pixelRatio: 1, layers: [ new VectorLayer({ className: 'bw', - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/linestring-style-opacity/main.js b/rendering/cases/linestring-style-opacity/main.js index 710ef11bec..54b1da06cb 100644 --- a/rendering/cases/linestring-style-opacity/main.js +++ b/rendering/cases/linestring-style-opacity/main.js @@ -1,70 +1,86 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; feature = new Feature({ - geometry: new LineString([[-60, 60], [45, 60]]) + geometry: new LineString([ + [-60, 60], + [45, 60], + ]), }); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-60, -50], [30, 10]]) + geometry: new LineString([ + [-60, -50], + [30, 10], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({color: '#f00', width: 3}) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new LineString([[-110, -100], [0, 100], [100, -90]]) -}); -feature.setStyle(new Style({ - stroke: new Stroke({ - color: 'rgba(55, 55, 55, 0.75)', - width: 5, - lineCap: 'square', - lineDash: [4, 8], - lineJoin: 'round' +feature.setStyle( + new Style({ + stroke: new Stroke({color: '#f00', width: 3}), }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-80, 80], [80, 80], [-40, -90]]) + geometry: new LineString([ + [-110, -100], + [0, 100], + [100, -90], + ]), +}); +feature.setStyle( + new Style({ + stroke: new Stroke({ + color: 'rgba(55, 55, 55, 0.75)', + width: 5, + lineCap: 'square', + lineDash: [4, 8], + lineJoin: 'round', + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new LineString([ + [-80, 80], + [80, 80], + [-40, -90], + ]), }); feature.setStyle([ new Style({ - stroke: new Stroke({color: '#F2F211', width: 5}) + stroke: new Stroke({color: '#F2F211', width: 5}), }), new Style({ - stroke: new Stroke({color: '#292921', width: 1}) - }) + stroke: new Stroke({color: '#292921', width: 1}), + }), ]); vectorSource.addFeature(feature); - new Map({ pixelRatio: 1, layers: [ new VectorLayer({ opacity: 0.5, - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/linestring-style-rotation/main.js b/rendering/cases/linestring-style-rotation/main.js index 135be9bbb8..a7d4018e10 100644 --- a/rendering/cases/linestring-style-rotation/main.js +++ b/rendering/cases/linestring-style-rotation/main.js @@ -1,70 +1,86 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; feature = new Feature({ - geometry: new LineString([[-60, 60], [45, 60]]) + geometry: new LineString([ + [-60, 60], + [45, 60], + ]), }); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-60, -50], [30, 10]]) + geometry: new LineString([ + [-60, -50], + [30, 10], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({color: '#f00', width: 3}) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new LineString([[-110, -100], [0, 100], [100, -90]]) -}); -feature.setStyle(new Style({ - stroke: new Stroke({ - color: 'rgba(55, 55, 55, 0.75)', - width: 5, - lineCap: 'square', - lineDash: [4, 8], - lineJoin: 'round' +feature.setStyle( + new Style({ + stroke: new Stroke({color: '#f00', width: 3}), }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-80, 80], [80, 80], [-40, -90]]) + geometry: new LineString([ + [-110, -100], + [0, 100], + [100, -90], + ]), +}); +feature.setStyle( + new Style({ + stroke: new Stroke({ + color: 'rgba(55, 55, 55, 0.75)', + width: 5, + lineCap: 'square', + lineDash: [4, 8], + lineJoin: 'round', + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new LineString([ + [-80, 80], + [80, 80], + [-40, -90], + ]), }); feature.setStyle([ new Style({ - stroke: new Stroke({color: '#F2F211', width: 5}) + stroke: new Stroke({color: '#F2F211', width: 5}), }), new Style({ - stroke: new Stroke({color: '#292921', width: 1}) - }) + stroke: new Stroke({color: '#292921', width: 1}), + }), ]); vectorSource.addFeature(feature); - new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], resolution: 1, - rotation: Math.PI / 4 - }) + rotation: Math.PI / 4, + }), }); render({tolerance: 0.01}); diff --git a/rendering/cases/linestring-style/main.js b/rendering/cases/linestring-style/main.js index 800659c76f..04032c21fb 100644 --- a/rendering/cases/linestring-style/main.js +++ b/rendering/cases/linestring-style/main.js @@ -1,69 +1,85 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; feature = new Feature({ - geometry: new LineString([[-60, 60], [45, 60]]) + geometry: new LineString([ + [-60, 60], + [45, 60], + ]), }); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-60, -50], [30, 10]]) + geometry: new LineString([ + [-60, -50], + [30, 10], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({color: '#f00', width: 3}) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new LineString([[-110, -100], [0, 100], [100, -90]]) -}); -feature.setStyle(new Style({ - stroke: new Stroke({ - color: 'rgba(55, 55, 55, 0.75)', - width: 5, - lineCap: 'square', - lineDash: [4, 8], - lineJoin: 'round' +feature.setStyle( + new Style({ + stroke: new Stroke({color: '#f00', width: 3}), }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new LineString([[-80, 80], [80, 80], [-40, -90]]) + geometry: new LineString([ + [-110, -100], + [0, 100], + [100, -90], + ]), +}); +feature.setStyle( + new Style({ + stroke: new Stroke({ + color: 'rgba(55, 55, 55, 0.75)', + width: 5, + lineCap: 'square', + lineDash: [4, 8], + lineJoin: 'round', + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new LineString([ + [-80, 80], + [80, 80], + [-40, -90], + ]), }); feature.setStyle([ new Style({ - stroke: new Stroke({color: '#F2F211', width: 5}) + stroke: new Stroke({color: '#F2F211', width: 5}), }), new Style({ - stroke: new Stroke({color: '#292921', width: 1}) - }) + stroke: new Stroke({color: '#292921', width: 1}), + }), ]); vectorSource.addFeature(feature); - new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/map-pan/main.js b/rendering/cases/map-pan/main.js index 69334de26c..ac09f2eef4 100644 --- a/rendering/cases/map-pan/main.js +++ b/rendering/cases/map-pan/main.js @@ -1,9 +1,9 @@ import Feature from '../../../src/ol/Feature.js'; -import Point from '../../../src/ol/geom/Point.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import Point from '../../../src/ol/geom/Point.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; const map = new Map({ pixelRatio: 1, @@ -11,18 +11,20 @@ const map = new Map({ layers: [ new VectorLayer({ source: new VectorSource({ - features: [new Feature({ - geometry: new Point([0, 0]) - })] - }) - }) + features: [ + new Feature({ + geometry: new Point([0, 0]), + }), + ], + }), + }), ], view: new View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1, - multiWorld: true - }) + multiWorld: true, + }), }); map.getView().setCenter([10, 10]); diff --git a/rendering/cases/map-text-align/main.js b/rendering/cases/map-text-align/main.js index 723ac2dabc..446a2dce6b 100644 --- a/rendering/cases/map-text-align/main.js +++ b/rendering/cases/map-text-align/main.js @@ -1,24 +1,23 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; -import {fromLonLat} from '../../../src/ol/proj.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; - +import {fromLonLat} from '../../../src/ol/proj.js'; new Map({ layers: [ new TileLayer({ source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), + }), ], target: 'map', view: new View({ rotation: Math.PI / 3, center: fromLonLat([8.6, 50.1]), - zoom: 3 - }) + zoom: 3, + }), }); render(); diff --git a/rendering/cases/map/main.js b/rendering/cases/map/main.js index 21b9d0c36f..ebed216202 100644 --- a/rendering/cases/map/main.js +++ b/rendering/cases/map/main.js @@ -1,9 +1,9 @@ import Feature from '../../../src/ol/Feature.js'; -import Point from '../../../src/ol/geom/Point.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import Point from '../../../src/ol/geom/Point.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; new Map({ pixelRatio: 1, @@ -11,17 +11,19 @@ new Map({ layers: [ new VectorLayer({ source: new VectorSource({ - features: [new Feature({ - geometry: new Point([0, 0]) - })] - }) - }) + features: [ + new Feature({ + geometry: new Point([0, 0]), + }), + ], + }), + }), ], view: new View({ projection: 'EPSG:4326', center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/multiple-layers/main.js b/rendering/cases/multiple-layers/main.js index 0d2df97582..fd1e59cfc2 100644 --- a/rendering/cases/multiple-layers/main.js +++ b/rendering/cases/multiple-layers/main.js @@ -1,11 +1,14 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import {Vector as VectorLayer, Tile as TileLayer} from '../../../src/ol/layer.js'; -import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; -import GeoJSON from '../../../src/ol/format/GeoJSON.js'; -import {Style, Stroke} from '../../../src/ol/style.js'; import Feature from '../../../src/ol/Feature.js'; +import GeoJSON from '../../../src/ol/format/GeoJSON.js'; +import Map from '../../../src/ol/Map.js'; import Point from '../../../src/ol/geom/Point.js'; +import View from '../../../src/ol/View.js'; +import {Stroke, Style} from '../../../src/ol/style.js'; +import { + Tile as TileLayer, + Vector as VectorLayer, +} from '../../../src/ol/layer.js'; +import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; const map = new Map({ layers: [ @@ -14,32 +17,32 @@ const map = new Map({ style: new Style({ stroke: new Stroke({ color: 'rgba(255,255,255,0.5)', - width: 0.75 - }) + width: 0.75, + }), }), source: new VectorSource({ url: '/data/countries.json', - format: new GeoJSON() - }) + format: new GeoJSON(), + }), }), new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - maxZoom: 3 - }) - }) + maxZoom: 3, + }), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 2 - }) + zoom: 2, + }), }); const unmanaged = new VectorLayer({ source: new VectorSource({ - features: [new Feature(new Point([0, 0]))] - }) + features: [new Feature(new Point([0, 0]))], + }), }); unmanaged.setMap(map); diff --git a/rendering/cases/multipoint-style/main.js b/rendering/cases/multipoint-style/main.js index a3e61c5b89..3dfd901872 100644 --- a/rendering/cases/multipoint-style/main.js +++ b/rendering/cases/multipoint-style/main.js @@ -1,169 +1,185 @@ +import CircleStyle from '../../../src/ol/style/Circle.js'; import Feature from '../../../src/ol/Feature.js'; -import MultiPoint from '../../../src/ol/geom/MultiPoint.js'; +import Fill from '../../../src/ol/style/Fill.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import MultiPoint from '../../../src/ol/geom/MultiPoint.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import CircleStyle from '../../../src/ol/style/Circle.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; feature = new Feature({ - geometry: new MultiPoint([[-20, 18]]) + geometry: new MultiPoint([[-20, 18]]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 2, - fill: new Fill({ - color: '#91E339' - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new MultiPoint([[-10, 18]]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 4, - fill: new Fill({ - color: '#5447E6' - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new MultiPoint([[4, 18]]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 6, - fill: new Fill({ - color: '#92A8A6' - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new MultiPoint([[-20, 3]]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 2, - fill: new Fill({ - color: '#91E339' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 2, + fill: new Fill({ + color: '#91E339', + }), }), - stroke: new Stroke({ - color: '#000000', - width: 1 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new MultiPoint([[-10, 3]]) + geometry: new MultiPoint([[-10, 18]]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 4, - fill: new Fill({ - color: '#5447E6' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 4, + fill: new Fill({ + color: '#5447E6', + }), }), - stroke: new Stroke({ - color: '#000000', - width: 2 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new MultiPoint([[4, 3]]) + geometry: new MultiPoint([[4, 18]]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 6, - fill: new Fill({ - color: '#92A8A6' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 6, + fill: new Fill({ + color: '#92A8A6', + }), }), - stroke: new Stroke({ - color: '#000000', - width: 3 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new MultiPoint([[-20, -15]]) + geometry: new MultiPoint([[-20, 3]]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 2, - stroke: new Stroke({ - color: '#256308', - width: 1 - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new MultiPoint([[-10, -15]]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 4, - fill: new Fill({ - color: 'rgba(0, 0, 255, 0.3)' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 2, + fill: new Fill({ + color: '#91E339', + }), + stroke: new Stroke({ + color: '#000000', + width: 1, + }), }), - stroke: new Stroke({ - color: '#256308', - width: 2 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new MultiPoint([[4, -15]]) + geometry: new MultiPoint([[-10, 3]]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 6, - fill: new Fill({ - color: 'rgba(235, 45, 70, 0.6)' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 4, + fill: new Fill({ + color: '#5447E6', + }), + stroke: new Stroke({ + color: '#000000', + width: 2, + }), }), - stroke: new Stroke({ - color: '#256308', - width: 3 - }) }) -})); +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new MultiPoint([[4, 3]]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 6, + fill: new Fill({ + color: '#92A8A6', + }), + stroke: new Stroke({ + color: '#000000', + width: 3, + }), + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new MultiPoint([[-20, -15]]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 2, + stroke: new Stroke({ + color: '#256308', + width: 1, + }), + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new MultiPoint([[-10, -15]]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 4, + fill: new Fill({ + color: 'rgba(0, 0, 255, 0.3)', + }), + stroke: new Stroke({ + color: '#256308', + width: 2, + }), + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new MultiPoint([[4, -15]]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 6, + fill: new Fill({ + color: 'rgba(235, 45, 70, 0.6)', + }), + stroke: new Stroke({ + color: '#256308', + width: 3, + }), + }), + }) +); vectorSource.addFeature(feature); const vectorLayer = new VectorLayer({ - source: vectorSource + source: vectorSource, }); new Map({ - layers: [ - vectorLayer - ], + layers: [vectorLayer], target: 'map', view: new View({ projection: 'EPSG:4326', center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); render(); diff --git a/rendering/cases/point-style/main.js b/rendering/cases/point-style/main.js index 7f1e425396..a07aad2fc4 100644 --- a/rendering/cases/point-style/main.js +++ b/rendering/cases/point-style/main.js @@ -1,169 +1,185 @@ +import CircleStyle from '../../../src/ol/style/Circle.js'; import Feature from '../../../src/ol/Feature.js'; -import Point from '../../../src/ol/geom/Point.js'; +import Fill from '../../../src/ol/style/Fill.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import Point from '../../../src/ol/geom/Point.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import CircleStyle from '../../../src/ol/style/Circle.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; feature = new Feature({ - geometry: new Point([-20, 18]) + geometry: new Point([-20, 18]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 2, - fill: new Fill({ - color: '#91E339' - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new Point([-10, 18]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 4, - fill: new Fill({ - color: '#5447E6' - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new Point([4, 18]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 6, - fill: new Fill({ - color: '#92A8A6' - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new Point([-20, 3]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 2, - fill: new Fill({ - color: '#91E339' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 2, + fill: new Fill({ + color: '#91E339', + }), }), - stroke: new Stroke({ - color: '#000000', - width: 1 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new Point([-10, 3]) + geometry: new Point([-10, 18]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 4, - fill: new Fill({ - color: '#5447E6' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 4, + fill: new Fill({ + color: '#5447E6', + }), }), - stroke: new Stroke({ - color: '#000000', - width: 2 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new Point([4, 3]) + geometry: new Point([4, 18]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 6, - fill: new Fill({ - color: '#92A8A6' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 6, + fill: new Fill({ + color: '#92A8A6', + }), }), - stroke: new Stroke({ - color: '#000000', - width: 3 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new Point([-20, -15]) + geometry: new Point([-20, 3]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 2, - stroke: new Stroke({ - color: '#256308', - width: 1 - }) - }) -})); -vectorSource.addFeature(feature); - -feature = new Feature({ - geometry: new Point([-10, -15]) -}); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 4, - fill: new Fill({ - color: 'rgba(0, 0, 255, 0.3)' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 2, + fill: new Fill({ + color: '#91E339', + }), + stroke: new Stroke({ + color: '#000000', + width: 1, + }), }), - stroke: new Stroke({ - color: '#256308', - width: 2 - }) }) -})); +); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new Point([4, -15]) + geometry: new Point([-10, 3]), }); -feature.setStyle(new Style({ - image: new CircleStyle({ - radius: 6, - fill: new Fill({ - color: 'rgba(235, 45, 70, 0.6)' +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 4, + fill: new Fill({ + color: '#5447E6', + }), + stroke: new Stroke({ + color: '#000000', + width: 2, + }), }), - stroke: new Stroke({ - color: '#256308', - width: 3 - }) }) -})); +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new Point([4, 3]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 6, + fill: new Fill({ + color: '#92A8A6', + }), + stroke: new Stroke({ + color: '#000000', + width: 3, + }), + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new Point([-20, -15]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 2, + stroke: new Stroke({ + color: '#256308', + width: 1, + }), + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new Point([-10, -15]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 4, + fill: new Fill({ + color: 'rgba(0, 0, 255, 0.3)', + }), + stroke: new Stroke({ + color: '#256308', + width: 2, + }), + }), + }) +); +vectorSource.addFeature(feature); + +feature = new Feature({ + geometry: new Point([4, -15]), +}); +feature.setStyle( + new Style({ + image: new CircleStyle({ + radius: 6, + fill: new Fill({ + color: 'rgba(235, 45, 70, 0.6)', + }), + stroke: new Stroke({ + color: '#256308', + width: 3, + }), + }), + }) +); vectorSource.addFeature(feature); const vectorLayer = new VectorLayer({ - source: vectorSource + source: vectorSource, }); new Map({ - layers: [ - vectorLayer - ], + layers: [vectorLayer], target: 'map', view: new View({ projection: 'EPSG:4326', center: [0, 0], - zoom: 1 - }) + zoom: 1, + }), }); render(); diff --git a/rendering/cases/polygon-style-gradient-pattern/main.js b/rendering/cases/polygon-style-gradient-pattern/main.js index 7c01b61d81..70035139f0 100644 --- a/rendering/cases/polygon-style-gradient-pattern/main.js +++ b/rendering/cases/polygon-style-gradient-pattern/main.js @@ -1,13 +1,12 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import Map from '../../../src/ol/Map.js'; import Polygon from '../../../src/ol/geom/Polygon.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; // create gradient const canvas = document.createElement('canvas'); @@ -34,51 +33,84 @@ context.arc(5, 5, 2, 0, 2 * Math.PI); context.fill(); const pattern = context.createPattern(canvas, 'repeat'); - const vectorSource = new VectorSource(); let feature; // rectangle with 1 hole feature = new Feature({ geometry: new Polygon([ - [[-22.5, -5], [-22.5, 35], [37.5, 35], [37.5, -5], [-22.5, -5]], - [[-2.5, 7], [17.5, 7], [17.5, 23], [-2.5, 23], [-2.5, 7]] - ]) + [ + [-22.5, -5], + [-22.5, 35], + [37.5, 35], + [37.5, -5], + [-22.5, -5], + ], + [ + [-2.5, 7], + [17.5, 7], + [17.5, 23], + [-2.5, 23], + [-2.5, 7], + ], + ]), }); -feature.setStyle(new Style({ - fill: new Fill({color: pattern}), - stroke: new Stroke({color: gradient, width: 3}) -})); +feature.setStyle( + new Style({ + fill: new Fill({color: pattern}), + stroke: new Stroke({color: gradient, width: 3}), + }) +); vectorSource.addFeature(feature); // rectangle with 2 holes feature = new Feature({ geometry: new Polygon([ - [[-37.5, -32.5], [-37.5, 17.5], [32.5, 17.5], [32.5, -32.5], [-37.5, -32.5]], - [[-33.5, -28.5], [-21.5, -28.5], [-21.5, -16.5], [-33.5, -16.5], [-33.5, -28.5]], - [[12.5, -28.5], [26.5, -28.5], [26.5, -16.5], [12.5, -16.5], [12.5, -28.5]] - ]) + [ + [-37.5, -32.5], + [-37.5, 17.5], + [32.5, 17.5], + [32.5, -32.5], + [-37.5, -32.5], + ], + [ + [-33.5, -28.5], + [-21.5, -28.5], + [-21.5, -16.5], + [-33.5, -16.5], + [-33.5, -28.5], + ], + [ + [12.5, -28.5], + [26.5, -28.5], + [26.5, -16.5], + [12.5, -16.5], + [12.5, -28.5], + ], + ]), }); -feature.setStyle(new Style({ - fill: new Fill({color: gradient}), - stroke: new Stroke({color: pattern, width: 5}) -})); +feature.setStyle( + new Style({ + fill: new Fill({color: gradient}), + stroke: new Stroke({color: pattern, width: 5}), + }) +); vectorSource.addFeature(feature); new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/polygon-style/main.js b/rendering/cases/polygon-style/main.js index 1e85099865..58f415539d 100644 --- a/rendering/cases/polygon-style/main.js +++ b/rendering/cases/polygon-style/main.js @@ -1,12 +1,12 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import Map from '../../../src/ol/Map.js'; import Polygon from '../../../src/ol/geom/Polygon.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; @@ -14,87 +14,153 @@ let feature; // rectangle with 1 hole feature = new Feature({ geometry: new Polygon([ - [[-102.5, 75], [-102.5, 115], [-42.5, 115], [-42.5, 75], [-102.5, 75]], - [[-82.5, 87], [-62.5, 87], [-62.5, 103], [-82.5, 103], [-82.5, 87]] - ]) + [ + [-102.5, 75], + [-102.5, 115], + [-42.5, 115], + [-42.5, 75], + [-102.5, 75], + ], + [ + [-82.5, 87], + [-62.5, 87], + [-62.5, 103], + [-82.5, 103], + [-82.5, 87], + ], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({ - width: 4, - color: '#000', - lineJoin: 'round', - lineCap: 'butt' +feature.setStyle( + new Style({ + stroke: new Stroke({ + width: 4, + color: '#000', + lineJoin: 'round', + lineCap: 'butt', + }), }) -})); +); vectorSource.addFeature(feature); // rectangle with 2 holes feature = new Feature({ geometry: new Polygon([ - [[-117.5, 47.5], [-117.5, 97.5], [-47.5, 97.5], [-47.5, 47.5], [-117.5, 47.5]], - [[-113.5, 51.5], [-101.5, 51.5], [-101.5, 63.5], [-113.5, 63.5], [-113.5, 51.5]], - [[-67.5, 51.5], [-53.5, 51.5], [-53.5, 63.5], [-67.5, 63.5], [-67.5, 51.5]] - ]) + [ + [-117.5, 47.5], + [-117.5, 97.5], + [-47.5, 97.5], + [-47.5, 47.5], + [-117.5, 47.5], + ], + [ + [-113.5, 51.5], + [-101.5, 51.5], + [-101.5, 63.5], + [-113.5, 63.5], + [-113.5, 51.5], + ], + [ + [-67.5, 51.5], + [-53.5, 51.5], + [-53.5, 63.5], + [-67.5, 63.5], + [-67.5, 51.5], + ], + ]), }); -feature.setStyle(new Style({ - zIndex: -1, - fill: new Fill({ - color: '#1A5E42' - }), - stroke: new Stroke({ - color: '#9696EB', - width: 3 +feature.setStyle( + new Style({ + zIndex: -1, + fill: new Fill({ + color: '#1A5E42', + }), + stroke: new Stroke({ + color: '#9696EB', + width: 3, + }), }) -})); +); vectorSource.addFeature(feature); - // rectangle with 1 hole feature = new Feature({ geometry: new Polygon([ - [[-22.5, -5], [-22.5, 35], [37.5, 35], [37.5, -5], [-22.5, -5]], - [[-2.5, 7], [17.5, 7], [17.5, 23], [-2.5, 23], [-2.5, 7]] - ]) + [ + [-22.5, -5], + [-22.5, 35], + [37.5, 35], + [37.5, -5], + [-22.5, -5], + ], + [ + [-2.5, 7], + [17.5, 7], + [17.5, 23], + [-2.5, 23], + [-2.5, 7], + ], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({ - width: 3, - color: '#777', - lineDash: [2, 4] +feature.setStyle( + new Style({ + stroke: new Stroke({ + width: 3, + color: '#777', + lineDash: [2, 4], + }), }) -})); +); vectorSource.addFeature(feature); // rectangle with 2 holes feature = new Feature({ geometry: new Polygon([ - [[-37.5, -32.5], [-37.5, 17.5], [32.5, 17.5], [32.5, -32.5], [-37.5, -32.5]], - [[-33.5, -28.5], [-21.5, -28.5], [-21.5, -16.5], [-33.5, -16.5], [-33.5, -28.5]], - [[12.5, -28.5], [26.5, -28.5], [26.5, -16.5], [12.5, -16.5], [12.5, -28.5]] - ]) + [ + [-37.5, -32.5], + [-37.5, 17.5], + [32.5, 17.5], + [32.5, -32.5], + [-37.5, -32.5], + ], + [ + [-33.5, -28.5], + [-21.5, -28.5], + [-21.5, -16.5], + [-33.5, -16.5], + [-33.5, -28.5], + ], + [ + [12.5, -28.5], + [26.5, -28.5], + [26.5, -16.5], + [12.5, -16.5], + [12.5, -28.5], + ], + ]), }); -feature.setStyle(new Style({ - fill: new Fill({ - color: 'rgba(255, 0, 0, 0.85)' +feature.setStyle( + new Style({ + fill: new Fill({ + color: 'rgba(255, 0, 0, 0.85)', + }), }) -})); +); vectorSource.addFeature(feature); - new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/regularshape-style/main.js b/rendering/cases/regularshape-style/main.js index eec94e8c25..6c201fb030 100644 --- a/rendering/cases/regularshape-style/main.js +++ b/rendering/cases/regularshape-style/main.js @@ -1,89 +1,94 @@ import Feature from '../../../src/ol/Feature.js'; -import Point from '../../../src/ol/geom/Point.js'; +import Fill from '../../../src/ol/style/Fill.js'; import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; +import Point from '../../../src/ol/geom/Point.js'; +import RegularShape from '../../../src/ol/style/RegularShape.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import RegularShape from '../../../src/ol/style/RegularShape.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); function createFeatures(stroke, fill, offSet = [0, 0]) { let feature; feature = new Feature({ - geometry: new Point([offSet[0], offSet[1]]) + geometry: new Point([offSet[0], offSet[1]]), }); // square with offset - feature.setStyle(new Style({ - image: new RegularShape({ - fill: fill, - stroke: stroke, - points: 4, - radius: 10, - angle: Math.PI / 4, - displacement: [-15, 15] + feature.setStyle( + new Style({ + image: new RegularShape({ + fill: fill, + stroke: stroke, + points: 4, + radius: 10, + angle: Math.PI / 4, + displacement: [-15, 15], + }), }) - })); + ); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new Point([8 + offSet[0], 15 + offSet[1]]) + geometry: new Point([8 + offSet[0], 15 + offSet[1]]), }); // triangle - feature.setStyle(new Style({ - image: new RegularShape({ - fill: fill, - stroke: stroke, - points: 3, - radius: 10, - rotation: Math.PI / 4, - angle: 0 + feature.setStyle( + new Style({ + image: new RegularShape({ + fill: fill, + stroke: stroke, + points: 3, + radius: 10, + rotation: Math.PI / 4, + angle: 0, + }), }) - })); + ); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new Point([-10 + offSet[0], -8 + offSet[1]]) + geometry: new Point([-10 + offSet[0], -8 + offSet[1]]), }); // star - feature.setStyle(new Style({ - image: new RegularShape({ - fill: fill, - stroke: stroke, - points: 5, - radius: 10, - radius2: 4, - angle: 0 + feature.setStyle( + new Style({ + image: new RegularShape({ + fill: fill, + stroke: stroke, + points: 5, + radius: 10, + radius2: 4, + angle: 0, + }), }) - })); + ); vectorSource.addFeature(feature); feature = new Feature({ - geometry: new Point([12 + offSet[0], -8 + offSet[1]]) + geometry: new Point([12 + offSet[0], -8 + offSet[1]]), }); // cross - feature.setStyle(new Style({ - image: new RegularShape({ - fill: fill, - stroke: stroke, - points: 4, - radius: 10, - radius2: 0, - angle: 0 + feature.setStyle( + new Style({ + image: new RegularShape({ + fill: fill, + stroke: stroke, + points: 4, + radius: 10, + radius2: 0, + angle: 0, + }), }) - })); + ); vectorSource.addFeature(feature); } -createFeatures( - new Stroke({width: 2}), - new Fill({color: 'red'}) -); +createFeatures(new Stroke({width: 2}), new Fill({color: 'red'})); createFeatures( new Stroke({ - lineDash: [10, 5] + lineDash: [10, 5], }), null, [50, 50] @@ -91,7 +96,7 @@ createFeatures( createFeatures( new Stroke({ lineDash: [10, 5], - lineDashOffset: 5 + lineDashOffset: 5, }), null, [-50, -50] @@ -100,7 +105,7 @@ createFeatures( createFeatures(new Stroke(), new Fill(), [50, -50]); const vectorLayer = new VectorLayer({ - source: vectorSource + source: vectorSource, }); new Map({ @@ -108,8 +113,8 @@ new Map({ layers: [vectorLayer], view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/render-context/main.js b/rendering/cases/render-context/main.js index 0902835534..a449e61e4c 100644 --- a/rendering/cases/render-context/main.js +++ b/rendering/cases/render-context/main.js @@ -1,77 +1,126 @@ +import CircleStyle from '../../../src/ol/style/Circle.js'; +import Fill from '../../../src/ol/style/Fill.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'; -import {toContext} from '../../../src/ol/render.js'; -import CircleStyle from '../../../src/ol/style/Circle.js'; -import Fill from '../../../src/ol/style/Fill.js'; import Stroke from '../../../src/ol/style/Stroke.js'; import Style from '../../../src/ol/style/Style.js'; +import {toContext} from '../../../src/ol/render.js'; const canvas = document.getElementById('canvas'); const vectorContext = toContext(canvas.getContext('2d'), { pixelRatio: 1, - size: [200, 200] + size: [200, 200], }); -vectorContext.setStyle(new Style({ - image: new CircleStyle({ - fill: new Fill({ - color: 'green' +vectorContext.setStyle( + new Style({ + image: new CircleStyle({ + fill: new Fill({ + color: 'green', + }), + radius: 10, }), - radius: 10 }) -})); +); vectorContext.drawGeometry(new Point([100, 100])); -vectorContext.setStyle(new Style({ - stroke: new Stroke({ - lineCap: 'butt', - color: 'red', - width: 14 +vectorContext.setStyle( + new Style({ + stroke: new Stroke({ + lineCap: 'butt', + color: 'red', + width: 14, + }), }) -})); -vectorContext.drawGeometry(new LineString([ - [10, 60], [30, 40], [50, 60], [70, 40], [90, 60] -])); +); +vectorContext.drawGeometry( + new LineString([ + [10, 60], + [30, 40], + [50, 60], + [70, 40], + [90, 60], + ]) +); -vectorContext.setStyle(new Style({ - stroke: new Stroke({ - lineJoin: 'bevel', - lineCap: 'butt', - color: '#111', - width: 14 +vectorContext.setStyle( + new Style({ + stroke: new Stroke({ + lineJoin: 'bevel', + lineCap: 'butt', + color: '#111', + width: 14, + }), }) -})); -vectorContext.drawGeometry(new LineString([ - [10, 140], [30, 120], [50, 140], [70, 120], [90, 140] -])); +); +vectorContext.drawGeometry( + new LineString([ + [10, 140], + [30, 120], + [50, 140], + [70, 120], + [90, 140], + ]) +); - -vectorContext.setStyle(new Style({ - stroke: new Stroke({ - color: 'blue', - width: 6 - }), - fill: new Fill({ - color: 'rgba(0,0,255,0.5)' +vectorContext.setStyle( + new Style({ + stroke: new Stroke({ + color: 'blue', + width: 6, + }), + fill: new Fill({ + color: 'rgba(0,0,255,0.5)', + }), }) -})); +); -vectorContext.drawGeometry(new Polygon([ - [[125, 25], [175, 25], [175, 75], [125, 75], [125, 25]], - [[140, 40], [140, 60], [160, 60], [160, 40], [140, 40]] -])); +vectorContext.drawGeometry( + new Polygon([ + [ + [125, 25], + [175, 25], + [175, 75], + [125, 75], + [125, 25], + ], + [ + [140, 40], + [140, 60], + [160, 60], + [160, 40], + [140, 40], + ], + ]) +); -vectorContext.setStyle(new Style({ - stroke: new Stroke({ - lineDash: [10, 5], - lineDashOffset: 5 +vectorContext.setStyle( + new Style({ + stroke: new Stroke({ + lineDash: [10, 5], + lineDashOffset: 5, + }), }) -})); +); -vectorContext.drawGeometry(new Polygon([ - [[125, 125], [175, 125], [175, 175], [125, 175], [125, 125]], - [[140, 140], [140, 160], [160, 160], [160, 140], [140, 140]] -])); +vectorContext.drawGeometry( + new Polygon([ + [ + [125, 125], + [175, 125], + [175, 175], + [125, 175], + [125, 125], + ], + [ + [140, 140], + [140, 160], + [160, 160], + [160, 140], + [140, 140], + ], + ]) +); render(); diff --git a/rendering/cases/reproj-image/main.js b/rendering/cases/reproj-image/main.js index 98553ed21f..08444e9120 100644 --- a/rendering/cases/reproj-image/main.js +++ b/rendering/cases/reproj-image/main.js @@ -1,31 +1,30 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import Static from '../../../src/ol/source/ImageStatic.js'; -import { - get as getProjection, - transformExtent -} from '../../../src/ol/proj.js'; import ImageLayer from '../../../src/ol/layer/Image.js'; +import Map from '../../../src/ol/Map.js'; +import Static from '../../../src/ol/source/ImageStatic.js'; +import View from '../../../src/ol/View.js'; +import {get as getProjection, transformExtent} from '../../../src/ol/proj.js'; const source = new Static({ url: '/data/tiles/osm/5/5/12.png', imageExtent: transformExtent([-123, 37, -122, 38], 'EPSG:4326', 'EPSG:3857'), - projection: getProjection('EPSG:3857') + projection: getProjection('EPSG:3857'), }); new Map({ pixelRatio: 1, target: 'map', - layers: [new ImageLayer({ - source: source - })], + layers: [ + new ImageLayer({ + source: source, + }), + ], view: new View({ center: [-122.416667, 37.783333], zoom: 8, - projection: 'EPSG:4326' - }) + projection: 'EPSG:4326', + }), }); render({ - tolerance: 0.001 + tolerance: 0.001, }); diff --git a/rendering/cases/reproj-tile-4326/main.js b/rendering/cases/reproj-tile-4326/main.js index bf72c74090..66a6679195 100644 --- a/rendering/cases/reproj-tile-4326/main.js +++ b/rendering/cases/reproj-tile-4326/main.js @@ -1,9 +1,9 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; -import {toLonLat, get} from '../../../src/ol/proj.js'; -import {createXYZ, createForProjection} from '../../../src/ol/tilegrid.js'; +import {createForProjection, createXYZ} from '../../../src/ol/tilegrid.js'; +import {get, toLonLat} from '../../../src/ol/proj.js'; const tileGrid = createXYZ(); const extent = tileGrid.getTileCoordExtent([5, 5, 12]); @@ -13,24 +13,27 @@ const source = new XYZ({ transition: 0, minZoom: 5, maxZoom: 5, - url: '/data/tiles/osm/{z}/{x}/{y}.png' + url: '/data/tiles/osm/{z}/{x}/{y}.png', }); -source.setTileGridForProjection(get('EPSG:4326'), createForProjection(get('EPSG:4326'), 7, [64, 64])); +source.setTileGridForProjection( + get('EPSG:4326'), + createForProjection(get('EPSG:4326'), 7, [64, 64]) +); new Map({ pixelRatio: 1, target: 'map', layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], view: new View({ projection: 'EPSG:4326', center: toLonLat(center), - zoom: 5 - }) + zoom: 5, + }), }); render(); diff --git a/rendering/cases/reproj-tile-5070/main.js b/rendering/cases/reproj-tile-5070/main.js index 722cbaa73c..6f02f05df8 100644 --- a/rendering/cases/reproj-tile-5070/main.js +++ b/rendering/cases/reproj-tile-5070/main.js @@ -1,14 +1,16 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; +import proj4 from 'proj4'; import {get, transform} from '../../../src/ol/proj.js'; import {register} from '../../../src/ol/proj/proj4.js'; -import proj4 from 'proj4'; -proj4.defs('EPSG:5070', +proj4.defs( + 'EPSG:5070', '+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 ' + - '+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'); + '+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs' +); register(proj4); const proj5070 = get('EPSG:5070'); proj5070.setExtent([-6e6, 0, 4e6, 6e6]); @@ -20,7 +22,7 @@ const source = new XYZ({ transition: 0, minZoom: 5, maxZoom: 5, - url: '/data/tiles/osm/{z}/{x}/{y}.png' + url: '/data/tiles/osm/{z}/{x}/{y}.png', }); new Map({ @@ -28,14 +30,14 @@ new Map({ target: 'map', layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], view: new View({ projection: 'EPSG:5070', center: center, - zoom: 4 - }) + zoom: 4, + }), }); render(); diff --git a/rendering/cases/reproj-tile-54009/main.js b/rendering/cases/reproj-tile-54009/main.js index eef8cc3f9e..f8763ec65e 100644 --- a/rendering/cases/reproj-tile-54009/main.js +++ b/rendering/cases/reproj-tile-54009/main.js @@ -1,12 +1,15 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; +import proj4 from 'proj4'; import {get, transform} from '../../../src/ol/proj.js'; import {register} from '../../../src/ol/proj/proj4.js'; -import proj4 from 'proj4'; -proj4.defs('ESRI:54009', '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'); +proj4.defs( + 'ESRI:54009', + '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' +); register(proj4); const proj54009 = get('ESRI:54009'); @@ -19,7 +22,7 @@ const source = new XYZ({ transition: 0, minZoom: 5, maxZoom: 5, - url: '/data/tiles/osm/{z}/{x}/{y}.png' + url: '/data/tiles/osm/{z}/{x}/{y}.png', }); new Map({ @@ -27,14 +30,14 @@ new Map({ target: 'map', layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], view: new View({ projection: 'ESRI:54009', center: center, - zoom: 6 - }) + zoom: 6, + }), }); render(); diff --git a/rendering/cases/reproj-tile-dateline-merc/main.js b/rendering/cases/reproj-tile-dateline-merc/main.js index 38e030a90b..06ac920635 100644 --- a/rendering/cases/reproj-tile-dateline-merc/main.js +++ b/rendering/cases/reproj-tile-dateline-merc/main.js @@ -1,16 +1,16 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; +import proj4 from 'proj4'; import {get, transform} from '../../../src/ol/proj.js'; import {register} from '../../../src/ol/proj/proj4.js'; -import proj4 from 'proj4'; proj4.defs('merc_180', '+proj=merc +lon_0=180 +units=m +no_defs'); register(proj4); const merc = get('merc_180'); -merc.setExtent([-20026376.39, -20048966.10, 20026376.39, 20048966.10]); +merc.setExtent([-20026376.39, -20048966.1, 20026376.39, 20048966.1]); const center4326 = [180, 0]; const center = transform(center4326, 'EPSG:4326', 'merc_180'); @@ -19,7 +19,7 @@ const source = new XYZ({ projection: 'EPSG:4326', minZoom: 0, maxZoom: 0, - url: '/data/tiles/4326/{z}/{x}/{y}.png' + url: '/data/tiles/4326/{z}/{x}/{y}.png', }); new Map({ @@ -27,14 +27,14 @@ new Map({ target: 'map', layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], view: new View({ projection: 'merc_180', center: center, - zoom: 0 - }) + zoom: 0, + }), }); render(); diff --git a/rendering/cases/reproj-tile-disable-smoothing/main.js b/rendering/cases/reproj-tile-disable-smoothing/main.js index fb194dfe0c..1826969898 100644 --- a/rendering/cases/reproj-tile-disable-smoothing/main.js +++ b/rendering/cases/reproj-tile-disable-smoothing/main.js @@ -1,9 +1,9 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; -import {toLonLat} from '../../../src/ol/proj.js'; import {createXYZ} from '../../../src/ol/tilegrid.js'; +import {toLonLat} from '../../../src/ol/proj.js'; const tileGrid = createXYZ(); const extent = tileGrid.getTileCoordExtent([5, 5, 12]); @@ -14,11 +14,11 @@ const source = new XYZ({ minZoom: 5, maxZoom: 5, imageSmoothing: false, - url: '/data/tiles/osm/{z}/{x}/{y}.png' + url: '/data/tiles/osm/{z}/{x}/{y}.png', }); const layer = new TileLayer({ - source: source + source: source, }); new Map({ @@ -28,8 +28,8 @@ new Map({ view: new View({ projection: 'EPSG:4326', center: toLonLat(center), - zoom: 10 - }) + zoom: 10, + }), }); render(); diff --git a/rendering/cases/reproj-tile-none-square/main.js b/rendering/cases/reproj-tile-none-square/main.js index 2884f3c959..f40f8974d9 100644 --- a/rendering/cases/reproj-tile-none-square/main.js +++ b/rendering/cases/reproj-tile-none-square/main.js @@ -1,23 +1,20 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; -import {toLonLat} from '../../../src/ol/proj.js'; import {createXYZ} from '../../../src/ol/tilegrid.js'; +import {toLonLat} from '../../../src/ol/proj.js'; const tileGrid = createXYZ({tileSize: [512, 256]}); const extent = tileGrid.getTileCoordExtent([5, 3, 12]); -const center = [ - (extent[0] + extent[2]) / 2, - (extent[1] + extent[3]) / 2 -]; +const center = [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2]; const source = new XYZ({ projection: 'EPSG:3857', minZoom: 5, maxZoom: 5, url: '/data/tiles/512x256/{z}/{x}/{y}.png', - tileSize: [512, 256] + tileSize: [512, 256], }); new Map({ @@ -25,14 +22,14 @@ new Map({ target: 'map', layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], view: new View({ projection: 'EPSG:4326', center: toLonLat(center), - zoom: 5 - }) + zoom: 5, + }), }); render(); diff --git a/rendering/cases/reproj-tile-northpole/main.js b/rendering/cases/reproj-tile-northpole/main.js index f667fd8b18..8a0974bf22 100644 --- a/rendering/cases/reproj-tile-northpole/main.js +++ b/rendering/cases/reproj-tile-northpole/main.js @@ -1,13 +1,16 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; +import proj4 from 'proj4'; import {get, transform} from '../../../src/ol/proj.js'; import {register} from '../../../src/ol/proj/proj4.js'; -import proj4 from 'proj4'; -proj4.defs('EPSG:3413', '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 ' + - '+k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'); +proj4.defs( + 'EPSG:3413', + '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 ' + + '+k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' +); register(proj4); const proj3413 = get('EPSG:3413'); @@ -19,7 +22,7 @@ const center = transform(center4326, 'EPSG:4326', 'EPSG:3413'); const source = new XYZ({ maxZoom: 0, projection: 'EPSG:4326', - url: '/data/tiles/4326/{z}/{x}/{y}.png' + url: '/data/tiles/4326/{z}/{x}/{y}.png', }); new Map({ @@ -27,14 +30,14 @@ new Map({ target: 'map', layers: [ new TileLayer({ - source: source - }) + source: source, + }), ], view: new View({ projection: 'EPSG:3413', center: center, - zoom: 0 - }) + zoom: 0, + }), }); render(); diff --git a/rendering/cases/rotated-view/main.js b/rendering/cases/rotated-view/main.js index 7c2faf2a4f..e561590ccf 100644 --- a/rendering/cases/rotated-view/main.js +++ b/rendering/cases/rotated-view/main.js @@ -1,9 +1,12 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import {Vector as VectorLayer, Tile as TileLayer} from '../../../src/ol/layer.js'; -import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; -import Point from '../../../src/ol/geom/Point.js'; import Feature from '../../../src/ol/Feature.js'; +import Map from '../../../src/ol/Map.js'; +import Point from '../../../src/ol/geom/Point.js'; +import View from '../../../src/ol/View.js'; +import { + Tile as TileLayer, + Vector as VectorLayer, +} from '../../../src/ol/layer.js'; +import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js'; import {fromLonLat} from '../../../src/ol/proj.js'; const center = fromLonLat([-111, 45.7]); @@ -12,25 +15,21 @@ new Map({ layers: [ new TileLayer({ source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), }), new VectorLayer({ source: new VectorSource({ - features: [ - new Feature( - new Point(center) - ) - ] - }) - }) + features: [new Feature(new Point(center))], + }), + }), ], target: 'map', view: new View({ center: center, zoom: 3, - rotation: Math.PI / 4 - }) + rotation: Math.PI / 4, + }), }); render(); diff --git a/rendering/cases/single-layer/main.js b/rendering/cases/single-layer/main.js index c1fcec8fe5..5800cc2cbf 100644 --- a/rendering/cases/single-layer/main.js +++ b/rendering/cases/single-layer/main.js @@ -1,21 +1,21 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; new Map({ layers: [ new TileLayer({ source: new XYZ({ - url: '/data/tiles/satellite/{z}/{x}/{y}.jpg' - }) - }) + url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', + }), + }), ], target: 'map', view: new View({ center: [0, 0], - zoom: 0 - }) + zoom: 0, + }), }); render({message: 'A single layer with a XZY source'}); diff --git a/rendering/cases/source-raster/main.js b/rendering/cases/source-raster/main.js index 215609e5dd..2804f03108 100644 --- a/rendering/cases/source-raster/main.js +++ b/rendering/cases/source-raster/main.js @@ -1,22 +1,24 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import ImageLayer from '../../../src/ol/layer/Image.js'; +import Map from '../../../src/ol/Map.js'; import RasterSource from '../../../src/ol/source/Raster.js'; +import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; const raster = new RasterSource({ - sources: [new XYZ({ - url: '/data/tiles/osm/{z}/{x}/{y}.png', - transition: 0 - })], + sources: [ + new XYZ({ + url: '/data/tiles/osm/{z}/{x}/{y}.png', + transition: 0, + }), + ], threads: 0, // Avoid using workers to work with puppeteer - operation: function(pixels) { + operation: function (pixels) { const pixel = pixels[0]; const red = pixel[0]; pixel[0] = pixel[2]; pixel[2] = red; return pixel; - } + }, }); new Map({ @@ -24,9 +26,8 @@ new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 0 - }) + zoom: 0, + }), }); render(); - diff --git a/rendering/cases/source-tilewms-gutter0/main.js b/rendering/cases/source-tilewms-gutter0/main.js index 101dee5322..3772e3d479 100644 --- a/rendering/cases/source-tilewms-gutter0/main.js +++ b/rendering/cases/source-tilewms-gutter0/main.js @@ -1,15 +1,15 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; import TileWMS from '../../../src/ol/source/TileWMS.js'; +import View from '../../../src/ol/View.js'; const tileWms = new TileWMS({ params: { - 'LAYERS': 'layer' + 'LAYERS': 'layer', }, gutter: 0, url: '/data/tiles/wms/wms0.png', - transition: 0 + transition: 0, }); new Map({ @@ -18,9 +18,8 @@ new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 5 - }) + zoom: 5, + }), }); render(); - diff --git a/rendering/cases/source-tilewms-gutter20/main.js b/rendering/cases/source-tilewms-gutter20/main.js index 060d2dcff5..9b0680db20 100644 --- a/rendering/cases/source-tilewms-gutter20/main.js +++ b/rendering/cases/source-tilewms-gutter20/main.js @@ -1,15 +1,15 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; import TileWMS from '../../../src/ol/source/TileWMS.js'; +import View from '../../../src/ol/View.js'; const tileWms = new TileWMS({ params: { - 'LAYERS': 'layer' + 'LAYERS': 'layer', }, gutter: 20, url: '/data/tiles/wms/wms20.png', - transition: 0 + transition: 0, }); new Map({ @@ -18,9 +18,8 @@ new Map({ target: 'map', view: new View({ center: [0, 0], - zoom: 5 - }) + zoom: 5, + }), }); render(); - diff --git a/rendering/cases/stacking/main.js b/rendering/cases/stacking/main.js index 44f24bfc67..0d784d373a 100644 --- a/rendering/cases/stacking/main.js +++ b/rendering/cases/stacking/main.js @@ -4,11 +4,11 @@ * above layers. */ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import Layer from '../../../src/ol/layer/Layer.js'; import Control from '../../../src/ol/control/Control.js'; +import Layer from '../../../src/ol/layer/Layer.js'; +import Map from '../../../src/ol/Map.js'; import SourceState from '../../../src/ol/source/State.js'; +import View from '../../../src/ol/View.js'; class Element extends Layer { constructor(options, style) { @@ -50,33 +50,39 @@ style2.zIndex = '-1'; new Map({ target: 'map', layers: [ - new Element({ - zIndex: 200 - }, { - background: 'red', - width: '50%', - height: '100%' - }), - new Element({ - zIndex: -200 - }, { - background: 'green', - width: '100%', - height: '50%' - }) + new Element( + { + zIndex: 200, + }, + { + background: 'red', + width: '50%', + height: '100%', + } + ), + new Element( + { + zIndex: -200, + }, + { + background: 'green', + width: '100%', + height: '50%', + } + ), ], controls: [ new Control({ - element: element1 + element: element1, }), new Control({ - element: element2 - }) + element: element2, + }), ], view: new View({ center: [0, 0], - zoom: 0 - }) + zoom: 0, + }), }); render(); diff --git a/rendering/cases/text-style-linestring-nice/main.js b/rendering/cases/text-style-linestring-nice/main.js index fbce6e2d13..7177b58459 100644 --- a/rendering/cases/text-style-linestring-nice/main.js +++ b/rendering/cases/text-style-linestring-nice/main.js @@ -1,133 +1,178 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; +import Text from '../../../src/ol/style/Text.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Text from '../../../src/ol/style/Text.js'; -import Style from '../../../src/ol/style/Style.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import LineString from '../../../src/ol/geom/LineString.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); const nicePath = [ - 20, 33, 40, 31, 60, 30, 80, 31, 100, 33, 120, 37, 140, 39, 160, 40, - 180, 39, 200, 37, 220, 33, 240, 31, 260, 30, 280, 31, 300, 33 + 20, + 33, + 40, + 31, + 60, + 30, + 80, + 31, + 100, + 33, + 120, + 37, + 140, + 39, + 160, + 40, + 180, + 39, + 200, + 37, + 220, + 33, + 240, + 31, + 260, + 30, + 280, + 31, + 300, + 33, ]; const lineString1 = new LineString(nicePath, 'XY'); const feature1 = new Feature({geometry: lineString1}); -feature1.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'Hello world', - font: '10px Ubuntu', - placement: 'line' +feature1.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'Hello world', + font: '10px Ubuntu', + placement: 'line', + }), }) -})); +); vectorSource.addFeature(feature1); const lineString2 = lineString1.clone(); lineString2.translate(0, 30); const feature2 = new Feature({geometry: lineString2}); -feature2.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'Scale 2', - font: 'normal 400 12px/1 Ubuntu', - scale: 2, - textBaseline: 'bottom', - textAlign: 'right', - placement: 'line' +feature2.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'Scale 2', + font: 'normal 400 12px/1 Ubuntu', + scale: 2, + textBaseline: 'bottom', + textAlign: 'right', + placement: 'line', + }), }) -})); +); vectorSource.addFeature(feature2); const lineString3 = lineString2.clone(); lineString3.translate(0, 30); const feature3 = new Feature({geometry: lineString3}); -feature3.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - font: 'italic bold 0.75em Ubuntu', - text: 'Set properties' +feature3.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + font: 'italic bold 0.75em Ubuntu', + text: 'Set properties', + }), }) -})); +); feature3.getStyle().getText().setTextAlign('left'); feature3.getStyle().getText().setOffsetX(10); feature3.getStyle().getText().setOffsetY(-10); feature3.getStyle().getText().setPlacement('line'); feature3.getStyle().getText().setScale(1.1); -feature3.getStyle().getText().setStroke(new Stroke({color: '#00F7F8'})); -feature3.getStyle().getText().setFill(new Fill({color: '#006772'})); +feature3 + .getStyle() + .getText() + .setStroke(new Stroke({color: '#00F7F8'})); +feature3 + .getStyle() + .getText() + .setFill(new Fill({color: '#006772'})); vectorSource.addFeature(feature3); const lineString4 = lineString3.clone(); lineString4.translate(0, 30); const feature4 = new Feature({geometry: lineString4}); -feature4.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'negative offsetX', - font: 'normal 400 10px/1 Ubuntu', - offsetX: -10, - textAlign: 'start', - textBaseline: 'top', - placement: 'line' +feature4.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'negative offsetX', + font: 'normal 400 10px/1 Ubuntu', + offsetX: -10, + textAlign: 'start', + textBaseline: 'top', + placement: 'line', + }), }) -})); +); vectorSource.addFeature(feature4); const lineString5 = lineString4.clone(); lineString5.translate(0, 30); const feature5 = new Feature({geometry: lineString5}); -feature5.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'Small text', - font: '10px Ubuntu', - offsetY: 5, - scale: 0.7, - textAlign: 'end', - placement: 'line' +feature5.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'Small text', + font: '10px Ubuntu', + offsetY: 5, + scale: 0.7, + textAlign: 'end', + placement: 'line', + }), }) -})); +); vectorSource.addFeature(feature5); const lineString6 = lineString5.clone(); lineString6.translate(0, 30); const feature6 = new Feature({geometry: lineString6}); -feature6.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'FILL AND STROKE', - font: '10px Ubuntu', - placement: 'line', - fill: new Fill({color: '#FFC0CB'}), - stroke: new Stroke({ - color: '#00FF00', - width: 1 - }) +feature6.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'FILL AND STROKE', + font: '10px Ubuntu', + placement: 'line', + fill: new Fill({color: '#FFC0CB'}), + stroke: new Stroke({ + color: '#00FF00', + width: 1, + }), + }), }) -})); +); vectorSource.addFeature(feature6); const map = new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], resolution: 1, - rotation: Math.PI / 4 - }) + rotation: Math.PI / 4, + }), }); map.getView().fit(vectorSource.getExtent()); diff --git a/rendering/cases/text-style-linestring-ugly/main.js b/rendering/cases/text-style-linestring-ugly/main.js index 91a2d454bb..f974d86a74 100644 --- a/rendering/cases/text-style-linestring-ugly/main.js +++ b/rendering/cases/text-style-linestring-ugly/main.js @@ -1,14 +1,13 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; +import Text from '../../../src/ol/style/Text.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Text from '../../../src/ol/style/Text.js'; -import Style from '../../../src/ol/style/Style.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import LineString from '../../../src/ol/geom/LineString.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); @@ -16,51 +15,63 @@ const uglyPath = [163, 22, 159, 30, 150, 30, 143, 24, 151, 17]; const lineString1 = new LineString(uglyPath, 'XY'); const feature1 = new Feature({geometry: lineString1}); -feature1.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'Hello world', - font: '10px Ubuntu', - placement: 'line', - overflow: true +feature1.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'Hello world', + font: '10px Ubuntu', + placement: 'line', + overflow: true, + }), }) -})); +); vectorSource.addFeature(feature1); const lineString2 = lineString1.clone(); lineString2.translate(0, 30); const feature2 = new Feature({geometry: lineString2}); -feature2.setStyle(new Style({ - stroke: new Stroke({color: 'red'}), - text: new Text({ - text: 'Scale 2', - scale: 2, - textBaseline: 'bottom', - textAlign: 'right', - placement: 'line', - font: 'italic bold 0.5em Ubuntu', - overflow: true +feature2.setStyle( + new Style({ + stroke: new Stroke({color: 'red'}), + text: new Text({ + text: 'Scale 2', + scale: 2, + textBaseline: 'bottom', + textAlign: 'right', + placement: 'line', + font: 'italic bold 0.5em Ubuntu', + overflow: true, + }), }) -})); +); vectorSource.addFeature(feature2); const lineString3 = lineString2.clone(); lineString3.translate(0, 30); const feature3 = new Feature({geometry: lineString3}); -feature3.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'Set properties' +feature3.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'Set properties', + }), }) -})); +); feature3.getStyle().getText().setTextAlign('left'); feature3.getStyle().getText().setOffsetX(10); feature3.getStyle().getText().setOffsetY(-10); feature3.getStyle().getText().setOverflow(true); feature3.getStyle().getText().setPlacement('line'); feature3.getStyle().getText().setScale(1.2); -feature3.getStyle().getText().setStroke(new Stroke({color: '#00F7F8'})); -feature3.getStyle().getText().setFill(new Fill({color: '#006772'})); +feature3 + .getStyle() + .getText() + .setStroke(new Stroke({color: '#00F7F8'})); +feature3 + .getStyle() + .getText() + .setFill(new Fill({color: '#006772'})); feature3.getStyle().getText().setMaxAngle(Math.PI); vectorSource.addFeature(feature3); @@ -68,70 +79,76 @@ vectorSource.addFeature(feature3); const lineString4 = lineString3.clone(); lineString4.translate(0, 30); const feature4 = new Feature({geometry: lineString4}); -feature4.setStyle(new Style({ - stroke: new Stroke({color: 'red'}), - text: new Text({ - text: 'PLEASE OMIT ME IM UGLY', - font: '10px Ubuntu', - offsetX: -10, - textAlign: 'start', - textBaseline: 'top', - placement: 'line', - overflow: true +feature4.setStyle( + new Style({ + stroke: new Stroke({color: 'red'}), + text: new Text({ + text: 'PLEASE OMIT ME IM UGLY', + font: '10px Ubuntu', + offsetX: -10, + textAlign: 'start', + textBaseline: 'top', + placement: 'line', + overflow: true, + }), }) -})); +); vectorSource.addFeature(feature4); const lineString5 = lineString4.clone(); lineString5.translate(0, 30); const feature5 = new Feature({geometry: lineString5}); -feature5.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'Small text', - font: '10px Ubuntu', - offsetY: 5, - scale: 0.7, - rotation: 4, - textAlign: 'end', - placement: 'line', - maxAngle: Math.PI, - overflow: true +feature5.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'Small text', + font: '10px Ubuntu', + offsetY: 5, + scale: 0.7, + rotation: 4, + textAlign: 'end', + placement: 'line', + maxAngle: Math.PI, + overflow: true, + }), }) -})); +); vectorSource.addFeature(feature5); const lineString6 = lineString5.clone(); lineString6.translate(0, 30); const feature6 = new Feature({geometry: lineString6}); -feature6.setStyle(new Style({ - stroke: new Stroke({color: 'blue'}), - text: new Text({ - text: 'FILL AND STROKE', - font: '10px Ubuntu', - placement: 'line', - overflow: true, - fill: new Fill({color: '#FFC0CB'}), - stroke: new Stroke({ - color: '#00FF00' - }) +feature6.setStyle( + new Style({ + stroke: new Stroke({color: 'blue'}), + text: new Text({ + text: 'FILL AND STROKE', + font: '10px Ubuntu', + placement: 'line', + overflow: true, + fill: new Fill({color: '#FFC0CB'}), + stroke: new Stroke({ + color: '#00FF00', + }), + }), }) -})); +); vectorSource.addFeature(feature6); const map = new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], resolution: 1, - rotation: -(Math.PI / 4) - }) + rotation: -(Math.PI / 4), + }), }); map.getView().fit(vectorSource.getExtent()); diff --git a/rendering/cases/text-style-overlap/main.js b/rendering/cases/text-style-overlap/main.js index 9a750a3d99..9db5f4b6d6 100644 --- a/rendering/cases/text-style-overlap/main.js +++ b/rendering/cases/text-style-overlap/main.js @@ -1,18 +1,46 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; import Point from '../../../src/ol/geom/Point.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; +import Text from '../../../src/ol/style/Text.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Text from '../../../src/ol/style/Text.js'; -import Style from '../../../src/ol/style/Style.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; -import LineString from '../../../src/ol/geom/LineString.js'; +import View from '../../../src/ol/View.js'; const nicePath = [ - 20, 33, 40, 31, 60, 30, 80, 31, 100, 33, 120, 37, 140, 39, 160, 40, - 180, 39, 200, 37, 220, 33, 240, 31, 260, 30, 280, 31, 300, 33 + 20, + 33, + 40, + 31, + 60, + 30, + 80, + 31, + 100, + 33, + 120, + 37, + 140, + 39, + 160, + 40, + 180, + 39, + 200, + 37, + 220, + 33, + 240, + 31, + 260, + 30, + 280, + 31, + 300, + 33, ]; const vectorSource = new VectorSource(); @@ -21,12 +49,12 @@ const pointStyle = new Style({ text: 'Point Label', font: 'Ubuntu', fill: new Fill({ - color: 'red' + color: 'red', }), stroke: new Stroke({ - color: 'black' - }) - }) + color: 'black', + }), + }), }); const lineStyle = new Style({ stroke: new Stroke({color: 'blue'}), @@ -34,36 +62,42 @@ const lineStyle = new Style({ text: 'Line Label', font: 'Ubuntu', fill: new Fill({ - color: 'red' + color: 'red', }), stroke: new Stroke({ - color: 'black' + color: 'black', }), - placement: 'line' - }) + placement: 'line', + }), }); const pointFeature1 = new Feature({ - geometry: new Point([160, 100]) + geometry: new Point([160, 100]), }); pointFeature1.setStyle(pointStyle.clone()); pointFeature1.getStyle().getText().setText('POINT ONE'); vectorSource.addFeature(pointFeature1); const pointFeature2 = new Feature({ - geometry: new Point([170, 105]) + geometry: new Point([170, 105]), }); pointFeature2.setStyle(pointStyle.clone()); pointFeature2.getStyle().getText().setText('POINT TWO'); -pointFeature2.getStyle().getText().setFill(new Fill({color: 'green'})); +pointFeature2 + .getStyle() + .getText() + .setFill(new Fill({color: 'green'})); vectorSource.addFeature(pointFeature2); const pointFeature3 = new Feature({ - geometry: new Point([150, 95]) + geometry: new Point([150, 95]), }); pointFeature3.setStyle(pointStyle.clone()); pointFeature3.getStyle().getText().setText('POINT THREE'); -pointFeature3.getStyle().getText().setFill(new Fill({color: 'yellow'})); +pointFeature3 + .getStyle() + .getText() + .setFill(new Fill({color: 'yellow'})); vectorSource.addFeature(pointFeature3); const lineString1 = new LineString(nicePath, 'XY'); @@ -77,7 +111,10 @@ lineString2.translate(10, 10); const lineFeature2 = new Feature({geometry: lineString2}); lineFeature2.setStyle(lineStyle.clone()); lineFeature2.getStyle().getText().setText('LINE TWO'); -lineFeature2.getStyle().getText().setFill(new Fill({color: 'green'})); +lineFeature2 + .getStyle() + .getText() + .setFill(new Fill({color: 'green'})); vectorSource.addFeature(lineFeature2); const lineString3 = lineString1.clone(); @@ -85,21 +122,24 @@ lineString3.translate(-10, 10); const lineFeature3 = new Feature({geometry: lineString3}); lineFeature3.setStyle(lineStyle.clone()); lineFeature3.getStyle().getText().setText('LINE THREE'); -lineFeature3.getStyle().getText().setFill(new Fill({color: 'yellow'})); +lineFeature3 + .getStyle() + .getText() + .setFill(new Fill({color: 'yellow'})); vectorSource.addFeature(lineFeature3); const map = new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); map.getView().fit(vectorSource.getExtent()); diff --git a/rendering/cases/text-style/main.js b/rendering/cases/text-style/main.js index 654563d36b..f5befd9b42 100644 --- a/rendering/cases/text-style/main.js +++ b/rendering/cases/text-style/main.js @@ -1,140 +1,150 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; +import Fill from '../../../src/ol/style/Fill.js'; +import Map from '../../../src/ol/Map.js'; import Point from '../../../src/ol/geom/Point.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; +import Text from '../../../src/ol/style/Text.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Text from '../../../src/ol/style/Text.js'; -import Style from '../../../src/ol/style/Style.js'; -import Fill from '../../../src/ol/style/Fill.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; const vectorSource = new VectorSource(); let feature; // scale feature = new Feature({ - geometry: new Point([-50, 50]) + geometry: new Point([-50, 50]), }); -feature.setStyle(new Style({ - text: new Text({ - text: 'hello', - font: '12px Ubuntu', - scale: 2, - fill: new Fill({ - color: 'red' +feature.setStyle( + new Style({ + text: new Text({ + text: 'hello', + font: '12px Ubuntu', + scale: 2, + fill: new Fill({ + color: 'red', + }), + stroke: new Stroke({ + color: '#000', + }), }), - stroke: new Stroke({ - color: '#000' - }) }) -})); +); vectorSource.addFeature(feature); // rotate feature = new Feature({ - geometry: new Point([50, -50]) + geometry: new Point([50, -50]), }); -feature.setStyle(new Style({ - text: new Text({ - text: 'upside down', - font: '12px Ubuntu', - rotation: Math.PI, - stroke: new Stroke({ - color: 'red', - width: 2 - }) +feature.setStyle( + new Style({ + text: new Text({ + text: 'upside down', + font: '12px Ubuntu', + rotation: Math.PI, + stroke: new Stroke({ + color: 'red', + width: 2, + }), + }), }) -})); +); vectorSource.addFeature(feature); // rotate with view feature = new Feature({ - geometry: new Point([50, 50]) + geometry: new Point([50, 50]), }); -feature.setStyle(new Style({ - text: new Text({ - font: 'Ubuntu', - text: 'rotateWithView', - rotateWithView: true, - stroke: new Stroke({ - color: [10, 10, 10, 0.5] - }) +feature.setStyle( + new Style({ + text: new Text({ + font: 'Ubuntu', + text: 'rotateWithView', + rotateWithView: true, + stroke: new Stroke({ + color: [10, 10, 10, 0.5], + }), + }), }) -})); +); vectorSource.addFeature(feature); // align left feature = new Feature({ - geometry: new Point([50, 50]) + geometry: new Point([50, 50]), }); -feature.setStyle(new Style({ - text: new Text({ - font: 'Ubuntu', - text: 'align left', - textAlign: 'left', - stroke: new Stroke({ - color: [10, 10, 10, 0.5] - }) +feature.setStyle( + new Style({ + text: new Text({ + font: 'Ubuntu', + text: 'align left', + textAlign: 'left', + stroke: new Stroke({ + color: [10, 10, 10, 0.5], + }), + }), }) -})); +); vectorSource.addFeature(feature); // background and padding feature = new Feature({ - geometry: new Point([-10, 0]) + geometry: new Point([-10, 0]), }); -feature.setStyle(new Style({ - text: new Text({ - text: 'hello', - font: '12px Ubuntu', - padding: [1, 2, 3, 5], - backgroundFill: new Fill({ - color: 'rgba(55, 55, 55, 0.25)' +feature.setStyle( + new Style({ + text: new Text({ + text: 'hello', + font: '12px Ubuntu', + padding: [1, 2, 3, 5], + backgroundFill: new Fill({ + color: 'rgba(55, 55, 55, 0.25)', + }), + backgroundStroke: new Stroke({ + color: '#000', + width: 1, + }), }), - backgroundStroke: new Stroke({ - color: '#000', - width: 1 - }) }) -})); +); vectorSource.addFeature(feature); // background and padding feature = new Feature({ - geometry: new Point([-10, 0]) + geometry: new Point([-10, 0]), }); -feature.setStyle(new Style({ - text: new Text({ - text: 'hello', - font: '12px Ubuntu', - padding: [1, 2, 3, 5], - backgroundFill: new Fill({ - color: 'rgba(55, 55, 55, 0.25)' +feature.setStyle( + new Style({ + text: new Text({ + text: 'hello', + font: '12px Ubuntu', + padding: [1, 2, 3, 5], + backgroundFill: new Fill({ + color: 'rgba(55, 55, 55, 0.25)', + }), + backgroundStroke: new Stroke({ + color: '#000', + width: 1, + }), }), - backgroundStroke: new Stroke({ - color: '#000', - width: 1 - }) }) -})); +); vectorSource.addFeature(feature); - new Map({ pixelRatio: 1, layers: [ new VectorLayer({ - source: vectorSource - }) + source: vectorSource, + }), ], target: 'map', view: new View({ center: [0, 0], resolution: 1, - rotation: Math.PI / 4 - }) + rotation: Math.PI / 4, + }), }); render({tolerance: 0.02}); diff --git a/rendering/cases/tile-disable-smoothing/main.js b/rendering/cases/tile-disable-smoothing/main.js index 805344e9b2..e82db95336 100644 --- a/rendering/cases/tile-disable-smoothing/main.js +++ b/rendering/cases/tile-disable-smoothing/main.js @@ -1,7 +1,7 @@ import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; import View from '../../../src/ol/View.js'; import XYZ from '../../../src/ol/source/XYZ.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; import {createXYZ} from '../../../src/ol/tilegrid.js'; const tileGrid = createXYZ(); @@ -13,11 +13,11 @@ const source = new XYZ({ minZoom: 5, maxZoom: 5, imageSmoothing: false, - url: '/data/tiles/osm/{z}/{x}/{y}.png' + url: '/data/tiles/osm/{z}/{x}/{y}.png', }); const layer = new TileLayer({ - source: source + source: source, }); new Map({ @@ -26,8 +26,8 @@ new Map({ layers: [layer], view: new View({ center: center, - zoom: 10 - }) + zoom: 10, + }), }); render(); diff --git a/rendering/cases/vector-zindex/main.js b/rendering/cases/vector-zindex/main.js index 937284279c..5f833c16dd 100644 --- a/rendering/cases/vector-zindex/main.js +++ b/rendering/cases/vector-zindex/main.js @@ -1,32 +1,40 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import Feature from '../../../src/ol/Feature.js'; import LineString from '../../../src/ol/geom/LineString.js'; +import Map from '../../../src/ol/Map.js'; +import Stroke from '../../../src/ol/style/Stroke.js'; +import Style from '../../../src/ol/style/Style.js'; import VectorLayer from '../../../src/ol/layer/Vector.js'; import VectorSource from '../../../src/ol/source/Vector.js'; -import Style from '../../../src/ol/style/Style.js'; -import Stroke from '../../../src/ol/style/Stroke.js'; - +import View from '../../../src/ol/View.js'; const vectorSourceRed = new VectorSource(); const vectorSourceBlue = new VectorSource(); let feature; feature = new Feature({ - geometry: new LineString([[-60, 20], [45, 20]]) + geometry: new LineString([ + [-60, 20], + [45, 20], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({color: '#f00', width: 10}) -})); +feature.setStyle( + new Style({ + stroke: new Stroke({color: '#f00', width: 10}), + }) +); vectorSourceRed.addFeature(feature); - feature = new Feature({ - geometry: new LineString([[0, -50], [0, 60]]) + geometry: new LineString([ + [0, -50], + [0, 60], + ]), }); -feature.setStyle(new Style({ - stroke: new Stroke({color: '#00f', width: 16}) -})); +feature.setStyle( + new Style({ + stroke: new Stroke({color: '#00f', width: 16}), + }) +); vectorSourceBlue.addFeature(feature); new Map({ @@ -34,17 +42,17 @@ new Map({ layers: [ new VectorLayer({ zIndex: 1, - source: vectorSourceRed + source: vectorSourceRed, }), new VectorLayer({ - source: vectorSourceBlue - }) + source: vectorSourceBlue, + }), ], target: 'map', view: new View({ center: [0, 0], - resolution: 1 - }) + resolution: 1, + }), }); render(); diff --git a/rendering/cases/webgl-points/main.js b/rendering/cases/webgl-points/main.js index cafb57a0e1..1067ff903b 100644 --- a/rendering/cases/webgl-points/main.js +++ b/rendering/cases/webgl-points/main.js @@ -1,32 +1,32 @@ -import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; -import TileLayer from '../../../src/ol/layer/Tile.js'; -import XYZ from '../../../src/ol/source/XYZ.js'; -import VectorSource from '../../../src/ol/source/Vector.js'; import KML from '../../../src/ol/format/KML.js'; +import Map from '../../../src/ol/Map.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; +import VectorSource from '../../../src/ol/source/Vector.js'; +import View from '../../../src/ol/View.js'; import WebGLPointsLayer from '../../../src/ol/layer/WebGLPoints.js'; +import XYZ from '../../../src/ol/source/XYZ.js'; const vector = new WebGLPointsLayer({ source: new VectorSource({ url: '/data/2012_Earthquakes_Mag5.kml', format: new KML({ - extractStyles: false - }) + extractStyles: false, + }), }), style: { symbol: { symbolType: 'square', size: 4, - color: 'white' - } - } + color: 'white', + }, + }, }); const raster = new TileLayer({ source: new XYZ({ url: '/data/tiles/satellite/{z}/{x}/{y}.jpg', - transition: 0 - }) + transition: 0, + }), }); new Map({ @@ -34,10 +34,10 @@ new Map({ target: 'map', view: new View({ center: [15180597.9736, 2700366.3807], - zoom: 2 - }) + zoom: 2, + }), }); render({ - message: 'Points are rendered using webgl as 4px pixel squares' + message: 'Points are rendered using webgl as 4px pixel squares', }); diff --git a/rendering/cases/zoomify-no-zdirection/main.js b/rendering/cases/zoomify-no-zdirection/main.js index c954a64144..3226870f4a 100644 --- a/rendering/cases/zoomify-no-zdirection/main.js +++ b/rendering/cases/zoomify-no-zdirection/main.js @@ -1,14 +1,14 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; +import View from '../../../src/ol/View.js'; import Zoomify from '../../../src/ol/source/Zoomify.js'; const layer = new TileLayer({ source: new Zoomify({ url: '/data/tiles/zoomify/', size: [200, 200], - tileSize: 100 - }) + tileSize: 100, + }), }); new Map({ @@ -17,8 +17,8 @@ new Map({ view: new View({ resolutions: [2, 1], center: [100, -100], - zoom: 0.4 - }) + zoom: 0.4, + }), }); render(); diff --git a/rendering/cases/zoomify-zdirection/main.js b/rendering/cases/zoomify-zdirection/main.js index 6863e47579..e7dc380751 100644 --- a/rendering/cases/zoomify-zdirection/main.js +++ b/rendering/cases/zoomify-zdirection/main.js @@ -1,6 +1,6 @@ import Map from '../../../src/ol/Map.js'; -import View from '../../../src/ol/View.js'; import TileLayer from '../../../src/ol/layer/Tile.js'; +import View from '../../../src/ol/View.js'; import Zoomify from '../../../src/ol/source/Zoomify.js'; const layer = new TileLayer({ @@ -8,8 +8,8 @@ const layer = new TileLayer({ url: '/data/tiles/zoomify/', size: [200, 200], tileSize: 100, - zDirection: -1 - }) + zDirection: -1, + }), }); new Map({ @@ -18,8 +18,8 @@ new Map({ view: new View({ resolutions: [2, 1], center: [100, -100], - zoom: 0.4 - }) + zoom: 0.4, + }), }); render(); diff --git a/rendering/test.js b/rendering/test.js index d12b40082d..acbfe72a01 100755 --- a/rendering/test.js +++ b/rendering/test.js @@ -35,7 +35,7 @@ function indexHandler(req, res) { const markup = `
      ${items.join('')}
    `; res.writeHead(404, { - 'Content-Type': 'text/html' + 'Content-Type': 'text/html', }); res.end(markup); } @@ -58,7 +58,7 @@ function serve(options) { const webpackHandler = webpackMiddleware(compiler, { lazy: true, logger: options.log, - stats: 'minimal' + stats: 'minimal', }); return new Promise((resolve, reject) => { @@ -78,12 +78,14 @@ function serve(options) { staticHandler(req, res, notFound(req, res)); }); - server.listen(options.port, options.host, err => { + server.listen(options.port, options.host, (err) => { if (err) { return reject(err); } const address = server.address(); - options.log.info(`test server listening http://${address.address}:${address.port}/`); + options.log.info( + `test server listening http://${address.address}:${address.port}/` + ); resolve(() => server.close()); }); }); @@ -104,7 +106,7 @@ function getPassFilePath(entry) { function parsePNG(filepath) { return new Promise((resolve, reject) => { const stream = fs.createReadStream(filepath); - stream.on('error', err => { + stream.on('error', (err) => { if (err.code === 'ENOENT') { return reject(new Error(`File not found: ${filepath}`)); } @@ -123,12 +125,22 @@ async function match(actual, expected) { const width = expectedImage.width; const height = expectedImage.height; if (actualImage.width != width) { - throw new Error(`Unexpected width for ${actual}: expected ${width}, got ${actualImage.width}`); + throw new Error( + `Unexpected width for ${actual}: expected ${width}, got ${actualImage.width}` + ); } if (actualImage.height != height) { - throw new Error(`Unexpected height for ${actual}: expected ${height}, got ${actualImage.height}`); + throw new Error( + `Unexpected height for ${actual}: expected ${height}, got ${actualImage.height}` + ); } - const count = pixelmatch(actualImage.data, expectedImage.data, null, width, height); + const count = pixelmatch( + actualImage.data, + expectedImage.data, + null, + width, + height + ); return count / (width * height); } @@ -155,14 +167,16 @@ async function exposeRender(page) { } async function renderPage(page, entry, options) { - const renderCalled = new Promise(resolve => { + const renderCalled = new Promise((resolve) => { handleRender = (config) => { handleRender = null; resolve(config || {}); }; }); options.log.debug('navigating', entry); - await page.goto(`http://${options.host}:${options.port}${getHref(entry)}`, {waitUntil: 'networkidle0'}); + await page.goto(`http://${options.host}:${options.port}${getHref(entry)}`, { + waitUntil: 'networkidle0', + }); const config = await renderCalled; options.log.debug('screenshot', entry); await page.screenshot({path: getActualScreenshotPath(entry)}); @@ -184,7 +198,11 @@ async function copyActualToExpected(entry) { async function renderEach(page, entries, options) { let fail = false; for (const entry of entries) { - const {tolerance = 0.005, message = ''} = await renderPage(page, entry, options); + const {tolerance = 0.005, message = ''} = await renderPage( + page, + entry, + options + ); if (options.fix) { await copyActualToExpected(entry); @@ -217,20 +235,20 @@ async function renderEach(page, entries, options) { async function render(entries, options) { const browser = await puppeteer.launch({ args: options.puppeteerArgs, - headless: options.headless + headless: options.headless, }); let fail = false; try { const page = await browser.newPage(); - page.on('error', err => { + page.on('error', (err) => { options.log.error('page crash', err); }); - page.on('pageerror', err => { + page.on('pageerror', (err) => { options.log.error('uncaught exception', err); }); - page.on('console', message => { + page.on('console', (message) => { const type = message.type(); if (options.log[type]) { options.log[type](message.text()); @@ -262,7 +280,9 @@ async function getLatest(patterns) { } async function getOutdated(entries, options) { - const libTime = await getLatest(path.join(__dirname, '..', 'src', 'ol', '**', '*')); + const libTime = await getLatest( + path.join(__dirname, '..', 'src', 'ol', '**', '*') + ); options.log.debug('library time', libTime); const outdated = []; for (const entry of entries) { @@ -274,7 +294,9 @@ async function getOutdated(entries, options) { continue; } - const caseTime = await getLatest(path.join(__dirname, path.dirname(entry), '**', '*')); + const caseTime = await getLatest( + path.join(__dirname, path.dirname(entry), '**', '*') + ); options.log.debug('case time', entry, caseTime); if (passTime < caseTime) { outdated.push(entry); @@ -292,7 +314,7 @@ async function main(entries, options) { } if (options.match) { const exp = new RegExp(options.match); - entries = entries.filter(entry => exp.test(entry)); + entries = entries.filter((entry) => exp.test(entry)); } if (!options.interactive && entries.length === 0) { return; @@ -309,63 +331,69 @@ async function main(entries, options) { } if (require.main === module) { - - const options = yargs. - option('fix', { + const options = yargs + .option('fix', { describe: 'Accept all screenshots as accepted', type: 'boolean', - default: false - }). - option('host', { + default: false, + }) + .option('host', { describe: 'The host for serving rendering cases', - default: '127.0.0.1' - }). - option('port', { + default: '127.0.0.1', + }) + .option('port', { describe: 'The port for serving rendering cases', type: 'number', - default: 3000 - }). - option('match', { + default: 3000, + }) + .option('match', { describe: 'Only run tests matching the provided string RegExp pattern', - type: 'string' - }). - option('force', { + type: 'string', + }) + .option('force', { describe: 'Run all tests (instead of just outdated tests)', type: 'boolean', - default: false - }). - option('interactive', { - describe: 'Run all tests and keep the test server running (this option will be reworked later)', + default: false, + }) + .option('interactive', { + describe: + 'Run all tests and keep the test server running (this option will be reworked later)', type: 'boolean', - default: false - }). - option('log-level', { + default: false, + }) + .option('log-level', { describe: 'The level for logging', choices: ['trace', 'debug', 'info', 'warn', 'error', 'silent'], - default: 'error' - }). - option('timeout', { + default: 'error', + }) + .option('timeout', { describe: 'The timeout for loading pages (in milliseconds)', type: 'number', - default: 60000 - }). - option('headless', { + default: 60000, + }) + .option('headless', { describe: 'Launch Puppeteer in headless mode', type: 'boolean', - default: false - }). - option('puppeteer-args', { + default: false, + }) + .option('puppeteer-args', { describe: 'Additional args for Puppeteer', type: 'array', - default: process.env.CI ? ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'] : [] - }). - parse(); + default: process.env.CI + ? [ + '--no-sandbox', + '--disable-setuid-sandbox', + '--disable-dev-shm-usage', + ] + : [], + }) + .parse(); - const entries = Object.keys(config.entry).map(key => config.entry[key]); + const entries = Object.keys(config.entry).map((key) => config.entry[key]); options.log = log.create({name: 'rendering', level: options.logLevel}); - main(entries, options).catch(err => { + main(entries, options).catch((err) => { options.log.error(err.message); process.exit(1); }); diff --git a/rendering/webpack.config.js b/rendering/webpack.config.js index 64fbb63861..42836e49d7 100644 --- a/rendering/webpack.config.js +++ b/rendering/webpack.config.js @@ -3,7 +3,7 @@ const path = require('path'); const cases = path.join(__dirname, 'cases'); -const caseDirs = fs.readdirSync(cases).filter(name => { +const caseDirs = fs.readdirSync(cases).filter((name) => { let exists = true; try { fs.accessSync(path.join(cases, name, 'main.js')); @@ -14,7 +14,7 @@ const caseDirs = fs.readdirSync(cases).filter(name => { }); const entry = {}; -caseDirs.forEach(c => { +caseDirs.forEach((c) => { entry[`cases/${c}/main`] = `./cases/${c}/main.js`; }); @@ -24,14 +24,14 @@ module.exports = { entry: entry, devtool: 'source-map', module: { - rules: [{ - test: /\.js$/, - use: { - loader: path.join(__dirname, '../examples/webpack/worker-loader.js') + rules: [ + { + test: /\.js$/, + use: { + loader: path.join(__dirname, '../examples/webpack/worker-loader.js'), + }, + include: [path.join(__dirname, '../src/ol/worker')], }, - include: [ - path.join(__dirname, '../src/ol/worker') - ] - }] - } + ], + }, }; diff --git a/src/ol/AssertionError.js b/src/ol/AssertionError.js index 0e49b0ee98..19f70e16a5 100644 --- a/src/ol/AssertionError.js +++ b/src/ol/AssertionError.js @@ -9,14 +9,17 @@ import {VERSION} from './util.js'; * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error. */ class AssertionError extends Error { - /** * @param {number} code Error code. */ constructor(code) { const path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0]; - const message = 'Assertion failed. See https://openlayers.org/en/' + path + - '/doc/errors/#' + code + ' for details.'; + const message = + 'Assertion failed. See https://openlayers.org/en/' + + path + + '/doc/errors/#' + + code + + ' for details.'; super(message); @@ -38,7 +41,6 @@ class AssertionError extends Error { // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40 this.message = message; } - } export default AssertionError; diff --git a/src/ol/Collection.js b/src/ol/Collection.js index bf5f0f9183..d2b90afb04 100644 --- a/src/ol/Collection.js +++ b/src/ol/Collection.js @@ -2,27 +2,24 @@ * @module ol/Collection */ import AssertionError from './AssertionError.js'; -import CollectionEventType from './CollectionEventType.js'; import BaseObject from './Object.js'; +import CollectionEventType from './CollectionEventType.js'; import Event from './events/Event.js'; - /** * @enum {string} * @private */ const Property = { - LENGTH: 'length' + LENGTH: 'length', }; - /** * @classdesc * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this * type. */ export class CollectionEvent extends Event { - /** * @param {CollectionEventType} type Type. * @param {*=} opt_element Element. @@ -45,10 +42,8 @@ export class CollectionEvent extends Event { */ this.index = opt_index; } - } - /** * @typedef {Object} Options * @property {boolean} [unique=false] Disallow the same item from being added to @@ -69,13 +64,11 @@ export class CollectionEvent extends Event { * @api */ class Collection extends BaseObject { - /** * @param {Array=} opt_array Array. * @param {Options=} opt_options Collection options. */ constructor(opt_array, opt_options) { - super(); const options = opt_options || {}; @@ -99,7 +92,6 @@ class Collection extends BaseObject { } this.updateLength_(); - } /** @@ -185,7 +177,8 @@ class Collection extends BaseObject { this.array_.splice(index, 0, elem); this.updateLength_(); this.dispatchEvent( - new CollectionEvent(CollectionEventType.ADD, elem, index)); + new CollectionEvent(CollectionEventType.ADD, elem, index) + ); } /** @@ -240,7 +233,9 @@ class Collection extends BaseObject { const prev = this.array_[index]; this.array_.splice(index, 1); this.updateLength_(); - this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev, index)); + this.dispatchEvent( + new CollectionEvent(CollectionEventType.REMOVE, prev, index) + ); return prev; } @@ -259,9 +254,11 @@ class Collection extends BaseObject { const prev = this.array_[index]; this.array_[index] = elem; this.dispatchEvent( - new CollectionEvent(CollectionEventType.REMOVE, prev, index)); + new CollectionEvent(CollectionEventType.REMOVE, prev, index) + ); this.dispatchEvent( - new CollectionEvent(CollectionEventType.ADD, elem, index)); + new CollectionEvent(CollectionEventType.ADD, elem, index) + ); } else { for (let j = n; j < index; ++j) { this.insertAt(j, undefined); @@ -291,5 +288,4 @@ class Collection extends BaseObject { } } - export default Collection; diff --git a/src/ol/CollectionEventType.js b/src/ol/CollectionEventType.js index a54821b67f..91a20c1c8c 100644 --- a/src/ol/CollectionEventType.js +++ b/src/ol/CollectionEventType.js @@ -17,5 +17,5 @@ export default { * @event module:ol/Collection.CollectionEvent#remove * @api */ - REMOVE: 'remove' + REMOVE: 'remove', }; diff --git a/src/ol/Disposable.js b/src/ol/Disposable.js index d7800fa2b8..4af7978487 100644 --- a/src/ol/Disposable.js +++ b/src/ol/Disposable.js @@ -7,7 +7,6 @@ * Objects that need to clean up after themselves. */ class Disposable { - constructor() { /** * The object has already been disposed. diff --git a/src/ol/Feature.js b/src/ol/Feature.js index 7246a0a118..590094057f 100644 --- a/src/ol/Feature.js +++ b/src/ol/Feature.js @@ -1,10 +1,10 @@ /** * @module ol/Feature */ +import BaseObject, {getChangeEventType} from './Object.js'; +import EventType from './events/EventType.js'; import {assert} from './asserts.js'; import {listen, unlistenByKey} from './events.js'; -import EventType from './events/EventType.js'; -import BaseObject, {getChangeEventType} from './Object.js'; /** * @typedef {typeof Feature|typeof import("./render/Feature.js").default} FeatureClass @@ -67,7 +67,6 @@ class Feature extends BaseObject { * associated with a `geometry` key. */ constructor(opt_geometryOrProperties) { - super(); /** @@ -101,10 +100,17 @@ class Feature extends BaseObject { */ this.geometryChangeKey_ = null; - this.addEventListener(getChangeEventType(this.geometryName_), this.handleGeometryChanged_); + this.addEventListener( + getChangeEventType(this.geometryName_), + this.handleGeometryChanged_ + ); if (opt_geometryOrProperties) { - if (typeof /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry === 'function') { + if ( + typeof ( + /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry + ) === 'function' + ) { const geometry = /** @type {Geometry} */ (opt_geometryOrProperties); this.setGeometry(geometry); } else { @@ -144,9 +150,7 @@ class Feature extends BaseObject { * @observable */ getGeometry() { - return ( - /** @type {Geometry|undefined} */ (this.get(this.geometryName_)) - ); + return /** @type {Geometry|undefined} */ (this.get(this.geometryName_)); } /** @@ -208,8 +212,12 @@ class Feature extends BaseObject { } const geometry = this.getGeometry(); if (geometry) { - this.geometryChangeKey_ = listen(geometry, - EventType.CHANGE, this.handleGeometryChange_, this); + this.geometryChangeKey_ = listen( + geometry, + EventType.CHANGE, + this.handleGeometryChange_, + this + ); } this.changed(); } @@ -261,14 +269,19 @@ class Feature extends BaseObject { * @api */ setGeometryName(name) { - this.removeEventListener(getChangeEventType(this.geometryName_), this.handleGeometryChanged_); + this.removeEventListener( + getChangeEventType(this.geometryName_), + this.handleGeometryChanged_ + ); this.geometryName_ = name; - this.addEventListener(getChangeEventType(this.geometryName_), this.handleGeometryChanged_); + this.addEventListener( + getChangeEventType(this.geometryName_), + this.handleGeometryChanged_ + ); this.handleGeometryChanged_(); } } - /** * Convert the provided object into a feature style function. Functions passed * through unchanged. Arrays of Style or single style objects wrapped @@ -288,12 +301,11 @@ export function createStyleFunction(obj) { if (Array.isArray(obj)) { styles = obj; } else { - assert(typeof /** @type {?} */ (obj).getZIndex === 'function', - 41); // Expected an `import("./style/Style.js").Style` or an array of `import("./style/Style.js").Style` + assert(typeof (/** @type {?} */ (obj).getZIndex) === 'function', 41); // Expected an `import("./style/Style.js").Style` or an array of `import("./style/Style.js").Style` const style = /** @type {import("./style/Style.js").default} */ (obj); styles = [style]; } - return function() { + return function () { return styles; }; } diff --git a/src/ol/Geolocation.js b/src/ol/Geolocation.js index 094148bb94..1ded94d821 100644 --- a/src/ol/Geolocation.js +++ b/src/ol/Geolocation.js @@ -1,13 +1,16 @@ /** * @module ol/Geolocation */ -import BaseObject, {getChangeEventType} from './Object.js'; import BaseEvent from './events/Event.js'; +import BaseObject, {getChangeEventType} from './Object.js'; import EventType from './events/EventType.js'; import {circular as circularPolygon} from './geom/Polygon.js'; +import { + get as getProjection, + getTransformFromProjections, + identityTransform, +} from './proj.js'; import {toRadians} from './math.js'; -import {get as getProjection, getTransformFromProjections, identityTransform} from './proj.js'; - /** * @enum {string} @@ -22,10 +25,9 @@ const Property = { PROJECTION: 'projection', SPEED: 'speed', TRACKING: 'tracking', - TRACKING_OPTIONS: 'trackingOptions' + TRACKING_OPTIONS: 'trackingOptions', }; - /** * @classdesc * Events emitted on Geolocation error. @@ -49,7 +51,6 @@ class GeolocationError extends BaseEvent { } } - /** * @typedef {Object} Options * @property {boolean} [tracking=false] Start Tracking right after @@ -60,7 +61,6 @@ class GeolocationError extends BaseEvent { * is reported in. */ - /** * @classdesc * Helper class for providing HTML5 Geolocation capabilities. @@ -85,12 +85,10 @@ class GeolocationError extends BaseEvent { * @api */ class Geolocation extends BaseObject { - /** * @param {Options=} opt_options Options. */ constructor(opt_options) { - super(); const options = opt_options || {}; @@ -114,8 +112,14 @@ class Geolocation extends BaseObject { */ this.watchId_ = undefined; - this.addEventListener(getChangeEventType(Property.PROJECTION), this.handleProjectionChanged_); - this.addEventListener(getChangeEventType(Property.TRACKING), this.handleTrackingChanged_); + this.addEventListener( + getChangeEventType(Property.PROJECTION), + this.handleProjectionChanged_ + ); + this.addEventListener( + getChangeEventType(Property.TRACKING), + this.handleTrackingChanged_ + ); if (options.projection !== undefined) { this.setProjection(options.projection); @@ -125,7 +129,6 @@ class Geolocation extends BaseObject { } this.setTracking(options.tracking !== undefined ? options.tracking : false); - } /** @@ -143,7 +146,9 @@ class Geolocation extends BaseObject { const projection = this.getProjection(); if (projection) { this.transform_ = getTransformFromProjections( - getProjection('EPSG:4326'), projection); + getProjection('EPSG:4326'), + projection + ); if (this.position_) { this.set(Property.POSITION, this.transform_(this.position_)); } @@ -160,7 +165,8 @@ class Geolocation extends BaseObject { this.watchId_ = navigator.geolocation.watchPosition( this.positionChange_.bind(this), this.positionError_.bind(this), - this.getTrackingOptions()); + this.getTrackingOptions() + ); } else if (!tracking && this.watchId_ !== undefined) { navigator.geolocation.clearWatch(this.watchId_); this.watchId_ = undefined; @@ -175,13 +181,18 @@ class Geolocation extends BaseObject { positionChange_(position) { const coords = position.coords; this.set(Property.ACCURACY, coords.accuracy); - this.set(Property.ALTITUDE, - coords.altitude === null ? undefined : coords.altitude); - this.set(Property.ALTITUDE_ACCURACY, - coords.altitudeAccuracy === null ? - undefined : coords.altitudeAccuracy); - this.set(Property.HEADING, coords.heading === null ? - undefined : toRadians(coords.heading)); + this.set( + Property.ALTITUDE, + coords.altitude === null ? undefined : coords.altitude + ); + this.set( + Property.ALTITUDE_ACCURACY, + coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy + ); + this.set( + Property.HEADING, + coords.heading === null ? undefined : toRadians(coords.heading) + ); if (!this.position_) { this.position_ = [coords.longitude, coords.latitude]; } else { @@ -190,8 +201,7 @@ class Geolocation extends BaseObject { } const projectedPosition = this.transform_(this.position_); this.set(Property.POSITION, projectedPosition); - this.set(Property.SPEED, - coords.speed === null ? undefined : coords.speed); + this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed); const geometry = circularPolygon(this.position_, coords.accuracy); geometry.applyTransform(this.transform_); this.set(Property.ACCURACY_GEOMETRY, geometry); @@ -225,9 +235,9 @@ class Geolocation extends BaseObject { * @api */ getAccuracyGeometry() { - return ( - /** @type {?import("./geom/Polygon.js").default} */ (this.get(Property.ACCURACY_GEOMETRY) || null) - ); + return /** @type {?import("./geom/Polygon.js").default} */ (this.get( + Property.ACCURACY_GEOMETRY + ) || null); } /** @@ -249,7 +259,9 @@ class Geolocation extends BaseObject { * @api */ getAltitudeAccuracy() { - return /** @type {number|undefined} */ (this.get(Property.ALTITUDE_ACCURACY)); + return /** @type {number|undefined} */ (this.get( + Property.ALTITUDE_ACCURACY + )); } /** @@ -272,9 +284,9 @@ class Geolocation extends BaseObject { * @api */ getPosition() { - return ( - /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get(Property.POSITION)) - ); + return /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get( + Property.POSITION + )); } /** @@ -285,9 +297,9 @@ class Geolocation extends BaseObject { * @api */ getProjection() { - return ( - /** @type {import("./proj/Projection.js").default|undefined} */ (this.get(Property.PROJECTION)) - ); + return /** @type {import("./proj/Projection.js").default|undefined} */ (this.get( + Property.PROJECTION + )); } /** @@ -321,7 +333,9 @@ class Geolocation extends BaseObject { * @api */ getTrackingOptions() { - return /** @type {PositionOptions|undefined} */ (this.get(Property.TRACKING_OPTIONS)); + return /** @type {PositionOptions|undefined} */ (this.get( + Property.TRACKING_OPTIONS + )); } /** @@ -359,5 +373,4 @@ class Geolocation extends BaseObject { } } - export default Geolocation; diff --git a/src/ol/Image.js b/src/ol/Image.js index d8f9cbb09c..a40663eb44 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -1,13 +1,12 @@ /** * @module ol/Image */ +import EventType from './events/EventType.js'; import ImageBase from './ImageBase.js'; import ImageState from './ImageState.js'; -import {listenOnce, unlistenByKey} from './events.js'; -import EventType from './events/EventType.js'; -import {getHeight} from './extent.js'; import {IMAGE_DECODE} from './has.js'; - +import {getHeight} from './extent.js'; +import {listenOnce, unlistenByKey} from './events.js'; /** * A function that takes an {@link module:ol/Image~Image} for the image and a @@ -27,9 +26,7 @@ import {IMAGE_DECODE} from './has.js'; * @api */ - class ImageWrapper extends ImageBase { - /** * @param {import("./extent.js").Extent} extent Extent. * @param {number|undefined} resolution Resolution. @@ -38,8 +35,14 @@ class ImageWrapper extends ImageBase { * @param {?string} crossOrigin Cross origin. * @param {LoadFunction} imageLoadFunction Image load function. */ - constructor(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) { - + constructor( + extent, + resolution, + pixelRatio, + src, + crossOrigin, + imageLoadFunction + ) { super(extent, resolution, pixelRatio, ImageState.IDLE); /** @@ -74,7 +77,6 @@ class ImageWrapper extends ImageBase { * @type {LoadFunction} */ this.imageLoadFunction_ = imageLoadFunction; - } /** @@ -161,35 +163,39 @@ export function listenImage(image, loadHandler, errorHandler) { if (img.src && IMAGE_DECODE) { const promise = img.decode(); let listening = true; - const unlisten = function() { + const unlisten = function () { listening = false; }; - promise.then(function() { - if (listening) { - loadHandler(); - } - }).catch(function(error) { - if (listening) { - // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream: - // https://bugs.webkit.org/show_bug.cgi?id=198527 - if (error.name === 'EncodingError' && error.message === 'Invalid image type.') { + promise + .then(function () { + if (listening) { loadHandler(); - } else { - errorHandler(); } - } - }); + }) + .catch(function (error) { + if (listening) { + // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream: + // https://bugs.webkit.org/show_bug.cgi?id=198527 + if ( + error.name === 'EncodingError' && + error.message === 'Invalid image type.' + ) { + loadHandler(); + } else { + errorHandler(); + } + } + }); return unlisten; } const listenerKeys = [ listenOnce(img, EventType.LOAD, loadHandler), - listenOnce(img, EventType.ERROR, errorHandler) + listenOnce(img, EventType.ERROR, errorHandler), ]; return function unlisten() { listenerKeys.forEach(unlistenByKey); }; } - export default ImageWrapper; diff --git a/src/ol/ImageBase.js b/src/ol/ImageBase.js index 2ec8c6393b..8a6dbfe7c6 100644 --- a/src/ol/ImageBase.js +++ b/src/ol/ImageBase.js @@ -1,15 +1,14 @@ /** * @module ol/ImageBase */ -import {abstract} from './util.js'; import EventTarget from './events/Target.js'; import EventType from './events/EventType.js'; +import {abstract} from './util.js'; /** * @abstract */ class ImageBase extends EventTarget { - /** * @param {import("./extent.js").Extent} extent Extent. * @param {number|undefined} resolution Resolution. @@ -17,7 +16,6 @@ class ImageBase extends EventTarget { * @param {import("./ImageState.js").default} state State. */ constructor(extent, resolution, pixelRatio, state) { - super(); /** @@ -43,7 +41,6 @@ class ImageBase extends EventTarget { * @type {import("./ImageState.js").default} */ this.state = state; - } /** @@ -98,5 +95,4 @@ class ImageBase extends EventTarget { } } - export default ImageBase; diff --git a/src/ol/ImageCanvas.js b/src/ol/ImageCanvas.js index 599beac831..d6893b9ac2 100644 --- a/src/ol/ImageCanvas.js +++ b/src/ol/ImageCanvas.js @@ -4,7 +4,6 @@ import ImageBase from './ImageBase.js'; import ImageState from './ImageState.js'; - /** * A function that is called to trigger asynchronous canvas drawing. It is * called with a "done" callback that should be called when drawing is done. @@ -14,9 +13,7 @@ import ImageState from './ImageState.js'; * @typedef {function(function(Error=): void): void} Loader */ - class ImageCanvas extends ImageBase { - /** * @param {import("./extent.js").Extent} extent Extent. * @param {number} resolution Resolution. @@ -26,8 +23,8 @@ class ImageCanvas extends ImageBase { * support asynchronous canvas drawing. */ constructor(extent, resolution, pixelRatio, canvas, opt_loader) { - - const state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED; + const state = + opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED; super(extent, resolution, pixelRatio, state); @@ -49,7 +46,6 @@ class ImageCanvas extends ImageBase { * @type {?Error} */ this.error_ = null; - } /** @@ -94,5 +90,4 @@ class ImageCanvas extends ImageBase { } } - export default ImageCanvas; diff --git a/src/ol/ImageState.js b/src/ol/ImageState.js index ab21220a27..e556bd1bb5 100644 --- a/src/ol/ImageState.js +++ b/src/ol/ImageState.js @@ -10,5 +10,5 @@ export default { LOADING: 1, LOADED: 2, ERROR: 3, - EMPTY: 4 + EMPTY: 4, }; diff --git a/src/ol/ImageTile.js b/src/ol/ImageTile.js index de3ad74440..34f37b9f46 100644 --- a/src/ol/ImageTile.js +++ b/src/ol/ImageTile.js @@ -6,9 +6,7 @@ import TileState from './TileState.js'; import {createCanvasContext2D} from './dom.js'; import {listenImage} from './Image.js'; - class ImageTile extends Tile { - /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @param {TileState} state State. @@ -17,8 +15,14 @@ class ImageTile extends Tile { * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. * @param {import("./Tile.js").Options=} opt_options Tile options. */ - constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) { - + constructor( + tileCoord, + state, + src, + crossOrigin, + tileLoadFunction, + opt_options + ) { super(tileCoord, state, opt_options); /** @@ -55,7 +59,6 @@ class ImageTile extends Tile { * @type {import("./Tile.js").LoadFunction} */ this.tileLoadFunction_ = tileLoadFunction; - } /** @@ -139,7 +142,6 @@ class ImageTile extends Tile { } } - /** * Get a 1-pixel blank image. * @return {HTMLCanvasElement} Blank image. diff --git a/src/ol/Kinetic.js b/src/ol/Kinetic.js index d80c34a36c..30dbcf14bf 100644 --- a/src/ol/Kinetic.js +++ b/src/ol/Kinetic.js @@ -9,7 +9,6 @@ * @api */ class Kinetic { - /** * @param {number} decay Rate of decay (must be negative). * @param {number} minVelocity Minimum velocity (pixels/millisecond). @@ -17,7 +16,6 @@ class Kinetic { * initial values (milliseconds). */ constructor(decay, minVelocity, delay) { - /** * @private * @type {number} diff --git a/src/ol/Map.js b/src/ol/Map.js index 794ddcebd3..b181d62dbe 100644 --- a/src/ol/Map.js +++ b/src/ol/Map.js @@ -1,11 +1,11 @@ /** * @module ol/Map */ +import CompositeMapRenderer from './renderer/Composite.js'; import PluggableMap from './PluggableMap.js'; +import {assign} from './obj.js'; import {defaults as defaultControls} from './control.js'; import {defaults as defaultInteractions} from './interaction.js'; -import {assign} from './obj.js'; -import CompositeMapRenderer from './renderer/Composite.js'; /** * @classdesc @@ -55,7 +55,6 @@ import CompositeMapRenderer from './renderer/Composite.js'; * @api */ class Map extends PluggableMap { - /** * @param {import("./PluggableMap.js").MapOptions} options Map options. */ @@ -76,5 +75,4 @@ class Map extends PluggableMap { } } - export default Map; diff --git a/src/ol/MapBrowserEvent.js b/src/ol/MapBrowserEvent.js index fe5f426052..2c19af0df1 100644 --- a/src/ol/MapBrowserEvent.js +++ b/src/ol/MapBrowserEvent.js @@ -9,7 +9,6 @@ import MapEvent from './MapEvent.js'; * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event. */ class MapBrowserEvent extends MapEvent { - /** * @param {string} type Event type. * @param {import("./PluggableMap.js").default} map Map. @@ -18,7 +17,6 @@ class MapBrowserEvent extends MapEvent { * @param {?import("./PluggableMap.js").FrameState=} opt_frameState Frame state. */ constructor(type, map, browserEvent, opt_dragging, opt_frameState) { - super(type, map, opt_frameState); /** @@ -49,7 +47,6 @@ class MapBrowserEvent extends MapEvent { * @api */ this.dragging = opt_dragging !== undefined ? opt_dragging : false; - } /** @@ -104,5 +101,4 @@ class MapBrowserEvent extends MapEvent { } } - export default MapBrowserEvent; diff --git a/src/ol/MapBrowserEventHandler.js b/src/ol/MapBrowserEventHandler.js index a1d2b67157..ac4095cb13 100644 --- a/src/ol/MapBrowserEventHandler.js +++ b/src/ol/MapBrowserEventHandler.js @@ -3,22 +3,20 @@ */ import 'elm-pep'; -import {DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS} from './has.js'; +import EventTarget from './events/Target.js'; +import EventType from './events/EventType.js'; import MapBrowserEventType from './MapBrowserEventType.js'; import MapBrowserPointerEvent from './MapBrowserPointerEvent.js'; -import {listen, unlistenByKey} from './events.js'; -import EventTarget from './events/Target.js'; import PointerEventType from './pointer/EventType.js'; -import EventType from './events/EventType.js'; +import {DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS} from './has.js'; +import {listen, unlistenByKey} from './events.js'; class MapBrowserEventHandler extends EventTarget { - /** * @param {import("./PluggableMap.js").default} map The map with the viewport to listen to events on. * @param {number=} moveTolerance The minimal distance the pointer must travel to trigger a move. */ constructor(map, moveTolerance) { - super(map); /** @@ -50,8 +48,9 @@ class MapBrowserEventHandler extends EventTarget { * @type {number} * @private */ - this.moveTolerance_ = moveTolerance ? - moveTolerance * DEVICE_PIXEL_RATIO : DEVICE_PIXEL_RATIO; + this.moveTolerance_ = moveTolerance + ? moveTolerance * DEVICE_PIXEL_RATIO + : DEVICE_PIXEL_RATIO; /** * The most recent "down" type event (or null if none have occurred). @@ -81,9 +80,12 @@ class MapBrowserEventHandler extends EventTarget { * @type {?import("./events.js").EventsKey} * @private */ - this.pointerdownListenerKey_ = listen(element, + this.pointerdownListenerKey_ = listen( + element, PointerEventType.POINTERDOWN, - this.handlePointerDown_, this); + this.handlePointerDown_, + this + ); /** * @type {PointerEvent} @@ -95,17 +97,23 @@ class MapBrowserEventHandler extends EventTarget { * @type {?import("./events.js").EventsKey} * @private */ - this.relayedListenerKey_ = listen(element, + this.relayedListenerKey_ = listen( + element, PointerEventType.POINTERMOVE, - this.relayEvent_, this); + this.relayEvent_, + this + ); /** * @private */ this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this); - this.element_.addEventListener(EventType.TOUCHMOVE, this.boundHandleTouchMove_, - PASSIVE_EVENT_LISTENERS ? {passive: false} : false); + this.element_.addEventListener( + EventType.TOUCHMOVE, + this.boundHandleTouchMove_, + PASSIVE_EVENT_LISTENERS ? {passive: false} : false + ); } /** @@ -115,23 +123,35 @@ class MapBrowserEventHandler extends EventTarget { */ emulateClick_(pointerEvent) { let newEvent = new MapBrowserPointerEvent( - MapBrowserEventType.CLICK, this.map_, pointerEvent); + MapBrowserEventType.CLICK, + this.map_, + pointerEvent + ); this.dispatchEvent(newEvent); if (this.clickTimeoutId_ !== undefined) { // double-click clearTimeout(this.clickTimeoutId_); this.clickTimeoutId_ = undefined; newEvent = new MapBrowserPointerEvent( - MapBrowserEventType.DBLCLICK, this.map_, pointerEvent); + MapBrowserEventType.DBLCLICK, + this.map_, + pointerEvent + ); this.dispatchEvent(newEvent); } else { // click - this.clickTimeoutId_ = setTimeout(function() { - this.clickTimeoutId_ = undefined; - const newEvent = new MapBrowserPointerEvent( - MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent); - this.dispatchEvent(newEvent); - }.bind(this), 250); + this.clickTimeoutId_ = setTimeout( + function () { + this.clickTimeoutId_ = undefined; + const newEvent = new MapBrowserPointerEvent( + MapBrowserEventType.SINGLECLICK, + this.map_, + pointerEvent + ); + this.dispatchEvent(newEvent); + }.bind(this), + 250 + ); } } @@ -145,8 +165,10 @@ class MapBrowserEventHandler extends EventTarget { updateActivePointers_(pointerEvent) { const event = pointerEvent; - if (event.type == MapBrowserEventType.POINTERUP || - event.type == MapBrowserEventType.POINTERCANCEL) { + if ( + event.type == MapBrowserEventType.POINTERUP || + event.type == MapBrowserEventType.POINTERCANCEL + ) { delete this.trackedTouches_[event.pointerId]; } else if (event.type == MapBrowserEventType.POINTERDOWN) { this.trackedTouches_[event.pointerId] = true; @@ -162,7 +184,10 @@ class MapBrowserEventHandler extends EventTarget { handlePointerUp_(pointerEvent) { this.updateActivePointers_(pointerEvent); const newEvent = new MapBrowserPointerEvent( - MapBrowserEventType.POINTERUP, this.map_, pointerEvent); + MapBrowserEventType.POINTERUP, + this.map_, + pointerEvent + ); this.dispatchEvent(newEvent); // We emulate click events on left mouse button click, touch contact, and pen @@ -171,7 +196,11 @@ class MapBrowserEventHandler extends EventTarget { // See http://www.w3.org/TR/pointerevents/#button-states // We only fire click, singleclick, and doubleclick if nobody has called // event.stopPropagation() or event.preventDefault(). - if (!newEvent.propagationStopped && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) { + if ( + !newEvent.propagationStopped && + !this.dragging_ && + this.isMouseActionButton_(pointerEvent) + ) { this.emulateClick_(this.down_); } @@ -201,19 +230,28 @@ class MapBrowserEventHandler extends EventTarget { handlePointerDown_(pointerEvent) { this.updateActivePointers_(pointerEvent); const newEvent = new MapBrowserPointerEvent( - MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent); + MapBrowserEventType.POINTERDOWN, + this.map_, + pointerEvent + ); this.dispatchEvent(newEvent); this.down_ = pointerEvent; if (this.dragListenerKeys_.length === 0) { this.dragListenerKeys_.push( - listen(document, + listen( + document, MapBrowserEventType.POINTERMOVE, - this.handlePointerMove_, this), - listen(document, + this.handlePointerMove_, + this + ), + listen( + document, MapBrowserEventType.POINTERUP, - this.handlePointerUp_, this), + this.handlePointerUp_, + this + ), /* Note that the listener for `pointercancel is set up on * `pointerEventHandler_` and not `documentPointerEventHandler_` like * the `pointerup` and `pointermove` listeners. @@ -227,9 +265,12 @@ class MapBrowserEventHandler extends EventTarget { * only receive a `touchcancel` from `pointerEventHandler_`, because it is * only registered there. */ - listen(this.element_, + listen( + this.element_, MapBrowserEventType.POINTERCANCEL, - this.handlePointerUp_, this) + this.handlePointerUp_, + this + ) ); } } @@ -246,8 +287,11 @@ class MapBrowserEventHandler extends EventTarget { if (this.isMoving_(pointerEvent)) { this.dragging_ = true; const newEvent = new MapBrowserPointerEvent( - MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent, - this.dragging_); + MapBrowserEventType.POINTERDRAG, + this.map_, + pointerEvent, + this.dragging_ + ); this.dispatchEvent(newEvent); } } @@ -262,8 +306,14 @@ class MapBrowserEventHandler extends EventTarget { relayEvent_(pointerEvent) { this.originalPointerMoveEvent_ = pointerEvent; const dragging = !!(this.down_ && this.isMoving_(pointerEvent)); - this.dispatchEvent(new MapBrowserPointerEvent( - pointerEvent.type, this.map_, pointerEvent, dragging)); + this.dispatchEvent( + new MapBrowserPointerEvent( + pointerEvent.type, + this.map_, + pointerEvent, + dragging + ) + ); } /** @@ -277,7 +327,10 @@ class MapBrowserEventHandler extends EventTarget { handleTouchMove_(event) { // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_` // may not be initialized yet when we get here on a platform without native pointer events. - if (!this.originalPointerMoveEvent_ || this.originalPointerMoveEvent_.defaultPrevented) { + if ( + !this.originalPointerMoveEvent_ || + this.originalPointerMoveEvent_.defaultPrevented + ) { event.preventDefault(); } } @@ -289,9 +342,12 @@ class MapBrowserEventHandler extends EventTarget { * @private */ isMoving_(pointerEvent) { - return this.dragging_ || - Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ || - Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_; + return ( + this.dragging_ || + Math.abs(pointerEvent.clientX - this.down_.clientX) > + this.moveTolerance_ || + Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_ + ); } /** @@ -302,7 +358,10 @@ class MapBrowserEventHandler extends EventTarget { unlistenByKey(this.relayedListenerKey_); this.relayedListenerKey_ = null; } - this.element_.removeEventListener(EventType.TOUCHMOVE, this.boundHandleTouchMove_); + this.element_.removeEventListener( + EventType.TOUCHMOVE, + this.boundHandleTouchMove_ + ); if (this.pointerdownListenerKey_) { unlistenByKey(this.pointerdownListenerKey_); @@ -317,5 +376,4 @@ class MapBrowserEventHandler extends EventTarget { } } - export default MapBrowserEventHandler; diff --git a/src/ol/MapBrowserEventType.js b/src/ol/MapBrowserEventType.js index 75e0d84c21..d345607821 100644 --- a/src/ol/MapBrowserEventType.js +++ b/src/ol/MapBrowserEventType.js @@ -8,7 +8,6 @@ import EventType from './events/EventType.js'; * @enum {string} */ export default { - /** * A true single click with no dragging and no double click. Note that this * event is delayed by 250 ms to ensure that it is not a double click. @@ -52,5 +51,5 @@ export default { POINTEROUT: 'pointerout', POINTERENTER: 'pointerenter', POINTERLEAVE: 'pointerleave', - POINTERCANCEL: 'pointercancel' + POINTERCANCEL: 'pointercancel', }; diff --git a/src/ol/MapBrowserPointerEvent.js b/src/ol/MapBrowserPointerEvent.js index 3eadb83837..af501590a3 100644 --- a/src/ol/MapBrowserPointerEvent.js +++ b/src/ol/MapBrowserPointerEvent.js @@ -4,7 +4,6 @@ import MapBrowserEvent from './MapBrowserEvent.js'; class MapBrowserPointerEvent extends MapBrowserEvent { - /** * @param {string} type Event type. * @param {import("./PluggableMap.js").default} map Map. @@ -13,7 +12,6 @@ class MapBrowserPointerEvent extends MapBrowserEvent { * @param {?import("./PluggableMap.js").FrameState=} opt_frameState Frame state. */ constructor(type, map, pointerEvent, opt_dragging, opt_frameState) { - super(type, map, pointerEvent, opt_dragging, opt_frameState); /** @@ -21,9 +19,7 @@ class MapBrowserPointerEvent extends MapBrowserEvent { * @type {PointerEvent} */ this.pointerEvent = pointerEvent; - } - } export default MapBrowserPointerEvent; diff --git a/src/ol/MapEvent.js b/src/ol/MapEvent.js index 83a1ed9827..5722b3f681 100644 --- a/src/ol/MapEvent.js +++ b/src/ol/MapEvent.js @@ -9,14 +9,12 @@ import Event from './events/Event.js'; * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event. */ class MapEvent extends Event { - /** * @param {string} type Event type. * @param {import("./PluggableMap.js").default} map Map. * @param {?import("./PluggableMap.js").FrameState=} opt_frameState Frame state. */ constructor(type, map, opt_frameState) { - super(type); /** @@ -32,9 +30,7 @@ class MapEvent extends Event { * @api */ this.frameState = opt_frameState !== undefined ? opt_frameState : null; - } - } export default MapEvent; diff --git a/src/ol/MapEventType.js b/src/ol/MapEventType.js index 0f25adf5b9..1f919c3e38 100644 --- a/src/ol/MapEventType.js +++ b/src/ol/MapEventType.js @@ -6,7 +6,6 @@ * @enum {string} */ export default { - /** * Triggered after a map frame is rendered. * @event module:ol/MapEvent~MapEvent#postrender @@ -26,6 +25,5 @@ export default { * @event module:ol/MapEvent~MapEvent#moveend * @api */ - MOVEEND: 'moveend' - + MOVEEND: 'moveend', }; diff --git a/src/ol/MapProperty.js b/src/ol/MapProperty.js index fe940e027c..cca1044ed5 100644 --- a/src/ol/MapProperty.js +++ b/src/ol/MapProperty.js @@ -9,5 +9,5 @@ export default { LAYERGROUP: 'layergroup', SIZE: 'size', TARGET: 'target', - VIEW: 'view' + VIEW: 'view', }; diff --git a/src/ol/Object.js b/src/ol/Object.js index 8b243b3a4c..a462129c10 100644 --- a/src/ol/Object.js +++ b/src/ol/Object.js @@ -1,19 +1,17 @@ /** * @module ol/Object */ -import {getUid} from './util.js'; +import Event from './events/Event.js'; import ObjectEventType from './ObjectEventType.js'; import Observable from './Observable.js'; -import Event from './events/Event.js'; import {assign} from './obj.js'; - +import {getUid} from './util.js'; /** * @classdesc * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type. */ export class ObjectEvent extends Event { - /** * @param {string} type The event type. * @param {string} key The property name. @@ -36,12 +34,9 @@ export class ObjectEvent extends Event { * @api */ this.oldValue = oldValue; - } - } - /** * @classdesc * Abstract base class; normally only used for creating subclasses and not @@ -86,7 +81,6 @@ export class ObjectEvent extends Event { * @api */ class BaseObject extends Observable { - /** * @param {Object=} opt_values An object with key-value pairs. */ @@ -203,22 +197,19 @@ class BaseObject extends Observable { } } - /** * @type {Object} */ const changeEventTypeCache = {}; - /** * @param {string} key Key name. * @return {string} Change name. */ export function getChangeEventType(key) { - return changeEventTypeCache.hasOwnProperty(key) ? - changeEventTypeCache[key] : - (changeEventTypeCache[key] = 'change:' + key); + return changeEventTypeCache.hasOwnProperty(key) + ? changeEventTypeCache[key] + : (changeEventTypeCache[key] = 'change:' + key); } - export default BaseObject; diff --git a/src/ol/ObjectEventType.js b/src/ol/ObjectEventType.js index 1cfd272211..58dcb20f31 100644 --- a/src/ol/ObjectEventType.js +++ b/src/ol/ObjectEventType.js @@ -11,5 +11,5 @@ export default { * @event module:ol/Object.ObjectEvent#propertychange * @api */ - PROPERTYCHANGE: 'propertychange' + PROPERTYCHANGE: 'propertychange', }; diff --git a/src/ol/Observable.js b/src/ol/Observable.js index 347e131c73..f1cdd7b951 100644 --- a/src/ol/Observable.js +++ b/src/ol/Observable.js @@ -1,9 +1,9 @@ /** * @module ol/Observable */ -import {listen, unlistenByKey, listenOnce} from './events.js'; import EventTarget from './events/Target.js'; import EventType from './events/EventType.js'; +import {listen, listenOnce, unlistenByKey} from './events.js'; /** * @classdesc @@ -18,7 +18,6 @@ import EventType from './events/EventType.js'; */ class Observable extends EventTarget { constructor() { - super(); /** @@ -26,7 +25,6 @@ class Observable extends EventTarget { * @type {number} */ this.revision_ = 0; - } /** @@ -109,7 +107,6 @@ class Observable extends EventTarget { } } - /** * Removes an event listener using the key returned by `on()` or `once()`. * @param {import("./events.js").EventsKey|Array} key The key returned by `on()` @@ -126,5 +123,4 @@ export function unByKey(key) { } } - export default Observable; diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index c99aea8452..a4d7d22766 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -1,14 +1,13 @@ /** * @module ol/Overlay */ -import MapEventType from './MapEventType.js'; import BaseObject, {getChangeEventType} from './Object.js'; +import MapEventType from './MapEventType.js'; import OverlayPositioning from './OverlayPositioning.js'; import {CLASS_SELECTABLE} from './css.js'; -import {removeNode, removeChildren, outerWidth, outerHeight} from './dom.js'; -import {listen, unlistenByKey} from './events.js'; import {containsExtent} from './extent.js'; - +import {listen, unlistenByKey} from './events.js'; +import {outerHeight, outerWidth, removeChildren, removeNode} from './dom.js'; /** * @typedef {Object} Options @@ -56,7 +55,6 @@ import {containsExtent} from './extent.js'; * name. */ - /** * @typedef {Object} PanOptions * @property {number} [duration=1000] The duration of the animation in @@ -82,10 +80,9 @@ const Property = { MAP: 'map', OFFSET: 'offset', POSITION: 'position', - POSITIONING: 'positioning' + POSITIONING: 'positioning', }; - /** * @classdesc * An element to be displayed over the map and attached to a single map @@ -107,12 +104,10 @@ const Property = { * @api */ class Overlay extends BaseObject { - /** * @param {Options} options Overlay options. */ constructor(options) { - super(); /** @@ -131,8 +126,8 @@ class Overlay extends BaseObject { * @protected * @type {boolean} */ - this.insertFirst = options.insertFirst !== undefined ? - options.insertFirst : true; + this.insertFirst = + options.insertFirst !== undefined ? options.insertFirst : true; /** * @protected @@ -145,22 +140,24 @@ class Overlay extends BaseObject { * @type {HTMLElement} */ this.element = document.createElement('div'); - this.element.className = options.className !== undefined ? - options.className : 'ol-overlay-container ' + CLASS_SELECTABLE; + this.element.className = + options.className !== undefined + ? options.className + : 'ol-overlay-container ' + CLASS_SELECTABLE; this.element.style.position = 'absolute'; let autoPan = options.autoPan; - if (autoPan && ('object' !== typeof autoPan)) { + if (autoPan && 'object' !== typeof autoPan) { autoPan = { animation: options.autoPanAnimation, - margin: options.autoPanMargin + margin: options.autoPanMargin, }; } /** * @protected * @type {PanIntoViewOptions|false} */ - this.autoPan = /** @type {PanIntoViewOptions} */(autoPan) || false; + this.autoPan = /** @type {PanIntoViewOptions} */ (autoPan) || false; /** * @protected @@ -169,7 +166,7 @@ class Overlay extends BaseObject { */ this.rendered = { transform_: '', - visible: true + visible: true, }; /** @@ -178,11 +175,26 @@ class Overlay extends BaseObject { */ this.mapPostrenderListenerKey = null; - this.addEventListener(getChangeEventType(Property.ELEMENT), this.handleElementChanged); - this.addEventListener(getChangeEventType(Property.MAP), this.handleMapChanged); - this.addEventListener(getChangeEventType(Property.OFFSET), this.handleOffsetChanged); - this.addEventListener(getChangeEventType(Property.POSITION), this.handlePositionChanged); - this.addEventListener(getChangeEventType(Property.POSITIONING), this.handlePositioningChanged); + this.addEventListener( + getChangeEventType(Property.ELEMENT), + this.handleElementChanged + ); + this.addEventListener( + getChangeEventType(Property.MAP), + this.handleMapChanged + ); + this.addEventListener( + getChangeEventType(Property.OFFSET), + this.handleOffsetChanged + ); + this.addEventListener( + getChangeEventType(Property.POSITION), + this.handlePositionChanged + ); + this.addEventListener( + getChangeEventType(Property.POSITIONING), + this.handlePositioningChanged + ); if (options.element !== undefined) { this.setElement(options.element); @@ -190,14 +202,15 @@ class Overlay extends BaseObject { this.setOffset(options.offset !== undefined ? options.offset : [0, 0]); - this.setPositioning(options.positioning !== undefined ? - /** @type {OverlayPositioning} */ (options.positioning) : - OverlayPositioning.TOP_LEFT); + this.setPositioning( + options.positioning !== undefined + ? /** @type {OverlayPositioning} */ (options.positioning) + : OverlayPositioning.TOP_LEFT + ); if (options.position !== undefined) { this.setPosition(options.position); } - } /** @@ -227,9 +240,9 @@ class Overlay extends BaseObject { * @api */ getMap() { - return ( - /** @type {import("./PluggableMap.js").default|undefined} */ (this.get(Property.MAP)) - ); + return /** @type {import("./PluggableMap.js").default|undefined} */ (this.get( + Property.MAP + )); } /** @@ -250,9 +263,9 @@ class Overlay extends BaseObject { * @api */ getPosition() { - return ( - /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get(Property.POSITION)) - ); + return /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get( + Property.POSITION + )); } /** @@ -263,9 +276,7 @@ class Overlay extends BaseObject { * @api */ getPositioning() { - return ( - /** @type {OverlayPositioning} */ (this.get(Property.POSITIONING)) - ); + return /** @type {OverlayPositioning} */ (this.get(Property.POSITIONING)); } /** @@ -290,11 +301,16 @@ class Overlay extends BaseObject { } const map = this.getMap(); if (map) { - this.mapPostrenderListenerKey = listen(map, - MapEventType.POSTRENDER, this.render, this); + this.mapPostrenderListenerKey = listen( + map, + MapEventType.POSTRENDER, + this.render, + this + ); this.updatePixelPosition(); - const container = this.stopEvent ? - map.getOverlayContainerStopEvent() : map.getOverlayContainer(); + const container = this.stopEvent + ? map.getOverlayContainerStopEvent() + : map.getOverlayContainer(); if (this.insertFirst) { container.insertBefore(this.element, container.childNodes[0] || null); } else { @@ -402,9 +418,13 @@ class Overlay extends BaseObject { const mapRect = this.getRect(map.getTargetElement(), map.getSize()); const element = this.getElement(); - const overlayRect = this.getRect(element, [outerWidth(element), outerHeight(element)]); + const overlayRect = this.getRect(element, [ + outerWidth(element), + outerHeight(element), + ]); - const myMargin = (panIntoViewOptions.margin === undefined) ? 20 : panIntoViewOptions.margin; + const myMargin = + panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin; if (!containsExtent(mapRect, overlayRect)) { // the overlay is not completely inside the viewport, so pan the map const offsetLeft = overlayRect[0] - mapRect[0]; @@ -429,18 +449,17 @@ class Overlay extends BaseObject { } if (delta[0] !== 0 || delta[1] !== 0) { - const center = /** @type {import("./coordinate.js").Coordinate} */ (map.getView().getCenterInternal()); + const center = /** @type {import("./coordinate.js").Coordinate} */ (map + .getView() + .getCenterInternal()); const centerPx = map.getPixelFromCoordinateInternal(center); - const newCenterPx = [ - centerPx[0] + delta[0], - centerPx[1] + delta[1] - ]; + const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]]; const panOptions = panIntoViewOptions.animation || {}; map.getView().animateInternal({ center: map.getCoordinateFromPixelInternal(newCenterPx), duration: panOptions.duration, - easing: panOptions.easing + easing: panOptions.easing, }); } } @@ -457,12 +476,7 @@ class Overlay extends BaseObject { const box = element.getBoundingClientRect(); const offsetX = box.left + window.pageXOffset; const offsetY = box.top + window.pageYOffset; - return [ - offsetX, - offsetY, - offsetX + size[0], - offsetY + size[1] - ]; + return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]]; } /** @@ -522,22 +536,30 @@ class Overlay extends BaseObject { const y = Math.round(pixel[1] + offset[1]) + 'px'; let posX = '0%'; let posY = '0%'; - if (positioning == OverlayPositioning.BOTTOM_RIGHT || - positioning == OverlayPositioning.CENTER_RIGHT || - positioning == OverlayPositioning.TOP_RIGHT) { + if ( + positioning == OverlayPositioning.BOTTOM_RIGHT || + positioning == OverlayPositioning.CENTER_RIGHT || + positioning == OverlayPositioning.TOP_RIGHT + ) { posX = '-100%'; - } else if (positioning == OverlayPositioning.BOTTOM_CENTER || - positioning == OverlayPositioning.CENTER_CENTER || - positioning == OverlayPositioning.TOP_CENTER) { + } else if ( + positioning == OverlayPositioning.BOTTOM_CENTER || + positioning == OverlayPositioning.CENTER_CENTER || + positioning == OverlayPositioning.TOP_CENTER + ) { posX = '-50%'; } - if (positioning == OverlayPositioning.BOTTOM_LEFT || - positioning == OverlayPositioning.BOTTOM_CENTER || - positioning == OverlayPositioning.BOTTOM_RIGHT) { + if ( + positioning == OverlayPositioning.BOTTOM_LEFT || + positioning == OverlayPositioning.BOTTOM_CENTER || + positioning == OverlayPositioning.BOTTOM_RIGHT + ) { posY = '-100%'; - } else if (positioning == OverlayPositioning.CENTER_LEFT || - positioning == OverlayPositioning.CENTER_CENTER || - positioning == OverlayPositioning.CENTER_RIGHT) { + } else if ( + positioning == OverlayPositioning.CENTER_LEFT || + positioning == OverlayPositioning.CENTER_CENTER || + positioning == OverlayPositioning.CENTER_RIGHT + ) { posY = '-50%'; } const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`; @@ -558,5 +580,4 @@ class Overlay extends BaseObject { } } - export default Overlay; diff --git a/src/ol/OverlayPositioning.js b/src/ol/OverlayPositioning.js index b0584fe558..20706d1355 100644 --- a/src/ol/OverlayPositioning.js +++ b/src/ol/OverlayPositioning.js @@ -17,5 +17,5 @@ export default { CENTER_RIGHT: 'center-right', TOP_LEFT: 'top-left', TOP_CENTER: 'top-center', - TOP_RIGHT: 'top-right' + TOP_RIGHT: 'top-right', }; diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 51b1b5648d..bb9b8868bd 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -1,32 +1,44 @@ /** * @module ol/PluggableMap */ +import BaseObject, {getChangeEventType} from './Object.js'; import Collection from './Collection.js'; import CollectionEventType from './CollectionEventType.js'; +import EventType from './events/EventType.js'; +import LayerGroup from './layer/Group.js'; import MapBrowserEvent from './MapBrowserEvent.js'; import MapBrowserEventHandler from './MapBrowserEventHandler.js'; import MapBrowserEventType from './MapBrowserEventType.js'; import MapEvent from './MapEvent.js'; import MapEventType from './MapEventType.js'; import MapProperty from './MapProperty.js'; -import RenderEventType from './render/EventType.js'; -import BaseObject, {getChangeEventType} from './Object.js'; import ObjectEventType from './ObjectEventType.js'; +import RenderEventType from './render/EventType.js'; import TileQueue, {getTilePriority} from './TileQueue.js'; import View from './View.js'; import ViewHint from './ViewHint.js'; -import {assert} from './asserts.js'; -import {removeNode} from './dom.js'; -import {listen, unlistenByKey} from './events.js'; -import EventType from './events/EventType.js'; -import {clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js'; +import { + DEVICE_PIXEL_RATIO, + IMAGE_DECODE, + PASSIVE_EVENT_LISTENERS, +} from './has.js'; import {TRUE} from './functions.js'; -import {DEVICE_PIXEL_RATIO, IMAGE_DECODE, PASSIVE_EVENT_LISTENERS} from './has.js'; -import LayerGroup from './layer/Group.js'; +import { + apply as applyTransform, + create as createTransform, +} from './transform.js'; +import {assert} from './asserts.js'; +import { + clone, + createOrUpdateEmpty, + equals, + getForViewAndSize, + isEmpty, +} from './extent.js'; +import {fromUserCoordinate, toUserCoordinate} from './proj.js'; import {hasArea} from './size.js'; -import {create as createTransform, apply as applyTransform} from './transform.js'; -import {toUserCoordinate, fromUserCoordinate} from './proj.js'; - +import {listen, unlistenByKey} from './events.js'; +import {removeNode} from './dom.js'; /** * State of the current frame. Only `pixelRatio`, `time` and `viewState` should @@ -51,19 +63,16 @@ import {toUserCoordinate, fromUserCoordinate} from './proj.js'; * @property {!Object>} wantedTiles */ - /** * @typedef {Object} DeclutterItems * @property {Array<*>} items Declutter items of an executor. * @property {number} opacity Layer opacity. */ - /** * @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction */ - /** * @typedef {Object} AtPixelOptions * @property {undefined|function(import("./layer/Layer.js").default): boolean} [layerFilter] Layer filter @@ -77,7 +86,6 @@ import {toUserCoordinate, fromUserCoordinate} from './proj.js'; * +/- 1 world width. Works only if a projection is used that can be wrapped. */ - /** * @typedef {Object} MapOptionsInternal * @property {Collection} [controls] @@ -87,7 +95,6 @@ import {toUserCoordinate, fromUserCoordinate} from './proj.js'; * @property {Object} values */ - /** * Object literal with config options for the map. * @typedef {Object} MapOptions @@ -128,7 +135,6 @@ import {toUserCoordinate, fromUserCoordinate} from './proj.js'; * {@link module:ol/Map~Map#setView}. */ - /** * @fires import("./MapBrowserEvent.js").MapBrowserEvent * @fires import("./MapEvent.js").MapEvent @@ -138,12 +144,10 @@ import {toUserCoordinate, fromUserCoordinate} from './proj.js'; * @api */ class PluggableMap extends BaseObject { - /** * @param {MapOptions} options Map options. */ constructor(options) { - super(); const optionsInternal = createOptionsInternal(options); @@ -151,19 +155,21 @@ class PluggableMap extends BaseObject { /** @private */ this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this); - /** * @type {number} * @private */ - this.maxTilesLoading_ = options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16; + this.maxTilesLoading_ = + options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16; /** * @private * @type {number} */ - this.pixelRatio_ = options.pixelRatio !== undefined ? - options.pixelRatio : DEVICE_PIXEL_RATIO; + this.pixelRatio_ = + options.pixelRatio !== undefined + ? options.pixelRatio + : DEVICE_PIXEL_RATIO; /** * @private @@ -180,7 +186,7 @@ class PluggableMap extends BaseObject { /** * @private */ - this.animationDelay_ = function() { + this.animationDelay_ = function () { this.animationDelayKey_ = undefined; this.renderFrame_(Date.now()); }.bind(this); @@ -239,13 +245,13 @@ class PluggableMap extends BaseObject { * @type {!HTMLElement} */ this.viewport_ = document.createElement('div'); - this.viewport_.className = 'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : ''); + this.viewport_.className = + 'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : ''); this.viewport_.style.position = 'relative'; this.viewport_.style.overflow = 'hidden'; this.viewport_.style.width = '100%'; this.viewport_.style.height = '100%'; - /** * @private * @type {!HTMLElement} @@ -274,10 +280,16 @@ class PluggableMap extends BaseObject { * @private * @type {MapBrowserEventHandler} */ - this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, options.moveTolerance); + this.mapBrowserEventHandler_ = new MapBrowserEventHandler( + this, + options.moveTolerance + ); const handleMapBrowserEvent = this.handleMapBrowserEvent.bind(this); for (const key in MapBrowserEventType) { - this.mapBrowserEventHandler_.addEventListener(MapBrowserEventType[key], handleMapBrowserEvent); + this.mapBrowserEventHandler_.addEventListener( + MapBrowserEventType[key], + handleMapBrowserEvent + ); } /** @@ -293,9 +305,16 @@ class PluggableMap extends BaseObject { this.keyHandlerKeys_ = null; const handleBrowserEvent = this.handleBrowserEvent.bind(this); - this.viewport_.addEventListener(EventType.CONTEXTMENU, handleBrowserEvent, false); - this.viewport_.addEventListener(EventType.WHEEL, handleBrowserEvent, - PASSIVE_EVENT_LISTENERS ? {passive: false} : false); + this.viewport_.addEventListener( + EventType.CONTEXTMENU, + handleBrowserEvent, + false + ); + this.viewport_.addEventListener( + EventType.WHEEL, + handleBrowserEvent, + PASSIVE_EVENT_LISTENERS ? {passive: false} : false + ); /** * @type {Collection} @@ -346,12 +365,25 @@ class PluggableMap extends BaseObject { */ this.tileQueue_ = new TileQueue( this.getTilePriority.bind(this), - this.handleTileChange_.bind(this)); + this.handleTileChange_.bind(this) + ); - this.addEventListener(getChangeEventType(MapProperty.LAYERGROUP), this.handleLayerGroupChanged_); - this.addEventListener(getChangeEventType(MapProperty.VIEW), this.handleViewChanged_); - this.addEventListener(getChangeEventType(MapProperty.SIZE), this.handleSizeChanged_); - this.addEventListener(getChangeEventType(MapProperty.TARGET), this.handleTargetChanged_); + this.addEventListener( + getChangeEventType(MapProperty.LAYERGROUP), + this.handleLayerGroupChanged_ + ); + this.addEventListener( + getChangeEventType(MapProperty.VIEW), + this.handleViewChanged_ + ); + this.addEventListener( + getChangeEventType(MapProperty.SIZE), + this.handleSizeChanged_ + ); + this.addEventListener( + getChangeEventType(MapProperty.TARGET), + this.handleTargetChanged_ + ); // setProperties will trigger the rendering of the map if the map // is "defined" already. @@ -362,74 +394,89 @@ class PluggableMap extends BaseObject { * @param {import("./control/Control.js").default} control Control. * @this {PluggableMap} */ - function(control) { + function (control) { control.setMap(this); - }.bind(this)); + }.bind(this) + ); - this.controls.addEventListener(CollectionEventType.ADD, + this.controls.addEventListener( + CollectionEventType.ADD, /** * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. */ - function(event) { + function (event) { event.element.setMap(this); - }.bind(this)); + }.bind(this) + ); - this.controls.addEventListener(CollectionEventType.REMOVE, + this.controls.addEventListener( + CollectionEventType.REMOVE, /** * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. */ - function(event) { + function (event) { event.element.setMap(null); - }.bind(this)); + }.bind(this) + ); this.interactions.forEach( /** * @param {import("./interaction/Interaction.js").default} interaction Interaction. * @this {PluggableMap} */ - function(interaction) { + function (interaction) { interaction.setMap(this); - }.bind(this)); + }.bind(this) + ); - this.interactions.addEventListener(CollectionEventType.ADD, + this.interactions.addEventListener( + CollectionEventType.ADD, /** * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. */ - function(event) { + function (event) { event.element.setMap(this); - }.bind(this)); + }.bind(this) + ); - this.interactions.addEventListener(CollectionEventType.REMOVE, + this.interactions.addEventListener( + CollectionEventType.REMOVE, /** * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. */ - function(event) { + function (event) { event.element.setMap(null); - }.bind(this)); + }.bind(this) + ); this.overlays_.forEach(this.addOverlayInternal_.bind(this)); - this.overlays_.addEventListener(CollectionEventType.ADD, + this.overlays_.addEventListener( + CollectionEventType.ADD, /** * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. */ - function(event) { - this.addOverlayInternal_(/** @type {import("./Overlay.js").default} */ (event.element)); - }.bind(this)); + function (event) { + this.addOverlayInternal_( + /** @type {import("./Overlay.js").default} */ (event.element) + ); + }.bind(this) + ); - this.overlays_.addEventListener(CollectionEventType.REMOVE, + this.overlays_.addEventListener( + CollectionEventType.REMOVE, /** * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. */ - function(event) { + function (event) { const overlay = /** @type {import("./Overlay.js").default} */ (event.element); const id = overlay.getId(); if (id !== undefined) { delete this.overlayIdIndex_[id.toString()]; } event.element.setMap(null); - }.bind(this)); - + }.bind(this) + ); } /** @@ -502,8 +549,14 @@ class PluggableMap extends BaseObject { */ disposeInternal() { this.mapBrowserEventHandler_.dispose(); - this.viewport_.removeEventListener(EventType.CONTEXTMENU, this.boundHandleBrowserEvent_); - this.viewport_.removeEventListener(EventType.WHEEL, this.boundHandleBrowserEvent_); + this.viewport_.removeEventListener( + EventType.CONTEXTMENU, + this.boundHandleBrowserEvent_ + ); + this.viewport_.removeEventListener( + EventType.WHEEL, + this.boundHandleBrowserEvent_ + ); if (this.handleResize_ !== undefined) { removeEventListener(EventType.RESIZE, this.handleResize_, false); this.handleResize_ = undefined; @@ -537,14 +590,23 @@ class PluggableMap extends BaseObject { } const coordinate = this.getCoordinateFromPixelInternal(pixel); opt_options = opt_options !== undefined ? opt_options : {}; - const hitTolerance = opt_options.hitTolerance !== undefined ? - opt_options.hitTolerance * this.frameState_.pixelRatio : 0; - const layerFilter = opt_options.layerFilter !== undefined ? - opt_options.layerFilter : TRUE; + const hitTolerance = + opt_options.hitTolerance !== undefined + ? opt_options.hitTolerance * this.frameState_.pixelRatio + : 0; + const layerFilter = + opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE; const checkWrapped = opt_options.checkWrapped !== false; return this.renderer_.forEachFeatureAtCoordinate( - coordinate, this.frameState_, hitTolerance, checkWrapped, callback, null, - layerFilter, null); + coordinate, + this.frameState_, + hitTolerance, + checkWrapped, + callback, + null, + layerFilter, + null + ); } /** @@ -557,9 +619,13 @@ class PluggableMap extends BaseObject { */ getFeaturesAtPixel(pixel, opt_options) { const features = []; - this.forEachFeatureAtPixel(pixel, function(feature) { - features.push(feature); - }, opt_options); + this.forEachFeatureAtPixel( + pixel, + function (feature) { + features.push(feature); + }, + opt_options + ); return features; } @@ -589,10 +655,18 @@ class PluggableMap extends BaseObject { return; } const options = opt_options || {}; - const hitTolerance = options.hitTolerance !== undefined ? - options.hitTolerance * this.frameState_.pixelRatio : 0; + const hitTolerance = + options.hitTolerance !== undefined + ? options.hitTolerance * this.frameState_.pixelRatio + : 0; const layerFilter = options.layerFilter || TRUE; - return this.renderer_.forEachLayerAtPixel(pixel, this.frameState_, hitTolerance, callback, layerFilter); + return this.renderer_.forEachLayerAtPixel( + pixel, + this.frameState_, + hitTolerance, + callback, + layerFilter + ); } /** @@ -609,12 +683,21 @@ class PluggableMap extends BaseObject { } const coordinate = this.getCoordinateFromPixelInternal(pixel); opt_options = opt_options !== undefined ? opt_options : {}; - const layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE; - const hitTolerance = opt_options.hitTolerance !== undefined ? - opt_options.hitTolerance * this.frameState_.pixelRatio : 0; + const layerFilter = + opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE; + const hitTolerance = + opt_options.hitTolerance !== undefined + ? opt_options.hitTolerance * this.frameState_.pixelRatio + : 0; const checkWrapped = opt_options.checkWrapped !== false; return this.renderer_.hasFeatureAtCoordinate( - coordinate, this.frameState_, hitTolerance, checkWrapped, layerFilter, null); + coordinate, + this.frameState_, + hitTolerance, + checkWrapped, + layerFilter, + null + ); } /** @@ -644,13 +727,14 @@ class PluggableMap extends BaseObject { */ getEventPixel(event) { const viewportPosition = this.viewport_.getBoundingClientRect(); - const eventPosition = 'changedTouches' in event ? - /** @type {TouchEvent} */ (event).changedTouches[0] : - /** @type {MouseEvent} */ (event); + const eventPosition = + 'changedTouches' in event + ? /** @type {TouchEvent} */ (event).changedTouches[0] + : /** @type {MouseEvent} */ (event); return [ eventPosition.clientX - viewportPosition.left, - eventPosition.clientY - viewportPosition.top + eventPosition.clientY - viewportPosition.top, ]; } @@ -664,7 +748,9 @@ class PluggableMap extends BaseObject { * @api */ getTarget() { - return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET)); + return /** @type {HTMLElement|string|undefined} */ (this.get( + MapProperty.TARGET + )); } /** @@ -677,7 +763,9 @@ class PluggableMap extends BaseObject { getTargetElement() { const target = this.getTarget(); if (target !== undefined) { - return typeof target === 'string' ? document.getElementById(target) : target; + return typeof target === 'string' + ? document.getElementById(target) + : target; } else { return null; } @@ -691,7 +779,10 @@ class PluggableMap extends BaseObject { * @api */ getCoordinateFromPixel(pixel) { - return toUserCoordinate(this.getCoordinateFromPixelInternal(pixel), this.getView().getProjection()); + return toUserCoordinate( + this.getCoordinateFromPixelInternal(pixel), + this.getView().getProjection() + ); } /** @@ -705,7 +796,10 @@ class PluggableMap extends BaseObject { if (!frameState) { return null; } else { - return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice()); + return applyTransform( + frameState.pixelToCoordinateTransform, + pixel.slice() + ); } } @@ -761,9 +855,7 @@ class PluggableMap extends BaseObject { * @api */ getLayerGroup() { - return ( - /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP)) - ); + return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP)); } /** @@ -799,7 +891,10 @@ class PluggableMap extends BaseObject { * @api */ getPixelFromCoordinate(coordinate) { - const viewCoordinate = fromUserCoordinate(coordinate, this.getView().getProjection()); + const viewCoordinate = fromUserCoordinate( + coordinate, + this.getView().getProjection() + ); return this.getPixelFromCoordinateInternal(viewCoordinate); } @@ -814,7 +909,10 @@ class PluggableMap extends BaseObject { if (!frameState) { return null; } else { - return applyTransform(frameState.coordinateToPixelTransform, coordinate.slice(0, 2)); + return applyTransform( + frameState.coordinateToPixelTransform, + coordinate.slice(0, 2) + ); } } @@ -833,9 +931,9 @@ class PluggableMap extends BaseObject { * @api */ getSize() { - return ( - /** @type {import("./size.js").Size|undefined} */ (this.get(MapProperty.SIZE)) - ); + return /** @type {import("./size.js").Size|undefined} */ (this.get( + MapProperty.SIZE + )); } /** @@ -846,9 +944,7 @@ class PluggableMap extends BaseObject { * @api */ getView() { - return ( - /** @type {View} */ (this.get(MapProperty.VIEW)) - ); + return /** @type {View} */ (this.get(MapProperty.VIEW)); } /** @@ -890,7 +986,13 @@ class PluggableMap extends BaseObject { * @return {number} Tile priority. */ getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) { - return getTilePriority(this.frameState_, tile, tileSourceKey, tileCenter, tileResolution); + return getTilePriority( + this.frameState_, + tile, + tileSourceKey, + tileCenter, + tileResolution + ); } /** @@ -914,7 +1016,14 @@ class PluggableMap extends BaseObject { } const target = /** @type {Node} */ (mapBrowserEvent.originalEvent.target); if (!mapBrowserEvent.dragging) { - if (this.overlayContainerStopEvent_.contains(target) || !(document.body.contains(target) || this.viewport_.getRootNode && this.viewport_.getRootNode().contains(target))) { + if ( + this.overlayContainerStopEvent_.contains(target) || + !( + document.body.contains(target) || + (this.viewport_.getRootNode && + this.viewport_.getRootNode().contains(target)) + ) + ) { // Abort if the event target is a child of the container that doesn't allow // event propagation or is no longer in the page. It's possible for the target to no longer // be in the page if it has been removed in an event listener, this might happen in a Control @@ -943,7 +1052,6 @@ class PluggableMap extends BaseObject { * @protected */ handlePostRender() { - const frameState = this.frameState_; // Manage the tile queue @@ -962,7 +1070,8 @@ class PluggableMap extends BaseObject { if (frameState) { const hints = frameState.viewHints; if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) { - const lowOnFrameBudget = !IMAGE_DECODE && Date.now() - frameState.time > 8; + const lowOnFrameBudget = + !IMAGE_DECODE && Date.now() - frameState.time > 8; maxTotalLoading = lowOnFrameBudget ? 0 : 8; maxNewLoads = lowOnFrameBudget ? 0 : 2; } @@ -973,9 +1082,17 @@ class PluggableMap extends BaseObject { } } - if (frameState && this.hasListener(RenderEventType.RENDERCOMPLETE) && !frameState.animate && - !this.tileQueue_.getTilesLoading() && !this.getLoading()) { - this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState); + if ( + frameState && + this.hasListener(RenderEventType.RENDERCOMPLETE) && + !frameState.animate && + !this.tileQueue_.getTilesLoading() && + !this.getLoading() + ) { + this.renderer_.dispatchRenderEvent( + RenderEventType.RENDERCOMPLETE, + frameState + ); } const postRenderFunctions = this.postRenderFunctions_; @@ -1039,11 +1156,22 @@ class PluggableMap extends BaseObject { this.renderer_ = this.createRenderer(); } - const keyboardEventTarget = !this.keyboardEventTarget_ ? - targetElement : this.keyboardEventTarget_; + const keyboardEventTarget = !this.keyboardEventTarget_ + ? targetElement + : this.keyboardEventTarget_; this.keyHandlerKeys_ = [ - listen(keyboardEventTarget, EventType.KEYDOWN, this.handleBrowserEvent, this), - listen(keyboardEventTarget, EventType.KEYPRESS, this.handleBrowserEvent, this) + listen( + keyboardEventTarget, + EventType.KEYDOWN, + this.handleBrowserEvent, + this + ), + listen( + keyboardEventTarget, + EventType.KEYPRESS, + this.handleBrowserEvent, + this + ), ]; if (!this.handleResize_) { @@ -1088,11 +1216,17 @@ class PluggableMap extends BaseObject { this.updateViewportSize_(); this.viewPropertyListenerKey_ = listen( - view, ObjectEventType.PROPERTYCHANGE, - this.handleViewPropertyChanged_, this); + view, + ObjectEventType.PROPERTYCHANGE, + this.handleViewPropertyChanged_, + this + ); this.viewChangeListenerKey_ = listen( - view, EventType.CHANGE, - this.handleViewPropertyChanged_, this); + view, + EventType.CHANGE, + this.handleViewPropertyChanged_, + this + ); view.resolveConstraints(0); } @@ -1110,12 +1244,8 @@ class PluggableMap extends BaseObject { const layerGroup = this.getLayerGroup(); if (layerGroup) { this.layerGroupPropertyListenerKeys_ = [ - listen( - layerGroup, ObjectEventType.PROPERTYCHANGE, - this.render, this), - listen( - layerGroup, EventType.CHANGE, - this.render, this) + listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this), + listen(layerGroup, EventType.CHANGE, this.render, this), ]; } this.render(); @@ -1218,13 +1348,22 @@ class PluggableMap extends BaseObject { /** @type {?FrameState} */ let frameState = null; if (size !== undefined && hasArea(size) && view && view.isDef()) { - const viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined); + const viewHints = view.getHints( + this.frameState_ ? this.frameState_.viewHints : undefined + ); const viewState = view.getState(); frameState = { animate: false, coordinateToPixelTransform: this.coordinateToPixelTransform_, - declutterItems: previousFrameState ? previousFrameState.declutterItems : [], - extent: getForViewAndSize(viewState.center, viewState.resolution, viewState.rotation, size), + declutterItems: previousFrameState + ? previousFrameState.declutterItems + : [], + extent: getForViewAndSize( + viewState.center, + viewState.resolution, + viewState.rotation, + size + ), index: this.frameIndex_++, layerIndex: 0, layerStatesArray: this.getLayerGroup().getLayerStatesArray(), @@ -1237,7 +1376,7 @@ class PluggableMap extends BaseObject { usedTiles: {}, viewState: viewState, viewHints: viewHints, - wantedTiles: {} + wantedTiles: {}, }; } @@ -1248,34 +1387,44 @@ class PluggableMap extends BaseObject { if (frameState.animate) { this.render(); } - Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions); + Array.prototype.push.apply( + this.postRenderFunctions_, + frameState.postRenderFunctions + ); if (previousFrameState) { - const moveStart = !this.previousExtent_ || - (!isEmpty(this.previousExtent_) && - !equals(frameState.extent, this.previousExtent_)); + const moveStart = + !this.previousExtent_ || + (!isEmpty(this.previousExtent_) && + !equals(frameState.extent, this.previousExtent_)); if (moveStart) { this.dispatchEvent( - new MapEvent(MapEventType.MOVESTART, this, previousFrameState)); + new MapEvent(MapEventType.MOVESTART, this, previousFrameState) + ); this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_); } } - const idle = this.previousExtent_ && - !frameState.viewHints[ViewHint.ANIMATING] && - !frameState.viewHints[ViewHint.INTERACTING] && - !equals(frameState.extent, this.previousExtent_); + const idle = + this.previousExtent_ && + !frameState.viewHints[ViewHint.ANIMATING] && + !frameState.viewHints[ViewHint.INTERACTING] && + !equals(frameState.extent, this.previousExtent_); if (idle) { - this.dispatchEvent(new MapEvent(MapEventType.MOVEEND, this, frameState)); + this.dispatchEvent( + new MapEvent(MapEventType.MOVEEND, this, frameState) + ); clone(frameState.extent, this.previousExtent_); } } this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState)); - this.postRenderTimeoutHandle_ = setTimeout(this.handlePostRender.bind(this), 0); - + this.postRenderTimeoutHandle_ = setTimeout( + this.handlePostRender.bind(this), + 0 + ); } /** @@ -1333,15 +1482,15 @@ class PluggableMap extends BaseObject { const computedStyle = getComputedStyle(targetElement); this.setSize([ targetElement.offsetWidth - - parseFloat(computedStyle['borderLeftWidth']) - - parseFloat(computedStyle['paddingLeft']) - - parseFloat(computedStyle['paddingRight']) - - parseFloat(computedStyle['borderRightWidth']), + parseFloat(computedStyle['borderLeftWidth']) - + parseFloat(computedStyle['paddingLeft']) - + parseFloat(computedStyle['paddingRight']) - + parseFloat(computedStyle['borderRightWidth']), targetElement.offsetHeight - - parseFloat(computedStyle['borderTopWidth']) - - parseFloat(computedStyle['paddingTop']) - - parseFloat(computedStyle['paddingBottom']) - - parseFloat(computedStyle['borderBottomWidth']) + parseFloat(computedStyle['borderTopWidth']) - + parseFloat(computedStyle['paddingTop']) - + parseFloat(computedStyle['paddingBottom']) - + parseFloat(computedStyle['borderBottomWidth']), ]); } @@ -1360,7 +1509,7 @@ class PluggableMap extends BaseObject { if (computedStyle.width && computedStyle.height) { size = [ parseInt(computedStyle.width, 10), - parseInt(computedStyle.height, 10) + parseInt(computedStyle.height, 10), ]; } view.setViewportSize(size); @@ -1368,21 +1517,20 @@ class PluggableMap extends BaseObject { } } - /** * @param {MapOptions} options Map options. * @return {MapOptionsInternal} Internal map options. */ function createOptionsInternal(options) { - /** * @type {HTMLElement|Document} */ let keyboardEventTarget = null; if (options.keyboardEventTarget !== undefined) { - keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ? - document.getElementById(options.keyboardEventTarget) : - options.keyboardEventTarget; + keyboardEventTarget = + typeof options.keyboardEventTarget === 'string' + ? document.getElementById(options.keyboardEventTarget) + : options.keyboardEventTarget; } /** @@ -1390,22 +1538,27 @@ function createOptionsInternal(options) { */ const values = {}; - const layerGroup = options.layers && typeof /** @type {?} */ (options.layers).getLayers === 'function' ? - /** @type {LayerGroup} */ (options.layers) : new LayerGroup({layers: /** @type {Collection} */ (options.layers)}); + const layerGroup = + options.layers && + typeof (/** @type {?} */ (options.layers).getLayers) === 'function' + ? /** @type {LayerGroup} */ (options.layers) + : new LayerGroup({layers: /** @type {Collection} */ (options.layers)}); values[MapProperty.LAYERGROUP] = layerGroup; values[MapProperty.TARGET] = options.target; - values[MapProperty.VIEW] = options.view !== undefined ? - options.view : new View(); + values[MapProperty.VIEW] = + options.view !== undefined ? options.view : new View(); let controls; if (options.controls !== undefined) { if (Array.isArray(options.controls)) { controls = new Collection(options.controls.slice()); } else { - assert(typeof /** @type {?} */ (options.controls).getArray === 'function', - 47); // Expected `controls` to be an array or an `import("./Collection.js").Collection` + assert( + typeof (/** @type {?} */ (options.controls).getArray) === 'function', + 47 + ); // Expected `controls` to be an array or an `import("./Collection.js").Collection` controls = /** @type {Collection} */ (options.controls); } } @@ -1415,8 +1568,11 @@ function createOptionsInternal(options) { if (Array.isArray(options.interactions)) { interactions = new Collection(options.interactions.slice()); } else { - assert(typeof /** @type {?} */ (options.interactions).getArray === 'function', - 48); // Expected `interactions` to be an array or an `import("./Collection.js").Collection` + assert( + typeof (/** @type {?} */ (options.interactions).getArray) === + 'function', + 48 + ); // Expected `interactions` to be an array or an `import("./Collection.js").Collection` interactions = /** @type {Collection} */ (options.interactions); } } @@ -1426,8 +1582,10 @@ function createOptionsInternal(options) { if (Array.isArray(options.overlays)) { overlays = new Collection(options.overlays.slice()); } else { - assert(typeof /** @type {?} */ (options.overlays).getArray === 'function', - 49); // Expected `overlays` to be an array or an `import("./Collection.js").Collection` + assert( + typeof (/** @type {?} */ (options.overlays).getArray) === 'function', + 49 + ); // Expected `overlays` to be an array or an `import("./Collection.js").Collection` overlays = options.overlays; } } else { @@ -1439,8 +1597,7 @@ function createOptionsInternal(options) { interactions: interactions, keyboardEventTarget: keyboardEventTarget, overlays: overlays, - values: values + values: values, }; - } export default PluggableMap; diff --git a/src/ol/Tile.js b/src/ol/Tile.js index f49c97e616..2aa8bf6144 100644 --- a/src/ol/Tile.js +++ b/src/ol/Tile.js @@ -1,12 +1,11 @@ /** * @module ol/Tile */ -import TileState from './TileState.js'; -import {easeIn} from './easing.js'; import EventTarget from './events/Target.js'; import EventType from './events/EventType.js'; +import TileState from './TileState.js'; import {abstract} from './util.js'; - +import {easeIn} from './easing.js'; /** * A function that takes an {@link module:ol/Tile} for the tile and a @@ -60,7 +59,6 @@ import {abstract} from './util.js'; * @api */ - /** * @typedef {Object} Options * @property {number} [transition=250] A duration for tile opacity @@ -68,7 +66,6 @@ import {abstract} from './util.js'; * @api */ - /** * @classdesc * Base class for tiles. @@ -76,7 +73,6 @@ import {abstract} from './util.js'; * @abstract */ class Tile extends EventTarget { - /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @param {TileState} state State. @@ -126,7 +122,8 @@ class Tile extends EventTarget { * The duration for the opacity transition. * @type {number} */ - this.transition_ = options.transition === undefined ? 250 : options.transition; + this.transition_ = + options.transition === undefined ? 250 : options.transition; /** * Lookup of start times for rendering transitions. If the start time is @@ -134,7 +131,6 @@ class Tile extends EventTarget { * @type {Object} */ this.transitionStarts_ = {}; - } /** @@ -147,8 +143,7 @@ class Tile extends EventTarget { /** * Called by the tile cache when the tile is removed from the cache due to expiry */ - release() { - } + release() {} /** * @return {string} Key. @@ -284,7 +279,7 @@ class Tile extends EventTarget { return 1; } - const delta = time - start + (1000 / 60); // avoid rendering at 0 + const delta = time - start + 1000 / 60; // avoid rendering at 0 if (delta >= this.transition_) { return 1; } @@ -316,5 +311,4 @@ class Tile extends EventTarget { } } - export default Tile; diff --git a/src/ol/TileCache.js b/src/ol/TileCache.js index 57ad1ce3c0..5a00af4534 100644 --- a/src/ol/TileCache.js +++ b/src/ol/TileCache.js @@ -5,7 +5,6 @@ import LRUCache from './structs/LRUCache.js'; import {fromKey, getKey} from './tilecoord.js'; class TileCache extends LRUCache { - /** * @param {!Object} usedTiles Used tiles. */ @@ -30,14 +29,15 @@ class TileCache extends LRUCache { const key = this.peekFirstKey(); const tileCoord = fromKey(key); const z = tileCoord[0]; - this.forEach(function(tile) { - if (tile.tileCoord[0] !== z) { - this.remove(getKey(tile.tileCoord)); - tile.release(); - } - }.bind(this)); + this.forEach( + function (tile) { + if (tile.tileCoord[0] !== z) { + this.remove(getKey(tile.tileCoord)); + tile.release(); + } + }.bind(this) + ); } } - export default TileCache; diff --git a/src/ol/TileQueue.js b/src/ol/TileQueue.js index 400cd56f74..349e884f84 100644 --- a/src/ol/TileQueue.js +++ b/src/ol/TileQueue.js @@ -1,39 +1,36 @@ /** * @module ol/TileQueue */ -import TileState from './TileState.js'; import EventType from './events/EventType.js'; import PriorityQueue, {DROP} from './structs/PriorityQueue.js'; - +import TileState from './TileState.js'; /** * @typedef {function(import("./Tile.js").default, string, import("./coordinate.js").Coordinate, number): number} PriorityFunction */ - class TileQueue extends PriorityQueue { - /** * @param {PriorityFunction} tilePriorityFunction Tile priority function. * @param {function(): ?} tileChangeCallback Function called on each tile change event. */ constructor(tilePriorityFunction, tileChangeCallback) { - super( /** * @param {Array} element Element. * @return {number} Priority. */ - function(element) { + function (element) { return tilePriorityFunction.apply(null, element); }, /** * @param {Array} element Element. * @return {string} Key. */ - function(element) { - return (/** @type {import("./Tile.js").default} */ (element[0]).getKey()); - }); + function (element) { + return /** @type {import("./Tile.js").default} */ (element[0]).getKey(); + } + ); /** @private */ this.boundHandleTileChange_ = this.handleTileChange.bind(this); @@ -55,7 +52,6 @@ class TileQueue extends PriorityQueue { * @type {!Object} */ this.tilesLoadingKeys_ = {}; - } /** @@ -85,7 +81,11 @@ class TileQueue extends PriorityQueue { handleTileChange(event) { const tile = /** @type {import("./Tile.js").default} */ (event.target); const state = tile.getState(); - if (tile.hifi && state === TileState.LOADED || state === TileState.ERROR || state === TileState.EMPTY) { + if ( + (tile.hifi && state === TileState.LOADED) || + state === TileState.ERROR || + state === TileState.EMPTY + ) { tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_); const tileKey = tile.getKey(); if (tileKey in this.tilesLoadingKeys_) { @@ -103,8 +103,11 @@ class TileQueue extends PriorityQueue { loadMoreTiles(maxTotalLoading, maxNewLoads) { let newLoads = 0; let state, tile, tileKey; - while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads && - this.getCount() > 0) { + while ( + this.tilesLoading_ < maxTotalLoading && + newLoads < maxNewLoads && + this.getCount() > 0 + ) { tile = /** @type {import("./Tile.js").default} */ (this.dequeue()[0]); tileKey = tile.getKey(); state = tile.getState(); @@ -118,10 +121,8 @@ class TileQueue extends PriorityQueue { } } - export default TileQueue; - /** * @param {import('./PluggableMap.js').FrameState} frameState Frame state. * @param {import("./Tile.js").default} tile Tile. @@ -130,7 +131,13 @@ export default TileQueue; * @param {number} tileResolution Tile resolution. * @return {number} Tile priority. */ -export function getTilePriority(frameState, tile, tileSourceKey, tileCenter, tileResolution) { +export function getTilePriority( + frameState, + tile, + tileSourceKey, + tileCenter, + tileResolution +) { // Filter out tiles at higher zoom levels than the current zoom level, or that // are outside the visible extent. if (!frameState || !(tileSourceKey in frameState.wantedTiles)) { @@ -148,6 +155,8 @@ export function getTilePriority(frameState, tile, tileSourceKey, tileCenter, til const center = frameState.viewState.center; const deltaX = tileCenter[0] - center[0]; const deltaY = tileCenter[1] - center[1]; - return 65536 * Math.log(tileResolution) + - Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution; + return ( + 65536 * Math.log(tileResolution) + + Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution + ); } diff --git a/src/ol/TileRange.js b/src/ol/TileRange.js index e2cf3b37ca..35e5781515 100644 --- a/src/ol/TileRange.js +++ b/src/ol/TileRange.js @@ -7,7 +7,6 @@ * by its min/max tile coordinates and is inclusive of coordinates. */ class TileRange { - /** * @param {number} minX Minimum X. * @param {number} maxX Maximum X. @@ -15,7 +14,6 @@ class TileRange { * @param {number} maxY Maximum Y. */ constructor(minX, maxX, minY, maxY) { - /** * @type {number} */ @@ -35,7 +33,6 @@ class TileRange { * @type {number} */ this.maxY = maxY; - } /** @@ -51,8 +48,12 @@ class TileRange { * @return {boolean} Contains. */ containsTileRange(tileRange) { - return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX && - this.minY <= tileRange.minY && tileRange.maxY <= this.maxY; + return ( + this.minX <= tileRange.minX && + tileRange.maxX <= this.maxX && + this.minY <= tileRange.minY && + tileRange.maxY <= this.maxY + ); } /** @@ -69,8 +70,12 @@ class TileRange { * @return {boolean} Equals. */ equals(tileRange) { - return this.minX == tileRange.minX && this.minY == tileRange.minY && - this.maxX == tileRange.maxX && this.maxY == tileRange.maxY; + return ( + this.minX == tileRange.minX && + this.minY == tileRange.minY && + this.maxX == tileRange.maxX && + this.maxY == tileRange.maxY + ); } /** @@ -117,14 +122,15 @@ class TileRange { * @return {boolean} Intersects. */ intersects(tileRange) { - return this.minX <= tileRange.maxX && - this.maxX >= tileRange.minX && - this.minY <= tileRange.maxY && - this.maxY >= tileRange.minY; + return ( + this.minX <= tileRange.maxX && + this.maxX >= tileRange.minX && + this.minY <= tileRange.maxY && + this.maxY >= tileRange.minY + ); } } - /** * @param {number} minX Minimum X. * @param {number} maxX Maximum X. @@ -145,5 +151,4 @@ export function createOrUpdate(minX, maxX, minY, maxY, tileRange) { } } - export default TileRange; diff --git a/src/ol/TileState.js b/src/ol/TileState.js index 61dd890c5b..07f3db788f 100644 --- a/src/ol/TileState.js +++ b/src/ol/TileState.js @@ -14,5 +14,5 @@ export default { * @type {number} */ ERROR: 3, - EMPTY: 4 + EMPTY: 4, }; diff --git a/src/ol/VectorRenderTile.js b/src/ol/VectorRenderTile.js index db9a6ec07f..782cd7860c 100644 --- a/src/ol/VectorRenderTile.js +++ b/src/ol/VectorRenderTile.js @@ -1,10 +1,9 @@ /** * @module ol/VectorRenderTile */ -import {getUid} from './util.js'; import Tile from './Tile.js'; import {createCanvasContext2D} from './dom.js'; - +import {getUid} from './util.js'; /** * @typedef {Object} ReplayState @@ -24,7 +23,6 @@ import {createCanvasContext2D} from './dom.js'; const canvasPool = []; class VectorRenderTile extends Tile { - /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @param {import("./TileState.js").default} state State. @@ -33,7 +31,6 @@ class VectorRenderTile extends Tile { * to get source tiles for this tile. */ constructor(tileCoord, state, urlTileCoord, getSourceTiles) { - super(tileCoord, state, {transition: 0}); /** @@ -148,7 +145,7 @@ class VectorRenderTile extends Tile { renderedTileResolution: NaN, renderedTileRevision: -1, renderedZ: -1, - renderedTileZ: -1 + renderedTileZ: -1, }; } return this.replayState_[key]; @@ -172,5 +169,4 @@ class VectorRenderTile extends Tile { } } - export default VectorRenderTile; diff --git a/src/ol/VectorTile.js b/src/ol/VectorTile.js index f957a452df..8aa1ab501a 100644 --- a/src/ol/VectorTile.js +++ b/src/ol/VectorTile.js @@ -5,7 +5,6 @@ import Tile from './Tile.js'; import TileState from './TileState.js'; class VectorTile extends Tile { - /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @param {TileState} state State. @@ -15,7 +14,6 @@ class VectorTile extends Tile { * @param {import("./Tile.js").Options=} opt_options Tile options. */ constructor(tileCoord, state, src, format, tileLoadFunction, opt_options) { - super(tileCoord, state, opt_options); /** @@ -65,7 +63,6 @@ class VectorTile extends Tile { * @type {string} */ this.url_ = src; - } /** diff --git a/src/ol/View.js b/src/ol/View.js index 3d5be60121..107d5660dd 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -1,29 +1,54 @@ /** * @module ol/View */ -import {DEFAULT_TILE_SIZE} from './tilegrid/common.js'; -import {VOID} from './functions.js'; -import {createExtent, none as centerNone} from './centerconstraint.js'; import BaseObject from './Object.js'; -import {createSnapToResolutions, createSnapToPower} from './resolutionconstraint.js'; -import {createSnapToZero, createSnapToN, none as rotationNone, disable} from './rotationconstraint.js'; +import GeometryType from './geom/GeometryType.js'; +import Units from './proj/Units.js'; import ViewHint from './ViewHint.js'; import ViewProperty from './ViewProperty.js'; -import {linearFindNearest} from './array.js'; +import {DEFAULT_TILE_SIZE} from './tilegrid/common.js'; +import { + METERS_PER_UNIT, + createProjection, + fromUserCoordinate, + fromUserExtent, + getUserProjection, + toUserCoordinate, + toUserExtent, +} from './proj.js'; +import {VOID} from './functions.js'; +import { + add as addCoordinate, + equals as coordinatesEqual, + rotate as rotateCoordinate, +} from './coordinate.js'; import {assert} from './asserts.js'; -import {add as addCoordinate, rotate as rotateCoordinate, equals as coordinatesEqual} from './coordinate.js'; -import {inAndOut} from './easing.js'; -import {getForViewAndSize, getCenter, getHeight, getWidth, isEmpty} from './extent.js'; -import GeometryType from './geom/GeometryType.js'; -import {fromExtent as polygonFromExtent} from './geom/Polygon.js'; -import {clamp, modulo} from './math.js'; import {assign} from './obj.js'; -import {createProjection, METERS_PER_UNIT, toUserCoordinate, toUserExtent, fromUserCoordinate, fromUserExtent, getUserProjection} from './proj.js'; -import Units from './proj/Units.js'; -import {equals} from './coordinate.js'; -import {easeOut} from './easing.js'; +import {none as centerNone, createExtent} from './centerconstraint.js'; +import {clamp, modulo} from './math.js'; import {createMinMaxResolution} from './resolutionconstraint.js'; - +import { + createSnapToN, + createSnapToZero, + disable, + none as rotationNone, +} from './rotationconstraint.js'; +import { + createSnapToPower, + createSnapToResolutions, +} from './resolutionconstraint.js'; +import {easeOut} from './easing.js'; +import {equals} from './coordinate.js'; +import { + getCenter, + getForViewAndSize, + getHeight, + getWidth, + isEmpty, +} from './extent.js'; +import {inAndOut} from './easing.js'; +import {linearFindNearest} from './array.js'; +import {fromExtent as polygonFromExtent} from './geom/Polygon.js'; /** * An animation configuration @@ -43,7 +68,6 @@ import {createMinMaxResolution} from './resolutionconstraint.js'; * @property {function(boolean)} callback */ - /** * @typedef {Object} Constraints * @property {import("./centerconstraint.js").Type} center @@ -51,7 +75,6 @@ import {createMinMaxResolution} from './resolutionconstraint.js'; * @property {import("./rotationconstraint.js").Type} rotation */ - /** * @typedef {Object} FitOptions * @property {import("./size.js").Size} [size] The size in pixels of the box to fit @@ -77,7 +100,6 @@ import {createMinMaxResolution} from './resolutionconstraint.js'; * series completed on its own or `false` if it was cancelled. */ - /** * @typedef {Object} ViewOptions * @property {import("./coordinate.js").Coordinate} [center] The initial center for @@ -155,7 +177,6 @@ import {createMinMaxResolution} from './resolutionconstraint.js'; * corresponding resolution. */ - /** * @typedef {Object} AnimationOptions * @property {import("./coordinate.js").Coordinate} [center] The center of the view at the end of @@ -176,7 +197,6 @@ import {createMinMaxResolution} from './resolutionconstraint.js'; * between 0 and 1 representing the progress toward the destination state. */ - /** * @typedef {Object} State * @property {import("./coordinate.js").Coordinate} center @@ -186,14 +206,12 @@ import {createMinMaxResolution} from './resolutionconstraint.js'; * @property {number} zoom */ - /** * Default min zoom level for the map view. * @type {number} */ const DEFAULT_MIN_ZOOM = 0; - /** * @classdesc * A View object represents a simple 2D view of the map. @@ -267,7 +285,6 @@ const DEFAULT_MIN_ZOOM = 0; * @api */ class View extends BaseObject { - /** * @param {ViewOptions=} opt_options View options. */ @@ -346,7 +363,6 @@ class View extends BaseObject { * @param {ViewOptions} options View options. */ applyOptions_(options) { - /** * @type {Object} */ @@ -395,11 +411,13 @@ class View extends BaseObject { this.constraints_ = { center: centerConstraint, resolution: resolutionConstraint, - rotation: rotationConstraint + rotation: rotationConstraint, }; this.setRotation(options.rotation !== undefined ? options.rotation : 0); - this.setCenterInternal(options.center !== undefined ? options.center : null); + this.setCenterInternal( + options.center !== undefined ? options.center : null + ); if (options.resolution !== undefined) { this.setResolution(options.resolution); } else if (options.zoom !== undefined) { @@ -408,13 +426,11 @@ class View extends BaseObject { this.setProperties(properties); - /** * @private * @type {ViewOptions} */ this.options_ = options; - } /** @@ -486,11 +502,17 @@ class View extends BaseObject { let options = arguments[i]; if (options.center) { options = assign({}, options); - options.center = fromUserCoordinate(options.center, this.getProjection()); + options.center = fromUserCoordinate( + options.center, + this.getProjection() + ); } if (options.anchor) { options = assign({}, options); - options.anchor = fromUserCoordinate(options.anchor, this.getProjection()); + options.anchor = fromUserCoordinate( + options.anchor, + this.getProjection() + ); } args[i] = options; } @@ -503,7 +525,10 @@ class View extends BaseObject { animateInternal(var_args) { let animationCount = arguments.length; let callback; - if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') { + if ( + animationCount > 1 && + typeof arguments[animationCount - 1] === 'function' + ) { callback = arguments[animationCount - 1]; --animationCount; } @@ -538,7 +563,7 @@ class View extends BaseObject { anchor: options.anchor, duration: options.duration !== undefined ? options.duration : 1000, easing: options.easing || inAndOut, - callback: callback + callback: callback, }; if (options.center) { @@ -559,7 +584,8 @@ class View extends BaseObject { if (options.rotation !== undefined) { animation.sourceRotation = rotation; - const delta = modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI; + const delta = + modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI; animation.targetRotation = rotation + delta; rotation = animation.targetRotation; } @@ -644,7 +670,8 @@ class View extends BaseObject { continue; } const elapsed = now - animation.start; - let fraction = animation.duration > 0 ? elapsed / animation.duration : 1; + let fraction = + animation.duration > 0 ? elapsed / animation.duration : 1; if (fraction >= 1) { animation.complete = true; fraction = 1; @@ -662,24 +689,48 @@ class View extends BaseObject { this.targetCenter_ = [x, y]; } if (animation.sourceResolution && animation.targetResolution) { - const resolution = progress === 1 ? - animation.targetResolution : - animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution); + const resolution = + progress === 1 + ? animation.targetResolution + : animation.sourceResolution + + progress * + (animation.targetResolution - animation.sourceResolution); if (animation.anchor) { const size = this.getViewportSize_(this.getRotation()); - const constrainedResolution = this.constraints_.resolution(resolution, 0, size, true); - this.targetCenter_ = this.calculateCenterZoom(constrainedResolution, animation.anchor); + const constrainedResolution = this.constraints_.resolution( + resolution, + 0, + size, + true + ); + this.targetCenter_ = this.calculateCenterZoom( + constrainedResolution, + animation.anchor + ); } this.targetResolution_ = resolution; this.applyTargetState_(true); } - if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) { - const rotation = progress === 1 ? - modulo(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : - animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation); + if ( + animation.sourceRotation !== undefined && + animation.targetRotation !== undefined + ) { + const rotation = + progress === 1 + ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) - + Math.PI + : animation.sourceRotation + + progress * + (animation.targetRotation - animation.sourceRotation); if (animation.anchor) { - const constrainedRotation = this.constraints_.rotation(rotation, true); - this.targetCenter_ = this.calculateCenterRotate(constrainedRotation, animation.anchor); + const constrainedRotation = this.constraints_.rotation( + rotation, + true + ); + this.targetCenter_ = this.calculateCenterRotate( + constrainedRotation, + animation.anchor + ); } this.targetRotation_ = rotation; } @@ -701,7 +752,9 @@ class View extends BaseObject { // prune completed series this.animations_ = this.animations_.filter(Boolean); if (more && this.updateAnimationKey_ === undefined) { - this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this)); + this.updateAnimationKey_ = requestAnimationFrame( + this.updateAnimations_.bind(this) + ); } } @@ -731,8 +784,12 @@ class View extends BaseObject { const currentCenter = this.getCenterInternal(); const currentResolution = this.getResolution(); if (currentCenter !== undefined && currentResolution !== undefined) { - const x = anchor[0] - resolution * (anchor[0] - currentCenter[0]) / currentResolution; - const y = anchor[1] - resolution * (anchor[1] - currentCenter[1]) / currentResolution; + const x = + anchor[0] - + (resolution * (anchor[0] - currentCenter[0])) / currentResolution; + const y = + anchor[1] - + (resolution * (anchor[1] - currentCenter[1])) / currentResolution; center = [x, y]; } return center; @@ -750,8 +807,10 @@ class View extends BaseObject { const w = size[0]; const h = size[1]; return [ - Math.abs(w * Math.cos(opt_rotation)) + Math.abs(h * Math.sin(opt_rotation)), - Math.abs(w * Math.sin(opt_rotation)) + Math.abs(h * Math.cos(opt_rotation)) + Math.abs(w * Math.cos(opt_rotation)) + + Math.abs(h * Math.sin(opt_rotation)), + Math.abs(w * Math.sin(opt_rotation)) + + Math.abs(h * Math.cos(opt_rotation)), ]; } else { return size; @@ -766,7 +825,9 @@ class View extends BaseObject { * @param {import("./size.js").Size=} opt_size Viewport size; if undefined, [100, 100] is assumed */ setViewportSize(opt_size) { - this.viewportSize_ = Array.isArray(opt_size) ? opt_size.slice() : [100, 100]; + this.viewportSize_ = Array.isArray(opt_size) + ? opt_size.slice() + : [100, 100]; if (!this.getAnimating()) { this.resolveConstraints(0); } @@ -791,7 +852,9 @@ class View extends BaseObject { * @return {import("./coordinate.js").Coordinate|undefined} The center of the view. */ getCenterInternal() { - return /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get(ViewProperty.CENTER)); + return /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get( + ViewProperty.CENTER + )); } /** @@ -878,7 +941,9 @@ class View extends BaseObject { * @api */ getMaxZoom() { - return /** @type {number} */ (this.getZoomForResolution(this.minResolution_)); + return /** @type {number} */ (this.getZoomForResolution( + this.minResolution_ + )); } /** @@ -896,7 +961,9 @@ class View extends BaseObject { * @api */ getMinZoom() { - return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_)); + return /** @type {number} */ (this.getZoomForResolution( + this.maxResolution_ + )); } /** @@ -955,7 +1022,10 @@ class View extends BaseObject { * @api */ getResolutionForExtent(extent, opt_size) { - return this.getResolutionForExtentInternal(fromUserExtent(extent, this.getProjection()), opt_size); + return this.getResolutionForExtentInternal( + fromUserExtent(extent, this.getProjection()), + opt_size + ); } /** @@ -988,10 +1058,11 @@ class View extends BaseObject { * @param {number} value Value. * @return {number} Resolution. */ - function(value) { + function (value) { const resolution = maxResolution / Math.pow(power, value * max); return resolution; - }); + } + ); } /** @@ -1020,10 +1091,11 @@ class View extends BaseObject { * @param {number} resolution Resolution. * @return {number} Value. */ - function(resolution) { - const value = (Math.log(maxResolution / resolution) / logPower) / max; + function (resolution) { + const value = Math.log(maxResolution / resolution) / logPower / max; return value; - }); + } + ); } /** @@ -1039,7 +1111,7 @@ class View extends BaseObject { projection: projection !== undefined ? projection : null, resolution: resolution, rotation: rotation, - zoom: this.getZoom() + zoom: this.getZoom(), }; } @@ -1095,11 +1167,21 @@ class View extends BaseObject { if (this.resolutions_.length <= 1) { return 0; } - const baseLevel = clamp(Math.floor(zoom), 0, this.resolutions_.length - 2); - const zoomFactor = this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1]; - return this.resolutions_[baseLevel] / Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1)); + const baseLevel = clamp( + Math.floor(zoom), + 0, + this.resolutions_.length - 2 + ); + const zoomFactor = + this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1]; + return ( + this.resolutions_[baseLevel] / + Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1)) + ); } else { - return this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_); + return ( + this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_) + ); } } @@ -1118,21 +1200,29 @@ class View extends BaseObject { /** @type {import("./geom/SimpleGeometry.js").default} */ let geometry; - assert(Array.isArray(geometryOrExtent) || typeof /** @type {?} */ (geometryOrExtent).getSimplifiedGeometry === 'function', - 24); // Invalid extent or geometry provided as `geometry` + assert( + Array.isArray(geometryOrExtent) || + typeof (/** @type {?} */ (geometryOrExtent).getSimplifiedGeometry) === + 'function', + 24 + ); // Invalid extent or geometry provided as `geometry` if (Array.isArray(geometryOrExtent)) { - assert(!isEmpty(geometryOrExtent), - 25); // Cannot fit empty extent provided as `geometry` + assert(!isEmpty(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry` const extent = fromUserExtent(geometryOrExtent, this.getProjection()); geometry = polygonFromExtent(extent); } else if (geometryOrExtent.getType() === GeometryType.CIRCLE) { - const extent = fromUserExtent(geometryOrExtent.getExtent(), this.getProjection()); + const extent = fromUserExtent( + geometryOrExtent.getExtent(), + this.getProjection() + ); geometry = polygonFromExtent(extent); geometry.rotate(this.getRotation(), getCenter(extent)); } else { const userProjection = getUserProjection(); if (userProjection) { - geometry = /** @type {import("./geom/SimpleGeometry.js").default} */ (geometryOrExtent.clone().transform(userProjection, this.getProjection())); + geometry = /** @type {import("./geom/SimpleGeometry.js").default} */ (geometryOrExtent + .clone() + .transform(userProjection, this.getProjection())); } else { geometry = geometryOrExtent; } @@ -1151,7 +1241,8 @@ class View extends BaseObject { if (!size) { size = this.getViewportSize_(); } - const padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0]; + const padding = + options.padding !== undefined ? options.padding : [0, 0, 0, 0]; const nearest = options.nearest !== undefined ? options.nearest : false; let minResolution; if (options.minResolution !== undefined) { @@ -1184,29 +1275,34 @@ class View extends BaseObject { // calculate resolution let resolution = this.getResolutionForExtentInternal( [minRotX, minRotY, maxRotX, maxRotY], - [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]); - resolution = isNaN(resolution) ? minResolution : - Math.max(resolution, minResolution); + [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]] + ); + resolution = isNaN(resolution) + ? minResolution + : Math.max(resolution, minResolution); resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1); // calculate center sinAngle = -sinAngle; // go back to original rotation let centerRotX = (minRotX + maxRotX) / 2; let centerRotY = (minRotY + maxRotY) / 2; - centerRotX += (padding[1] - padding[3]) / 2 * resolution; - centerRotY += (padding[0] - padding[2]) / 2 * resolution; + centerRotX += ((padding[1] - padding[3]) / 2) * resolution; + centerRotY += ((padding[0] - padding[2]) / 2) * resolution; const centerX = centerRotX * cosAngle - centerRotY * sinAngle; const centerY = centerRotY * cosAngle + centerRotX * sinAngle; const center = [centerX, centerY]; const callback = options.callback ? options.callback : VOID; if (options.duration !== undefined) { - this.animateInternal({ - resolution: resolution, - center: this.getConstrainedCenter(center, resolution), - duration: options.duration, - easing: options.easing - }, callback); + this.animateInternal( + { + resolution: resolution, + center: this.getConstrainedCenter(center, resolution), + duration: options.duration, + easing: options.easing, + }, + callback + ); } else { this.targetResolution_ = resolution; this.targetCenter_ = center; @@ -1223,7 +1319,11 @@ class View extends BaseObject { * @api */ centerOn(coordinate, size, position) { - this.centerOnInternal(fromUserCoordinate(coordinate, this.getProjection()), size, position); + this.centerOnInternal( + fromUserCoordinate(coordinate, this.getProjection()), + size, + position + ); } /** @@ -1264,7 +1364,10 @@ class View extends BaseObject { */ adjustCenter(deltaCoordinates) { const center = toUserCoordinate(this.targetCenter_, this.getProjection()); - this.setCenter([center[0] + deltaCoordinates[0], center[1] + deltaCoordinates[1]]); + this.setCenter([ + center[0] + deltaCoordinates[0], + center[1] + deltaCoordinates[1], + ]); } /** @@ -1273,7 +1376,10 @@ class View extends BaseObject { */ adjustCenterInternal(deltaCoordinates) { const center = this.targetCenter_; - this.setCenterInternal([center[0] + deltaCoordinates[0], center[1] + deltaCoordinates[1]]); + this.setCenterInternal([ + center[0] + deltaCoordinates[0], + center[1] + deltaCoordinates[1], + ]); } /** @@ -1284,7 +1390,8 @@ class View extends BaseObject { * @api */ adjustResolution(ratio, opt_anchor) { - const anchor = opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection()); + const anchor = + opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection()); this.adjustResolutionInternal(ratio, anchor); } @@ -1297,7 +1404,12 @@ class View extends BaseObject { adjustResolutionInternal(ratio, opt_anchor) { const isMoving = this.getAnimating() || this.getInteracting(); const size = this.getViewportSize_(this.getRotation()); - const newResolution = this.constraints_.resolution(this.targetResolution_ * ratio, 0, size, isMoving); + const newResolution = this.constraints_.resolution( + this.targetResolution_ * ratio, + 0, + size, + isMoving + ); if (opt_anchor) { this.targetCenter_ = this.calculateCenterZoom(newResolution, opt_anchor); @@ -1338,7 +1450,10 @@ class View extends BaseObject { */ adjustRotationInternal(delta, opt_anchor) { const isMoving = this.getAnimating() || this.getInteracting(); - const newRotation = this.constraints_.rotation(this.targetRotation_ + delta, isMoving); + const newRotation = this.constraints_.rotation( + this.targetRotation_ + delta, + isMoving + ); if (opt_anchor) { this.targetCenter_ = this.calculateCenterRotate(newRotation, opt_anchor); } @@ -1416,13 +1531,27 @@ class View extends BaseObject { * @private */ applyTargetState_(opt_doNotCancelAnims, opt_forceMoving) { - const isMoving = this.getAnimating() || this.getInteracting() || opt_forceMoving; + const isMoving = + this.getAnimating() || this.getInteracting() || opt_forceMoving; // compute rotation - const newRotation = this.constraints_.rotation(this.targetRotation_, isMoving); + const newRotation = this.constraints_.rotation( + this.targetRotation_, + isMoving + ); const size = this.getViewportSize_(newRotation); - const newResolution = this.constraints_.resolution(this.targetResolution_, 0, size, isMoving); - const newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, isMoving); + const newResolution = this.constraints_.resolution( + this.targetResolution_, + 0, + size, + isMoving + ); + const newCenter = this.constraints_.center( + this.targetCenter_, + newResolution, + size, + isMoving + ); if (this.get(ViewProperty.ROTATION) !== newRotation) { this.set(ViewProperty.ROTATION, newRotation); @@ -1430,7 +1559,10 @@ class View extends BaseObject { if (this.get(ViewProperty.RESOLUTION) !== newResolution) { this.set(ViewProperty.RESOLUTION, newResolution); } - if (!this.get(ViewProperty.CENTER) || !equals(this.get(ViewProperty.CENTER), newCenter)) { + if ( + !this.get(ViewProperty.CENTER) || + !equals(this.get(ViewProperty.CENTER), newCenter) + ) { this.set(ViewProperty.CENTER, newCenter); } @@ -1455,8 +1587,16 @@ class View extends BaseObject { const newRotation = this.constraints_.rotation(this.targetRotation_); const size = this.getViewportSize_(newRotation); - const newResolution = this.constraints_.resolution(this.targetResolution_, direction, size); - const newCenter = this.constraints_.center(this.targetCenter_, newResolution, size); + const newResolution = this.constraints_.resolution( + this.targetResolution_, + direction, + size + ); + const newCenter = this.constraints_.center( + this.targetCenter_, + newResolution, + size + ); if (duration === 0 && !this.cancelAnchor_) { this.targetResolution_ = newResolution; @@ -1466,14 +1606,16 @@ class View extends BaseObject { return; } - const anchor = opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined); + const anchor = + opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined); this.cancelAnchor_ = undefined; - if (this.getResolution() !== newResolution || + if ( + this.getResolution() !== newResolution || this.getRotation() !== newRotation || !this.getCenterInternal() || - !equals(this.getCenterInternal(), newCenter)) { - + !equals(this.getCenterInternal(), newCenter) + ) { if (this.getAnimating()) { this.cancelAnimations(); } @@ -1484,7 +1626,7 @@ class View extends BaseObject { resolution: newResolution, duration: duration, easing: easeOut, - anchor: anchor + anchor: anchor, }); } } @@ -1510,7 +1652,8 @@ class View extends BaseObject { * @api */ endInteraction(opt_duration, opt_resolutionDirection, opt_anchor) { - const anchor = opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection()); + const anchor = + opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection()); this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor); } @@ -1536,7 +1679,11 @@ class View extends BaseObject { */ getConstrainedCenter(targetCenter, opt_targetResolution) { const size = this.getViewportSize_(this.getRotation()); - return this.constraints_.center(targetCenter, opt_targetResolution || this.getResolution(), size); + return this.constraints_.center( + targetCenter, + opt_targetResolution || this.getResolution(), + size + ); } /** @@ -1550,7 +1697,9 @@ class View extends BaseObject { */ getConstrainedZoom(targetZoom, opt_direction) { const targetRes = this.getResolutionForZoom(targetZoom); - return this.getZoomForResolution(this.getConstrainedResolution(targetRes, opt_direction)); + return this.getZoomForResolution( + this.getConstrainedResolution(targetRes, opt_direction) + ); } /** @@ -1570,25 +1719,26 @@ class View extends BaseObject { } } - /** * @param {Function} callback Callback. * @param {*} returnValue Return value. */ function animationCallback(callback, returnValue) { - setTimeout(function() { + setTimeout(function () { callback(returnValue); }, 0); } - /** * @param {ViewOptions} options View options. * @return {import("./centerconstraint.js").Type} The constraint. */ export function createCenterConstraint(options) { if (options.extent !== undefined) { - const smooth = options.smoothExtentConstraint !== undefined ? options.smoothExtentConstraint : true; + const smooth = + options.smoothExtentConstraint !== undefined + ? options.smoothExtentConstraint + : true; return createExtent(options.extent, options.constrainOnlyCenter, smooth); } @@ -1603,7 +1753,6 @@ export function createCenterConstraint(options) { return centerNone; } - /** * @param {ViewOptions} options View options. * @return {{constraint: import("./resolutionconstraint.js").Type, maxResolution: number, @@ -1619,23 +1768,25 @@ export function createResolutionConstraint(options) { const defaultMaxZoom = 28; const defaultZoomFactor = 2; - let minZoom = options.minZoom !== undefined ? - options.minZoom : DEFAULT_MIN_ZOOM; + let minZoom = + options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM; - let maxZoom = options.maxZoom !== undefined ? - options.maxZoom : defaultMaxZoom; + let maxZoom = + options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom; - const zoomFactor = options.zoomFactor !== undefined ? - options.zoomFactor : defaultZoomFactor; + const zoomFactor = + options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor; - const multiWorld = options.multiWorld !== undefined ? - options.multiWorld : false; + const multiWorld = + options.multiWorld !== undefined ? options.multiWorld : false; const smooth = - options.smoothResolutionConstraint !== undefined ? options.smoothResolutionConstraint : true; + options.smoothResolutionConstraint !== undefined + ? options.smoothResolutionConstraint + : true; const showFullExtent = - options.showFullExtent !== undefined ? options.showFullExtent : false; + options.showFullExtent !== undefined ? options.showFullExtent : false; const projection = createProjection(options.projection, 'EPSG:3857'); const projExtent = projection.getExtent(); @@ -1649,29 +1800,40 @@ export function createResolutionConstraint(options) { if (options.resolutions !== undefined) { const resolutions = options.resolutions; maxResolution = resolutions[minZoom]; - minResolution = resolutions[maxZoom] !== undefined ? - resolutions[maxZoom] : resolutions[resolutions.length - 1]; + minResolution = + resolutions[maxZoom] !== undefined + ? resolutions[maxZoom] + : resolutions[resolutions.length - 1]; if (options.constrainResolution) { - resolutionConstraint = createSnapToResolutions(resolutions, smooth, - !constrainOnlyCenter && extent, showFullExtent); + resolutionConstraint = createSnapToResolutions( + resolutions, + smooth, + !constrainOnlyCenter && extent, + showFullExtent + ); } else { - resolutionConstraint = createMinMaxResolution(maxResolution, minResolution, smooth, - !constrainOnlyCenter && extent, showFullExtent); + resolutionConstraint = createMinMaxResolution( + maxResolution, + minResolution, + smooth, + !constrainOnlyCenter && extent, + showFullExtent + ); } } else { // calculate the default min and max resolution - const size = !projExtent ? - // use an extent that can fit the whole world if need be - 360 * METERS_PER_UNIT[Units.DEGREES] / - projection.getMetersPerUnit() : - Math.max(getWidth(projExtent), getHeight(projExtent)); + const size = !projExtent + ? // use an extent that can fit the whole world if need be + (360 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit() + : Math.max(getWidth(projExtent), getHeight(projExtent)); - const defaultMaxResolution = size / DEFAULT_TILE_SIZE / Math.pow( - defaultZoomFactor, DEFAULT_MIN_ZOOM); + const defaultMaxResolution = + size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM); - const defaultMinResolution = defaultMaxResolution / Math.pow( - defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM); + const defaultMinResolution = + defaultMaxResolution / + Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM); // user provided maxResolution takes precedence maxResolution = options.maxResolution; @@ -1696,31 +1858,48 @@ export function createResolutionConstraint(options) { } // given discrete zoom levels, minResolution may be different than provided - maxZoom = minZoom + Math.floor( - Math.log(maxResolution / minResolution) / Math.log(zoomFactor)); + maxZoom = + minZoom + + Math.floor( + Math.log(maxResolution / minResolution) / Math.log(zoomFactor) + ); minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom); if (options.constrainResolution) { resolutionConstraint = createSnapToPower( - zoomFactor, maxResolution, minResolution, smooth, - !constrainOnlyCenter && extent, showFullExtent); + zoomFactor, + maxResolution, + minResolution, + smooth, + !constrainOnlyCenter && extent, + showFullExtent + ); } else { - resolutionConstraint = createMinMaxResolution(maxResolution, minResolution, smooth, - !constrainOnlyCenter && extent, showFullExtent); + resolutionConstraint = createMinMaxResolution( + maxResolution, + minResolution, + smooth, + !constrainOnlyCenter && extent, + showFullExtent + ); } } - return {constraint: resolutionConstraint, maxResolution: maxResolution, - minResolution: minResolution, minZoom: minZoom, zoomFactor: zoomFactor}; + return { + constraint: resolutionConstraint, + maxResolution: maxResolution, + minResolution: minResolution, + minZoom: minZoom, + zoomFactor: zoomFactor, + }; } - /** * @param {ViewOptions} options View options. * @return {import("./rotationconstraint.js").Type} Rotation constraint. */ export function createRotationConstraint(options) { - const enableRotation = options.enableRotation !== undefined ? - options.enableRotation : true; + const enableRotation = + options.enableRotation !== undefined ? options.enableRotation : true; if (enableRotation) { const constrainRotation = options.constrainRotation; if (constrainRotation === undefined || constrainRotation === true) { @@ -1737,7 +1916,6 @@ export function createRotationConstraint(options) { } } - /** * Determine if an animation involves no view change. * @param {Animation} animation The animation. diff --git a/src/ol/ViewHint.js b/src/ol/ViewHint.js index 92c75624c3..10a59aa7e0 100644 --- a/src/ol/ViewHint.js +++ b/src/ol/ViewHint.js @@ -7,5 +7,5 @@ */ export default { ANIMATING: 0, - INTERACTING: 1 + INTERACTING: 1, }; diff --git a/src/ol/ViewProperty.js b/src/ol/ViewProperty.js index 192863d084..1d92963531 100644 --- a/src/ol/ViewProperty.js +++ b/src/ol/ViewProperty.js @@ -8,5 +8,5 @@ export default { CENTER: 'center', RESOLUTION: 'resolution', - ROTATION: 'rotation' + ROTATION: 'rotation', }; diff --git a/src/ol/array.js b/src/ol/array.js index bb9796c096..578c096cc1 100644 --- a/src/ol/array.js +++ b/src/ol/array.js @@ -2,7 +2,6 @@ * @module ol/array */ - /** * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1. * https://github.com/darkskyapp/binary-search @@ -22,13 +21,14 @@ export function binarySearch(haystack, needle, opt_comparator) { while (low < high) { /* Note that "(low + high) >>> 1" may overflow, and results in a typecast * to double (which gives the wrong results). */ - mid = low + (high - low >> 1); + mid = low + ((high - low) >> 1); cmp = +comparator(haystack[mid], needle); - if (cmp < 0.0) { /* Too low. */ + if (cmp < 0.0) { + /* Too low. */ low = mid + 1; - - } else { /* Key found or too high */ + } else { + /* Key found or too high */ high = mid; found = !cmp; } @@ -38,7 +38,6 @@ export function binarySearch(haystack, needle, opt_comparator) { return found ? low : ~low; } - /** * Compare function for array sort that is safe for numbers. * @param {*} a The first object to be compared. @@ -50,7 +49,6 @@ export function numberSafeCompareFunction(a, b) { return a > b ? 1 : a < b ? -1 : 0; } - /** * Whether the array contains the given object. * @param {Array<*>} arr The array to test for the presence of the element. @@ -61,7 +59,6 @@ export function includes(arr, obj) { return arr.indexOf(obj) >= 0; } - /** * @param {Array} arr Array. * @param {number} target Target. @@ -107,7 +104,6 @@ export function linearFindNearest(arr, target, direction) { } } - /** * @param {Array<*>} arr Array. * @param {number} begin Begin index. @@ -123,7 +119,6 @@ export function reverseSubArray(arr, begin, end) { } } - /** * @param {Array} arr The array to modify. * @param {!Array|VALUE} data The elements or arrays of elements to add to arr. @@ -137,7 +132,6 @@ export function extend(arr, data) { } } - /** * @param {Array} arr The array to modify. * @param {VALUE} obj The element to remove. @@ -153,7 +147,6 @@ export function remove(arr, obj) { return found; } - /** * @param {Array} arr The array to search in. * @param {function(VALUE, number, ?) : boolean} func The function to compare. @@ -173,7 +166,6 @@ export function find(arr, func) { return null; } - /** * @param {Array|Uint8ClampedArray} arr1 The first array to compare. * @param {Array|Uint8ClampedArray} arr2 The second array to compare. @@ -192,7 +184,6 @@ export function equals(arr1, arr2) { return true; } - /** * Sort the passed array such that the relative order of equal elements is preverved. * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details. @@ -207,7 +198,7 @@ export function stableSort(arr, compareFnc) { for (i = 0; i < length; i++) { tmp[i] = {index: i, value: arr[i]}; } - tmp.sort(function(a, b) { + tmp.sort(function (a, b) { return compareFnc(a.value, b.value) || a.index - b.index; }); for (i = 0; i < arr.length; i++) { @@ -215,7 +206,6 @@ export function stableSort(arr, compareFnc) { } } - /** * @param {Array<*>} arr The array to search in. * @param {Function} func Comparison function. @@ -223,14 +213,13 @@ export function stableSort(arr, compareFnc) { */ export function findIndex(arr, func) { let index; - const found = !arr.every(function(el, idx) { + const found = !arr.every(function (el, idx) { index = idx; return !func(el, idx, arr); }); return found ? index : -1; } - /** * @param {Array<*>} arr The array to test. * @param {Function=} opt_func Comparison function. @@ -239,11 +228,11 @@ export function findIndex(arr, func) { */ export function isSorted(arr, opt_func, opt_strict) { const compare = opt_func || numberSafeCompareFunction; - return arr.every(function(currentVal, index) { + return arr.every(function (currentVal, index) { if (index === 0) { return true; } const res = compare(arr[index - 1], currentVal); - return !(res > 0 || opt_strict && res === 0); + return !(res > 0 || (opt_strict && res === 0)); }); } diff --git a/src/ol/centerconstraint.js b/src/ol/centerconstraint.js index 82576941b8..b024106275 100644 --- a/src/ol/centerconstraint.js +++ b/src/ol/centerconstraint.js @@ -3,12 +3,10 @@ */ import {clamp} from './math.js'; - /** * @typedef {function((import("./coordinate.js").Coordinate|undefined), number, import("./size.js").Size, boolean=): (import("./coordinate.js").Coordinate|undefined)} Type */ - /** * @param {import("./extent.js").Extent} extent Extent. * @param {boolean} onlyCenter If true, the constraint will only apply to the view center. @@ -25,7 +23,7 @@ export function createExtent(extent, onlyCenter, smooth) { * @param {boolean=} opt_isMoving True if an interaction or animation is in progress. * @return {import("./coordinate.js").Coordinate|undefined} Center. */ - function(center, resolution, size, opt_isMoving) { + function (center, resolution, size, opt_isMoving) { if (center) { const viewWidth = onlyCenter ? 0 : size[0] * resolution; const viewHeight = onlyCenter ? 0 : size[1] * resolution; @@ -51,9 +49,11 @@ export function createExtent(extent, onlyCenter, smooth) { // during an interaction, allow some overscroll if (opt_isMoving && smooth) { - x += -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) + + x += + -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) + ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio); - y += -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) + + y += + -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) + ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio); } @@ -65,7 +65,6 @@ export function createExtent(extent, onlyCenter, smooth) { ); } - /** * @param {import("./coordinate.js").Coordinate=} center Center. * @return {import("./coordinate.js").Coordinate|undefined} Center. diff --git a/src/ol/color.js b/src/ol/color.js index 4bff697ad9..4b52b056c5 100644 --- a/src/ol/color.js +++ b/src/ol/color.js @@ -4,7 +4,6 @@ import {assert} from './asserts.js'; import {clamp} from './math.js'; - /** * A color represented as a short array [red, green, blue, alpha]. * red, green, and blue should be integers in the range 0..255 inclusive. @@ -14,7 +13,6 @@ import {clamp} from './math.js'; * @api */ - /** * This RegExp matches # followed by 3, 4, 6, or 8 hex digits. * @const @@ -23,7 +21,6 @@ import {clamp} from './math.js'; */ const HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i; - /** * Regular expression for matching potential named color style strings. * @const @@ -32,7 +29,6 @@ const HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i; */ const NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\(.*\)$/i; - /** * Return the color as an rgba string. * @param {Color|string} color Color. @@ -65,62 +61,58 @@ function fromNamed(color) { } } - /** * @param {string} s String. * @return {Color} Color. */ -export const fromString = ( - function() { +export const fromString = (function () { + // We maintain a small cache of parsed strings. To provide cheap LRU-like + // semantics, whenever the cache grows too large we simply delete an + // arbitrary 25% of the entries. - // We maintain a small cache of parsed strings. To provide cheap LRU-like - // semantics, whenever the cache grows too large we simply delete an - // arbitrary 25% of the entries. + /** + * @const + * @type {number} + */ + const MAX_CACHE_SIZE = 1024; + /** + * @type {Object} + */ + const cache = {}; + + /** + * @type {number} + */ + let cacheSize = 0; + + return ( /** - * @const - * @type {number} + * @param {string} s String. + * @return {Color} Color. */ - const MAX_CACHE_SIZE = 1024; - - /** - * @type {Object} - */ - const cache = {}; - - /** - * @type {number} - */ - let cacheSize = 0; - - return ( - /** - * @param {string} s String. - * @return {Color} Color. - */ - function(s) { - let color; - if (cache.hasOwnProperty(s)) { - color = cache[s]; - } else { - if (cacheSize >= MAX_CACHE_SIZE) { - let i = 0; - for (const key in cache) { - if ((i++ & 3) === 0) { - delete cache[key]; - --cacheSize; - } + function (s) { + let color; + if (cache.hasOwnProperty(s)) { + color = cache[s]; + } else { + if (cacheSize >= MAX_CACHE_SIZE) { + let i = 0; + for (const key in cache) { + if ((i++ & 3) === 0) { + delete cache[key]; + --cacheSize; } } - color = fromStringInternal_(s); - cache[s] = color; - ++cacheSize; } - return color; + color = fromStringInternal_(s); + cache[s] = color; + ++cacheSize; } - ); - - })(); + return color; + } + ); +})(); /** * Return the color as an array. This function maintains a cache of calculated @@ -149,7 +141,8 @@ function fromStringInternal_(s) { s = fromNamed(s); } - if (HEX_COLOR_RE_.exec(s)) { // hex + if (HEX_COLOR_RE_.exec(s)) { + // hex const n = s.length - 1; // number of hex digits let d; // number of digits per channel if (n <= 4) { @@ -175,10 +168,12 @@ function fromStringInternal_(s) { } } color = [r, g, b, a / 255]; - } else if (s.indexOf('rgba(') == 0) { // rgba() + } else if (s.indexOf('rgba(') == 0) { + // rgba() color = s.slice(5, -1).split(',').map(Number); normalize(color); - } else if (s.indexOf('rgb(') == 0) { // rgb() + } else if (s.indexOf('rgb(') == 0) { + // rgb() color = s.slice(4, -1).split(',').map(Number); color.push(1); normalize(color); @@ -188,7 +183,6 @@ function fromStringInternal_(s) { return color; } - /** * TODO this function is only used in the test, we probably shouldn't export it * @param {Color} color Color. @@ -202,7 +196,6 @@ export function normalize(color) { return color; } - /** * @param {Color} color Color. * @return {string} String. @@ -232,5 +225,7 @@ export function isStringColor(s) { if (NAMED_COLOR_RE_.test(s)) { s = fromNamed(s); } - return HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0; + return ( + HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0 + ); } diff --git a/src/ol/colorlike.js b/src/ol/colorlike.js index ddeeb7d3ad..54e5c18bd7 100644 --- a/src/ol/colorlike.js +++ b/src/ol/colorlike.js @@ -3,7 +3,6 @@ */ import {toString} from './color.js'; - /** * A type accepted by CanvasRenderingContext2D.fillStyle * or CanvasRenderingContext2D.strokeStyle. @@ -16,7 +15,6 @@ import {toString} from './color.js'; * @api */ - /** * @param {import("./color.js").Color|ColorLike} color Color. * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}. diff --git a/src/ol/control.js b/src/ol/control.js index 7b10be95b8..73ea893dd7 100644 --- a/src/ol/control.js +++ b/src/ol/control.js @@ -1,8 +1,8 @@ /** * @module ol/control */ -import Collection from './Collection.js'; import Attribution from './control/Attribution.js'; +import Collection from './Collection.js'; import Rotate from './control/Rotate.js'; import Zoom from './control/Zoom.js'; @@ -33,7 +33,6 @@ export {default as ZoomToExtent} from './control/ZoomToExtent.js'; * @api */ - /** * Set of controls included in maps by default. Unless configured otherwise, * this returns a collection containing an instance of each of the following @@ -49,7 +48,6 @@ export {default as ZoomToExtent} from './control/ZoomToExtent.js'; * @api */ export function defaults(opt_options) { - const options = opt_options ? opt_options : {}; const controls = new Collection(); @@ -64,8 +62,8 @@ export function defaults(opt_options) { controls.push(new Rotate(options.rotateOptions)); } - const attributionControl = options.attribution !== undefined ? - options.attribution : true; + const attributionControl = + options.attribution !== undefined ? options.attribution : true; if (attributionControl) { controls.push(new Attribution(options.attributionOptions)); } diff --git a/src/ol/control/Attribution.js b/src/ol/control/Attribution.js index f3409c829e..76924ec860 100644 --- a/src/ol/control/Attribution.js +++ b/src/ol/control/Attribution.js @@ -1,13 +1,12 @@ /** * @module ol/control/Attribution */ -import {equals} from '../array.js'; import Control from './Control.js'; -import {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_COLLAPSED} from '../css.js'; -import {removeChildren, replaceNode} from '../dom.js'; import EventType from '../events/EventType.js'; +import {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; +import {equals} from '../array.js'; import {inView} from '../layer/Layer.js'; - +import {removeChildren, replaceNode} from '../dom.js'; /** * @typedef {Object} Options @@ -32,7 +31,6 @@ import {inView} from '../layer/Layer.js'; * callback. */ - /** * @classdesc * Control to show all the attributions associated with the layer sources @@ -43,18 +41,16 @@ import {inView} from '../layer/Layer.js'; * @api */ class Attribution extends Control { - /** * @param {Options=} opt_options Attribution options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; super({ element: document.createElement('div'), render: options.render || render, - target: options.target + target: options.target, }); /** @@ -67,7 +63,8 @@ class Attribution extends Control { * @private * @type {boolean} */ - this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true; + this.collapsed_ = + options.collapsed !== undefined ? options.collapsed : true; /** * @private @@ -79,18 +76,21 @@ class Attribution extends Control { * @private * @type {boolean} */ - this.collapsible_ = options.collapsible !== undefined ? - options.collapsible : true; + this.collapsible_ = + options.collapsible !== undefined ? options.collapsible : true; if (!this.collapsible_) { this.collapsed_ = false; } - const className = options.className !== undefined ? options.className : 'ol-attribution'; + const className = + options.className !== undefined ? options.className : 'ol-attribution'; - const tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions'; + const tipLabel = + options.tipLabel !== undefined ? options.tipLabel : 'Attributions'; - const collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\u00BB'; + const collapseLabel = + options.collapseLabel !== undefined ? options.collapseLabel : '\u00BB'; if (typeof collapseLabel === 'string') { /** @@ -116,19 +116,27 @@ class Attribution extends Control { this.label_ = label; } - - const activeLabel = (this.collapsible_ && !this.collapsed_) ? - this.collapseLabel_ : this.label_; + const activeLabel = + this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_; const button = document.createElement('button'); button.setAttribute('type', 'button'); button.title = tipLabel; button.appendChild(activeLabel); - button.addEventListener(EventType.CLICK, this.handleClick_.bind(this), false); + button.addEventListener( + EventType.CLICK, + this.handleClick_.bind(this), + false + ); - const cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL + - (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') + - (this.collapsible_ ? '' : ' ol-uncollapsible'); + const cssClasses = + className + + ' ' + + CLASS_UNSELECTABLE + + ' ' + + CLASS_CONTROL + + (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') + + (this.collapsible_ ? '' : ' ol-uncollapsible'); const element = this.element; element.className = cssClasses; element.appendChild(this.ulElement_); @@ -146,7 +154,6 @@ class Attribution extends Control { * @type {boolean} */ this.renderedVisible_ = true; - } /** @@ -190,7 +197,10 @@ class Attribution extends Control { continue; } - if (!this.overrideCollapsible_ && source.getAttributionsCollapsible() === false) { + if ( + !this.overrideCollapsible_ && + source.getAttributionsCollapsible() === false + ) { this.setCollapsible(false); } @@ -320,7 +330,6 @@ class Attribution extends Control { } } - /** * Update the attribution element. * @param {import("../MapEvent.js").default} mapEvent Map event. @@ -330,5 +339,4 @@ export function render(mapEvent) { this.updateElement_(mapEvent.frameState); } - export default Attribution; diff --git a/src/ol/control/Control.js b/src/ol/control/Control.js index 1f54f28ce7..9e76547af4 100644 --- a/src/ol/control/Control.js +++ b/src/ol/control/Control.js @@ -1,12 +1,11 @@ /** * @module ol/control/Control */ -import {VOID} from '../functions.js'; -import MapEventType from '../MapEventType.js'; import BaseObject from '../Object.js'; -import {removeNode} from '../dom.js'; +import MapEventType from '../MapEventType.js'; +import {VOID} from '../functions.js'; import {listen, unlistenByKey} from '../events.js'; - +import {removeNode} from '../dom.js'; /** * @typedef {Object} Options @@ -20,7 +19,6 @@ import {listen, unlistenByKey} from '../events.js'; * the control to be rendered outside of the map's viewport. */ - /** * @classdesc * A control is a visible widget with a DOM element in a fixed position on the @@ -46,12 +44,10 @@ import {listen, unlistenByKey} from '../events.js'; * @api */ class Control extends BaseObject { - /** * @param {Options} options Control options. */ constructor(options) { - super(); /** @@ -87,7 +83,6 @@ class Control extends BaseObject { if (options.target) { this.setTarget(options.target); } - } /** @@ -124,12 +119,14 @@ class Control extends BaseObject { this.listenerKeys.length = 0; this.map_ = map; if (this.map_) { - const target = this.target_ ? - this.target_ : map.getOverlayContainerStopEvent(); + const target = this.target_ + ? this.target_ + : map.getOverlayContainerStopEvent(); target.appendChild(this.element); if (this.render !== VOID) { - this.listenerKeys.push(listen(map, - MapEventType.POSTRENDER, this.render, this)); + this.listenerKeys.push( + listen(map, MapEventType.POSTRENDER, this.render, this) + ); } map.render(); } @@ -155,11 +152,9 @@ class Control extends BaseObject { * @api */ setTarget(target) { - this.target_ = typeof target === 'string' ? - document.getElementById(target) : - target; + this.target_ = + typeof target === 'string' ? document.getElementById(target) : target; } } - export default Control; diff --git a/src/ol/control/FullScreen.js b/src/ol/control/FullScreen.js index d2f82a3268..44022755c4 100644 --- a/src/ol/control/FullScreen.js +++ b/src/ol/control/FullScreen.js @@ -2,19 +2,21 @@ * @module ol/control/FullScreen */ import Control from './Control.js'; -import {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED} from '../css.js'; -import {replaceNode} from '../dom.js'; -import {listen} from '../events.js'; import EventType from '../events/EventType.js'; +import {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED} from '../css.js'; +import {listen} from '../events.js'; +import {replaceNode} from '../dom.js'; -const events = ['fullscreenchange', 'webkitfullscreenchange', 'MSFullscreenChange']; - +const events = [ + 'fullscreenchange', + 'webkitfullscreenchange', + 'MSFullscreenChange', +]; /** * @enum {string} */ const FullScreenEventType = { - /** * Triggered after the map entered fullscreen. * @event FullScreenEventType#enterfullscreen @@ -27,11 +29,9 @@ const FullScreenEventType = { * @event FullScreenEventType#leavefullscreen * @api */ - LEAVEFULLSCREEN: 'leavefullscreen' - + LEAVEFULLSCREEN: 'leavefullscreen', }; - /** * @typedef {Object} Options * @property {string} [className='ol-full-screen'] CSS class name. @@ -49,7 +49,6 @@ const FullScreenEventType = { * be displayed fullscreen. */ - /** * @classdesc * Provides a button that when clicked fills up the full screen with the map. @@ -66,25 +65,23 @@ const FullScreenEventType = { * @api */ class FullScreen extends Control { - /** * @param {Options=} opt_options Options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; super({ element: document.createElement('div'), - target: options.target + target: options.target, }); /** * @private * @type {string} */ - this.cssClassName_ = options.className !== undefined ? options.className : - 'ol-full-screen'; + this.cssClassName_ = + options.className !== undefined ? options.className : 'ol-full-screen'; const label = options.label !== undefined ? options.label : '\u2922'; @@ -92,17 +89,20 @@ class FullScreen extends Control { * @private * @type {Text} */ - this.labelNode_ = typeof label === 'string' ? - document.createTextNode(label) : label; + this.labelNode_ = + typeof label === 'string' ? document.createTextNode(label) : label; - const labelActive = options.labelActive !== undefined ? options.labelActive : '\u00d7'; + const labelActive = + options.labelActive !== undefined ? options.labelActive : '\u00d7'; /** * @private * @type {Text} */ - this.labelActiveNode_ = typeof labelActive === 'string' ? - document.createTextNode(labelActive) : labelActive; + this.labelActiveNode_ = + typeof labelActive === 'string' + ? document.createTextNode(labelActive) + : labelActive; /** * @private @@ -116,11 +116,20 @@ class FullScreen extends Control { this.button_.title = tipLabel; this.button_.appendChild(this.labelNode_); - this.button_.addEventListener(EventType.CLICK, this.handleClick_.bind(this), false); + this.button_.addEventListener( + EventType.CLICK, + this.handleClick_.bind(this), + false + ); - const cssClasses = this.cssClassName_ + ' ' + CLASS_UNSELECTABLE + - ' ' + CLASS_CONTROL + ' ' + - (!isFullScreenSupported() ? CLASS_UNSUPPORTED : ''); + const cssClasses = + this.cssClassName_ + + ' ' + + CLASS_UNSELECTABLE + + ' ' + + CLASS_CONTROL + + ' ' + + (!isFullScreenSupported() ? CLASS_UNSUPPORTED : ''); const element = this.element; element.className = cssClasses; element.appendChild(this.button_); @@ -136,7 +145,6 @@ class FullScreen extends Control { * @type {HTMLElement|string|undefined} */ this.source_ = options.source; - } /** @@ -164,15 +172,15 @@ class FullScreen extends Control { } else { let element; if (this.source_) { - element = typeof this.source_ === 'string' ? - document.getElementById(this.source_) : - this.source_; + element = + typeof this.source_ === 'string' + ? document.getElementById(this.source_) + : this.source_; } else { element = map.getTargetElement(); } if (this.keys_) { requestFullScreenWithKeys(element); - } else { requestFullScreen(element); } @@ -224,13 +232,13 @@ class FullScreen extends Control { if (map) { for (let i = 0, ii = events.length; i < ii; ++i) { this.listenerKeys.push( - listen(document, events[i], this.handleFullScreenChange_, this)); + listen(document, events[i], this.handleFullScreenChange_, this) + ); } } } } - /** * @return {boolean} Fullscreen is supported by the current platform. */ @@ -248,7 +256,9 @@ function isFullScreenSupported() { */ function isFullScreen() { return !!( - document.webkitIsFullScreen || document.msFullscreenElement || document.fullscreenElement + document.webkitIsFullScreen || + document.msFullscreenElement || + document.fullscreenElement ); } diff --git a/src/ol/control/MousePosition.js b/src/ol/control/MousePosition.js index b55796638e..f7bbee05e9 100644 --- a/src/ol/control/MousePosition.js +++ b/src/ol/control/MousePosition.js @@ -3,12 +3,16 @@ */ import 'elm-pep'; -import {listen} from '../events.js'; +import Control from './Control.js'; import EventType from '../pointer/EventType.js'; import {getChangeEventType} from '../Object.js'; -import Control from './Control.js'; -import {getTransformFromProjections, identityTransform, get as getProjection, getUserProjection} from '../proj.js'; - +import { + get as getProjection, + getTransformFromProjections, + getUserProjection, + identityTransform, +} from '../proj.js'; +import {listen} from '../events.js'; /** * @type {string} @@ -20,7 +24,6 @@ const PROJECTION = 'projection'; */ const COORDINATE_FORMAT = 'coordinateFormat'; - /** * @typedef {Object} Options * @property {string} [className='ol-mouse-position'] CSS class name. @@ -38,7 +41,6 @@ const COORDINATE_FORMAT = 'coordinateFormat'; * string `''`). */ - /** * @classdesc * A control to show the 2D coordinates of the mouse cursor. By default, these @@ -52,24 +54,26 @@ const COORDINATE_FORMAT = 'coordinateFormat'; * @api */ class MousePosition extends Control { - /** * @param {Options=} opt_options Mouse position options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; const element = document.createElement('div'); - element.className = options.className !== undefined ? options.className : 'ol-mouse-position'; + element.className = + options.className !== undefined ? options.className : 'ol-mouse-position'; super({ element: element, render: options.render || render, - target: options.target + target: options.target, }); - this.addEventListener(getChangeEventType(PROJECTION), this.handleProjectionChanged_); + this.addEventListener( + getChangeEventType(PROJECTION), + this.handleProjectionChanged_ + ); if (options.coordinateFormat) { this.setCoordinateFormat(options.coordinateFormat); @@ -82,7 +86,8 @@ class MousePosition extends Control { * @private * @type {string} */ - this.undefinedHTML_ = options.undefinedHTML !== undefined ? options.undefinedHTML : ' '; + this.undefinedHTML_ = + options.undefinedHTML !== undefined ? options.undefinedHTML : ' '; /** * @private @@ -107,7 +112,6 @@ class MousePosition extends Control { * @type {?import("../proj.js").TransformFunction} */ this.transform_ = null; - } /** @@ -126,9 +130,9 @@ class MousePosition extends Control { * @api */ getCoordinateFormat() { - return ( - /** @type {import("../coordinate.js").CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT)) - ); + return /** @type {import("../coordinate.js").CoordinateFormat|undefined} */ (this.get( + COORDINATE_FORMAT + )); } /** @@ -139,9 +143,9 @@ class MousePosition extends Control { * @api */ getProjection() { - return ( - /** @type {import("../proj/Projection.js").default|undefined} */ (this.get(PROJECTION)) - ); + return /** @type {import("../proj/Projection.js").default|undefined} */ (this.get( + PROJECTION + )); } /** @@ -216,7 +220,9 @@ class MousePosition extends Control { const projection = this.getProjection(); if (projection) { this.transform_ = getTransformFromProjections( - this.mapProjection_, projection); + this.mapProjection_, + projection + ); } else { this.transform_ = identityTransform; } @@ -227,7 +233,9 @@ class MousePosition extends Control { const userProjection = getUserProjection(); if (userProjection) { this.transform_ = getTransformFromProjections( - this.mapProjection_, userProjection); + this.mapProjection_, + userProjection + ); } this.transform_(coordinate, coordinate); const coordinateFormat = this.getCoordinateFormat(); @@ -245,7 +253,6 @@ class MousePosition extends Control { } } - /** * Update the projection. Rendering of the coordinates is done in * `handleMouseMove` and `handleMouseUp`. @@ -264,5 +271,4 @@ export function render(mapEvent) { } } - export default MousePosition; diff --git a/src/ol/control/OverviewMap.js b/src/ol/control/OverviewMap.js index a64b15979d..b48294f4ad 100644 --- a/src/ol/control/OverviewMap.js +++ b/src/ol/control/OverviewMap.js @@ -1,24 +1,29 @@ /** * @module ol/control/OverviewMap */ -import PluggableMap from '../PluggableMap.js'; import CompositeMapRenderer from '../renderer/Composite.js'; +import Control from './Control.js'; +import EventType from '../events/EventType.js'; import MapEventType from '../MapEventType.js'; import MapProperty from '../MapProperty.js'; -import {getChangeEventType} from '../Object.js'; import ObjectEventType from '../ObjectEventType.js'; import Overlay from '../Overlay.js'; import OverlayPositioning from '../OverlayPositioning.js'; -import ViewProperty from '../ViewProperty.js'; -import Control from './Control.js'; -import {fromExtent as polygonFromExtent} from '../geom/Polygon.js'; -import {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_COLLAPSED} from '../css.js'; -import {replaceNode} from '../dom.js'; -import {listen, listenOnce} from '../events.js'; -import EventType from '../events/EventType.js'; -import {containsExtent, equals as equalsExtent, getBottomRight, getTopLeft, scaleFromCenter} from '../extent.js'; +import PluggableMap from '../PluggableMap.js'; import View from '../View.js'; - +import ViewProperty from '../ViewProperty.js'; +import {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; +import { + containsExtent, + equals as equalsExtent, + getBottomRight, + getTopLeft, + scaleFromCenter, +} from '../extent.js'; +import {getChangeEventType} from '../Object.js'; +import {listen, listenOnce} from '../events.js'; +import {fromExtent as polygonFromExtent} from '../geom/Polygon.js'; +import {replaceNode} from '../dom.js'; /** * Maximum width and/or height extent ratio that determines when the overview @@ -27,7 +32,6 @@ import View from '../View.js'; */ const MAX_RATIO = 0.75; - /** * Minimum width and/or height extent ratio that determines when the overview * map should be zoomed in. @@ -35,14 +39,12 @@ const MAX_RATIO = 0.75; */ const MIN_RATIO = 0.1; - class ControlledMap extends PluggableMap { createRenderer() { return new CompositeMapRenderer(this); } } - /** * @typedef {Object} Options * @property {string} [className='ol-overviewmap'] CSS class name. @@ -64,7 +66,6 @@ class ControlledMap extends PluggableMap { * a default view with the same projection as the main map will be used. */ - /** * Create a new control with a map acting as an overview map for another * defined map. @@ -72,18 +73,16 @@ class ControlledMap extends PluggableMap { * @api */ class OverviewMap extends Control { - /** * @param {Options=} opt_options OverviewMap options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; super({ element: document.createElement('div'), render: options.render || render, - target: options.target + target: options.target, }); /** @@ -95,14 +94,15 @@ class OverviewMap extends Control { * @type {boolean} * @private */ - this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true; + this.collapsed_ = + options.collapsed !== undefined ? options.collapsed : true; /** * @private * @type {boolean} */ - this.collapsible_ = options.collapsible !== undefined ? - options.collapsible : true; + this.collapsible_ = + options.collapsible !== undefined ? options.collapsible : true; if (!this.collapsible_) { this.collapsed_ = false; @@ -112,8 +112,8 @@ class OverviewMap extends Control { * @private * @type {boolean} */ - this.rotateWithView_ = options.rotateWithView !== undefined ? - options.rotateWithView : false; + this.rotateWithView_ = + options.rotateWithView !== undefined ? options.rotateWithView : false; /** * @private @@ -121,11 +121,14 @@ class OverviewMap extends Control { */ this.viewExtent_ = undefined; - const className = options.className !== undefined ? options.className : 'ol-overviewmap'; + const className = + options.className !== undefined ? options.className : 'ol-overviewmap'; - const tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map'; + const tipLabel = + options.tipLabel !== undefined ? options.tipLabel : 'Overview map'; - const collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\u00AB'; + const collapseLabel = + options.collapseLabel !== undefined ? options.collapseLabel : '\u00AB'; if (typeof collapseLabel === 'string') { /** @@ -140,7 +143,6 @@ class OverviewMap extends Control { const label = options.label !== undefined ? options.label : '\u00BB'; - if (typeof label === 'string') { /** * @private @@ -152,14 +154,18 @@ class OverviewMap extends Control { this.label_ = label; } - const activeLabel = (this.collapsible_ && !this.collapsed_) ? - this.collapseLabel_ : this.label_; + const activeLabel = + this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_; const button = document.createElement('button'); button.setAttribute('type', 'button'); button.title = tipLabel; button.appendChild(activeLabel); - button.addEventListener(EventType.CLICK, this.handleClick_.bind(this), false); + button.addEventListener( + EventType.CLICK, + this.handleClick_.bind(this), + false + ); /** * @type {HTMLElement} @@ -180,12 +186,12 @@ class OverviewMap extends Control { * @private */ this.ovmap_ = new ControlledMap({ - view: options.view + view: options.view, }); const ovmap = this.ovmap_; if (options.layers) { - options.layers.forEach(function(layer) { + options.layers.forEach(function (layer) { ovmap.addLayer(layer); }); } @@ -201,13 +207,18 @@ class OverviewMap extends Control { this.boxOverlay_ = new Overlay({ position: [0, 0], positioning: OverlayPositioning.CENTER_CENTER, - element: box + element: box, }); this.ovmap_.addOverlay(this.boxOverlay_); - const cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL + - (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') + - (this.collapsible_ ? '' : ' ol-uncollapsible'); + const cssClasses = + className + + ' ' + + CLASS_UNSELECTABLE + + ' ' + + CLASS_CONTROL + + (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') + + (this.collapsible_ ? '' : ' ol-uncollapsible'); const element = this.element; element.className = cssClasses; element.appendChild(this.ovmapDiv_); @@ -222,21 +233,23 @@ class OverviewMap extends Control { /* Functions definition */ - const computeDesiredMousePosition = function(mousePosition) { + const computeDesiredMousePosition = function (mousePosition) { return { clientX: mousePosition.clientX, - clientY: mousePosition.clientY + clientY: mousePosition.clientY, }; }; - const move = function(event) { + const move = function (event) { const position = /** @type {?} */ (computeDesiredMousePosition(event)); - const coordinates = ovmap.getEventCoordinateInternal(/** @type {Event} */ (position)); + const coordinates = ovmap.getEventCoordinateInternal( + /** @type {Event} */ (position) + ); overlay.setPosition(coordinates); }; - const endMoving = function(event) { + const endMoving = function (event) { const coordinates = ovmap.getEventCoordinateInternal(event); scope.getMap().getView().setCenterInternal(coordinates); @@ -247,11 +260,10 @@ class OverviewMap extends Control { /* Binding */ - overlayBox.addEventListener('mousedown', function() { + overlayBox.addEventListener('mousedown', function () { window.addEventListener('mousemove', move); window.addEventListener('mouseup', endMoving); }); - } /** @@ -277,9 +289,14 @@ class OverviewMap extends Control { if (map) { this.ovmap_.setTarget(this.ovmapDiv_); - this.listenerKeys.push(listen( - map, ObjectEventType.PROPERTYCHANGE, - this.handleMapPropertyChange_, this)); + this.listenerKeys.push( + listen( + map, + ObjectEventType.PROPERTYCHANGE, + this.handleMapPropertyChange_, + this + ) + ); const view = map.getView(); if (view) { @@ -317,12 +334,15 @@ class OverviewMap extends Control { if (!this.view_) { // Unless an explicit view definition was given, derive default from whatever main map uses. const newView = new View({ - projection: view.getProjection() + projection: view.getProjection(), }); this.ovmap_.setView(newView); } - view.addEventListener(getChangeEventType(ViewProperty.ROTATION), this.boundHandleRotationChanged_); + view.addEventListener( + getChangeEventType(ViewProperty.ROTATION), + this.boundHandleRotationChanged_ + ); // Sync once with the new view this.handleRotationChanged_(); } @@ -333,7 +353,10 @@ class OverviewMap extends Control { * @private */ unbindView_(view) { - view.removeEventListener(getChangeEventType(ViewProperty.ROTATION), this.boundHandleRotationChanged_); + view.removeEventListener( + getChangeEventType(ViewProperty.ROTATION), + this.boundHandleRotationChanged_ + ); } /** @@ -381,10 +404,12 @@ class OverviewMap extends Control { const ovview = ovmap.getView(); const ovextent = ovview.calculateExtentInternal(ovmapSize); - const topLeftPixel = - ovmap.getPixelFromCoordinateInternal(getTopLeft(extent)); - const bottomRightPixel = - ovmap.getPixelFromCoordinateInternal(getBottomRight(extent)); + const topLeftPixel = ovmap.getPixelFromCoordinateInternal( + getTopLeft(extent) + ); + const bottomRightPixel = ovmap.getPixelFromCoordinateInternal( + getBottomRight(extent) + ); const boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]); const boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]); @@ -392,10 +417,12 @@ class OverviewMap extends Control { const ovmapWidth = ovmapSize[0]; const ovmapHeight = ovmapSize[1]; - if (boxWidth < ovmapWidth * MIN_RATIO || - boxHeight < ovmapHeight * MIN_RATIO || - boxWidth > ovmapWidth * MAX_RATIO || - boxHeight > ovmapHeight * MAX_RATIO) { + if ( + boxWidth < ovmapWidth * MIN_RATIO || + boxHeight < ovmapHeight * MIN_RATIO || + boxWidth > ovmapWidth * MAX_RATIO || + boxHeight > ovmapHeight * MAX_RATIO + ) { this.resetExtent_(); } else if (!containsExtent(ovextent, extent)) { this.recenter_(); @@ -425,8 +452,7 @@ class OverviewMap extends Control { // get how many times the current map overview could hold different // box sizes using the min and max ratio, pick the step in the middle used // to calculate the extent from the main map to set it to the overview map, - const steps = Math.log( - MAX_RATIO / MIN_RATIO) / Math.LN2; + const steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2; const ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO); scaleFromCenter(extent, ratio); ovview.fitInternal(polygonFromExtent(extent)); @@ -473,8 +499,8 @@ class OverviewMap extends Control { const center = view.getCenterInternal(); const resolution = view.getResolution(); const ovresolution = ovview.getResolution(); - const width = mapSize[0] * resolution / ovresolution; - const height = mapSize[1] * resolution / ovresolution; + const width = (mapSize[0] * resolution) / ovresolution; + const height = (mapSize[1] * resolution) / ovresolution; // set position using center coordinates overlay.setPosition(center); @@ -520,11 +546,14 @@ class OverviewMap extends Control { } ovmap.updateSize(); this.resetExtent_(); - listenOnce(ovmap, MapEventType.POSTRENDER, - function(event) { + listenOnce( + ovmap, + MapEventType.POSTRENDER, + function (event) { this.updateBox_(); }, - this); + this + ); } } @@ -617,7 +646,6 @@ class OverviewMap extends Control { } } - /** * Update the overview map element. * @param {import("../MapEvent.js").default} mapEvent Map event. @@ -628,5 +656,4 @@ export function render(mapEvent) { this.updateBox_(); } - export default OverviewMap; diff --git a/src/ol/control/Rotate.js b/src/ol/control/Rotate.js index c4bdc237d3..26e3881ac5 100644 --- a/src/ol/control/Rotate.js +++ b/src/ol/control/Rotate.js @@ -2,10 +2,9 @@ * @module ol/control/Rotate */ import Control from './Control.js'; +import EventType from '../events/EventType.js'; import {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js'; import {easeOut} from '../easing.js'; -import EventType from '../events/EventType.js'; - /** * @typedef {Object} Options @@ -23,7 +22,6 @@ import EventType from '../events/EventType.js'; * rendered outside of the map's viewport. */ - /** * @classdesc * A button control to reset rotation to 0. @@ -33,21 +31,20 @@ import EventType from '../events/EventType.js'; * @api */ class Rotate extends Control { - /** * @param {Options=} opt_options Rotate options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; super({ element: document.createElement('div'), render: options.render || render, - target: options.target + target: options.target, }); - const className = options.className !== undefined ? options.className : 'ol-rotate'; + const className = + options.className !== undefined ? options.className : 'ol-rotate'; const label = options.label !== undefined ? options.label : '\u21E7'; @@ -74,9 +71,14 @@ class Rotate extends Control { button.title = tipLabel; button.appendChild(this.label_); - button.addEventListener(EventType.CLICK, this.handleClick_.bind(this), false); + button.addEventListener( + EventType.CLICK, + this.handleClick_.bind(this), + false + ); - const cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; + const cssClasses = + className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; const element = this.element; element.className = cssClasses; element.appendChild(button); @@ -104,7 +106,6 @@ class Rotate extends Control { if (this.autoHide_) { this.element.classList.add(CLASS_HIDDEN); } - } /** @@ -137,7 +138,7 @@ class Rotate extends Control { view.animate({ rotation: 0, duration: this.duration_, - easing: easeOut + easing: easeOut, }); } else { view.setRotation(0); @@ -146,7 +147,6 @@ class Rotate extends Control { } } - /** * Update the rotate control element. * @param {import("../MapEvent.js").default} mapEvent Map event. diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index b910182ab1..25e71be508 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -1,13 +1,12 @@ /** * @module ol/control/ScaleLine */ -import {getChangeEventType} from '../Object.js'; -import {assert} from '../asserts.js'; import Control from './Control.js'; -import {CLASS_UNSELECTABLE} from '../css.js'; -import {getPointResolution, METERS_PER_UNIT} from '../proj.js'; import ProjUnits from '../proj/Units.js'; - +import {CLASS_UNSELECTABLE} from '../css.js'; +import {METERS_PER_UNIT, getPointResolution} from '../proj.js'; +import {assert} from '../asserts.js'; +import {getChangeEventType} from '../Object.js'; /** * @type {string} @@ -24,10 +23,9 @@ export const Units = { IMPERIAL: 'imperial', NAUTICAL: 'nautical', METRIC: 'metric', - US: 'us' + US: 'us', }; - /** * @const * @type {Array} @@ -40,7 +38,6 @@ const LEADING_DIGITS = [1, 2, 5]; */ const DEFAULT_DPI = 25.4 / 0.28; - /** * @typedef {Object} Options * @property {string} [className='ol-scale-line'] CSS Class name. @@ -60,7 +57,6 @@ const DEFAULT_DPI = 25.4 / 0.28; * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed. */ - /** * @classdesc * A control displaying rough y-axis distances, calculated for the center of the @@ -76,21 +72,23 @@ const DEFAULT_DPI = 25.4 / 0.28; * @api */ class ScaleLine extends Control { - /** * @param {Options=} opt_options Scale line options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; - const className = options.className !== undefined ? options.className : - options.bar ? 'ol-scale-bar' : 'ol-scale-line'; + const className = + options.className !== undefined + ? options.className + : options.bar + ? 'ol-scale-bar' + : 'ol-scale-line'; super({ element: document.createElement('div'), render: options.render || render, - target: options.target + target: options.target, }); /** @@ -133,7 +131,10 @@ class ScaleLine extends Control { */ this.renderedHTML_ = ''; - this.addEventListener(getChangeEventType(UNITS_PROP), this.handleUnitsChanged_); + this.addEventListener( + getChangeEventType(UNITS_PROP), + this.handleUnitsChanged_ + ); this.setUnits(options.units || Units.METRIC); @@ -160,7 +161,6 @@ class ScaleLine extends Control { * @type {number|undefined} */ this.dpi_ = options.dpi || undefined; - } /** @@ -217,13 +217,17 @@ class ScaleLine extends Control { const center = viewState.center; const projection = viewState.projection; const units = this.getUnits(); - const pointResolutionUnits = units == Units.DEGREES ? - ProjUnits.DEGREES : - ProjUnits.METERS; - let pointResolution = - getPointResolution(projection, viewState.resolution, center, pointResolutionUnits); + const pointResolutionUnits = + units == Units.DEGREES ? ProjUnits.DEGREES : ProjUnits.METERS; + let pointResolution = getPointResolution( + projection, + viewState.resolution, + center, + pointResolutionUnits + ); - const minWidth = this.minWidth_ * (this.dpi_ || DEFAULT_DPI) / DEFAULT_DPI; + const minWidth = + (this.minWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI; let nominalCount = minWidth * pointResolution; let suffix = ''; @@ -281,8 +285,7 @@ class ScaleLine extends Control { assert(false, 33); // Invalid units } - let i = 3 * Math.floor( - Math.log(minWidth * pointResolution) / Math.log(10)); + let i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10)); let count, width, decimalCount; while (true) { decimalCount = Math.floor(i / 3); @@ -319,7 +322,6 @@ class ScaleLine extends Control { this.element.style.display = ''; this.renderedVisible_ = true; } - } /** @@ -330,7 +332,8 @@ class ScaleLine extends Control { * @returns {string} The stringified HTML of the scalebar. */ createScaleBar(width, scale, suffix) { - const mapScale = '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString(); + const mapScale = + '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString(); const scaleSteps = []; const stepWidth = width / this.scaleBarSteps_; let backgroundColor = '#ffffff'; @@ -342,22 +345,27 @@ class ScaleLine extends Control { scaleSteps.push( '
    ' + '
    ' + '
    ' + this.createMarker('relative', i) + /*render text every second step, except when only 2 steps */ - (i % 2 === 0 || this.scaleBarSteps_ === 2 ? - this.createStepText(i, width, false, scale, suffix) : - '' - ) + - '
    ' + (i % 2 === 0 || this.scaleBarSteps_ === 2 + ? this.createStepText(i, width, false, scale, suffix) + : '') + + '
    ' ); if (i === this.scaleBarSteps_ - 1) { - {/*render text at the end */} + { + /*render text at the end */ + } scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix)); } // switch colors of steps between black and white @@ -370,19 +378,23 @@ class ScaleLine extends Control { let scaleBarText; if (this.scaleBarText_) { - scaleBarText = '
    ' + - mapScale + - '
    '; + scaleBarText = + '
    ' + + mapScale + + '
    '; } else { scaleBarText = ''; } - const container = '
    ' + scaleBarText + scaleSteps.join('') + - '
    '; + ''; return container; } @@ -394,11 +406,17 @@ class ScaleLine extends Control { */ createMarker(position, i) { const top = position === 'absolute' ? 3 : -10; - return '
    '; + return ( + '
    ' + ); } /** @@ -411,20 +429,31 @@ class ScaleLine extends Control { * @returns {string} The stringified div containing the step text */ createStepText(i, width, isLast, scale, suffix) { - const length = i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_ * i) * 100) / 100; + const length = + i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_) * i * 100) / 100; const lengthString = length + (i === 0 ? '' : ' ' + suffix); - const margin = i === 0 ? -3 : width / this.scaleBarSteps_ * -1; - const minWidth = i === 0 ? 0 : width / this.scaleBarSteps_ * 2; - return '
    ' + lengthString + - '
    '; + '' + ); } /** @@ -459,5 +488,4 @@ export function render(mapEvent) { this.updateElement_(); } - export default ScaleLine; diff --git a/src/ol/control/Zoom.js b/src/ol/control/Zoom.js index 0dbed9bf39..b2ac5dae04 100644 --- a/src/ol/control/Zoom.js +++ b/src/ol/control/Zoom.js @@ -1,12 +1,11 @@ /** * @module ol/control/Zoom */ -import EventType from '../events/EventType.js'; import Control from './Control.js'; +import EventType from '../events/EventType.js'; import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; import {easeOut} from '../easing.js'; - /** * @typedef {Object} Options * @property {number} [duration=250] Animation duration in milliseconds. @@ -22,7 +21,6 @@ import {easeOut} from '../easing.js'; * rendered outside of the map's viewport. */ - /** * @classdesc * A control with 2 buttons, one for zoom in and one for zoom out. @@ -32,52 +30,68 @@ import {easeOut} from '../easing.js'; * @api */ class Zoom extends Control { - /** * @param {Options=} opt_options Zoom options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; super({ element: document.createElement('div'), - target: options.target + target: options.target, }); - const className = options.className !== undefined ? options.className : 'ol-zoom'; + const className = + options.className !== undefined ? options.className : 'ol-zoom'; const delta = options.delta !== undefined ? options.delta : 1; - const zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+'; - const zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\u2212'; + const zoomInLabel = + options.zoomInLabel !== undefined ? options.zoomInLabel : '+'; + const zoomOutLabel = + options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\u2212'; - const zoomInTipLabel = options.zoomInTipLabel !== undefined ? - options.zoomInTipLabel : 'Zoom in'; - const zoomOutTipLabel = options.zoomOutTipLabel !== undefined ? - options.zoomOutTipLabel : 'Zoom out'; + const zoomInTipLabel = + options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in'; + const zoomOutTipLabel = + options.zoomOutTipLabel !== undefined + ? options.zoomOutTipLabel + : 'Zoom out'; const inElement = document.createElement('button'); inElement.className = className + '-in'; inElement.setAttribute('type', 'button'); inElement.title = zoomInTipLabel; inElement.appendChild( - typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel + typeof zoomInLabel === 'string' + ? document.createTextNode(zoomInLabel) + : zoomInLabel ); - inElement.addEventListener(EventType.CLICK, this.handleClick_.bind(this, delta), false); + inElement.addEventListener( + EventType.CLICK, + this.handleClick_.bind(this, delta), + false + ); const outElement = document.createElement('button'); outElement.className = className + '-out'; outElement.setAttribute('type', 'button'); outElement.title = zoomOutTipLabel; outElement.appendChild( - typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel + typeof zoomOutLabel === 'string' + ? document.createTextNode(zoomOutLabel) + : zoomOutLabel ); - outElement.addEventListener(EventType.CLICK, this.handleClick_.bind(this, -delta), false); + outElement.addEventListener( + EventType.CLICK, + this.handleClick_.bind(this, -delta), + false + ); - const cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; + const cssClasses = + className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; const element = this.element; element.className = cssClasses; element.appendChild(inElement); @@ -88,7 +102,6 @@ class Zoom extends Control { * @private */ this.duration_ = options.duration !== undefined ? options.duration : 250; - } /** @@ -123,7 +136,7 @@ class Zoom extends Control { view.animate({ zoom: newZoom, duration: this.duration_, - easing: easeOut + easing: easeOut, }); } else { view.setZoom(newZoom); @@ -132,5 +145,4 @@ class Zoom extends Control { } } - export default Zoom; diff --git a/src/ol/control/ZoomSlider.js b/src/ol/control/ZoomSlider.js index b65ec01808..d9bef3a62c 100644 --- a/src/ol/control/ZoomSlider.js +++ b/src/ol/control/ZoomSlider.js @@ -4,14 +4,13 @@ import 'elm-pep'; import Control from './Control.js'; +import EventType from '../events/EventType.js'; +import PointerEventType from '../pointer/EventType.js'; import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; +import {clamp} from '../math.js'; import {easeOut} from '../easing.js'; import {listen, unlistenByKey} from '../events.js'; import {stopPropagation} from '../events/Event.js'; -import EventType from '../events/EventType.js'; -import {clamp} from '../math.js'; -import PointerEventType from '../pointer/EventType.js'; - /** * The enum for available directions. @@ -20,10 +19,9 @@ import PointerEventType from '../pointer/EventType.js'; */ const Direction = { VERTICAL: 0, - HORIZONTAL: 1 + HORIZONTAL: 1, }; - /** * @typedef {Object} Options * @property {string} [className='ol-zoomslider'] CSS class name. @@ -32,7 +30,6 @@ const Direction = { * should be re-rendered. This is called in a `requestAnimationFrame` callback. */ - /** * @classdesc * A slider type of control for zooming. @@ -44,23 +41,21 @@ const Direction = { * @api */ class ZoomSlider extends Control { - /** * @param {Options=} opt_options Zoom slider options. */ constructor(opt_options) { - const options = opt_options ? opt_options : {}; super({ element: document.createElement('div'), - render: options.render || render + render: options.render || render, }); /** - * @type {!Array.} - * @private - */ + * @type {!Array.} + * @private + */ this.dragListenerKeys_ = []; /** @@ -131,19 +126,37 @@ class ZoomSlider extends Control { */ this.duration_ = options.duration !== undefined ? options.duration : 200; - const className = options.className !== undefined ? options.className : 'ol-zoomslider'; + const className = + options.className !== undefined ? options.className : 'ol-zoomslider'; const thumbElement = document.createElement('button'); thumbElement.setAttribute('type', 'button'); thumbElement.className = className + '-thumb ' + CLASS_UNSELECTABLE; const containerElement = this.element; - containerElement.className = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; + containerElement.className = + className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; containerElement.appendChild(thumbElement); - containerElement.addEventListener(PointerEventType.POINTERDOWN, this.handleDraggerStart_.bind(this), false); - containerElement.addEventListener(PointerEventType.POINTERMOVE, this.handleDraggerDrag_.bind(this), false); - containerElement.addEventListener(PointerEventType.POINTERUP, this.handleDraggerEnd_.bind(this), false); + containerElement.addEventListener( + PointerEventType.POINTERDOWN, + this.handleDraggerStart_.bind(this), + false + ); + containerElement.addEventListener( + PointerEventType.POINTERMOVE, + this.handleDraggerDrag_.bind(this), + false + ); + containerElement.addEventListener( + PointerEventType.POINTERUP, + this.handleDraggerEnd_.bind(this), + false + ); - containerElement.addEventListener(EventType.CLICK, this.handleContainerClick_.bind(this), false); + containerElement.addEventListener( + EventType.CLICK, + this.handleContainerClick_.bind(this), + false + ); thumbElement.addEventListener(EventType.CLICK, stopPropagation, false); } @@ -171,17 +184,20 @@ class ZoomSlider extends Control { initSlider_() { const container = this.element; const containerSize = { - width: container.offsetWidth, height: container.offsetHeight + width: container.offsetWidth, + height: container.offsetHeight, }; const thumb = /** @type {HTMLElement} */ (container.firstElementChild); const computedStyle = getComputedStyle(thumb); - const thumbWidth = thumb.offsetWidth + - parseFloat(computedStyle['marginRight']) + - parseFloat(computedStyle['marginLeft']); - const thumbHeight = thumb.offsetHeight + - parseFloat(computedStyle['marginTop']) + - parseFloat(computedStyle['marginBottom']); + const thumbWidth = + thumb.offsetWidth + + parseFloat(computedStyle['marginRight']) + + parseFloat(computedStyle['marginLeft']); + const thumbHeight = + thumb.offsetHeight + + parseFloat(computedStyle['marginTop']) + + parseFloat(computedStyle['marginBottom']); this.thumbSize_ = [thumbWidth, thumbHeight]; if (containerSize.width > containerSize.height) { @@ -203,7 +219,8 @@ class ZoomSlider extends Control { const relativePosition = this.getRelativePosition_( event.offsetX - this.thumbSize_[0] / 2, - event.offsetY - this.thumbSize_[1] / 2); + event.offsetY - this.thumbSize_[1] / 2 + ); const resolution = this.getResolutionForPosition_(relativePosition); const zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution)); @@ -211,7 +228,7 @@ class ZoomSlider extends Control { view.animateInternal({ zoom: zoom, duration: this.duration_, - easing: easeOut + easing: easeOut, }); } @@ -222,7 +239,8 @@ class ZoomSlider extends Control { */ handleDraggerStart_(event) { if (!this.dragging_ && event.target === this.element.firstElementChild) { - const element = /** @type {HTMLElement} */ (this.element.firstElementChild); + const element = /** @type {HTMLElement} */ (this.element + .firstElementChild); this.getMap().getView().beginInteraction(); this.startX_ = event.clientX - parseFloat(element.style.left); this.startY_ = event.clientY - parseFloat(element.style.top); @@ -250,7 +268,9 @@ class ZoomSlider extends Control { const deltaX = event.clientX - this.startX_; const deltaY = event.clientY - this.startY_; const relativePosition = this.getRelativePosition_(deltaX, deltaY); - this.currentResolution_ = this.getResolutionForPosition_(relativePosition); + this.currentResolution_ = this.getResolutionForPosition_( + relativePosition + ); this.getMap().getView().setResolution(this.currentResolution_); } } @@ -338,7 +358,6 @@ class ZoomSlider extends Control { } } - /** * Update the zoomslider element. * @param {import("../MapEvent.js").default} mapEvent Map event. @@ -356,5 +375,4 @@ export function render(mapEvent) { this.setThumbPosition_(res); } - export default ZoomSlider; diff --git a/src/ol/control/ZoomToExtent.js b/src/ol/control/ZoomToExtent.js index 6c3142a6c0..68ddcc3c88 100644 --- a/src/ol/control/ZoomToExtent.js +++ b/src/ol/control/ZoomToExtent.js @@ -1,11 +1,10 @@ /** * @module ol/control/ZoomToExtent */ -import EventType from '../events/EventType.js'; -import {fromExtent as polygonFromExtent} from '../geom/Polygon.js'; import Control from './Control.js'; +import EventType from '../events/EventType.js'; import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; - +import {fromExtent as polygonFromExtent} from '../geom/Polygon.js'; /** * @typedef {Object} Options @@ -19,7 +18,6 @@ import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; * extent of the view projection is used. */ - /** * @classdesc * A button control which, when pressed, changes the map view to a specific @@ -28,7 +26,6 @@ import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; * @api */ class ZoomToExtent extends Control { - /** * @param {Options=} opt_options Options. */ @@ -37,7 +34,7 @@ class ZoomToExtent extends Control { super({ element: document.createElement('div'), - target: options.target + target: options.target, }); /** @@ -46,10 +43,12 @@ class ZoomToExtent extends Control { */ this.extent = options.extent ? options.extent : null; - const className = options.className !== undefined ? options.className : 'ol-zoom-extent'; + const className = + options.className !== undefined ? options.className : 'ol-zoom-extent'; const label = options.label !== undefined ? options.label : 'E'; - const tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent'; + const tipLabel = + options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent'; const button = document.createElement('button'); button.setAttribute('type', 'button'); button.title = tipLabel; @@ -57,9 +56,14 @@ class ZoomToExtent extends Control { typeof label === 'string' ? document.createTextNode(label) : label ); - button.addEventListener(EventType.CLICK, this.handleClick_.bind(this), false); + button.addEventListener( + EventType.CLICK, + this.handleClick_.bind(this), + false + ); - const cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; + const cssClasses = + className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL; const element = this.element; element.className = cssClasses; element.appendChild(button); @@ -80,7 +84,9 @@ class ZoomToExtent extends Control { handleZoomToExtent() { const map = this.getMap(); const view = map.getView(); - const extent = !this.extent ? view.getProjection().getExtent() : this.extent; + const extent = !this.extent + ? view.getProjection().getExtent() + : this.extent; view.fitInternal(polygonFromExtent(extent)); } } diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index 563ff1bf64..ec9d2a101b 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -1,10 +1,9 @@ /** * @module ol/coordinate */ +import {getWidth} from './extent.js'; import {modulo} from './math.js'; import {padNumber} from './string.js'; -import {getWidth} from './extent.js'; - /** * An array of numbers representing an xy coordinate. Example: `[16, 48]`. @@ -12,7 +11,6 @@ import {getWidth} from './extent.js'; * @api */ - /** * A function that takes a {@link module:ol/coordinate~Coordinate} and * transforms it into a `{string}`. @@ -21,7 +19,6 @@ import {getWidth} from './extent.js'; * @api */ - /** * Add `delta` to `coordinate`. `coordinate` is modified in place and returned * by the function. @@ -46,7 +43,6 @@ export function add(coordinate, delta) { return coordinate; } - /** * Calculates the point closest to the passed coordinate on the passed circle. * @@ -69,13 +65,12 @@ export function closestOnCircle(coordinate, circle) { } const d = Math.sqrt(dx * dx + dy * dy); - const x = x0 + r * dx / d; - const y = y0 + r * dy / d; + const x = x0 + (r * dx) / d; + const y = y0 + (r * dy) / d; return [x, y]; } - /** * Calculates the point closest to the passed coordinate on the passed segment. * This is the foot of the perpendicular of the coordinate to the segment when @@ -99,8 +94,10 @@ export function closestOnSegment(coordinate, segment) { const y2 = end[1]; const dx = x2 - x1; const dy = y2 - y1; - const along = (dx === 0 && dy === 0) ? 0 : - ((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0); + const along = + dx === 0 && dy === 0 + ? 0 + : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0); let x, y; if (along <= 0) { x = x1; @@ -115,7 +112,6 @@ export function closestOnSegment(coordinate, segment) { return [x, y]; } - /** * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be * used to format @@ -150,13 +146,12 @@ export function createStringXY(opt_fractionDigits) { * @param {Coordinate} coordinate Coordinate. * @return {string} String XY. */ - function(coordinate) { + function (coordinate) { return toStringXY(coordinate, opt_fractionDigits); } ); } - /** * @param {string} hemispheres Hemispheres. * @param {number} degrees Degrees. @@ -172,7 +167,7 @@ export function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) { let deg = Math.floor(x / 3600); let min = Math.floor((x - deg * 3600) / 60); - let sec = x - (deg * 3600) - (min * 60); + let sec = x - deg * 3600 - min * 60; sec = Math.ceil(sec * precision) / precision; if (sec >= 60) { @@ -185,12 +180,19 @@ export function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) { deg += 1; } - return deg + '\u00b0 ' + padNumber(min, 2) + '\u2032 ' + - padNumber(sec, 2, dflPrecision) + '\u2033' + - (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)); + return ( + deg + + '\u00b0 ' + + padNumber(min, 2) + + '\u2032 ' + + padNumber(sec, 2, dflPrecision) + + '\u2033' + + (normalizedDegrees == 0 + ? '' + : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)) + ); } - /** * Transforms the given {@link module:ol/coordinate~Coordinate} to a string * using the given string template. The strings `{x}` and `{y}` in the template @@ -232,7 +234,6 @@ export function format(coordinate, template, opt_fractionDigits) { } } - /** * @param {Coordinate} coordinate1 First coordinate. * @param {Coordinate} coordinate2 Second coordinate. @@ -249,7 +250,6 @@ export function equals(coordinate1, coordinate2) { return equals; } - /** * Rotate `coordinate` by `angle`. `coordinate` is modified in place and * returned by the function. @@ -278,7 +278,6 @@ export function rotate(coordinate, angle) { return coordinate; } - /** * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned * by the function. @@ -302,7 +301,6 @@ export function scale(coordinate, scale) { return coordinate; } - /** * @param {Coordinate} coord1 First coordinate. * @param {Coordinate} coord2 Second coordinate. @@ -314,7 +312,6 @@ export function squaredDistance(coord1, coord2) { return dx * dx + dy * dy; } - /** * @param {Coordinate} coord1 First coordinate. * @param {Coordinate} coord2 Second coordinate. @@ -324,7 +321,6 @@ export function distance(coord1, coord2) { return Math.sqrt(squaredDistance(coord1, coord2)); } - /** * Calculate the squared distance from a coordinate to a line segment. * @@ -334,11 +330,9 @@ export function distance(coord1, coord2) { * @return {number} Squared distance from the point to the line segment. */ export function squaredDistanceToSegment(coordinate, segment) { - return squaredDistance(coordinate, - closestOnSegment(coordinate, segment)); + return squaredDistance(coordinate, closestOnSegment(coordinate, segment)); } - /** * Format a geographic coordinate with the hemisphere, degrees, minutes, and * seconds. @@ -367,14 +361,16 @@ export function squaredDistanceToSegment(coordinate, segment) { */ export function toStringHDMS(coordinate, opt_fractionDigits) { if (coordinate) { - return degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' + - degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits); + return ( + degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + + ' ' + + degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits) + ); } else { return ''; } } - /** * Format a coordinate as a comma delimited string. * @@ -404,7 +400,6 @@ export function toStringXY(coordinate, opt_fractionDigits) { return format(coordinate, '{x}, {y}', opt_fractionDigits); } - /** * Modifies the provided coordinate in-place to be within the real world * extent. The lower projection extent boundary is inclusive, the upper one @@ -416,10 +411,16 @@ export function toStringXY(coordinate, opt_fractionDigits) { */ export function wrapX(coordinate, projection) { const projectionExtent = projection.getExtent(); - if (projection.canWrapX() && (coordinate[0] < projectionExtent[0] || coordinate[0] >= projectionExtent[2])) { + if ( + projection.canWrapX() && + (coordinate[0] < projectionExtent[0] || + coordinate[0] >= projectionExtent[2]) + ) { const worldWidth = getWidth(projectionExtent); - const worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / worldWidth); - coordinate[0] -= (worldsAway * worldWidth); + const worldsAway = Math.floor( + (coordinate[0] - projectionExtent[0]) / worldWidth + ); + coordinate[0] -= worldsAway * worldWidth; } return coordinate; } diff --git a/src/ol/css.js b/src/ol/css.js index 88a6d5c9dc..b7eb38b0bf 100644 --- a/src/ol/css.js +++ b/src/ol/css.js @@ -13,7 +13,6 @@ * @property {Array} families */ - /** * The CSS class for hidden feature. * @@ -22,7 +21,6 @@ */ export const CLASS_HIDDEN = 'ol-hidden'; - /** * The CSS class that we'll give the DOM elements to have them selectable. * @@ -31,7 +29,6 @@ export const CLASS_HIDDEN = 'ol-hidden'; */ export const CLASS_SELECTABLE = 'ol-selectable'; - /** * The CSS class that we'll give the DOM elements to have them unselectable. * @@ -40,7 +37,6 @@ export const CLASS_SELECTABLE = 'ol-selectable'; */ export const CLASS_UNSELECTABLE = 'ol-unselectable'; - /** * The CSS class for unsupported feature. * @@ -49,7 +45,6 @@ export const CLASS_UNSELECTABLE = 'ol-unselectable'; */ export const CLASS_UNSUPPORTED = 'ol-unsupported'; - /** * The CSS class for controls. * @@ -58,7 +53,6 @@ export const CLASS_UNSUPPORTED = 'ol-unsupported'; */ export const CLASS_CONTROL = 'ol-control'; - /** * The CSS class that we'll give the DOM elements that are collapsed, i.e. * to those elements which usually can be expanded. @@ -72,22 +66,25 @@ export const CLASS_COLLAPSED = 'ol-collapsed'; * From http://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font * @type {RegExp} */ -const fontRegEx = new RegExp([ - '^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)', - '(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)', - '(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)', - '(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?', - '(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))', - '(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))', - '?\\s*([-,\\"\\\'\\sa-z]+?)\\s*$' -].join(''), 'i'); +const fontRegEx = new RegExp( + [ + '^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)', + '(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)', + '(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)', + '(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?', + '(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))', + '(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))', + '?\\s*([-,\\"\\\'\\sa-z]+?)\\s*$', + ].join(''), + 'i' +); const fontRegExMatchIndex = [ 'style', 'variant', 'weight', 'size', 'lineHeight', - 'family' + 'family', ]; /** @@ -96,7 +93,7 @@ const fontRegExMatchIndex = [ * @param {string} fontSpec The CSS font property. * @return {FontParameters} The font parameters (or null if the input spec is invalid). */ -export const getFontParameters = function(fontSpec) { +export const getFontParameters = function (fontSpec) { const match = fontSpec.match(fontRegEx); if (!match) { return null; @@ -106,7 +103,7 @@ export const getFontParameters = function(fontSpec) { size: '1.2em', style: 'normal', weight: 'normal', - variant: 'normal' + variant: 'normal', }); for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) { const value = match[i + 1]; diff --git a/src/ol/dom.js b/src/ol/dom.js index e3c403cc99..1c392cce21 100644 --- a/src/ol/dom.js +++ b/src/ol/dom.js @@ -4,7 +4,6 @@ import {WORKER_OFFSCREEN_CANVAS} from './has.js'; * @module ol/dom */ - //FIXME Move this function to the canvas module /** * Create an html canvas element and returns its 2d context. @@ -14,11 +13,12 @@ import {WORKER_OFFSCREEN_CANVAS} from './has.js'; * @return {CanvasRenderingContext2D} The context. */ export function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) { - const canvas = opt_canvasPool && opt_canvasPool.length ? - opt_canvasPool.shift() : - WORKER_OFFSCREEN_CANVAS ? - new OffscreenCanvas(opt_width || 300, opt_height || 300) : - document.createElement('canvas'); + const canvas = + opt_canvasPool && opt_canvasPool.length + ? opt_canvasPool.shift() + : WORKER_OFFSCREEN_CANVAS + ? new OffscreenCanvas(opt_width || 300, opt_height || 300) + : document.createElement('canvas'); if (opt_width) { canvas.width = opt_width; } @@ -29,7 +29,6 @@ export function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) { return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')); } - /** * Get the current computed width for the given element including margin, * padding and border. @@ -45,7 +44,6 @@ export function outerWidth(element) { return width; } - /** * Get the current computed height for the given element including margin, * padding and border. diff --git a/src/ol/easing.js b/src/ol/easing.js index 7a64d450e9..b6a6c51f51 100644 --- a/src/ol/easing.js +++ b/src/ol/easing.js @@ -2,7 +2,6 @@ * @module ol/easing */ - /** * Start slow and speed up. * @param {number} t Input between 0 and 1. @@ -13,7 +12,6 @@ export function easeIn(t) { return Math.pow(t, 3); } - /** * Start fast and slow down. * @param {number} t Input between 0 and 1. @@ -24,7 +22,6 @@ export function easeOut(t) { return 1 - easeIn(1 - t); } - /** * Start slow, speed up, and then slow down again. * @param {number} t Input between 0 and 1. @@ -35,7 +32,6 @@ export function inAndOut(t) { return 3 * t * t - 2 * t * t * t; } - /** * Maintain a constant speed over time. * @param {number} t Input between 0 and 1. @@ -46,7 +42,6 @@ export function linear(t) { return t; } - /** * Start slow, speed up, and at the very end slow down again. This has the * same general behavior as {@link module:ol/easing~inAndOut}, but the final diff --git a/src/ol/events.js b/src/ol/events.js index f234e82dca..8bd12b7b6e 100644 --- a/src/ol/events.js +++ b/src/ol/events.js @@ -3,7 +3,6 @@ */ import {clear} from './obj.js'; - /** * Key to use with {@link module:ol/Observable~Observable#unByKey}. * @typedef {Object} EventsKey @@ -51,7 +50,7 @@ export function listen(target, type, listener, opt_this, opt_once) { } if (opt_once) { const originalListener = listener; - listener = function() { + listener = function () { target.removeEventListener(type, listener); originalListener.apply(this, arguments); }; @@ -59,13 +58,12 @@ export function listen(target, type, listener, opt_this, opt_once) { const eventsKey = { target: target, type: type, - listener: listener + listener: listener, }; target.addEventListener(type, listener); return eventsKey; } - /** * Registers a one-off event listener on an event target. Inspired by * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html @@ -90,7 +88,6 @@ export function listenOnce(target, type, listener, opt_this) { return listen(target, type, listener, opt_this, true); } - /** * Unregisters event listeners on an event target. Inspired by * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html diff --git a/src/ol/events/Event.js b/src/ol/events/Event.js index 1f6d9739b2..69ce76ba1d 100644 --- a/src/ol/events/Event.js +++ b/src/ol/events/Event.js @@ -13,12 +13,10 @@ * {@link module:ol/events/Target~Target}. */ class BaseEvent { - /** * @param {string} type Type. */ constructor(type) { - /** * @type {boolean} */ @@ -54,10 +52,8 @@ class BaseEvent { stopPropagation() { this.propagationStopped = true; } - } - /** * @param {Event|import("./Event.js").default} evt Event */ @@ -65,7 +61,6 @@ export function stopPropagation(evt) { evt.stopPropagation(); } - /** * @param {Event|import("./Event.js").default} evt Event */ diff --git a/src/ol/events/EventType.js b/src/ol/events/EventType.js index 8959635887..571a653111 100644 --- a/src/ol/events/EventType.js +++ b/src/ol/events/EventType.js @@ -35,5 +35,5 @@ export default { LOAD: 'load', RESIZE: 'resize', TOUCHMOVE: 'touchmove', - WHEEL: 'wheel' + WHEEL: 'wheel', }; diff --git a/src/ol/events/KeyCode.js b/src/ol/events/KeyCode.js index e855570c82..01a2d8cf10 100644 --- a/src/ol/events/KeyCode.js +++ b/src/ol/events/KeyCode.js @@ -10,5 +10,5 @@ export default { LEFT: 37, UP: 38, RIGHT: 39, - DOWN: 40 + DOWN: 40, }; diff --git a/src/ol/events/Target.js b/src/ol/events/Target.js index 475d2d570e..dbc845d0dc 100644 --- a/src/ol/events/Target.js +++ b/src/ol/events/Target.js @@ -2,16 +2,14 @@ * @module ol/events/Target */ import Disposable from '../Disposable.js'; -import {VOID} from '../functions.js'; import Event from './Event.js'; +import {VOID} from '../functions.js'; import {clear} from '../obj.js'; - /** * @typedef {EventTarget|Target} EventTargetLike */ - /** * @classdesc * A simplified implementation of the W3C DOM Level 2 EventTarget interface. @@ -28,12 +26,10 @@ import {clear} from '../obj.js'; * returns false. */ class Target extends Disposable { - /** * @param {*=} opt_target Default event target for dispatched events. */ constructor(opt_target) { - super(); /** @@ -59,7 +55,6 @@ class Target extends Disposable { * @type {!Object>} */ this.listeners_ = {}; - } /** @@ -107,9 +102,13 @@ class Target extends Disposable { ++this.dispatching_[type]; for (let i = 0, ii = listeners.length; i < ii; ++i) { if ('handleEvent' in listeners[i]) { - propagate = /** @type {import("../events.js").ListenerObject} */ (listeners[i]).handleEvent(evt); + propagate = /** @type {import("../events.js").ListenerObject} */ (listeners[ + i + ]).handleEvent(evt); } else { - propagate = /** @type {import("../events.js").ListenerFunction} */ (listeners[i]).call(this, evt); + propagate = /** @type {import("../events.js").ListenerFunction} */ (listeners[ + i + ]).call(this, evt); } if (propagate === false || evt.propagationStopped) { propagate = false; @@ -153,9 +152,9 @@ class Target extends Disposable { * @return {boolean} Has listeners. */ hasListener(opt_type) { - return opt_type ? - opt_type in this.listeners_ : - Object.keys(this.listeners_).length > 0; + return opt_type + ? opt_type in this.listeners_ + : Object.keys(this.listeners_).length > 0; } /** @@ -182,5 +181,4 @@ class Target extends Disposable { } } - export default Target; diff --git a/src/ol/events/condition.js b/src/ol/events/condition.js index b4049571f1..03b6fcb370 100644 --- a/src/ol/events/condition.js +++ b/src/ol/events/condition.js @@ -2,10 +2,9 @@ * @module ol/events/condition */ import MapBrowserEventType from '../MapBrowserEventType.js'; +import {FALSE, TRUE} from '../functions.js'; +import {MAC, WEBKIT} from '../has.js'; import {assert} from '../asserts.js'; -import {TRUE, FALSE} from '../functions.js'; -import {WEBKIT, MAC} from '../has.js'; - /** * A function that takes an {@link module:ol/MapBrowserEvent} and returns a @@ -14,7 +13,6 @@ import {WEBKIT, MAC} from '../has.js'; * @typedef {function(this: ?, import("../MapBrowserEvent.js").default): boolean} Condition */ - /** * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when * additionally the shift-key is pressed). @@ -23,15 +21,15 @@ import {WEBKIT, MAC} from '../has.js'; * @return {boolean} True if only the alt key is pressed. * @api */ -export const altKeyOnly = function(mapBrowserEvent) { +export const altKeyOnly = function (mapBrowserEvent) { const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent); return ( originalEvent.altKey && - !(originalEvent.metaKey || originalEvent.ctrlKey) && - !originalEvent.shiftKey); + !(originalEvent.metaKey || originalEvent.ctrlKey) && + !originalEvent.shiftKey + ); }; - /** * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise * (e.g. when additionally the platform-modifier-key is pressed). @@ -40,15 +38,15 @@ export const altKeyOnly = function(mapBrowserEvent) { * @return {boolean} True if only the alt and shift keys are pressed. * @api */ -export const altShiftKeysOnly = function(mapBrowserEvent) { +export const altShiftKeysOnly = function (mapBrowserEvent) { const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent); return ( originalEvent.altKey && - !(originalEvent.metaKey || originalEvent.ctrlKey) && - originalEvent.shiftKey); + !(originalEvent.metaKey || originalEvent.ctrlKey) && + originalEvent.shiftKey + ); }; - /** * Return `true` if the map has the focus. This condition requires a map target * element with a `tabindex` attribute, e.g. `
    `. @@ -57,11 +55,10 @@ export const altShiftKeysOnly = function(mapBrowserEvent) { * @return {boolean} The map has the focus. * @api */ -export const focus = function(event) { +export const focus = function (event) { return event.target.getTargetElement().contains(document.activeElement); }; - /** * Return always true. * @@ -71,7 +68,6 @@ export const focus = function(event) { */ export const always = TRUE; - /** * Return `true` if the event is a `click` event, `false` otherwise. * @@ -79,11 +75,10 @@ export const always = TRUE; * @return {boolean} True if the event is a map `click` event. * @api */ -export const click = function(mapBrowserEvent) { +export const click = function (mapBrowserEvent) { return mapBrowserEvent.type == MapBrowserEventType.CLICK; }; - /** * Return `true` if the event has an "action"-producing mouse button. * @@ -93,13 +88,11 @@ export const click = function(mapBrowserEvent) { * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @return {boolean} The result. */ -export const mouseActionButton = function(mapBrowserEvent) { +export const mouseActionButton = function (mapBrowserEvent) { const originalEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent); - return originalEvent.button == 0 && - !(WEBKIT && MAC && originalEvent.ctrlKey); + return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey); }; - /** * Return always false. * @@ -109,7 +102,6 @@ export const mouseActionButton = function(mapBrowserEvent) { */ export const never = FALSE; - /** * Return `true` if the browser event is a `pointermove` event, `false` * otherwise. @@ -118,11 +110,10 @@ export const never = FALSE; * @return {boolean} True if the browser event is a `pointermove` event. * @api */ -export const pointerMove = function(mapBrowserEvent) { +export const pointerMove = function (mapBrowserEvent) { return mapBrowserEvent.type == 'pointermove'; }; - /** * Return `true` if the event is a map `singleclick` event, `false` otherwise. * @@ -130,11 +121,10 @@ export const pointerMove = function(mapBrowserEvent) { * @return {boolean} True if the event is a map `singleclick` event. * @api */ -export const singleClick = function(mapBrowserEvent) { +export const singleClick = function (mapBrowserEvent) { return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK; }; - /** * Return `true` if the event is a map `dblclick` event, `false` otherwise. * @@ -142,11 +132,10 @@ export const singleClick = function(mapBrowserEvent) { * @return {boolean} True if the event is a map `dblclick` event. * @api */ -export const doubleClick = function(mapBrowserEvent) { +export const doubleClick = function (mapBrowserEvent) { return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK; }; - /** * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is * pressed. @@ -155,15 +144,15 @@ export const doubleClick = function(mapBrowserEvent) { * @return {boolean} True only if there no modifier keys are pressed. * @api */ -export const noModifierKeys = function(mapBrowserEvent) { +export const noModifierKeys = function (mapBrowserEvent) { const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent); return ( !originalEvent.altKey && - !(originalEvent.metaKey || originalEvent.ctrlKey) && - !originalEvent.shiftKey); + !(originalEvent.metaKey || originalEvent.ctrlKey) && + !originalEvent.shiftKey + ); }; - /** * Return `true` if only the platform-modifier-key (the meta-key on Mac, * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally @@ -173,14 +162,15 @@ export const noModifierKeys = function(mapBrowserEvent) { * @return {boolean} True if only the platform modifier key is pressed. * @api */ -export const platformModifierKeyOnly = function(mapBrowserEvent) { +export const platformModifierKeyOnly = function (mapBrowserEvent) { const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent); - return !originalEvent.altKey && + return ( + !originalEvent.altKey && (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) && - !originalEvent.shiftKey; + !originalEvent.shiftKey + ); }; - /** * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when * additionally the alt-key is pressed). @@ -189,15 +179,15 @@ export const platformModifierKeyOnly = function(mapBrowserEvent) { * @return {boolean} True if only the shift key is pressed. * @api */ -export const shiftKeyOnly = function(mapBrowserEvent) { +export const shiftKeyOnly = function (mapBrowserEvent) { const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent); return ( !originalEvent.altKey && - !(originalEvent.metaKey || originalEvent.ctrlKey) && - originalEvent.shiftKey); + !(originalEvent.metaKey || originalEvent.ctrlKey) && + originalEvent.shiftKey + ); }; - /** * Return `true` if the target element is not editable, i.e. not a ``-, * `",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","dirkey","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","group","contexts","token","div1","defaultValue","unique","isXMLDoc","optionsCache","createOptions","object","flag","Callbacks","memory","fired","firing","firingStart","firingLength","firingIndex","list","stack","once","fire","stopOnFalse","self","disable","add","index","lock","locked","fireWith","func","tuples","state","always","deferred","fail","then","fns","newDefer","tuple","action","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","progressContexts","resolveContexts","fragment","createDocumentFragment","opt","checkOn","optSelected","reliableMarginRight","boxSizingReliable","pixelPosition","noCloneChecked","cloneNode","optDisabled","radioValue","checkClone","focusinBubbles","backgroundClip","clearCloneStyle","container","marginDiv","divReset","body","cssText","zoom","boxSizing","offsetWidth","getComputedStyle","width","marginRight","data_user","data_priv","rbrace","rmultiDash","Data","defineProperty","uid","accepts","owner","descriptor","unlock","defineProperties","set","prop","stored","camel","hasData","discard","acceptData","removeData","_data","_removeData","dataAttr","camelKey","queue","dequeue","startLength","hooks","_queueHooks","next","stop","setter","delay","time","fx","speeds","timeout","clearTimeout","clearQueue","count","defer","nodeHook","boolHook","rclass","rreturn","rfocusable","removeAttr","removeProp","propFix","addClass","classes","clazz","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","valHooks","option","one","max","optionSet","nType","attrHooks","propName","attrNames","for","class","notxml","propHooks","hasAttribute","getter","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","event","global","types","handleObjIn","eventHandle","events","t","handleObj","special","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","bubbleType","ontype","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","props","fixHooks","keyHooks","original","which","charCode","keyCode","mouseHooks","eventDoc","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","originalEvent","fixHook","load","blur","click","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","getPreventDefault","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","orig","related","relatedTarget","attaches","on","origFn","triggerHandler","isSimple","rparentsprev","rneedsContext","guaranteedUnique","children","contents","prev","targets","winnow","is","closest","pos","prevAll","addBack","sibling","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","contentDocument","reverse","truncate","n","qualifier","rxhtmlTag","rtagName","rhtml","rnoInnerhtml","manipulation_rcheckableType","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","thead","col","tr","td","optgroup","tbody","tfoot","colgroup","caption","th","append","createTextNode","domManip","manipulationTarget","prepend","insertBefore","before","after","keepData","cleanData","getAll","setGlobalEval","dataAndEvents","deepDataAndEvents","html","replaceWith","detach","allowIntersection","hasScripts","iNoClone","disableScript","restoreScript","_evalUrl","appendTo","prependTo","insertAfter","replaceAll","insert","srcElements","destElements","inPage","fixInput","cloneCopyEvent","selection","wrap","nodes","url","ajax","dataType","async","throws","content","refElements","dest","pdataOld","pdataCur","udataOld","udataCur","wrapAll","firstElementChild","wrapInner","unwrap","curCSS","iframe","rdisplayswap","rmargin","rnumsplit","rnumnonpx","rrelNum","elemdisplay","BODY","cssShow","position","visibility","display","cssNormalTransform","letterSpacing","fontWeight","cssExpand","cssPrefixes","vendorPropName","capName","origName","isHidden","el","css","getStyles","showHide","show","hidden","css_defaultDisplay","styles","hide","toggle","cssHooks","opacity","computed","cssNumber","columnCount","fillOpacity","lineHeight","order","orphans","widows","zIndex","cssProps","float","extra","_computed","minWidth","maxWidth","getPropertyValue","setPositiveNumber","subtract","augmentWidthOrHeight","isBorderBox","getWidthOrHeight","valueIsBorderBox","offsetHeight","actualDisplay","contentWindow","write","close","visible","margin","padding","border","prefix","suffix","expand","expanded","parts","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","serialize","param","serializeArray","traditional","s","encodeURIComponent","ajaxSettings","buildParams","v","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","transports","allTypes","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","params","response","responseText","complete","status","active","lastModified","etag","isLocal","processData","contentType","*","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","abort","statusText","finalText","success","method","crossDomain","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","isSuccess","modified","ajaxHandleResponses","ajaxConvert","rejectWith","getJSON","getScript","ct","finalDataType","firstDataType","conv2","current","conv","dataFilter","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhr","XMLHttpRequest","xhrSupported","xhrSuccessStatus",1223,"xhrId","xhrCallbacks","ActiveXObject","cors","open","username","xhrFields","onload","onerror","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","tween","createTween","unit","scale","maxIterations","createFxNow","animation","collection","Animation","properties","stopped","tick","currentTime","startTime","duration","percent","tweens","run","opts","specialEasing","originalProperties","Tween","easing","gotoEnd","propFilter","timer","anim","tweener","prefilter","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","eased","step","cssFn","speed","animate","genFx","fadeTo","to","optall","doAnimation","finish","stopQueue","timers","includeWidth","height","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","p","swing","cos","PI","interval","setInterval","clearInterval","slow","fast","animated","offset","setOffset","win","box","left","getBoundingClientRect","getWindow","pageYOffset","pageXOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","using","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","module","exports","define","amd"],"mappings":";;;CAaA,SAAWA,EAAQC,WAOnB,GAECC,GAGAC,EAIAC,QAA2BH,WAG3BI,EAAWL,EAAOK,SAClBC,EAAWN,EAAOM,SAClBC,EAAUD,EAASE,gBAGnBC,EAAUT,EAAOU,OAGjBC,EAAKX,EAAOY,EAGZC,KAGAC,KAEAC,EAAe,QAGfC,EAAcF,EAAgBG,OAC9BC,EAAYJ,EAAgBK,KAC5BC,EAAaN,EAAgBO,MAC7BC,EAAeR,EAAgBS,QAC/BC,EAAgBX,EAAWY,SAC3BC,EAAcb,EAAWc,eACzBC,EAAYb,EAAac,KAGzBnB,EAAS,SAAUoB,EAAUC,GAE5B,MAAO,IAAIrB,GAAOsB,GAAGC,KAAMH,EAAUC,EAAS7B,IAI/CgC,EAAY,sCAAsCC,OAGlDC,EAAiB,OAKjBC,EAAa,sCAGbC,EAAa,6BAGbC,EAAY,QACZC,EAAa,eAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,eAIfC,EAAY,WACXvC,EAASwC,oBAAqB,mBAAoBD,GAAW,GAC7D7C,EAAO8C,oBAAqB,OAAQD,GAAW,GAC/CnC,EAAOqC,QAGTrC,GAAOsB,GAAKtB,EAAOsC,WAElBC,OAAQlC,EAERmC,YAAaxC,EACbuB,KAAM,SAAUH,EAAUC,EAAS7B,GAClC,GAAIiD,GAAOC,CAGX,KAAMtB,EACL,MAAOuB,KAIR,IAAyB,gBAAbvB,GAAwB,CAUnC,GAPCqB,EAF2B,MAAvBrB,EAASwB,OAAO,IAAyD,MAA3CxB,EAAS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AMkE,EAAM4C,GACjD,GAAIuI,EAEJ,OAAK/R,GAAO8G,SAAUpE,GAIdA,EAAK9C,SAASE,gBAAiB,SAAWwF,GAI3B,IAAlB5C,EAAKQ,UACT6O,EAAMrP,EAAK5C,gBAIJiG,KAAKwe,IACX7hB,EAAKwd,KAAM,SAAW5a,GAAQyM,EAAK,SAAWzM,GAC9C5C,EAAKwd,KAAM,SAAW5a,GAAQyM,EAAK,SAAWzM,GAC9CyM,EAAK,SAAWzM,KAIXkE,IAAUjK,UAEhBS,EAAO4yB,IAAKlwB,EAAMkE,EAAMstB,GAGxBl0B,EAAOgL,MAAOtI,EAAMkE,EAAM4C,EAAO0qB,IAChCttB,EAAM4D,EAAY2qB,EAAS51B,UAAWiL,EAAW,WAQvDxK,EAAOsB,GAAG2jC,KAAO,WAChB,MAAOtiC,MAAKE,QAGb7C,EAAOsB,GAAG4jC,QAAUllC,EAAOsB,GAAGyqB,QAGP,gBAAXoZ,SAAuBA,QAAoC,gBAAnBA,QAAOC,QAK1DD,OAAOC,QAAUplC,EASM,kBAAXqlC,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WAAc,MAAOrlC,KAMtB,gBAAXV,IAAkD,gBAApBA,GAAOM,WAChDN,EAAOU,OAASV,EAAOY,EAAIF,KAGxBV"} +{"version":3,"sources":["jquery-3.5.1.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAAOL,EAAIK,KAAO,SAAUC,GAC/B,OAAON,EAAIK,KAAKE,KAAMD,IACnB,SAAUA,GACb,OAAON,EAAIQ,OAAOC,MAAO,GAAIH,IAI1BI,EAAOV,EAAIU,KAEXC,EAAUX,EAAIW,QAEdC,EAAa,GAEbC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,EAAuBD,EAAWT,KAAML,QAExCgB,EAAU,GAEVC,EAAa,SAAqBC,GAMhC,MAAsB,mBAARA,GAA8C,iBAAjBA,EAAIC,UAIjDC,EAAW,SAAmBF,GAChC,OAAc,MAAPA,GAAeA,IAAQA,EAAIvB,QAIhCH,EAAWG,EAAOH,SAIjB6B,EAA4B,CAC/BC,MAAM,EACNC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,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery-3.5.1.min.js"} diff --git a/config/jsdoc/api/template/static/scripts/main.js b/config/jsdoc/api/template/static/scripts/main.js index 5a705ab243..f93b44a33f 100644 --- a/config/jsdoc/api/template/static/scripts/main.js +++ b/config/jsdoc/api/template/static/scripts/main.js @@ -237,14 +237,27 @@ $(function () { search.manualToggle(clsItem, show); }); - // Auto resizing on navigation +// Auto resizing on navigation var _onResize = function () { - var height = $(window).height(); + var height_w = $(window).height(); + var height_s = $('section').height(); var $el = $('.navigation'); - - $el.height(height).find('.navigation-list').height(height - 133); - }; - + var dif_h = height_w - height_s; + if (window.matchMedia("(min-width: 768px)").matches) { + if (dif_h >=0){ + $('.navigation').height(height_s+dif_h+74); + $('.navigation-list').height(height_s+dif_h) + } + else { + $('.navigation').height(height_s+74); + $('.navigation-list').height(height_s-60); + } + } + else{ + $('.navigation').height(220); + $('.navigation-list').height(140); + } + } $(window).on('resize', _onResize); _onResize(); diff --git a/config/jsdoc/api/template/static/styles/bootstrap.min.css b/config/jsdoc/api/template/static/styles/bootstrap.min.css index 6d45de5e1c..224039688a 100644 --- a/config/jsdoc/api/template/static/styles/bootstrap.min.css +++ b/config/jsdoc/api/template/static/styles/bootstrap.min.css @@ -1,7 +1,7 @@ /*! - * Bootstrap v3.0.3 (http://getbootstrap.com) - * Copyright 2013 Twitter, Inc. - * Licensed under http://www.apache.org/licenses/LICENSE-2.0 - */ - -/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#4fadc2;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small{font-size:65%}h4,h5,h6{margin-top:10px;margin-bottom:10px}h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media(min-width:100px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-primary:hover{color:#3071a9}.text-warning{color:#8a6d3b}.text-warning:hover{color:#66512c}.text-danger{color:#a94442}.text-danger:hover{color:#843534}.text-success{color:#3c763d}.text-success:hover{color:#2b542c}.text-info{color:#31708f}.text-info:hover{color:#245269}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}.list-inline>li:first-child{padding-left:0}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}@media(min-width:100px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small,blockquote .small{display:block;line-height:1.428571429;color:#999}blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small,blockquote.pull-right .small{text-align:right}blockquote.pull-right small:before,blockquote.pull-right .small:before{content:''}blockquote.pull-right small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.428571429}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}@media(min-width:100px){.container{width:750px}}@media(min-width:992px){.container{width:970px}}@media(min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666666666666%}.col-xs-10{width:83.33333333333334%}.col-xs-9{width:75%}.col-xs-8{width:66.66666666666666%}.col-xs-7{width:58.333333333333336%}.col-xs-6{width:50%}.col-xs-5{width:41.66666666666667%}.col-xs-4{width:33.33333333333333%}.col-xs-3{width:25%}.col-xs-2{width:16.666666666666664%}.col-xs-1{width:8.333333333333332%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666666666666%}.col-xs-pull-10{right:83.33333333333334%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666666666666%}.col-xs-pull-7{right:58.333333333333336%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666666666667%}.col-xs-pull-4{right:33.33333333333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.666666666666664%}.col-xs-pull-1{right:8.333333333333332%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666666666666%}.col-xs-push-10{left:83.33333333333334%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666666666666%}.col-xs-push-7{left:58.333333333333336%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666666666667%}.col-xs-push-4{left:33.33333333333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.666666666666664%}.col-xs-push-1{left:8.333333333333332%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666666666666%}.col-xs-offset-10{margin-left:83.33333333333334%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666666666666%}.col-xs-offset-7{margin-left:58.333333333333336%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666666666667%}.col-xs-offset-4{margin-left:33.33333333333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.666666666666664%}.col-xs-offset-1{margin-left:8.333333333333332%}.col-xs-offset-0{margin-left:0}@media(min-width:100px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666666666666%}.col-sm-10{width:83.33333333333334%}.col-sm-9{width:75%}.col-sm-8{width:66.66666666666666%}.col-sm-7{width:58.333333333333336%}.col-sm-6{width:50%}.col-sm-5{width:41.66666666666667%}.col-sm-4{width:33.33333333333333%}.col-sm-3{width:25%}.col-sm-2{width:16.666666666666664%}.col-sm-1{width:8.333333333333332%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666666666666%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666666666666%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-0{margin-left:0}}@media(min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666666666666%}.col-md-10{width:83.33333333333334%}.col-md-9{width:75%}.col-md-8{width:66.66666666666666%}.col-md-7{width:58.333333333333336%}.col-md-6{width:50%}.col-md-5{width:41.66666666666667%}.col-md-4{width:33.33333333333333%}.col-md-3{width:25%}.col-md-2{width:16.666666666666664%}.col-md-1{width:8.333333333333332%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666666666666%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666666666666%}.col-md-push-10{left:83.33333333333334%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666666666666%}.col-md-push-7{left:58.333333333333336%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666666666667%}.col-md-push-4{left:33.33333333333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.666666666666664%}.col-md-push-1{left:8.333333333333332%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666666666666%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-0{margin-left:0}}@media(min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666666666666%}.col-lg-10{width:83.33333333333334%}.col-lg-9{width:75%}.col-lg-8{width:66.66666666666666%}.col-lg-7{width:58.333333333333336%}.col-lg-6{width:50%}.col-lg-5{width:41.66666666666667%}.col-lg-4{width:33.33333333333333%}.col-lg-3{width:25%}.col-lg-2{width:16.666666666666664%}.col-lg-1{width:8.333333333333332%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666666666666%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666666666666%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{position:static;display:table-column;float:none}table td[class*="col-"],table th[class*="col-"]{display:table-cell;float:none}.table>thead>tr>.active,.table>tbody>tr>.active,.table>tfoot>tr>.active,.table>thead>.active>td,.table>tbody>.active>td,.table>tfoot>.active>td,.table>thead>.active>th,.table>tbody>.active>th,.table>tfoot>.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>.active:hover,.table-hover>tbody>.active:hover>td,.table-hover>tbody>.active:hover>th{background-color:#e8e8e8}.table>thead>tr>.success,.table>tbody>tr>.success,.table>tfoot>tr>.success,.table>thead>.success>td,.table>tbody>.success>td,.table>tfoot>.success>td,.table>thead>.success>th,.table>tbody>.success>th,.table>tfoot>.success>th{background-color:#dff0d8}.table-hover>tbody>tr>.success:hover,.table-hover>tbody>.success:hover>td,.table-hover>tbody>.success:hover>th{background-color:#d0e9c6}.table>thead>tr>.danger,.table>tbody>tr>.danger,.table>tfoot>tr>.danger,.table>thead>.danger>td,.table>tbody>.danger>td,.table>tfoot>.danger>td,.table>thead>.danger>th,.table>tbody>.danger>th,.table>tfoot>.danger>th{background-color:#f2dede}.table-hover>tbody>tr>.danger:hover,.table-hover>tbody>.danger:hover>td,.table-hover>tbody>.danger:hover>th{background-color:#ebcccc}.table>thead>tr>.warning,.table>tbody>tr>.warning,.table>tfoot>tr>.warning,.table>thead>.warning>td,.table>tbody>.warning>td,.table>tfoot>.warning>td,.table>thead>.warning>th,.table>tbody>.warning>th,.table>tfoot>.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>.warning:hover,.table-hover>tbody>.warning:hover>td,.table-hover>tbody>.warning:hover>th{background-color:#faf2cc}@media(max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;border:1px solid #ddd;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{height:auto}output{display:block;padding-top:7px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.radio label,.checkbox label{display:inline;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:normal;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg{height:auto}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media(min-width:100px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block}.form-inline select.form-control{width:auto}.form-inline .radio,.form-inline .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:none;margin-left:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-control-static{padding-top:7px}@media(min-width:100px){.form-horizontal .control-label{text-align:right}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#fff}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-link{font-weight:normal;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:normal;line-height:1;-moz-osx-font-smoothing:grayscale}.glyphicon:empty{width:1em}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media(min-width:100px){.navbar-right .dropdown-menu{right:0;left:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:4px;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;border-collapse:separate;table-layout:fixed}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-right:0;padding-left:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:normal;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn:first-child>.btn{margin-right:-1px}.input-group-btn:last-child>.btn{margin-left:-1px}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:hover,.input-group-btn>.btn:active{z-index:2}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media(min-width:100px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media(min-width:100px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media(min-width:100px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media(min-width:100px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}@media(min-width:100px){.navbar{border-radius:4px}}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}@media(min-width:100px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media(min-width:100px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.container>.navbar-header,.container>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media(min-width:100px){.container>.navbar-header,.container>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media(min-width:100px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media(min-width:100px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media(min-width:100px){.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media(min-width:100px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media(max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media(min-width:100px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media(min-width:100px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}@media(min-width:100px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block}.navbar-form select.form-control{width:auto}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{float:none;margin-left:0}}@media(max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media(min-width:100px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media(min-width:100px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#ccc}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media(max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media(max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{background-color:#eee}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:100px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{display:block;height:auto;max-width:100%;margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0}.panel>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.list-group .list-group-item:last-child{border-bottom:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child th,.panel>.table>tbody:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:last-child>th,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:last-child>td,.panel>.table-responsive>.table-bordered>thead>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:auto;overflow-y:scroll}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;z-index:1050;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{min-height:16.428571429px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:100px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}}.tooltip{position:absolute;z-index:1030;display:block;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0;content:" "}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0;content:" "}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;height:auto;max-width:100%;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);opacity:.5;filter:alpha(opacity=50)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1)}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1)}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;outline:0;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:100px){.carousel-control .glyphicons-chevron-left,.carousel-control .glyphicons-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,tr.visible-xs,th.visible-xs,td.visible-xs{display:none!important}@media(max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media(min-width:100px) and (max-width:991px){.visible-xs.visible-sm{display:block!important}table.visible-xs.visible-sm{display:table}tr.visible-xs.visible-sm{display:table-row!important}th.visible-xs.visible-sm,td.visible-xs.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-xs.visible-md{display:block!important}table.visible-xs.visible-md{display:table}tr.visible-xs.visible-md{display:table-row!important}th.visible-xs.visible-md,td.visible-xs.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-xs.visible-lg{display:block!important}table.visible-xs.visible-lg{display:table}tr.visible-xs.visible-lg{display:table-row!important}th.visible-xs.visible-lg,td.visible-xs.visible-lg{display:table-cell!important}}.visible-sm,tr.visible-sm,th.visible-sm,td.visible-sm{display:none!important}@media(max-width:767px){.visible-sm.visible-xs{display:block!important}table.visible-sm.visible-xs{display:table}tr.visible-sm.visible-xs{display:table-row!important}th.visible-sm.visible-xs,td.visible-sm.visible-xs{display:table-cell!important}}@media(min-width:100px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-sm.visible-md{display:block!important}table.visible-sm.visible-md{display:table}tr.visible-sm.visible-md{display:table-row!important}th.visible-sm.visible-md,td.visible-sm.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-sm.visible-lg{display:block!important}table.visible-sm.visible-lg{display:table}tr.visible-sm.visible-lg{display:table-row!important}th.visible-sm.visible-lg,td.visible-sm.visible-lg{display:table-cell!important}}.visible-md,tr.visible-md,th.visible-md,td.visible-md{display:none!important}@media(max-width:767px){.visible-md.visible-xs{display:block!important}table.visible-md.visible-xs{display:table}tr.visible-md.visible-xs{display:table-row!important}th.visible-md.visible-xs,td.visible-md.visible-xs{display:table-cell!important}}@media(min-width:100px) and (max-width:991px){.visible-md.visible-sm{display:block!important}table.visible-md.visible-sm{display:table}tr.visible-md.visible-sm{display:table-row!important}th.visible-md.visible-sm,td.visible-md.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-md.visible-lg{display:block!important}table.visible-md.visible-lg{display:table}tr.visible-md.visible-lg{display:table-row!important}th.visible-md.visible-lg,td.visible-md.visible-lg{display:table-cell!important}}.visible-lg,tr.visible-lg,th.visible-lg,td.visible-lg{display:none!important}@media(max-width:767px){.visible-lg.visible-xs{display:block!important}table.visible-lg.visible-xs{display:table}tr.visible-lg.visible-xs{display:table-row!important}th.visible-lg.visible-xs,td.visible-lg.visible-xs{display:table-cell!important}}@media(min-width:100px) and (max-width:991px){.visible-lg.visible-sm{display:block!important}table.visible-lg.visible-sm{display:table}tr.visible-lg.visible-sm{display:table-row!important}th.visible-lg.visible-sm,td.visible-lg.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-lg.visible-md{display:block!important}table.visible-lg.visible-md{display:table}tr.visible-lg.visible-md{display:table-row!important}th.visible-lg.visible-md,td.visible-lg.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}.hidden-xs{display:block!important}table.hidden-xs{display:table}tr.hidden-xs{display:table-row!important}th.hidden-xs,td.hidden-xs{display:table-cell!important}@media(max-width:767px){.hidden-xs,tr.hidden-xs,th.hidden-xs,td.hidden-xs{display:none!important}}@media(min-width:100px) and (max-width:991px){.hidden-xs.hidden-sm,tr.hidden-xs.hidden-sm,th.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-xs.hidden-md,tr.hidden-xs.hidden-md,th.hidden-xs.hidden-md,td.hidden-xs.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-xs.hidden-lg,tr.hidden-xs.hidden-lg,th.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg{display:none!important}}.hidden-sm{display:block!important}table.hidden-sm{display:table}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}@media(max-width:767px){.hidden-sm.hidden-xs,tr.hidden-sm.hidden-xs,th.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs{display:none!important}}@media(min-width:100px) and (max-width:991px){.hidden-sm,tr.hidden-sm,th.hidden-sm,td.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-sm.hidden-md,tr.hidden-sm.hidden-md,th.hidden-sm.hidden-md,td.hidden-sm.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-sm.hidden-lg,tr.hidden-sm.hidden-lg,th.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg{display:none!important}}.hidden-md{display:block!important}table.hidden-md{display:table}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}@media(max-width:767px){.hidden-md.hidden-xs,tr.hidden-md.hidden-xs,th.hidden-md.hidden-xs,td.hidden-md.hidden-xs{display:none!important}}@media(min-width:100px) and (max-width:991px){.hidden-md.hidden-sm,tr.hidden-md.hidden-sm,th.hidden-md.hidden-sm,td.hidden-md.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-md,tr.hidden-md,th.hidden-md,td.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-md.hidden-lg,tr.hidden-md.hidden-lg,th.hidden-md.hidden-lg,td.hidden-md.hidden-lg{display:none!important}}.hidden-lg{display:block!important}table.hidden-lg{display:table}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}@media(max-width:767px){.hidden-lg.hidden-xs,tr.hidden-lg.hidden-xs,th.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs{display:none!important}}@media(min-width:100px) and (max-width:991px){.hidden-lg.hidden-sm,tr.hidden-lg.hidden-sm,th.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-lg.hidden-md,tr.hidden-lg.hidden-md,th.hidden-lg.hidden-md,td.hidden-lg.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-lg,tr.hidden-lg,th.hidden-lg,td.hidden-lg{display:none!important}}.visible-print,tr.visible-print,th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print,tr.hidden-print,th.hidden-print,td.hidden-print{display:none!important}} + * Bootstrap v4.5.0 (https://getbootstrap.com/) + * Copyright 2011-2020 The Bootstrap Authors + * Copyright 2011-2020 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{color:#fff;background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{color:#212529;background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{color:#212529;background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{color:#fff;background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before,.custom-control-input[disabled]~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(.75rem);transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img,.card-img-bottom,.card-img-top{-ms-flex-negative:0;flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{-ms-flex:1 0 0%;flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item{display:-ms-flexbox;display:flex}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0}a.close.disabled{pointer-events:none}.toast{max-width:350px;overflow:hidden;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal.modal-static .modal-dialog{-webkit-transform:scale(1.02);transform:scale(1.02)}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);height:-webkit-min-content;height:-moz-min-content;height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem);height:-webkit-min-content;height:-moz-min-content;height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:spinner-border .75s linear infinite;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:spinner-grow .75s linear infinite;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;-ms-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}} +/*# sourceMappingURL=bootstrap.min.css.map */ diff --git a/config/jsdoc/api/template/static/styles/jaguar.css b/config/jsdoc/api/template/static/styles/jaguar.css index 43a455cadf..488d640ddd 100644 --- a/config/jsdoc/api/template/static/styles/jaguar.css +++ b/config/jsdoc/api/template/static/styles/jaguar.css @@ -1,45 +1,20 @@ @import url(https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700); -.navbar-inverse { - border: 0; -} -.navbar-inverse .navbar-inner { +.navbar{ background: #1F6B75; - height: 50px; - text-shadow: 1px 1px 2px rgba(0,0,0,0.25); } -.navbar-inverse .brand { - color: #fff; - font-size: 160%; - font-weight: bold; - position: absolute; - top: 6px; - left: 16px; -} -.navbar-inverse .brand:hover, -.navbar-inverse .brand:focus { - color: #aae1e9; - text-decoration: none; -} -.navbar-inverse .brand img { - width: 35px; + +.navbar-brand img { height: 35px; vertical-align: middle; margin-right: 5px; - border:0; + display: inline-block; } -.navbar-inverse .container { - padding: 0; -} -.navbar-inverse .navbar-nav>li>a { + +.navbar-brand { color: #fff; -} -.navbar-inverse .navbar-nav>li>a:hover, -.navbar-inverse .navbar-nav>li>a:focus, -.navbar-inverse .navbar-nav>li>a.active -{ - outline:0; - color: #fff; - background-color: #268591; + font-size: 160%; + font-weight: bold; + padding 8px 0; } body { @@ -61,6 +36,14 @@ a { -webkit-transition: all .2s; transition: all .2s; } +a { + color: #03899c; + text-decoration:none +} +a:hover, a:focus, footer a:hover, footer a:focus { + color: #ff7a00; + text-decoration:none +} .navigation li { color: #888; } @@ -68,7 +51,6 @@ a { html, body { font-family: "Quattrocento Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - font-size: 1.0em; background-color: #fff; } ul, @@ -79,24 +61,27 @@ ol { li { list-style-type: none; } -#wrap { - position: relative; -} ::-webkit-scrollbar { width: 8px; background-color: transparent; } ::-webkit-scrollbar-thumb { - background-color: gray; + background-color: transparent; border-radius: 4px; } .navigation { - position: fixed; - float: left; - width: 250px; - height: 100%; + margin-top:15px; background-color: #2a2a2a; } +@media (max-width:768px) { + .navigation { + max-height:220px; + } + .navigation-list{ + height:140px; + } +} + .navigation .applicationName { margin: 0; margin-top: 15px; @@ -117,7 +102,7 @@ li { vertical-align: text-bottom; } .navigation .search { - padding: 10px 15px; + padding: 1rem; } .navigation .search input { background-color: #333; @@ -136,21 +121,21 @@ li { border-bottom: 1px solid #333; } -.navigation .glyphicon { +.navigation .fa { margin-right: 3px; flex-shrink: 0; } -.navigation .item .glyphicon:before { +.navigation .item .fa:before { display: inline-block; } -.navigation .item.toggle-manual .glyphicon:before { +.navigation .item.toggle-manual .fa:before { transition: transform .1s; } -.navigation .item-class.toggle-manual-show .glyphicon:before { +.navigation .item-class.toggle-manual-show .fa:before { /* With 90deg the icon slightly slides left at transition end */ transform: rotate(89.9deg); } -.navigation .item-module.toggle-manual-show .glyphicon:before { +.navigation .item-module.toggle-manual-show .fa:before { transform: rotate(45deg); } @@ -239,8 +224,7 @@ li { } .main { - padding: 20px 20px; - margin-left: 250px; + padding: 1.5rem } .main .page-title { display: none; @@ -257,7 +241,7 @@ li { } .main h3 { font-weight: bold; - font-size: 13px; + font-size: 1.3em; margin: 5px 0; } .main h4 { @@ -274,12 +258,6 @@ li { .main h4.name span.type { margin-left: 10px; } -.main h4.name span.glyphicon { - display: inline-block; - vertical-align: middle; - color: #c1c1c1; - margin-left: 7px; -} .main h4.name span.returnType, .main h4.name span.type { margin-left: 3px; background-color: transparent!important; @@ -302,7 +280,7 @@ span.type-signature.static { margin-right: 3px; } .main .subsection-title { - font-size: 15px; + font-size: 18px; margin-top: 30px; color: #1F6B75; } @@ -344,7 +322,7 @@ span.type-signature.static { position: relative; margin-top: 20px; padding-top: 5px; - border-top: 1px solid #e1e1e1; + border-top: 2px solid #1F6B75; } .main .nameContainer .inherited { display: inline-block; @@ -358,11 +336,13 @@ span.type-signature.static { .main .nameContainer .inherited a { color: #fff; } -.main .nameContainer .tag-source { - position: absolute; - top: 17px; - right: 0; - font-size: 11px; +@media (min-width: 768px) { + .main .nameContainer .tag-source { + position: absolute; + top: 0.2rem; + right: 0; + font-size: 0.8rem; + } } .main .nameContainer .tag-source a { color: gray; @@ -381,7 +361,17 @@ span.type-signature.static { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } .main pre { - font-size: 12px; + display: block; + padding: 0.6rem; + margin: 0 0 10px; + font-size: 0.8rem; + line-height: 1.428571429; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; } .main table { width: 100%; @@ -422,9 +412,11 @@ span.type-signature.static { color: gray; } .main .readme p { +/* margin-top: 15px; line-height: 1.2; font-size: 0.9em; + */ } .main .readme h1 { font-size: 1.7em; diff --git a/config/jsdoc/api/template/static/styles/site.css b/config/jsdoc/api/template/static/styles/site.css index e8c6d9ef5b..27071be018 100644 --- a/config/jsdoc/api/template/static/styles/site.css +++ b/config/jsdoc/api/template/static/styles/site.css @@ -1,9 +1,7 @@ /* Carbon adds (see https://sell.buysellads.com) */ #ad { - margin-left: 1em; - float: right; - width: 330px; + padding:0.5rem; min-height: 125px; } @@ -65,17 +63,3 @@ #carbonads a.carbon-poweredby { color: #aaa; } - -/* Clear the float after the advertisement. */ - -.container-overview { - clear: both; -} - -pre.source { - clear: both; -} - -section.content { - overflow-y: auto; -} diff --git a/config/jsdoc/api/template/tmpl/container.tmpl b/config/jsdoc/api/template/tmpl/container.tmpl index 4674194e9f..f9d86d6757 100644 --- a/config/jsdoc/api/template/tmpl/container.tmpl +++ b/config/jsdoc/api/template/tmpl/container.tmpl @@ -12,7 +12,7 @@
    -

    +

    @@ -41,12 +41,14 @@
    import  from '';
    -

    diff --git a/config/jsdoc/api/template/tmpl/examples.tmpl b/config/jsdoc/api/template/tmpl/examples.tmpl index 950c32081a..cb8cc89417 100644 --- a/config/jsdoc/api/template/tmpl/examples.tmpl +++ b/config/jsdoc/api/template/tmpl/examples.tmpl @@ -1,5 +1,5 @@ @@ -13,4 +13,4 @@ \ No newline at end of file +?> diff --git a/config/jsdoc/api/template/tmpl/layout.tmpl b/config/jsdoc/api/template/tmpl/layout.tmpl index 22ccd319fd..18000b51c1 100644 --- a/config/jsdoc/api/template/tmpl/layout.tmpl +++ b/config/jsdoc/api/template/tmpl/layout.tmpl @@ -3,7 +3,7 @@ var version = obj.packageInfo.version; ?> - + + + - - - -