Skip to content

Commit 2a0bf2a

Browse files
mapbox-gl 三方库及插件升级到最新版本 review by zhurc
1 parent 78bd70f commit 2a0bf2a

File tree

4 files changed

+27
-19
lines changed

4 files changed

+27
-19
lines changed

dist/include-mapboxgl.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
var includes = (targetScript.getAttribute('include') || "").split(",");
3737
var excludes = (targetScript.getAttribute('exclude') || "").split(",");
3838
if (!inArray(excludes, 'mapbox-gl')) {
39-
inputCSS("https://cdn.bootcss.com/mapbox-gl/0.43.0/mapbox-gl.css");
40-
inputScript("https://cdn.bootcss.com/mapbox-gl/0.43.0/mapbox-gl.js");
39+
inputCSS("https://cdn.bootcss.com/mapbox-gl/0.45.0/mapbox-gl.css");
40+
inputScript("https://cdn.bootcss.com/mapbox-gl/0.45.0/mapbox-gl.js");
4141
}
4242
if (inArray(includes, 'draw')) {
43-
inputCSS("http://iclient.supermap.io/libs/mapbox-gl-js/plugins/mapbox-gl-draw/mapbox-gl-draw.css");
44-
inputScript("http://iclient.supermap.io/libs/mapbox-gl-js/plugins/mapbox-gl-draw/mapbox-gl-draw.js");
43+
inputCSS("http://iclient.supermap.io/web/libs/mapbox-gl-js/plugins/mapbox-gl-draw/1.0.9/mapbox-gl-draw.css");
44+
inputScript("http://iclient.supermap.io/web/libs/mapbox-gl-js/plugins/mapbox-gl-draw/1.0.9/mapbox-gl-draw.js");
4545
}
4646
if (inArray(includes, 'compare')) {
4747
inputCSS("http://iclient.supermap.io/libs/mapbox-gl-js/plugins/mapbox-gl-compare/mapbox-gl-compare.css");
@@ -51,11 +51,11 @@
5151
inputScript("http://mapv.baidu.com/build/mapv.min.js");
5252
}
5353
if (inArray(includes, 'echarts')) {
54-
inputScript("https://cdn.bootcss.com/echarts/4.0.4/echarts.min.js");
54+
inputScript("https://cdn.bootcss.com/echarts/4.1.0/echarts.min.js");
5555
inputScript("http://iclient.supermap.io/libs/echartsLayer/EchartsLayer.js");
5656
}
5757
if (inArray(includes, 'three')) {
58-
inputScript("https://cdn.bootcss.com/three.js/90/three.min.js");
58+
inputScript("https://cdn.bootcss.com/three.js/92/three.min.js");
5959
}
6060
if(inArray(includes,'deck')){
6161
inputScript("http://iclient.supermap.io/web/libs/deck.gl/5.1.3/deck.gl.min.js");
@@ -81,10 +81,10 @@
8181
inputScript("http://iclient.supermap.io/libs/three/plugins/loaders/GLTFLoader.js");
8282
}
8383
if (inArray(includes, 'proj4')) {
84-
inputScript("https://cdn.bootcss.com/proj4js/2.4.3/proj4.js");
84+
inputScript("https://cdn.bootcss.com/proj4js/2.4.4/proj4.js");
8585
}
8686
if (inArray(includes, 'echarts-gl')) {
87-
inputScript("http://iclient.supermap.io/libs/echarts-gl/1.1.0/echarts-gl.min.js");
87+
inputScript("http://iclient.supermap.io/web/libs/echarts-gl/1.1.1/echarts-gl.min.js");
8888
}
8989
if (inArray(includes, 'shapefile')) {
9090
inputScript("https://unpkg.com/shapefile@0.6.6/dist/shapefile.js");

examples/mapboxgl/mapvPolylineTime.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
width: 100%;
1919
}
2020
</style>
21-
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
22-
<script type="text/javascript" include="mapv,proj4" src="../../dist/include-mapboxgl.js"></script>
21+
2322
</head>
2423
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%">
2524
<div id="map"></div>
25+
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
26+
<script type="text/javascript" include="mapv,proj4" src="../../dist/include-mapboxgl.js"></script>
2627
<script type="text/javascript">
2728
var attribution = "<a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox </a>" +
2829
"| Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> <a href='http://mapv.baidu.com' target='_blank'>© 2017 百度 MapV</a> with <span>© <a href='http://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>";
@@ -65,6 +66,9 @@
6566
var maxLength = 0;
6667
for (var i = 0; i < rs.length; i++) {
6768
var item = rs[i].split(',');
69+
70+
71+
6872
var coordinates = [];
6973
if (item.length > maxLength) {
7074
maxLength = item.length;
@@ -73,16 +77,18 @@
7377
if (item.length === 1) {
7478
continue;
7579
}
76-
coordinates.push(proj4('EPSG:3857', 'EPSG:4326', [item[j], item[j + 1]]));
80+
coordinates.push(proj4('EPSG:3857', 'EPSG:4326', [parseInt(item[j]), parseInt(item[j + 1])]));
7781
timeData.push({
7882
geometry: {
7983
type: 'Point',
80-
coordinates: proj4('EPSG:3857', 'EPSG:4326', [item[j], item[j + 1]])
84+
coordinates: proj4('EPSG:3857', 'EPSG:4326', [parseInt(item[j]), parseInt(item[j + 1])])
8185
},
8286
count: 1,
8387
time: j
8488
});
8589
}
90+
91+
8692
data.push({
8793
geometry: {
8894
type: 'LineString',

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@
108108
"jsonsql": "^0.2.5",
109109
"leaflet": "^1.2.0",
110110
"lodash.topairs": "^4.3.0",
111-
"mapbox-gl": "0.43.0",
111+
"mapbox-gl": "0.45.0",
112112
"mapv": "2.0.20",
113113
"ol-mapbox-style": "^2.11.2",
114114
"openlayers": "^4.6.5",
115115
"pbf": "3.0.2",
116-
"proj4": "2.3.15",
116+
"proj4": "2.4.4",
117117
"promise-polyfill": "^6.0.2",
118-
"three": "^0.90.0"
118+
"three": "^0.92.0"
119119
}
120120
}

src/mapboxgl/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
"author": "SuperMap",
1515
"license": "Apache-2.0",
1616
"dependencies": {
17-
"echarts": "4.0.4",
18-
"mapv": "2.0.14",
19-
"mapbox-gl": "0.43.0",
20-
"three": "^0.90.0",
17+
18+
"echarts": "4.1.0",
19+
"mapv": "2.0.20",
20+
"mapbox-gl": "0.45.0",
21+
22+
"three": "^0.92.0",
2123
"@supermap/iclient-common": "9.0.1"
2224
}
2325
}

0 commit comments

Comments
 (0)