diff --git a/dist/mapboxgl/include-mapboxgl.js b/dist/mapboxgl/include-mapboxgl.js index a0326ddba..d6489dd62 100644 --- a/dist/mapboxgl/include-mapboxgl.js +++ b/dist/mapboxgl/include-mapboxgl.js @@ -66,7 +66,7 @@ inputScript(libsurl+ '/mapboxgl-l7-render/index.js'); } if (inArray(includes, 'g2')) { - inputScript('https://cdnjs.cloudflare.com/ajax/libs/antv-g2/4.2.8/g2.min.js'); + inputScript(libsurl + '/antv/g2/4.2.8/g2.min.js'); } if (inArray(includes, 'g6')) { inputScript(libsurl + '/antv/g6/4.3.2/g6.min.js'); diff --git a/dist/maplibregl/include-maplibregl.js b/dist/maplibregl/include-maplibregl.js index feeb404ae..c802650e3 100644 --- a/dist/maplibregl/include-maplibregl.js +++ b/dist/maplibregl/include-maplibregl.js @@ -50,7 +50,8 @@ //加载类库资源文件 function load(config) { - var libsurl = '../../web/libs'; + var libsurl = config.libsurl; + var disturl = config.disturl; var includes = (targetScript.getAttribute('include') || '').split(','); var excludes = (targetScript.getAttribute('exclude') || '').split(','); if (!inArray(excludes, 'maplibregl')) { @@ -61,7 +62,7 @@ inputScript(libsurl + '/maplibregl-l7-render/index.js'); } if (inArray(includes, 'g2')) { - inputScript('https://cdnjs.cloudflare.com/ajax/libs/antv-g2/4.2.8/g2.min.js'); + inputScript(libsurl + '/antv/g2/4.2.8/g2.min.js'); } if (inArray(includes, 'turf')) { inputScript(libsurl + '/turf/6.5.0/turf.min.js'); @@ -188,15 +189,16 @@ } if (!inArray(excludes, 'iclient-maplibregl')) { if (supportES6()) { - inputScript('../../dist/maplibregl/iclient-maplibregl-es6.min.js'); + inputScript(disturl + '/maplibregl/iclient-maplibregl-es6.min.js'); } else { - inputScript('../../dist/maplibregl/iclient-maplibregl.min.js'); + inputScript(disturl + '/maplibregl/iclient-maplibregl.min.js'); } } } load({ - libsurl: 'https://iclient.supermap.io/web/libs' + libsurl: 'https://iclient.supermap.io/web/libs', + disturl: '../../dist' }); window.isLocal = false; window.server = document.location.toString().match(/file:\/\//) diff --git a/test/mapboxgl/overlay/L7LayerSpec.js b/test/mapboxgl/overlay/L7LayerSpec.js index 560886d3a..99bcfc15a 100644 --- a/test/mapboxgl/overlay/L7LayerSpec.js +++ b/test/mapboxgl/overlay/L7LayerSpec.js @@ -6,7 +6,7 @@ import { L7Layer } from '../../../src/mapboxgl/overlay/L7Layer'; var url = GlobeParameter.ChinaURL + '/zxyTileImage.png?z={z}&x={x}&y={y}'; -describe('L7Layer', () => { +describe('mapboxgl L7Layer', () => { var originalTimeout; var testDiv, map, getL7Scene, setLayoutProperty; var data = [ diff --git a/test/maplibregl/core/MapExtendSpec.js b/test/maplibregl/core/MapExtendSpec.js index cf65a7fea..a163a4cb0 100644 --- a/test/maplibregl/core/MapExtendSpec.js +++ b/test/maplibregl/core/MapExtendSpec.js @@ -2,7 +2,7 @@ import '../../../src/maplibregl/core/MapExtend'; import maplibregl from 'maplibre-gl'; import { L7Layer } from '../../../src/maplibregl/overlay'; -describe('MapExtend', () => { +describe('maplibregl MapExtend', () => { var url = 'http://supermapiserver:8090/iserver/services/map-china400/rest/maps/China'; var testDiv, map; beforeAll(() => { diff --git a/test/maplibregl/overlay/L7LayerSpec.js b/test/maplibregl/overlay/L7LayerSpec.js index 79c24339b..a04f6aba0 100644 --- a/test/maplibregl/overlay/L7LayerSpec.js +++ b/test/maplibregl/overlay/L7LayerSpec.js @@ -6,7 +6,7 @@ import { L7Layer } from '../../../src/maplibregl/overlay/L7Layer'; var url = GlobeParameter.ChinaURL + '/zxyTileImage.png?z={z}&x={x}&y={y}'; -describe('L7Layer', () => { +describe('maplibregl L7Layer', () => { var originalTimeout; var testDiv, map, getL7Scene, setLayoutProperty; var data = [