fix: 修复栅格图片瓦片的混合问题 (#1316)

* fix: 修复 featureScale 错误

* style: lint style

* fix: remove featureScalePlugin async

* fix: 修复栅格图片瓦片的混合问题

Co-authored-by: shihui <yiqianyao.yqy@alibaba-inc.com>
This commit is contained in:
YiQianYao 2022-08-30 14:44:44 +08:00 committed by GitHub
parent 9f2f834960
commit 7837021908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -19,6 +19,22 @@ export default () => {
zIndex: 1, zIndex: 1,
}); });
layerTile.source( layerTile.source(
'//t3.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=f1f2021a42d110057042177cd22d856f',
// 'http://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
{
parser: {
type: 'rasterTile',
tileSize: 256,
// zoomOffset: 0
// zoomOffset: 1,
},
},
);
const layerTile2 = new RasterLayer({
zIndex: 0,
});
layerTile2.source(
// '//t3.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=f1f2021a42d110057042177cd22d856f', // '//t3.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=f1f2021a42d110057042177cd22d856f',
'http://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}', 'http://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
{ {
@ -33,6 +49,7 @@ export default () => {
scene.on('loaded', () => { scene.on('loaded', () => {
scene.addLayer(layerTile); scene.addLayer(layerTile);
scene.addLayer(layerTile2);
}); });
}, []); }, []);
return ( return (

View File

@ -77,7 +77,7 @@ export default class ImageModel extends BaseModel {
primitive: gl.TRIANGLES, primitive: gl.TRIANGLES,
blend: { blend: {
// Tip: 优化显示效果 // Tip: 优化显示效果
enable: false, enable: true,
}, },
depth: { enable: false }, depth: { enable: false },
stencil: getMask(mask, maskInside), stencil: getMask(mask, maskInside),