@mapgis/webclient-mapboxgl-plugin 17.4.1 → 17.6.0
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 +57 -1
- package/dist/es5/webclient-common.min.js +32 -6
- package/dist/es5/webclient-mapboxgl-plugin.min.js +1 -1
- package/dist/webclient-mapboxgl-plugin-es6.min.js +1 -1
- package/documention/EchartsLayer.html +2 -2
- package/documention/MapView.html +176 -87
- package/documention/MapViewMapboxgl.html +935 -287
- package/documention/Popup.html +3 -3
- package/documention/Screenshot.html +2 -2
- package/documention/SketchEditor.html +12 -12
- package/documention/SketchEditorMapboxgl.html +477 -241
- package/documention/global.html +607 -394
- package/documention/index.html +2 -2
- package/documention/initializeOptions.html +454 -0
- package/documention/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapvLayer.html +6 -2
- package/package.json +4 -4
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
|
|
105
105
|
<nav>
|
|
106
106
|
|
|
107
|
-
<div class="category"><div 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 class="mapgis-sidebar-menus"><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapView"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapView.html">MapView</a><span style="display: none;"><p>二维场景视图(mapboxgl引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<code>Map</code>,<br/>
|
|
107
|
+
<div class="category"><div 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 class="mapgis-sidebar-menus"><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="initializeOptions"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="initializeOptions.html">initializeOptions</a><span style="display: none;"><p>根据图层获取对应的mapboxgl内的sources和layers</p></span></li></ul><div 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 class="mapgis-sidebar-menus"><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapView"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapView.html">MapView</a><span style="display: none;"><p>二维场景视图(mapboxgl引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<code>Map</code>,<br/>
|
|
108
108
|
继承自<a href='http://webclient.smaryun.com/static/modules/common/api/common-mapgis/MapView.html' target='_blank'>zondy.MapView</a><br/>
|
|
109
109
|
参考示例:
|
|
110
110
|
<a href='#MapView'>[初始化二维场景视图]</a>
|
|
@@ -117,7 +117,7 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p></span></li
|
|
|
117
117
|
[ES6引入方式]:<br/>
|
|
118
118
|
import { Popup } from '@mapgis/webclient-mapboxgl-plugin' <br/>
|
|
119
119
|
自定义样式说明:<br/>
|
|
120
|
-
zondy-
|
|
120
|
+
zondy-popup__container 弹窗容器样式<br/>
|
|
121
121
|
zondy-popup__tip 弹窗对话框箭头样式<br/>
|
|
122
122
|
zondy-popup__header 弹窗头部样式<br/>
|
|
123
123
|
zondy-popup__content 弹窗主体样式<br/>
|
package/documention/MapView.html
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
|
|
105
105
|
<nav>
|
|
106
106
|
|
|
107
|
-
<div class="category"><div 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 class="mapgis-sidebar-menus"><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapView"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapView.html">MapView</a><span style="display: none;"><p>二维场景视图(mapboxgl引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<code>Map</code>,<br/>
|
|
107
|
+
<div class="category"><div 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 class="mapgis-sidebar-menus"><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="initializeOptions"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="initializeOptions.html">initializeOptions</a><span style="display: none;"><p>根据图层获取对应的mapboxgl内的sources和layers</p></span></li></ul><div 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 class="mapgis-sidebar-menus"><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapView"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapView.html">MapView</a><span style="display: none;"><p>二维场景视图(mapboxgl引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<code>Map</code>,<br/>
|
|
108
108
|
继承自<a href='http://webclient.smaryun.com/static/modules/common/api/common-mapgis/MapView.html' target='_blank'>zondy.MapView</a><br/>
|
|
109
109
|
参考示例:
|
|
110
110
|
<a href='#MapView'>[初始化二维场景视图]</a>
|
|
@@ -117,7 +117,7 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p></span></li
|
|
|
117
117
|
[ES6引入方式]:<br/>
|
|
118
118
|
import { Popup } from '@mapgis/webclient-mapboxgl-plugin' <br/>
|
|
119
119
|
自定义样式说明:<br/>
|
|
120
|
-
zondy-
|
|
120
|
+
zondy-popup__container 弹窗容器样式<br/>
|
|
121
121
|
zondy-popup__tip 弹窗对话框箭头样式<br/>
|
|
122
122
|
zondy-popup__header 弹窗头部样式<br/>
|
|
123
123
|
zondy-popup__content 弹窗主体样式<br/>
|
|
@@ -288,6 +288,32 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p>
|
|
|
288
288
|
|
|
289
289
|
|
|
290
290
|
|
|
291
|
+
<tr class="deep-level-1">
|
|
292
|
+
|
|
293
|
+
<td class="name"><code>spatialReference</code></td>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
<td class="type">
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<span class="param-type">SpatialReference</span>
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
</td>
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
<td class="default">
|
|
307
|
+
|
|
308
|
+
</td>
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
<td class="description last"><p>视图空间参考系</p></td>
|
|
312
|
+
</tr>
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
291
317
|
<tr class="deep-level-1">
|
|
292
318
|
|
|
293
319
|
<td class="name"><code>zoom</code></td>
|
|
@@ -336,7 +362,7 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p>
|
|
|
336
362
|
</td>
|
|
337
363
|
|
|
338
364
|
|
|
339
|
-
<td class="description last"><p
|
|
365
|
+
<td class="description last"><p>地图视图中心点。如果有中心点,看是否存在zoom/scale,使用center和zoom/scale定位(同时设置scale和zoom时,scale优先于zoom),否则默认zoom为到第0级。如果没有设置center,但设置了extent,则以extent定位。</p></td>
|
|
340
366
|
</tr>
|
|
341
367
|
|
|
342
368
|
|
|
@@ -362,7 +388,7 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p>
|
|
|
362
388
|
</td>
|
|
363
389
|
|
|
364
390
|
|
|
365
|
-
<td class="description last"><p
|
|
391
|
+
<td class="description last"><p>地图视图初始所在的范围。如果没有设置center,但设置extent了,则地图视图定位到extent范围内。</p></td>
|
|
366
392
|
</tr>
|
|
367
393
|
|
|
368
394
|
|
|
@@ -414,7 +440,7 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p>
|
|
|
414
440
|
</td>
|
|
415
441
|
|
|
416
442
|
|
|
417
|
-
<td class="description last"><p>地图视图的最大比例尺(比例尺的分母,该值越小,比例尺越大)。视图的当前比列尺不会大于地图视图的最大比例尺。默认值为undefined,undefined
|
|
443
|
+
<td class="description last"><p>地图视图的最大比例尺(比例尺的分母,该值越小,比例尺越大)。视图的当前比列尺不会大于地图视图的最大比例尺。默认值为undefined,undefined表示用户未设置,地图视图会根据当前加载的图层,自动计算maxScale、minScale的值。如果用户设置了该值,则地图视图将直接采用用户设置的值。maxScale的值应该始终小于minScale的值。</p></td>
|
|
418
444
|
</tr>
|
|
419
445
|
|
|
420
446
|
|
|
@@ -440,7 +466,59 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p>
|
|
|
440
466
|
</td>
|
|
441
467
|
|
|
442
468
|
|
|
443
|
-
<td class="description last"><p>地图视图的最小比例尺(比例尺的分母,该值越大,比例尺越小)。视图的当前比列尺不会小于地图视图的最小比例尺。默认值为undefined,undefined
|
|
469
|
+
<td class="description last"><p>地图视图的最小比例尺(比例尺的分母,该值越大,比例尺越小)。视图的当前比列尺不会小于地图视图的最小比例尺。默认值为undefined,undefined表示用户未设置,地图视图会根据当前加载的图层,自动计算maxScale、minScale的值。如果用户设置了该值,则地图视图将直接采用用户设置的值。minScale的值应该始终大于maxScale的值。</p></td>
|
|
470
|
+
</tr>
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
<tr class="deep-level-1">
|
|
476
|
+
|
|
477
|
+
<td class="name"><code>maxZoom</code></td>
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
<td class="type">
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
<span class="param-type">Number</span>
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
</td>
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
<td class="default">
|
|
491
|
+
|
|
492
|
+
</td>
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
<td class="description last"><p>最大缩放级数 。优先级低于maxScale</p></td>
|
|
496
|
+
</tr>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
<tr class="deep-level-1">
|
|
502
|
+
|
|
503
|
+
<td class="name"><code>minZoom</code></td>
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
<td class="type">
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
<span class="param-type">Number</span>
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
</td>
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
<td class="default">
|
|
517
|
+
|
|
518
|
+
</td>
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
<td class="description last"><p>最小缩放级数。优先级低于minScale</p></td>
|
|
444
522
|
</tr>
|
|
445
523
|
|
|
446
524
|
|
|
@@ -471,6 +549,32 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p>
|
|
|
471
549
|
|
|
472
550
|
|
|
473
551
|
|
|
552
|
+
|
|
553
|
+
<tr class="deep-level-1">
|
|
554
|
+
|
|
555
|
+
<td class="name"><code>fullExtent</code></td>
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
<td class="type">
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
<span class="param-type">Number</span>
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
</td>
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
<td class="default">
|
|
569
|
+
|
|
570
|
+
</td>
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
<td class="description last"><p>地图视图最大显示范围。用户不设置时,将地图范围作为地图视图的最大显示范围,用户设置时采用用户设置的。地图视图初始化时,会根据此范围计算地图视图的最小比例尺,当瓦片数据的最大比例尺小于此比例尺时,无法显示。在相同视图大小下,fullExtent越大,地图视图的最小比例尺越小。</p></td>
|
|
574
|
+
</tr>
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
474
578
|
|
|
475
579
|
|
|
476
580
|
|
|
@@ -606,7 +710,8 @@ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p>
|
|
|
606
710
|
const { Map } = zondy
|
|
607
711
|
const { MapView } = zondy.mapboxgl
|
|
608
712
|
// ES6引入方式
|
|
609
|
-
import { Map
|
|
713
|
+
import { Map } from "@mapgis/webclient-common"
|
|
714
|
+
import { MapView } from "@mapgis/webclient-mapboxgl-plugin"
|
|
610
715
|
// 初始化图层管理容器
|
|
611
716
|
const map = new Map();
|
|
612
717
|
// 初始化地图视图对象
|
|
@@ -660,80 +765,6 @@ const mapView = new MapView({
|
|
|
660
765
|
<span class="method-parameter is-pulled-right">
|
|
661
766
|
<label>类型:</label>
|
|
662
767
|
|
|
663
|
-
<span class="param-type">SpatialReference</span>
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
</span>
|
|
667
|
-
|
|
668
|
-
<h4 class="name" id="_spatialReference">
|
|
669
|
-
<a class="href-link" href="#_spatialReference">#</a>
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
<span class='tag'>readonly</span>
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
<span class="code-name">
|
|
676
|
-
_spatialReference
|
|
677
|
-
</span>
|
|
678
|
-
|
|
679
|
-
</h4>
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
<div class="description">
|
|
685
|
-
<p>视图空间参考系</p>
|
|
686
|
-
</div>
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
<dl class="details">
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
</dl>
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
</div>
|
|
731
|
-
|
|
732
|
-
<div class="member">
|
|
733
|
-
|
|
734
|
-
<span class="method-parameter is-pulled-right">
|
|
735
|
-
<label>类型:</label>
|
|
736
|
-
|
|
737
768
|
<span class="param-type">Point</span>
|
|
738
769
|
|
|
739
770
|
|
|
@@ -804,7 +835,7 @@ const mapView = new MapView({
|
|
|
804
835
|
<span class="method-parameter is-pulled-right">
|
|
805
836
|
<label>类型:</label>
|
|
806
837
|
|
|
807
|
-
<span class="param-type">
|
|
838
|
+
<span class="param-type">EngineType</span>
|
|
808
839
|
|
|
809
840
|
|
|
810
841
|
</span>
|
|
@@ -1110,7 +1141,7 @@ const mapView = new MapView({
|
|
|
1110
1141
|
|
|
1111
1142
|
|
|
1112
1143
|
<div class="description">
|
|
1113
|
-
<p
|
|
1144
|
+
<p>地图视图的最大比例尺(比例尺的分母,该值越小,比例尺越大)。视图的当前比列尺不会大于地图视图的最大比例尺。默认值为undefined,undefined表示用户未设置,地图视图会根据当前加载的图层,自动计算maxScale、minScale的值。如果用户设置了该值,则地图视图将直接采用用户设置的值。maxScale的值应该始终小于minScale的值。</p>
|
|
1114
1145
|
</div>
|
|
1115
1146
|
|
|
1116
1147
|
|
|
@@ -1180,7 +1211,7 @@ const mapView = new MapView({
|
|
|
1180
1211
|
|
|
1181
1212
|
|
|
1182
1213
|
<div class="description">
|
|
1183
|
-
<p
|
|
1214
|
+
<p>地图视图的最小比例尺(比例尺的分母,该值越大,比例尺越小)。视图的当前比列尺不会小于地图视图的最小比例尺。默认值为undefined,undefined表示用户未设置,地图视图会根据当前加载的图层,自动计算maxScale、minScale的值。如果用户设置了该值,则地图视图将直接采用用户设置的值。minScale的值应该始终大于maxScale的值。</p>
|
|
1184
1215
|
</div>
|
|
1185
1216
|
|
|
1186
1217
|
|
|
@@ -2043,7 +2074,8 @@ const mapView = new MapView({
|
|
|
2043
2074
|
const { Map } = zondy
|
|
2044
2075
|
const { MapView } = zondy.mapboxgl
|
|
2045
2076
|
// ES6引入方式
|
|
2046
|
-
import { Map
|
|
2077
|
+
import { Map } from "@mapgis/webclient-common"
|
|
2078
|
+
import { MapView } from "@mapgis/webclient-mapboxgl-plugin"
|
|
2047
2079
|
// 初始化图层管理容器
|
|
2048
2080
|
map = new .Map();
|
|
2049
2081
|
// 初始化地图视图对象
|
|
@@ -2851,6 +2883,38 @@ igsMapImageLayer.on('layer-view-created', function (result) {
|
|
|
2851
2883
|
|
|
2852
2884
|
|
|
2853
2885
|
|
|
2886
|
+
<tr class="deep-level-1">
|
|
2887
|
+
|
|
2888
|
+
<td class="name"><code>layer</code></td>
|
|
2889
|
+
|
|
2890
|
+
|
|
2891
|
+
<td class="type">
|
|
2892
|
+
|
|
2893
|
+
|
|
2894
|
+
<span class="param-type">Layer</span>
|
|
2895
|
+
|
|
|
2896
|
+
|
|
2897
|
+
<span class="param-type">SubLayer</span>
|
|
2898
|
+
|
|
|
2899
|
+
|
|
2900
|
+
<span class="param-type">undefined</span>
|
|
2901
|
+
|
|
2902
|
+
|
|
2903
|
+
|
|
2904
|
+
</td>
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
<td class="default">
|
|
2908
|
+
|
|
2909
|
+
</td>
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
<td class="description last"><p>跳转的图层</p></td>
|
|
2913
|
+
</tr>
|
|
2914
|
+
|
|
2915
|
+
|
|
2916
|
+
|
|
2917
|
+
|
|
2854
2918
|
<tr class="deep-level-1">
|
|
2855
2919
|
|
|
2856
2920
|
<td class="name"><code>target</code></td>
|
|
@@ -3028,6 +3092,31 @@ igsMapImageLayer.on('layer-view-created', function (result) {
|
|
|
3028
3092
|
|
|
3029
3093
|
|
|
3030
3094
|
|
|
3095
|
+
<div class='columns method-parameter'>
|
|
3096
|
+
<div class="column is-2"><label>返回值:</label></div>
|
|
3097
|
+
<div class="column is-10">
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
|
|
3101
|
+
<div class="columns">
|
|
3102
|
+
|
|
3103
|
+
<div class='param-desc column is-7'><p>视图跳转是否成功</p></div>
|
|
3104
|
+
|
|
3105
|
+
|
|
3106
|
+
<div class='column is-5 has-text-left'>
|
|
3107
|
+
<label>类型: </label>
|
|
3108
|
+
|
|
3109
|
+
<span class="param-type">Promise.<Boolean></span>
|
|
3110
|
+
|
|
3111
|
+
|
|
3112
|
+
</div>
|
|
3113
|
+
|
|
3114
|
+
</div>
|
|
3115
|
+
|
|
3116
|
+
|
|
3117
|
+
</div>
|
|
3118
|
+
</div>
|
|
3119
|
+
|
|
3031
3120
|
|
|
3032
3121
|
|
|
3033
3122
|
|
|
@@ -3449,7 +3538,7 @@ const result = this.mapView.hitTest({x:1100,y:600})</code></pre>
|
|
|
3449
3538
|
|
|
3450
3539
|
<td class="default">
|
|
3451
3540
|
|
|
3452
|
-
PictureFormat.
|
|
3541
|
+
PictureFormat.PNG
|
|
3453
3542
|
|
|
3454
3543
|
</td>
|
|
3455
3544
|
|
|
@@ -3736,7 +3825,7 @@ const mapView = new MapView({
|
|
|
3736
3825
|
})
|
|
3737
3826
|
// 设置屏幕快照参数
|
|
3738
3827
|
const screenshotOptions: {
|
|
3739
|
-
format: PictureFormat.
|
|
3828
|
+
format: PictureFormat.PNG
|
|
3740
3829
|
}
|
|
3741
3830
|
// 开始屏幕快照
|
|
3742
3831
|
mapView.takeScreenshot(screenshotOptions).then((result) => {
|