diff --git a/test/unit/dataSourceProvider.js b/test/unit/dataSourceProvider.js index 1b4e6adfbd..e06e03f4a0 100644 --- a/test/unit/dataSourceProvider.js +++ b/test/unit/dataSourceProvider.js @@ -72,6 +72,7 @@ describe('Provide in Sources', function () { featureLayer.update = FeatureProcessing.update; featureLayer.projection = 'EPSG:4978'; featureLayer.mergeFeatures = false; + featureLayer.zoom.min = 10; function extrude() { return 5000; } @@ -86,7 +87,6 @@ describe('Provide in Sources', function () { format: `${formatTag}application/json`, extent: globalExtent, projection: 'EPSG:3857', - zoom: { min: zoom, max: zoom }, }); featureLayer.convert = Feature2Mesh.convert({ color, extrude }); @@ -201,7 +201,7 @@ describe('Provide in Sources', function () { }); }); it('should get 3 meshs with WFS source and DataSourceProvider', (done) => { - const tile = new TileMesh(geom, material, planarlayer, extent, zoom); + const tile = new TileMesh(geom, material, planarlayer, extent, featureLayer.zoom.min); material.visible = true; nodeLayer.level = EMPTY_TEXTURE_ZOOM; tile.parent = { pendingSubdivision: false }; @@ -220,7 +220,7 @@ describe('Provide in Sources', function () { material, planarlayer, extent, - zoom); + featureLayer.zoom.min); tile.material.visible = true; tile.parent = { pendingSubdivision: false }; featureLayer.source.uid = 8; diff --git a/test/unit/featureprocess.js b/test/unit/featureprocess.js index 04751e6f12..ec9c2d00f5 100644 --- a/test/unit/featureprocess.js +++ b/test/unit/featureprocess.js @@ -30,11 +30,10 @@ describe('Layer with Feature process', function () { url: 'https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements/09-ariege/departement-09-ariege.geojson', projection: 'EPSG:4326', format: 'application/json', - zoom: { min: 0, max: 0 }, networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}, }); - const ariege = new GeometryLayer('ariege', new THREE.Group(), { source }); + const ariege = new GeometryLayer('ariege', new THREE.Group(), { source, zoom: { min: 7 } }); ariege.update = FeatureProcessing.update; ariege.convert = Feature2Mesh.convert({ @@ -42,8 +41,6 @@ describe('Layer with Feature process', function () { extrude, }); - ariege.source.zoom = 0; - const context = { camera: viewer.camera, engine: viewer.mainLoop.gfxEngine, diff --git a/test/unit/layeredmaterial.js b/test/unit/layeredmaterial.js index 310dc8da7a..79afe0d40e 100644 --- a/test/unit/layeredmaterial.js +++ b/test/unit/layeredmaterial.js @@ -13,12 +13,13 @@ describe('material state vs layer state', function () { getLayer: () => nodeLayer, visible: true, }, - getExtentsByProjection: () => 0, + getExtentsByProjection: () => ([{ zoom: 0 }]), }; const layer = { id: 'test', visible: true, opacity: 1.0, + zoom: { max: Infinity, min: 0 }, }; it('should correctly initialize opacity & visibility', () => {