From 28bdbeb869d4e69709a12ec1dcdcd602e51feac1 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 28 Nov 2018 15:59:44 +0100 Subject: [PATCH 1/2] Change projection property in sources options to optional The `projection` property is not mandatory, the view's projection is used if not provided. --- src/ol/source/Image.js | 2 +- src/ol/source/ImageArcGISRest.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js index 8f2164c0f2..dcce898db8 100644 --- a/src/ol/source/Image.js +++ b/src/ol/source/Image.js @@ -70,7 +70,7 @@ class ImageSourceEvent extends Event { /** * @typedef {Object} Options * @property {import("./Source.js").AttributionLike} [attributions] - * @property {import("../proj.js").ProjectionLike} projection + * @property {import("../proj.js").ProjectionLike} [projection] * @property {Array} [resolutions] * @property {import("./State.js").default} [state] */ diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index 417473451b..37e3e6a95c 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -28,7 +28,7 @@ import {appendParams} from '../uri.js'; * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/} * for further reference. - * @property {import("../proj.js").ProjectionLike} projection Projection. + * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, * `2` means twice the size of the map viewport, and so on. * @property {Array} [resolutions] Resolutions. If specified, requests will be made for From 769d7dd732e3994c314f34e2aa2efc10a7740e7e Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 28 Nov 2018 16:00:55 +0100 Subject: [PATCH 2/2] Change urls property in TileArcGISRest to optional The `urls`property is optional if `url` is defined. --- src/ol/source/TileArcGISRest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index ea0e8c85a3..c76710a3d9 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -44,7 +44,7 @@ import {appendParams} from '../uri.js'; * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * @property {number} [transition] Duration of the opacity transition for rendering. To disable the opacity * transition, pass `transition: 0`. - * @property {Array} urls ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS + * @property {Array} [urls] ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS * Service supports multiple urls for export requests. */