Skip to content

Documentation / @geoverse/core-libre / BaiduProtocolOptions

Interface: BaiduProtocolOptions ​

Defined in: packages/core-libre/src/sources/baiduProtocol.ts:333

Properties ​

fetchTile? ​

ts
optional fetchTile?: TileBitmapFetcher;

Defined in: packages/core-libre/src/sources/baiduProtocol.ts:341

覆写瓦片获取(测试注入);优先于 tileUrl。设置后 useWorker 失效(回主线程)


tileUrl? ​

ts
optional tileUrl?: (tx, ty, z) => string;

Defined in: packages/core-libre/src/sources/baiduProtocol.ts:339

百度瓦片地址(默认走 maponline*.bdimg.com)。 ⚠️ 务必指向同源代理——百度瓦片无 CORS 且有防盗链 403,直连会被画布污染/拒绝。 例:(x,y,z) => \/baidu-tile/${z}/${x}/${y}``(开发期 Vite 代理 / 生产边缘函数)。

Parameters ​

tx ​

number

ty ​

number

z ​

number

Returns ​

string


useWorker? ​

ts
optional useWorker?: boolean;

Defined in: packages/core-libre/src/sources/baiduProtocol.ts:346

在 Web Worker 内执行 warp(fetch+解码+合成+重采样),把 CPU 移出主线程。 主线程只算 plan(廉价);worker 回传可转移的 ImageBitmap。降级条件不满足时回主线程。


warpGrid? ​

ts
optional warpGrid?: number;

Defined in: packages/core-libre/src/sources/baiduProtocol.ts:351

warp 分格数(输出 N×N 分片仿射,降低低层级/高纬度变形与接缝)。默认 8; 规整到 256 的 2 的幂因子(1/2/4/8/16),1=单仿射。越大越精细、CPU 略增。