From 4aac17bae30acbd53b319054941d7180e236af4d Mon Sep 17 00:00:00 2001 From: "Dan.Manastireanu" Date: Thu, 26 Oct 2017 18:00:06 +0300 Subject: [PATCH] openlayers: make TileWMS projection optional. Closes #20994 --- types/openlayers/index.d.ts | 3 ++- types/openlayers/openlayers-tests.ts | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 441214cce6..4c66e1d970 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -4,6 +4,7 @@ // Bin Wang // Junyoung Clare Jang // Alexandre Melard +// Dan Manastireanu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Definitions partially generated using tsd-jsdoc (https://github.com/englercj/tsd-jsdoc) @@ -13414,7 +13415,7 @@ declare module olx { hidpi?: boolean; logo?: (string | olx.LogoOptions); tileGrid?: ol.tilegrid.TileGrid; - projection: ol.ProjectionLike; + projection?: ol.ProjectionLike; reprojectionErrorThreshold?: number; serverType?: (ol.source.wms.ServerType | string); tileLoadFunction?: ol.TileLoadFunctionType; diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 50281ff0fe..5db7d06064 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -558,6 +558,12 @@ let tileWMS: ol.source.TileWMS = new ol.source.TileWMS({ url: stringValue }); +//test without projection +tileWMS = new ol.source.TileWMS({ + params: {}, + serverType: stringValue, + url: stringValue +}); voidValue = tileWMS.updateParams(tileWMS.getParams()); stringValue = tileWMS.getGetFeatureInfoUrl([0, 0], 1, "EPSG:4326", {});