Skip to content

Commit 7811bcf

Browse files
committed
【examples】【API】增加mapboxgl打印例子。修复API参数错误 review by xiongjj
1 parent 96ca288 commit 7811bcf

File tree

8 files changed

+443
-12
lines changed

8 files changed

+443
-12
lines changed

dist/mapboxgl/include-mapboxgl.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@
142142
if (inArray(includes, 'echarts-gl')) {
143143
inputScript("https://iclient.supermap.io/web/libs/echarts-gl/1.1.1/echarts-gl.min.js");
144144
}
145-
145+
if (inArray(includes, 'mapbox-print-pdf')) {
146+
inputScript("../../../web/libs/mapbox-print-pdf/0.4.4/mapbox-print-pdf.min.js");
147+
}
146148
// dist
147149
if (!inArray(excludes, 'iclient-mapboxgl')) {
148150
if (supportES6()) {

examples/js/utils.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ var utils = {
2626
//获取当前语言。默认从cookie读取,没有则读取浏览器默认语言
2727
function getLanguage() {
2828
var lang = getCookie(cKey);
29-
if (lang) {
30-
return lang;
31-
}
32-
if (navigator.appName === 'Netscape') {
33-
lang = navigator.language;
34-
} else {
35-
lang = navigator.browserLanguage;
29+
if (!lang) {
30+
if (navigator.appName === 'Netscape') {
31+
lang = navigator.language;
32+
} else {
33+
lang = navigator.browserLanguage;
34+
}
3635
}
3736
if (lang) {
3837
if (lang.indexOf('zh') === 0) {

examples/mapboxgl/config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,14 @@ var exampleConfig = {
10641064
version: "9.1.1",
10651065
thumbnail: "mvt_4326.png",
10661066
fileName: "mvtVectorTile_4326"
1067-
}
1067+
},
1068+
{
1069+
name: "地图打印",
1070+
name_en: "Map Print",
1071+
version: "10.0.2",
1072+
thumbnail: "print_pdf.png",
1073+
fileName: "print_pdf"
1074+
},
10681075
]
10691076
},
10701077
Multi_coordinate_cluster: {

examples/mapboxgl/img/print_pdf.png

18.5 KB
Loading

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