Skip to content

Commit e67c636

Browse files
committed
[fix]分端 leaflet引用mapbox; 图片路径修改 review by songym
1 parent 23a89b4 commit e67c636

File tree

7 files changed

+14
-17
lines changed

7 files changed

+14
-17
lines changed

dist/leaflet/include-leaflet.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
22
* This program are made available under the terms of the Apache License, Version 2.0
33
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
4-
(function() {
4+
(function () {
55
var r = new RegExp('(^|(.*?\\/))(include-leaflet.js)(\\?|$)'),
66
s = document.getElementsByTagName('script'),
77
targetScript;
@@ -57,6 +57,10 @@
5757
inputCSS('https://cdn.jsdelivr.net/npm/leaflet@1.7.1/dist/leaflet.css');
5858
inputScript('https://cdn.jsdelivr.net/npm/leaflet@1.7.1/dist/leaflet.js');
5959
}
60+
if (inArray(includes, 'mapbox-gl-enhance')) {
61+
inputCSS('https://iclient.supermap.io/web/libs/mapbox-gl-js-enhance/1.12.0/mapbox-gl-enhance.css');
62+
inputScript('https://iclient.supermap.io/web/libs/mapbox-gl-js-enhance/1.12.0/mapbox-gl-enhance.js');
63+
}
6064
if (inArray(includes, 'leaflet.heat')) {
6165
inputScript('https://cdn.bootcdn.net/ajax/libs/leaflet.heat/0.2.0/leaflet-heat.js');
6266
}
@@ -126,7 +130,7 @@
126130
inputScript('https://iclient.supermap.io/web/libs/bezier-easing/2.1.0/bezier-easing.js');
127131
}
128132
if (inArray(includes, 'tensorflow')) {
129-
inputScript('https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@3.5.0/dist/tf.min.js');
133+
inputScript('https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@3.5.0/dist/tf.min.js');
130134
}
131135

132136
// iclient
@@ -167,7 +171,6 @@
167171
if (inArray(includes, 'leaflet-mapbox-gl')) {
168172
inputScript('https://cdn.jsdelivr.net/npm/mapbox-gl-leaflet@0.0.14/leaflet-mapbox-gl.js');
169173
}
170-
171174
}
172175

173176
load();

examples/img/blueCar.png

3 KB
Loading

examples/img/redCar.png

2.99 KB
Loading

examples/leaflet/echartsAnimatorCar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
symbolSize: 30,
5353
symbol: function () {
5454
if ((Math.round(Math.random() * 2) % 2)) {
55-
return 'image://../classic/images/blueCar.png'
55+
return 'image://../img/blueCar.png'
5656
} else {
57-
return 'image://../classic/images/redCar.png'
57+
return 'image://../img/redCar.png'
5858
}
5959
}()
6060
},

examples/leaflet/mvt_mapboxgl.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@
1616

1717
<body style="margin: 0; overflow: hidden; background: #fff; width: 100%; height: 100%; position: absolute; top: 0">
1818
<div id="map" style="margin: 0 auto; width: 100%; height: 100%"></div>
19-
<!-- 叠加非3857的地图,请使用mapbox-gl-enhance -->
20-
<script
21-
type="text/javascript"
22-
include="mapbox-gl-enhance"
23-
src="../../dist/mapboxgl/include-mapboxgl.js"
24-
></script>
25-
<!-- 需引入三方插件 mapbox-gl-leaflet https://github.com/mapbox/mapbox-gl-leaflet -->
26-
<script type="text/javascript" include="leaflet-mapbox-gl" src="../../dist/leaflet/include-leaflet.js"></script>
19+
<!-- 叠加非3857的地图,请使用mapbox-gl-enhance, 需引入三方插件 mapbox-gl-leaflet https://github.com/mapbox/mapbox-gl-leaflet -->
20+
<script type="text/javascript" include="leaflet-mapbox-gl,mapbox-gl-enhance" src="../../dist/leaflet/include-leaflet.js"></script>
2721

2822
<script type="text/javascript">
2923
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';

examples/mapboxgl/echartsAnimatorCar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@
7070
symbolSize: 30,
7171
symbol: function () {
7272
if ((Math.round(Math.random() * 2) % 2)) {
73-
return 'image://../classic/images/blueCar.png'
73+
return 'image://../img/blueCar.png'
7474
} else {
75-
return 'image://../classic/images/redCar.png'
75+
return 'image://../img/redCar.png'
7676
}
7777
}()
7878
};

examples/openlayers/echartsAnimatorCar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
symbolSize: 30,
7575
symbol: function () {
7676
if ((Math.round(Math.random() * 2) % 2)) {
77-
return 'image://../classic/images/blueCar.png'
77+
return 'image://../img/blueCar.png'
7878
} else {
79-
return 'image://../classic/images/redCar.png'
79+
return 'image://../img/redCar.png'
8080
}
8181
}()
8282
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy