diff --git a/src/views/gisMapPage/gisMapBox1.vue b/src/views/gisMapPage/gisMapBox1.vue index c6d2900..20eb021 100644 --- a/src/views/gisMapPage/gisMapBox1.vue +++ b/src/views/gisMapPage/gisMapBox1.vue @@ -57,9 +57,7 @@ map = newfiberMapbox.map; map.ogcLayers = []; newfiberMapbox.unLoadLayers = []; - (sprites || []).forEach(url => { - map.style._loadSprite(url.includes('http') ? url : window.location.href.split('#')[0] + url); - }); + (sprites || []).forEach(url => map.style._loadSprite(url.includes('http') ? url : window.location.origin.split('#')[0] + url)); ((l7 || []).images || []).forEach(item => newfiberMapbox.addImage(item.name, item.url.includes('http') ? item.url : window.location.href.split('#')[0] + item.url) );