@mapgis/webclient-mapboxgl-plugin 17.0.7 → 17.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -36
- package/dist/es5/webclient-common.min.js +15 -4
- package/dist/es5/webclient-mapboxgl-plugin.min.js +1 -1
- package/dist/webclient-mapboxgl-plugin-es6.min.js +1 -1
- package/documention/MapViewMapboxgl.html +1244 -19
- package/documention/Popup.html +7 -5
- package/documention/Screenshot.html +5 -14
- package/documention/SketchEditorMapboxgl.html +108 -50
- package/documention/index.html +7 -7
- package/documention/scripts/sideBar.js +16 -2
- package/package.json +3 -3
package/documention/Popup.html
CHANGED
|
@@ -116,7 +116,7 @@ zondy-popup__footer 弹窗底部样式<br/></p>
|
|
|
116
116
|
|
|
117
117
|
<span class="param-type">
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
MapView
|
|
120
120
|
|
|
121
121
|
</span>
|
|
122
122
|
|
|
@@ -376,9 +376,11 @@ zondy-popup__footer 弹窗底部样式<br/></p>
|
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
379
|
-
const { Map
|
|
379
|
+
const { Map } = zondy
|
|
380
|
+
const { MapView } = zondy.mapboxgl
|
|
380
381
|
// ES6引入方式
|
|
381
|
-
import {
|
|
382
|
+
import { MapView } from "@mapgis/webclient-mapboxgl-plugin"
|
|
383
|
+
import { Map } from "@mapgis/webclient-common"
|
|
382
384
|
// 初始化图层管理容器
|
|
383
385
|
const map = new Map();
|
|
384
386
|
// 初始化地图视图对象
|
|
@@ -551,7 +553,7 @@ mapView.popup.close(popupObj)
|
|
|
551
553
|
|
|
552
554
|
<span class="param-type">
|
|
553
555
|
|
|
554
|
-
|
|
556
|
+
MapView
|
|
555
557
|
|
|
556
558
|
</span>
|
|
557
559
|
|
|
@@ -950,7 +952,7 @@ mapView.popup.close(popupObj)
|
|
|
950
952
|
|
|
951
953
|
<span class="param-type">
|
|
952
954
|
|
|
953
|
-
|
|
955
|
+
MapView
|
|
954
956
|
|
|
955
957
|
</span>
|
|
956
958
|
|
|
@@ -278,10 +278,12 @@
|
|
|
278
278
|
|
|
279
279
|
|
|
280
280
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
281
|
-
const { Map
|
|
282
|
-
const {
|
|
281
|
+
const { Map } = zondy
|
|
282
|
+
const { MapView } = zondy.mapboxgl
|
|
283
|
+
const { Screenshot } = zondy.mapboxgl.tool
|
|
283
284
|
// ES6引入方式
|
|
284
|
-
import {
|
|
285
|
+
import { MapView, Screenshot } from "@mapgis/webclient-mapboxgl-plugin"
|
|
286
|
+
import { Map } from "@mapgis/webclient-common"
|
|
285
287
|
// 初始化图层管理容器
|
|
286
288
|
const map = new Map();
|
|
287
289
|
// 初始化地图视图对象
|
|
@@ -310,17 +312,6 @@ mapView.ui.add(screenshot)</code></pre>
|
|
|
310
312
|
</div>
|
|
311
313
|
|
|
312
314
|
|
|
313
|
-
<h3 class="subsection-title">继承关系</h3>
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
<ul>
|
|
319
|
-
<li>Widget</li>
|
|
320
|
-
</ul>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
315
|
|
|
325
316
|
|
|
326
317
|
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
<div class="description">
|
|
38
38
|
<p>二维Mapboxgl引擎草图编辑类<br/>
|
|
39
39
|
<br>[ES5引入方式]:<br/>
|
|
40
|
-
const {
|
|
40
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch <br/>
|
|
41
41
|
[ES6引入方式]:<br/>
|
|
42
|
-
import {
|
|
42
|
+
import { SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/></p>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
@@ -110,7 +110,7 @@ import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin"
|
|
|
110
110
|
|
|
111
111
|
<span class="param-type">
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
MapView
|
|
114
114
|
|
|
115
115
|
</span>
|
|
116
116
|
|
|
|
@@ -317,10 +317,15 @@ import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin"
|
|
|
317
317
|
|
|
318
318
|
|
|
319
319
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
320
|
-
const {
|
|
320
|
+
const { Color } = zondy
|
|
321
|
+
const { SketchDataType } = zondy.enum
|
|
322
|
+
const { SimpleMarkerSymbol } = zondy.symbol
|
|
323
|
+
const { SketchStyle } = zondy.tool.sketch
|
|
324
|
+
const { MapView } = zondy.mapboxgl
|
|
325
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
321
326
|
[ES6引入方式]:
|
|
322
|
-
import { MapView,
|
|
323
|
-
import { SketchStyle,
|
|
327
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
328
|
+
import { SketchStyle, SketchEditor, Color, SketchDataType} from "@mapgis/webclient-common" <br/>
|
|
324
329
|
var map = new Map()
|
|
325
330
|
var mapView = new MapView({
|
|
326
331
|
viewId: "mapgis-2d-viewer",
|
|
@@ -335,14 +340,14 @@ var sketchStyle = new SketchStyle({
|
|
|
335
340
|
lineStyle: undefined,
|
|
336
341
|
fillStyle: undefined
|
|
337
342
|
})
|
|
338
|
-
var
|
|
343
|
+
var sketchEditor = new SketchEditor({
|
|
339
344
|
view: mapView,
|
|
340
345
|
layer: new GraphicsLayer(),
|
|
341
346
|
vertexStyle: vertexStyle
|
|
342
347
|
})
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
348
|
+
sketchEditor.start(SketchDataType.POINT) // 绘制点
|
|
349
|
+
sketchEditor.start(SketchDataType.POLYLINE) // 绘制线
|
|
350
|
+
sketchEditor.start(SketchDataType.POLYGON) // 绘制区
|
|
346
351
|
*</code></pre>
|
|
347
352
|
|
|
348
353
|
|
|
@@ -1212,9 +1217,11 @@ SketchEditorMapboxgl.start(SketchDataType.POLYGON) // 绘制区
|
|
|
1212
1217
|
|
|
1213
1218
|
|
|
1214
1219
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
1215
|
-
const {
|
|
1220
|
+
const { Polygon, LineString } = zondy.geometry
|
|
1221
|
+
const { MapView } = zondy.mapboxgl
|
|
1222
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
1216
1223
|
[ES6引入方式]:
|
|
1217
|
-
import { MapView,
|
|
1224
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
1218
1225
|
import { Polygon, LineString } from "@mapgis/webclient-common" <br/>
|
|
1219
1226
|
var map = new Map()
|
|
1220
1227
|
var mapView = new MapView({
|
|
@@ -1273,11 +1280,11 @@ var testLayer = new GraphicsLayer({
|
|
|
1273
1280
|
graphics: this.testFeatures
|
|
1274
1281
|
})
|
|
1275
1282
|
map.add(testLayer)
|
|
1276
|
-
var
|
|
1283
|
+
var sketchEditor = new SketchEditor({
|
|
1277
1284
|
view: mapView,
|
|
1278
1285
|
layer: new GraphicsLayer()
|
|
1279
1286
|
})
|
|
1280
|
-
|
|
1287
|
+
sketchEditor.drawPolylineToPolygon(testGeometries)</code></pre>
|
|
1281
1288
|
|
|
1282
1289
|
|
|
1283
1290
|
|
|
@@ -1644,22 +1651,24 @@ sketchEditorMapboxgl.drawPolylineToPolygon(testGeometries)</code></pre>
|
|
|
1644
1651
|
|
|
1645
1652
|
|
|
1646
1653
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
1647
|
-
const {
|
|
1654
|
+
const { Polygon, LineString } = zondy.geometry
|
|
1655
|
+
const { MapView } = zondy.mapboxgl
|
|
1656
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
1648
1657
|
[ES6引入方式]:
|
|
1649
|
-
import { MapView,
|
|
1658
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
1650
1659
|
import { Polygon, LineString } from "@mapgis/webclient-common" <br/>
|
|
1651
1660
|
var map = new Map()
|
|
1652
1661
|
var mapView = new MapView({
|
|
1653
1662
|
viewId: "mapgis-2d-viewer",
|
|
1654
1663
|
map: map,
|
|
1655
1664
|
})
|
|
1656
|
-
var
|
|
1665
|
+
var sketchEditor = new SketchEditor({
|
|
1657
1666
|
view: mapView,
|
|
1658
1667
|
layer: new GraphicsLayer()
|
|
1659
1668
|
})
|
|
1660
|
-
|
|
1661
|
-
console.log("是否可以进行恢复操作:" +
|
|
1662
|
-
const geometry =
|
|
1669
|
+
sketchEditor.start(SketchDataType.POLYGON)
|
|
1670
|
+
console.log("是否可以进行恢复操作:" + sketchEditor.canRedo())
|
|
1671
|
+
const geometry = sketchEditor.redo()
|
|
1663
1672
|
console.log("恢复后的几何对象" + geometry)</code></pre>
|
|
1664
1673
|
|
|
1665
1674
|
|
|
@@ -2049,12 +2058,15 @@ console.log("恢复后的几何对象" + geometry)</code></pre>
|
|
|
2049
2058
|
|
|
2050
2059
|
|
|
2051
2060
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
2052
|
-
const {
|
|
2053
|
-
const {
|
|
2054
|
-
const {
|
|
2061
|
+
const { Color, Map } = zondy
|
|
2062
|
+
const { SketchDataType } = zondy.enum
|
|
2063
|
+
const { SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol } = zondy.symbol
|
|
2064
|
+
const { SketchStyle } = zondy.tool.sketch
|
|
2065
|
+
const { MapView } = zondy.mapboxgl
|
|
2066
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
2055
2067
|
// ES6引入方式
|
|
2056
2068
|
import { Map, SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol, Color, SketchStyle, SketchDataType } from "@mapgis/webclient-common"
|
|
2057
|
-
import { MapView,
|
|
2069
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
2058
2070
|
var map = new Map()
|
|
2059
2071
|
var mapView = new MapView({
|
|
2060
2072
|
viewId: "mapgis-2d-viewer",
|
|
@@ -2121,7 +2133,7 @@ var sketchStyle = new SketchStyle({
|
|
|
2121
2133
|
})
|
|
2122
2134
|
})
|
|
2123
2135
|
})
|
|
2124
|
-
var sketchEditor = new
|
|
2136
|
+
var sketchEditor = new SketchEditor({
|
|
2125
2137
|
view: mapView,
|
|
2126
2138
|
layer: graphicsLayer,
|
|
2127
2139
|
})
|
|
@@ -2347,16 +2359,18 @@ sketchEditor.start(SketchDataType.POLYGON)</code></pre>
|
|
|
2347
2359
|
|
|
2348
2360
|
|
|
2349
2361
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
2350
|
-
const {
|
|
2362
|
+
const { Polygon, LineString } = zondy.geometry
|
|
2363
|
+
const { MapView } = zondy.mapboxgl
|
|
2364
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
2351
2365
|
[ES6引入方式]:
|
|
2352
|
-
import { MapView,
|
|
2366
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
2353
2367
|
import { Polygon, LineString } from "@mapgis/webclient-common" <br/>
|
|
2354
2368
|
var map = new Map()
|
|
2355
2369
|
var mapView = new MapView({
|
|
2356
2370
|
viewId: "mapgis-2d-viewer",
|
|
2357
2371
|
map: map,
|
|
2358
2372
|
})
|
|
2359
|
-
var
|
|
2373
|
+
var sketchEditor = new SketchEditor({
|
|
2360
2374
|
view: mapView,
|
|
2361
2375
|
layer: new GraphicsLayer()
|
|
2362
2376
|
})
|
|
@@ -2392,7 +2406,7 @@ const newSketchEditors = SketchEditorMapboxgl.split(polygon,polyline)</code></pr
|
|
|
2392
2406
|
|
|
2393
2407
|
<span class="code-name" id="start" style="font-size:30px">
|
|
2394
2408
|
|
|
2395
|
-
start<span class="signature">(dataType)</span>
|
|
2409
|
+
start<span class="signature">(dataType, extendOptions)</span>
|
|
2396
2410
|
|
|
2397
2411
|
</span>
|
|
2398
2412
|
</h4>
|
|
@@ -2461,6 +2475,35 @@ const newSketchEditors = SketchEditorMapboxgl.split(polygon,polyline)</code></pr
|
|
|
2461
2475
|
|
|
2462
2476
|
|
|
2463
2477
|
|
|
2478
|
+
|
|
2479
|
+
|
|
2480
|
+
<tr class="deep-level-0">
|
|
2481
|
+
|
|
2482
|
+
<td class="name"><code>extendOptions</code></td>
|
|
2483
|
+
|
|
2484
|
+
|
|
2485
|
+
<td class="type">
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
<span class="param-type">
|
|
2489
|
+
|
|
2490
|
+
Object
|
|
2491
|
+
|
|
2492
|
+
</span>
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
</td>
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
|
|
2501
|
+
<td class="description last"><p>草图编辑的扩展属性,可以通过该属性传入草图编辑额外需要的参数</p></td>
|
|
2502
|
+
</tr>
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
|
|
2464
2507
|
</tbody>
|
|
2465
2508
|
</table>
|
|
2466
2509
|
</div>
|
|
@@ -2532,9 +2575,14 @@ const newSketchEditors = SketchEditorMapboxgl.split(polygon,polyline)</code></pr
|
|
|
2532
2575
|
|
|
2533
2576
|
|
|
2534
2577
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
2535
|
-
const {
|
|
2578
|
+
const { Color } = zondy
|
|
2579
|
+
const { SketchDataType } = zondy.enum
|
|
2580
|
+
const { SimpleMarkerSymbol } = zondy.symbol
|
|
2581
|
+
const { SketchStyle } = zondy.tool.sketch
|
|
2582
|
+
const { MapView } = zondy.mapboxgl
|
|
2583
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
2536
2584
|
[ES6引入方式]:
|
|
2537
|
-
import { MapView,
|
|
2585
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
2538
2586
|
import { SketchStyle, SimpleMarkerSymbol, Color, SketchDataType} from "@mapgis/webclient-common" <br/>
|
|
2539
2587
|
var map = new Map()
|
|
2540
2588
|
var mapView = new MapView({
|
|
@@ -2550,14 +2598,14 @@ var sketchStyle = new SketchStyle({
|
|
|
2550
2598
|
lineStyle: undefined,
|
|
2551
2599
|
fillStyle: undefined
|
|
2552
2600
|
})
|
|
2553
|
-
var
|
|
2601
|
+
var sketchEditor = new SketchEditor({
|
|
2554
2602
|
view: mapView,
|
|
2555
2603
|
layer: new GraphicsLayer(),
|
|
2556
2604
|
vertexStyle: vertexStyle
|
|
2557
2605
|
})
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2606
|
+
sketchEditor.start(SketchDataType.POINT) // 绘制点
|
|
2607
|
+
sketchEditor.start(SketchDataType.POLYLINE) // 绘制线
|
|
2608
|
+
sketchEditor.start(SketchDataType.POLYGON) // 绘制区</code></pre>
|
|
2561
2609
|
|
|
2562
2610
|
|
|
2563
2611
|
|
|
@@ -2712,10 +2760,15 @@ SketchEditorMapboxgl.start(SketchDataType.POLYGON) // 绘制区</code></pre>
|
|
|
2712
2760
|
|
|
2713
2761
|
|
|
2714
2762
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
2715
|
-
const {
|
|
2763
|
+
const { Color } = zondy
|
|
2764
|
+
const { SketchDataType } = zondy.enum
|
|
2765
|
+
const { SimpleMarkerSymbol } = zondy.symbol
|
|
2766
|
+
const { SketchStyle } = zondy.tool.sketch
|
|
2767
|
+
const { MapView } = zondy.mapboxgl
|
|
2768
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
2716
2769
|
[ES6引入方式]:
|
|
2717
|
-
import { MapView,
|
|
2718
|
-
import { SketchStyle,
|
|
2770
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
2771
|
+
import { SketchStyle, SketchEditor, Color, SketchDataType} from "@mapgis/webclient-common" <br/>
|
|
2719
2772
|
import SketchEllipseDrawTool from "./SketchEllipseDrawTool" <br/>
|
|
2720
2773
|
var map = new Map()
|
|
2721
2774
|
var mapView = new MapView({
|
|
@@ -2731,12 +2784,12 @@ var sketchStyle = new SketchStyle({
|
|
|
2731
2784
|
lineStyle: undefined,
|
|
2732
2785
|
fillStyle: undefined
|
|
2733
2786
|
})
|
|
2734
|
-
var
|
|
2787
|
+
var sketchEditor = new SketchEditor({
|
|
2735
2788
|
view: mapView,
|
|
2736
2789
|
layer: new GraphicsLayer(),
|
|
2737
2790
|
vertexStyle: vertexStyle
|
|
2738
2791
|
})
|
|
2739
|
-
|
|
2792
|
+
sketchEditor.startCustomDrawTool(SketchEllipseDrawTool, "ellipse") // 绘制椭圆</code></pre>
|
|
2740
2793
|
|
|
2741
2794
|
|
|
2742
2795
|
|
|
@@ -2956,22 +3009,25 @@ sketchEditorMapboxgl.startCustomDrawTool(SketchEllipseDrawTool, "ellipse") //
|
|
|
2956
3009
|
|
|
2957
3010
|
|
|
2958
3011
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
2959
|
-
const {
|
|
3012
|
+
const { Polygon, LineString } = zondy.geometry
|
|
3013
|
+
const { SketchDataType } = zondy.enum
|
|
3014
|
+
const { MapView } = zondy.mapboxgl
|
|
3015
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
2960
3016
|
[ES6引入方式]:
|
|
2961
|
-
import { MapView,
|
|
3017
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
2962
3018
|
import { Polygon, LineString, SketchDataType } from "@mapgis/webclient-common" <br/>
|
|
2963
3019
|
var map = new Map()
|
|
2964
3020
|
var mapView = new MapView({
|
|
2965
3021
|
viewId: "mapgis-2d-viewer",
|
|
2966
3022
|
map: map,
|
|
2967
3023
|
})
|
|
2968
|
-
var
|
|
3024
|
+
var sketchEditor = new SketchEditor({
|
|
2969
3025
|
view: mapView,
|
|
2970
3026
|
layer: new GraphicsLayer()
|
|
2971
3027
|
})
|
|
2972
|
-
|
|
2973
|
-
console.log("是否可以进行撤销操作:" +
|
|
2974
|
-
const geometry =
|
|
3028
|
+
sketchEditor.start(SketchDataType.POLYGON)
|
|
3029
|
+
console.log("是否可以进行撤销操作:" + sketchEditor.canUndo())
|
|
3030
|
+
const geometry = sketchEditor.undo()
|
|
2975
3031
|
console.log("恢复后的几何对象" + geometry)</code></pre>
|
|
2976
3032
|
|
|
2977
3033
|
|
|
@@ -3157,16 +3213,18 @@ console.log("恢复后的几何对象" + geometry)</code></pre>
|
|
|
3157
3213
|
|
|
3158
3214
|
|
|
3159
3215
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
3160
|
-
const {
|
|
3216
|
+
const { Polygon } = zondy.geometry
|
|
3217
|
+
const { MapView } = zondy.mapboxgl
|
|
3218
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch
|
|
3161
3219
|
[ES6引入方式]:
|
|
3162
|
-
import { MapView,
|
|
3163
|
-
import {
|
|
3220
|
+
import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/>
|
|
3221
|
+
import { Polygon } from "@mapgis/webclient-common" <br/>
|
|
3164
3222
|
var map = new Map()
|
|
3165
3223
|
var mapView = new MapView({
|
|
3166
3224
|
viewId: "mapgis-2d-viewer",
|
|
3167
3225
|
map: map,
|
|
3168
3226
|
})
|
|
3169
|
-
var
|
|
3227
|
+
var sketchEditor = new SketchEditor({
|
|
3170
3228
|
view: mapView,
|
|
3171
3229
|
layer: new GraphicsLayer()
|
|
3172
3230
|
})
|
package/documention/index.html
CHANGED
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
参考示例:
|
|
109
109
|
<a href='#MapViewMapboxgl'>[初始化二维场景视图]</a>
|
|
110
110
|
<br>[ES5引入方式]:<br/>
|
|
111
|
-
|
|
111
|
+
zondy.mapboxgl.MapView() <br/>
|
|
112
112
|
[ES6引入方式]:<br/>
|
|
113
|
-
import { MapViewMapboxgl } from '@mapgis/webclient-mapboxgl-plugin' <br/></p></span></li><div class="mapgis-link-detail" id="MapViewMapboxgl-detail"><div><a linkTo="#page-title" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" id="api-fold">构造函数</a></div><div><a linkTo="#function" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" id="api-fold" class="mapgis-link-name">方法</a></div><div><ul><li><a linkTo="#fromJSON" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="fromJSON" id="api-member" class="mapgis-link-name">fromJSON</a></li><li><a linkTo="#flyTo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="flyTo" id="api-member" class="mapgis-link-name">flyTo</a></li><li><a linkTo="#getCenter" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getCenter" id="api-member" class="mapgis-link-name">getCenter</a></li><li><a linkTo="#getExtent" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getExtent" id="api-member" class="mapgis-link-name">getExtent</a></li><li><a linkTo="#getScale" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getScale" id="api-member" class="mapgis-link-name">getScale</a></li><li><a linkTo="#getSize" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getSize" id="api-member" class="mapgis-link-name">getSize</a></li><li><a linkTo="#getZoom" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getZoom" id="api-member" class="mapgis-link-name">getZoom</a></li><li><a linkTo="#goTo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="goTo" id="api-member" class="mapgis-link-name">goTo</a></li><li><a linkTo="#hitTest" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="hitTest" id="api-member" class="mapgis-link-name">hitTest</a></li><li><a linkTo="#takeScreenshot" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="takeScreenshot" id="api-member" class="mapgis-link-name">takeScreenshot</a></li><li><a linkTo="#toJSON" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="toJSON" id="api-member" class="mapgis-link-name">toJSON</a></li><li><a linkTo="#toMap" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="toMap" id="api-member" class="mapgis-link-name">toMap</a></li><li><a linkTo="#toScreen" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="toScreen" id="api-member" class="mapgis-link-name">toScreen</a></li></ul></div><div><a linkTo="#member" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" id="api-fold" class="mapgis-link-name">成员变量</a></div><div><ul><li><a linkTo="#engineType" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="engineType" id="api-member" class="mapgis-link-name">engineType</a></li></ul></div></div><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html"id="Popup" title="Popup" Popup.html>Popup</a><img id="Popup-detail-arrow" onclick="toggleLinkDetail('Popup-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>二维场景信息弹窗(mapboxgl引擎)
|
|
113
|
+
import { MapViewMapboxgl } from '@mapgis/webclient-mapboxgl-plugin' <br/></p></span></li><div class="mapgis-link-detail" id="MapViewMapboxgl-detail"><div><a linkTo="#page-title" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" id="api-fold">构造函数</a></div><div><a linkTo="#function" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" id="api-fold" class="mapgis-link-name">方法</a></div><div><ul><li><a linkTo="#fromJSON" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="fromJSON" id="api-member" class="mapgis-link-name">fromJSON</a></li><li><a linkTo="#flyTo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="flyTo" id="api-member" class="mapgis-link-name">flyTo</a></li><li><a linkTo="#getCenter" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getCenter" id="api-member" class="mapgis-link-name">getCenter</a></li><li><a linkTo="#getExtent" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getExtent" id="api-member" class="mapgis-link-name">getExtent</a></li><li><a linkTo="#getScale" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getScale" id="api-member" class="mapgis-link-name">getScale</a></li><li><a linkTo="#getSize" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getSize" id="api-member" class="mapgis-link-name">getSize</a></li><li><a linkTo="#getZoom" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="getZoom" id="api-member" class="mapgis-link-name">getZoom</a></li><li><a linkTo="#goTo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="goTo" id="api-member" class="mapgis-link-name">goTo</a></li><li><a linkTo="#hitTest" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="hitTest" id="api-member" class="mapgis-link-name">hitTest</a></li><li><a linkTo="#takeScreenshot" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="takeScreenshot" id="api-member" class="mapgis-link-name">takeScreenshot</a></li><li><a linkTo="#toJSON" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="toJSON" id="api-member" class="mapgis-link-name">toJSON</a></li><li><a linkTo="#toMap" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="toMap" id="api-member" class="mapgis-link-name">toMap</a></li><li><a linkTo="#toScreen" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="toScreen" id="api-member" class="mapgis-link-name">toScreen</a></li></ul></div><div><a linkTo="#member" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" id="api-fold" class="mapgis-link-name">成员变量</a></div><div><ul><li><a linkTo="#_spatialReference" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="_spatialReference" id="api-member" class="mapgis-link-name">_spatialReference</a></li><li><a linkTo="#center" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="center" id="api-member" class="mapgis-link-name">center</a></li><li><a linkTo="#engineType" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="engineType" id="api-member" class="mapgis-link-name">engineType</a></li><li><a linkTo="#extent" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="extent" id="api-member" class="mapgis-link-name">extent</a></li><li><a linkTo="#fullExtent" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="fullExtent" id="api-member" class="mapgis-link-name">fullExtent</a></li><li><a linkTo="#height" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="height" id="api-member" class="mapgis-link-name">height</a></li><li><a linkTo="#maxScale" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="maxScale" id="api-member" class="mapgis-link-name">maxScale</a></li><li><a linkTo="#minScale" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="minScale" id="api-member" class="mapgis-link-name">minScale</a></li><li><a linkTo="#popup" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="popup" id="api-member" class="mapgis-link-name">popup</a></li><li><a linkTo="#scale" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="scale" id="api-member" class="mapgis-link-name">scale</a></li><li><a linkTo="#spatialReferenceLocked" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="spatialReferenceLocked" id="api-member" class="mapgis-link-name">spatialReferenceLocked</a></li><li><a linkTo="#stationary" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="stationary" id="api-member" class="mapgis-link-name">stationary</a></li><li><a linkTo="#width" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="width" id="api-member" class="mapgis-link-name">width</a></li><li><a linkTo="#zoom" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/MapViewMapboxgl.html" title="zoom" id="api-member" class="mapgis-link-name">zoom</a></li></ul></div></div><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html"id="Popup" title="Popup" Popup.html>Popup</a><img id="Popup-detail-arrow" onclick="toggleLinkDetail('Popup-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>二维场景信息弹窗(mapboxgl引擎)
|
|
114
114
|
参考示例:
|
|
115
115
|
<a href='#MapView'>[初始化二维场景视图]</a>
|
|
116
116
|
[ES6引入方式]:<br/>
|
|
@@ -122,9 +122,9 @@ zondy-popup__header 弹窗头部样式<br/>
|
|
|
122
122
|
zondy-popup__content 弹窗主体样式<br/>
|
|
123
123
|
zondy-popup__footer 弹窗底部样式<br/></p></span></li><div class="mapgis-link-detail" id="Popup-detail"><div><a linkTo="#page-title" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" id="api-fold">构造函数</a></div><div><a linkTo="#function" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" id="api-fold" class="mapgis-link-name">方法</a></div><div><ul><li><a linkTo="#close" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="close" id="api-member" class="mapgis-link-name">close</a></li><li><a linkTo="#open" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="open" id="api-member" class="mapgis-link-name">open</a></li><li><a linkTo="#openPopup" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="openPopup" id="api-member" class="mapgis-link-name">openPopup</a></li></ul></div><div><a linkTo="#member" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" id="api-fold" class="mapgis-link-name">成员变量</a></div><div><ul><li><a linkTo="#alignment" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="alignment" id="api-member" class="mapgis-link-name">alignment</a></li><li><a linkTo="#content" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="content" id="api-member" class="mapgis-link-name">content</a></li><li><a linkTo="#defaultButtons" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="defaultButtons" id="api-member" class="mapgis-link-name">defaultButtons</a></li><li><a linkTo="#location" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="location" id="api-member" class="mapgis-link-name">location</a></li><li><a linkTo="#title" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="title" id="api-member" class="mapgis-link-name">title</a></li><li><a linkTo="#view" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Popup.html" title="view" id="api-member" class="mapgis-link-name">view</a></li></ul></div></div><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html"id="Screenshot" title="Screenshot" Screenshot.html>Screenshot</a><img id="Screenshot-detail-arrow" onclick="toggleLinkDetail('Screenshot-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>打印工具</p></span></li><div class="mapgis-link-detail" id="Screenshot-detail"><div><a linkTo="#page-title" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" id="api-fold">构造函数</a></div><div><a linkTo="#member" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" id="api-fold" class="mapgis-link-name">成员变量</a></div><div><ul><li><a linkTo="#filename" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="filename" id="api-member" class="mapgis-link-name">filename</a></li><li><a linkTo="#format" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="format" id="api-member" class="mapgis-link-name">format</a></li><li><a linkTo="#height" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="height" id="api-member" class="mapgis-link-name">height</a></li><li><a linkTo="#isDownload" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="isDownload" id="api-member" class="mapgis-link-name">isDownload</a></li><li><a linkTo="#view" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="view" id="api-member" class="mapgis-link-name">view</a></li><li><a linkTo="#width" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="width" id="api-member" class="mapgis-link-name">width</a></li><li><a linkTo="#x" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="x" id="api-member" class="mapgis-link-name">x</a></li><li><a linkTo="#y" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/Screenshot.html" title="y" id="api-member" class="mapgis-link-name">y</a></li></ul></div></div></ul><div onclick="toggleSideBar('SketchEditorModule-sidebar')" id="SketchEditorModule" style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">草图编辑模块</div><ul id="SketchEditorModule-sidebar" class="mapgis-sidebar-menus"><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html"id="SketchEditorMapboxgl" title="SketchEditorMapboxgl" SketchEditorMapboxgl.html>SketchEditorMapboxgl</a><img id="SketchEditorMapboxgl-detail-arrow" onclick="toggleLinkDetail('SketchEditorMapboxgl-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>二维Mapboxgl引擎草图编辑类<br/>
|
|
124
124
|
<br>[ES5引入方式]:<br/>
|
|
125
|
-
const {
|
|
125
|
+
const { SketchEditor } = zondy.mapboxgl.tool.sketch <br/>
|
|
126
126
|
[ES6引入方式]:<br/>
|
|
127
|
-
import {
|
|
127
|
+
import { SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/></p></span></li><div class="mapgis-link-detail" id="SketchEditorMapboxgl-detail"><div><a linkTo="#page-title" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" id="api-fold">构造函数</a></div><div><a linkTo="#function" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" id="api-fold" class="mapgis-link-name">方法</a></div><div><ul><li><a linkTo="#addVertex" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="addVertex" id="api-member" class="mapgis-link-name">addVertex</a></li><li><a linkTo="#canRedo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="canRedo" id="api-member" class="mapgis-link-name">canRedo</a></li><li><a linkTo="#canUndo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="canUndo" id="api-member" class="mapgis-link-name">canUndo</a></li><li><a linkTo="#drawPolylineToPolygon" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="drawPolylineToPolygon" id="api-member" class="mapgis-link-name">drawPolylineToPolygon</a></li><li><a linkTo="#getGeometry" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="getGeometry" id="api-member" class="mapgis-link-name">getGeometry</a></li><li><a linkTo="#getSketchStyle" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="getSketchStyle" id="api-member" class="mapgis-link-name">getSketchStyle</a></li><li><a linkTo="#redo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="redo" id="api-member" class="mapgis-link-name">redo</a></li><li><a linkTo="#remove" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="remove" id="api-member" class="mapgis-link-name">remove</a></li><li><a linkTo="#removeVertex" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="removeVertex" id="api-member" class="mapgis-link-name">removeVertex</a></li><li><a linkTo="#setSketchStyle" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="setSketchStyle" id="api-member" class="mapgis-link-name">setSketchStyle</a></li><li><a linkTo="#split" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="split" id="api-member" class="mapgis-link-name">split</a></li><li><a linkTo="#start" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="start" id="api-member" class="mapgis-link-name">start</a></li><li><a linkTo="#startCustomDrawTool" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="startCustomDrawTool" id="api-member" class="mapgis-link-name">startCustomDrawTool</a></li><li><a linkTo="#stop" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="stop" id="api-member" class="mapgis-link-name">stop</a></li><li><a linkTo="#undo" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="undo" id="api-member" class="mapgis-link-name">undo</a></li><li><a linkTo="#union" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="union" id="api-member" class="mapgis-link-name">union</a></li><li><a linkTo="#updateVertex" link="/static/modules/mapboxgl/api/mapboxgl-mapgis/SketchEditorMapboxgl.html" title="updateVertex" id="api-member" class="mapgis-link-name">updateVertex</a></li></ul></div></div></ul></div>
|
|
128
128
|
|
|
129
129
|
</nav>
|
|
130
130
|
</div>
|
|
@@ -177,7 +177,7 @@ import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin"
|
|
|
177
177
|
</ol>
|
|
178
178
|
<ul>
|
|
179
179
|
<li>
|
|
180
|
-
<p>官网(website):<a href="http://
|
|
180
|
+
<p>官网(website):<a href="http://192.168.82.89:8086/#/index">http://192.168.82.89:8086/#/index</a></p>
|
|
181
181
|
</li>
|
|
182
182
|
<li>
|
|
183
183
|
<p>源码(source code):<a href="https://github.com/ParnDeedlit/WebClient-mapboxgl">https://github.com/ParnDeedlit/WebClient-MapboxGL</a></p>
|
|
@@ -220,8 +220,8 @@ import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin"
|
|
|
220
220
|
<div class="content has-text-centered">
|
|
221
221
|
<p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 17.1.1</a></p>
|
|
222
222
|
<p class="sidebar-created-by">
|
|
223
|
-
<a href="
|
|
224
|
-
<a href="http://
|
|
223
|
+
<a href="https://www.smaryun.com" target="_blank" rel="noopener noreferrer">司马云</a> <span>© 2020 云生态圈</span>
|
|
224
|
+
<a href="http://develop.smaryun.com:8899/" target="_blank" rel="noopener noreferrer">MapGIS Client for JavaScript</a>
|
|
225
225
|
</p>
|
|
226
226
|
</div>
|
|
227
227
|
</footer>
|
|
@@ -61,7 +61,7 @@ function getTypeHTML(e) {
|
|
|
61
61
|
break
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
const _baseUrl = window.location.href.split('
|
|
64
|
+
const _baseUrl = window.location.href.split('#')[0]
|
|
65
65
|
fetch(_baseUrl + '/' + link, {
|
|
66
66
|
method: 'GET',
|
|
67
67
|
})
|
|
@@ -111,7 +111,21 @@ function getLinkName(url) {
|
|
|
111
111
|
targets.forEach(function (_target) {
|
|
112
112
|
_target.addEventListener('click', function (e) {
|
|
113
113
|
const _baseUrl = getBaseUrl(window.location.href)
|
|
114
|
-
|
|
114
|
+
let isGlobe = false, globePath
|
|
115
|
+
for (let i = 0; i < e.target.attributes.length; i++) {
|
|
116
|
+
if(e.target.attributes[i].name.indexOf('global.html') > -1) {
|
|
117
|
+
isGlobe = true
|
|
118
|
+
globePath = e.target.attributes[i].name
|
|
119
|
+
break
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
let path
|
|
123
|
+
if (isGlobe) {
|
|
124
|
+
path = '/' + globePath
|
|
125
|
+
} else {
|
|
126
|
+
path = e.target.attributes[1].value
|
|
127
|
+
}
|
|
128
|
+
fetch(_baseUrl + path, {
|
|
115
129
|
method: 'GET',
|
|
116
130
|
})
|
|
117
131
|
.then(response => response.text())
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapgis/webclient-mapboxgl-plugin",
|
|
3
|
-
"version" : "17.
|
|
3
|
+
"version" : "17.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/webclient-mapboxgl-plugin-es6.min.js",
|
|
6
6
|
"scripts": {},
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "Wuhan Zondy Cyber Science&Technology Co.Ltd.",
|
|
14
14
|
"license": "Apache-2.0",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@mapgis/mapbox-gl": "^17.
|
|
17
|
-
"@mapgis/webclient-common": "^17.
|
|
16
|
+
"@mapgis/mapbox-gl": "^17.2.0",
|
|
17
|
+
"@mapgis/webclient-common": "^17.2.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {},
|
|
20
20
|
"devDependencies": {}
|