From e8e909253b11cfa0017996692dec52bc28dee5ff Mon Sep 17 00:00:00 2001 From: Hauke Stieler Date: Sat, 28 Apr 2018 08:27:48 +0200 Subject: [PATCH] [openlayers] Add hidpi option and test for ImageArcGISRest source (#25348) * Add hidpi option to ImageArcGISRestOptions * Add tests for the ImageArcGISRest source --- types/openlayers/index.d.ts | 2 ++ types/openlayers/openlayers-tests.ts | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 2a7d1b0949..a4d4f52d5e 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -8,6 +8,7 @@ // Dan Manastireanu // Yair Tawil // Pierre Marchand +// Hauke Stieler // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Definitions partially generated using tsd-jsdoc (https://github.com/englercj/tsd-jsdoc) @@ -12087,6 +12088,7 @@ export namespace olx { interface ImageArcGISRestOptions { attributions?: ol.Attribution[]; crossOrigin?: (string); + hidpi?: boolean; logo?: (string | LogoOptions); imageLoadFunction?: ol.ImageLoadFunctionType; params?: { [k: string]: any }; diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 58f9c5e4ad..d97a96c9de 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -718,6 +718,23 @@ const wmts: ol.source.WMTS = new ol.source.WMTS({ wrapX: true, }); +// +// ol.source.ImageArcGISRest +// +const arcGISImageLoadFunction: ol.ImageLoadFunctionType = (image, url) => {}; +const imageArcGISRest: ol.source.ImageArcGISRest = new ol.source.ImageArcGISRest({ + attributions: [attribution], + crossOrigin: stringValue, + hidpi: booleanValue, + logo: logoOptions, + imageLoadFunction: arcGISImageLoadFunction, + params: {}, + projection: projectionLike, + ratio: numberValue, + resolutions: [numberValue, numberValue, numberValue, numberValue, numberValue], + url: stringValue +}); + // // ol.coordinate //