From d4f1a272ae3d2f9f7b5dad4afa1e452239ac6148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E5=A3=B0?= Date: Wed, 14 Sep 2022 15:37:13 +0800 Subject: [PATCH] fix url bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决文件路径中有 # 或空格时,被浏览器截断的问题 --- lib/combineTileset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/combineTileset.js b/lib/combineTileset.js index f879f5d..446eef2 100644 --- a/lib/combineTileset.js +++ b/lib/combineTileset.js @@ -45,7 +45,7 @@ function combineTileset(options) { if (defined(boundingVolume) && defined(geometricError)) { // Use external tileset instand of b3dm. var url = path.relative(outputDir, jsonFile); - url = url.replace(/\\/g, '/'); + url = url.replace(/\\/g, '/').replace(/#/gi, '%23').replace(/ /gi, '%20'); // Only support region for now. if(boundingVolume.region) {