Closed quater23 closed 1 year ago
version: "tiff-imagery-provider": "^2.6.5",
ts报错是因为TIFFImageryProvider没有完全扩展ImageryProvider的属性,这样写就没事了:
const provider: any = await TIFFImageryProvider.fromUrl(url);
viewer.imageryLayers.addImageryProvider(provider);
ok,但我用的是js,一开始按照文档上那样写就报错了,后来改成这样就可以:
const provider = await TIFFImageryProvider.fromUrl(url, {});
也许你可以在文档上标注一下😃
感谢,已修复
https://github.com/hongfaqiu/TIFFImageryProvider/blob/18c4015bfc545debe2bb079a172b239c68324848/packages/TIFFImageryProvider/src/TIFFImageryProvider.ts#L361
When i use this code to load tiff, it is error. code:
error info:
The reason for the error is that i didn't pass in
options
, so it isundefined
, but theTIFFImageryProvider
function need its attributes.so may be you can change the source code like this: