Skip to content

Commit

Permalink
test: vector tile case
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei committed Mar 29, 2024
1 parent be9102d commit 3403053
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TestScene } from '@antv/l7-test-utils';
import RasterLayer from '../../src/raster/index';

describe('RasterLayer', () => {
describe('raster-tile', () => {
let scene: any;
beforeEach(() => {
scene = TestScene();
});
// vector data
it('rasterLayer raster', async () => {
const url1 =
'https://tiles{1-3}.geovisearth.com/base/v1/ter/{z}/{x}/{y}?format=webp&tmsIds=w&token=b2a0cfc132cd60b61391b9dd63c15711eadb9b38a9943e3f98160d5710aef788';
Expand Down
30 changes: 30 additions & 0 deletions packages/layers/__tests__/tile/vector-tile.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { TestScene } from '@antv/l7-test-utils';
import PointLayer from '../../src/point';

describe('vector-tile', () => {
let scene: any;
beforeEach(() => {
scene = TestScene();
});
it('pointLayer vector', async () => {
const layer = new PointLayer({
featureId: 'COLOR',
sourceLayer: 'ecoregions2',
});
layer
.source('https://ganos.oss-cn-hangzhou.aliyuncs.com/m2/rs_l7/{z}/{x}/{y}.pbf', {
parser: {
type: 'mvt',
tileSize: 256,
zoomOffset: 0,
maxZoom: 9,
extent: [-180, -85.051129, 179, 85.051129],
},
})
.shape('circle')
.color('COLOR')
.size(10);

scene.addLayer(layer);
});
});

0 comments on commit 3403053

Please sign in to comment.