|
36 | 36 | var includes = (targetScript.getAttribute('include') || "").split(","); |
37 | 37 | var excludes = (targetScript.getAttribute('exclude') || "").split(","); |
38 | 38 | if (!inArray(excludes, 'leaflet')) { |
39 | | - inputCSS("http://cdn.bootcss.com/leaflet/1.2.0/leaflet.css"); |
40 | | - inputScript("http://cdn.bootcss.com/leaflet/1.2.0/leaflet-src.js"); |
| 39 | + inputCSS("../../web/libs/leaflet/leaflet.css"); |
| 40 | + inputScript("../../web/libs/leaflet/leaflet.js"); |
41 | 41 | } |
42 | 42 | if (inArray(includes, 'mapv')) { |
43 | | - inputScript("http://mapv.baidu.com/build/mapv.min.js"); |
| 43 | + inputScript("../../web/libs/mapv/mapv.min.js"); |
44 | 44 | } |
45 | 45 | if (inArray(includes, 'turf')) { |
46 | | - inputScript("https://cdn.bootcss.com/Turf.js/4.6.1/turf.min.js"); |
| 46 | + inputScript("../../web/libs/turf/turf.min.js"); |
47 | 47 | } |
48 | 48 | if (inArray(includes, 'echarts')) { |
49 | | - inputScript("http://cdn.bootcss.com/echarts/3.6.2/echarts.min.js"); |
| 49 | + inputScript("../../web/libs/echarts/echarts.min.js"); |
50 | 50 | } |
51 | 51 | if (inArray(includes, 'd3')) { |
52 | | - inputScript("https://cdn.bootcss.com/d3/4.10.2/d3.min.js"); |
| 52 | + inputScript("../../web/libs/d3/d3.min.js"); |
53 | 53 | } |
54 | 54 | if (inArray(includes, 'd3-hexbin')) { |
55 | | - inputScript("https://d3js.org/d3-hexbin.v0.2.min.js"); |
| 55 | + inputScript("../../web/libs/d3/d3-hexbin.v0.2.min.js"); |
56 | 56 | } |
57 | 57 | if (inArray(includes, 'd3Layer')) { |
58 | | - inputScript("http://iclient.supermap.io/libs/leaflet/plugins/leaflet.d3Layer/leaflet-d3Layer.min.js"); |
| 58 | + inputScript("../../web/libs/leaflet/plugins/leaflet.d3Layer/leaflet-d3Layer.min.js"); |
59 | 59 | } |
60 | 60 | if (inArray(includes, 'elasticsearch')) { |
61 | | - inputScript("http://cdn.bootcss.com/elasticsearch/13.0.1/elasticsearch.min.js"); |
| 61 | + inputScript("../../web/libs/elasticsearch/elasticsearch.min.js"); |
62 | 62 | } |
63 | 63 | if (!inArray(excludes, 'iclient9-leaflet')) { |
64 | 64 | inputScript("../../dist/iclient9-leaflet.js"); |
|
67 | 67 | inputCSS("../../dist/iclient9-leaflet.min.css"); |
68 | 68 | } |
69 | 69 | if (inArray(includes, 'leaflet.heat')) { |
70 | | - inputScript("http://cdn.bootcss.com/leaflet.heat/0.2.0/leaflet-heat.js"); |
| 70 | + inputScript("../../web/libs/leaflet/plugins/leaflet.heat/leaflet-heat.js"); |
71 | 71 | } |
72 | 72 | if (inArray(includes, 'osmbuildings')) { |
73 | | - inputScript("http://iclient.supermap.io/libs/osmbuildings/OSMBuildings-Leaflet.js"); |
| 73 | + inputScript("../../web/libs/osmbuildings/OSMBuildings-Leaflet.js"); |
74 | 74 | } |
75 | 75 | if (inArray(includes, 'leaflet.markercluster')) { |
76 | | - inputCSS("http://cdn.bootcss.com/leaflet.markercluster/1.0.3/MarkerCluster.Default.css"); |
77 | | - inputCSS("http://cdn.bootcss.com/leaflet.markercluster/1.0.3/MarkerCluster.css"); |
78 | | - inputScript("http://cdn.bootcss.com/leaflet.markercluster/1.0.3/leaflet.markercluster.js"); |
| 76 | + inputCSS("../../web/libs/leaflet/plugins/leaflet.markercluster/MarkerCluster.Default.css"); |
| 77 | + inputCSS("../../web/libs/leaflet/plugins/leaflet.markercluster/MarkerCluster.css"); |
| 78 | + inputScript("../../web/libs/leaflet/plugins/leaflet.markercluster/leaflet.markercluster.js"); |
79 | 79 | } |
80 | 80 | if (inArray(includes, 'leaflet-icon-pulse')) { |
81 | | - inputCSS("http://iclient.supermap.io/libs/leaflet/plugins/leaflet-icon-pulse/L.Icon.Pulse.css"); |
82 | | - inputScript("http://iclient.supermap.io/libs/leaflet/plugins/leaflet-icon-pulse/L.Icon.Pulse.js"); |
| 81 | + inputCSS("../../web/libs/leaflet/plugins/leaflet-icon-pulse/L.Icon.Pulse.css"); |
| 82 | + inputScript("../../web/libs/leaflet/plugins/leaflet-icon-pulse/L.Icon.Pulse.js"); |
83 | 83 | } |
84 | 84 | if (inArray(includes, 'leaflet.draw')) { |
85 | | - inputCSS("http://cdn.bootcss.com/leaflet.draw/0.4.12/leaflet.draw.css"); |
86 | | - inputScript("http://cdn.bootcss.com/leaflet.draw/0.4.12/leaflet.draw.js"); |
| 85 | + inputCSS("../../web/libs/leaflet/plugins/leaflet.draw/leaflet.draw.css"); |
| 86 | + inputScript("../../web/libs/leaflet/plugins/leaflet.draw/leaflet.draw.js"); |
87 | 87 | } |
88 | 88 | if (inArray(includes, 'leaflet.pm')) { |
89 | | - inputCSS("http://cdn.bootcss.com/leaflet.pm/0.16.0/leaflet.pm.min.css"); |
90 | | - inputScript("http://cdn.bootcss.com/leaflet.pm/0.16.0/leaflet.pm.min.js"); |
| 89 | + inputCSS("../../web/libs/leaflet/plugins/leaflet.pm/leaflet.pm.min.css"); |
| 90 | + inputScript("../../web/libs/leaflet/plugins/leaflet.pm/leaflet.pm.min.js"); |
91 | 91 | } |
92 | 92 | } |
93 | 93 |
|
94 | 94 | load(); |
95 | | - window.isLocal = false; |
| 95 | + window.isLocal = true; |
96 | 96 | window.server = "http://localhost:8090"; |
97 | 97 | })(); |
0 commit comments