From 5012e4987c25a7c36e90717a39c0059a29b3fbaf Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 7 May 2019 14:39:58 +0200 Subject: [PATCH 1/4] Don't use View#constrainCenter function --- examples/device-orientation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/device-orientation.js b/examples/device-orientation.js index a01ac6f38a..8f7fd602d6 100644 --- a/examples/device-orientation.js +++ b/examples/device-orientation.js @@ -40,6 +40,6 @@ gn.init().then(function() { center[0] -= resolution * gamma * 25; center[1] += resolution * beta * 25; - view.setCenter(view.constrainCenter(center)); + view.setCenter(center); }); }); From bd57128ca441c099facff5fa5ceefac40d896e5f Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 7 May 2019 14:46:18 +0200 Subject: [PATCH 2/4] Remove unsupported condition property There's no `condition` property for the Extent interaction --- examples/extent-interaction.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/extent-interaction.js b/examples/extent-interaction.js index 936d75ebe4..0925665abf 100644 --- a/examples/extent-interaction.js +++ b/examples/extent-interaction.js @@ -1,6 +1,5 @@ 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 ExtentInteraction from '../src/ol/interaction/Extent.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; @@ -27,9 +26,7 @@ const map = new Map({ }) }); -const extent = new ExtentInteraction({ - condition: platformModifierKeyOnly -}); +const extent = new ExtentInteraction(); map.addInteraction(extent); extent.setActive(false); From 6b1bce2b9d50ff194739c240a363f49d8b3fd088 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 7 May 2019 14:50:39 +0200 Subject: [PATCH 3/4] Add missing className property to BaseTile layer options --- src/ol/layer/BaseTile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/layer/BaseTile.js b/src/ol/layer/BaseTile.js index 0bbfe1c346..3e2f70f8d4 100644 --- a/src/ol/layer/BaseTile.js +++ b/src/ol/layer/BaseTile.js @@ -8,6 +8,7 @@ import {assign} from '../obj.js'; /** * @typedef {Object} Options + * @property {string} [className='ol-layer'] A CSS class name to set to the layer element. * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. * @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be From f5ae41f03ea3f2ee2b77f648af314886112923eb Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 7 May 2019 14:53:52 +0200 Subject: [PATCH 4/4] Compare Date with Date instead of number --- examples/wms-time.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/wms-time.js b/examples/wms-time.js index 7f65044055..18bce02a25 100644 --- a/examples/wms-time.js +++ b/examples/wms-time.js @@ -46,7 +46,7 @@ function updateInfo() { function setTime() { startDate.setMinutes(startDate.getMinutes() + 15); - if (startDate > Date.now()) { + if (startDate > new Date()) { startDate = threeHoursAgo(); } layers[1].getSource().updateParams({'TIME': startDate.toISOString()});