From 991d316a389abc66fc2c1c8abde5ecb170cee22e Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Thu, 16 Aug 2018 13:54:12 +0200 Subject: [PATCH] Add tests --- types/openlayers/openlayers-tests.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 6e28ad4cd2..d631a9e9bb 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -418,6 +418,14 @@ feature.setStyle(styleArray); feature.setStyle(featureStyleFunction); feature.setStyle(styleFunction); feature.setProperties(object); +const nullStyleFunction = (feature: (ol.Feature|ol.render.Feature), resolution: number): null => { + return null; +}; +const nullFeatureStyleFunction = (resolution: number): null => { + return null; +}; +feature.setStyle(nullStyleFunction); +feature.setStyle(nullFeatureStyleFunction); // // ol.View @@ -573,6 +581,10 @@ const vectorLayer: ol.layer.Vector = new ol.layer.Vector({ zIndex: -1 }); +vectorLayer.setStyle(nullStyleFunction); +vectorLayer.setStyle(null); +vectorLayer.setStyle(undefined); + // // ol.layer.VectorTile //