@mapgis/webclient-mapboxgl-plugin 17.4.0 → 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.
@@ -0,0 +1,3210 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+
6
+ <meta charset="utf-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <title>Client for JavaScript SketchEditor</title>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/app.min.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/iframe.css">
14
+ <link type="text/css" rel="stylesheet" href="">
15
+
16
+
17
+ </head>
18
+
19
+
20
+
21
+ <body class="layout small-header">
22
+ <div id="stickyNavbarOverlay"></div>
23
+
24
+
25
+ <div class="top-nav">
26
+ <div class="inner">
27
+ <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
28
+ <span aria-hidden="true"></span>
29
+ <span aria-hidden="true"></span>
30
+ <span aria-hidden="true"></span>
31
+ </a>
32
+ <div class="logo">
33
+
34
+ <h1> MapGIS Client for JavaScript API</h1>
35
+
36
+
37
+ </div>
38
+ <div class="menu">
39
+
40
+ <div class="navigation">
41
+
42
+
43
+ <a
44
+ class="link user-link "
45
+ href="/static/modules/common/api/common-mapgis/index.html"
46
+ >
47
+ Common
48
+ </a>
49
+
50
+ <a
51
+ class="link user-link "
52
+ href="/static/modules/cesium/api/cesium-mapgis/index.html"
53
+ >
54
+ Cesium-Plugin
55
+ </a>
56
+
57
+ <a
58
+ class="link user-link "
59
+ href="/static/modules/mapboxgl/api/mapboxgl-mapgis/index.html"
60
+ >
61
+ MapboxGL-Plugin
62
+ </a>
63
+
64
+ <a
65
+ class="link user-link "
66
+ href="/static/modules/leaflet/api/leaflet-mapgis/index.html"
67
+ >
68
+ Leaflet-Plugin
69
+ </a>
70
+
71
+ <a
72
+ class="link user-link "
73
+ href="/static/modules/openlayers/api/openLayers-mapgis/index.html"
74
+ >
75
+ OpenLayers-Plugin
76
+ </a>
77
+
78
+ <a
79
+ class="link user-link "
80
+ href="/static/modules/video/api/video-mapgis/index.html"
81
+ >
82
+ Video-Plugin
83
+ </a>
84
+
85
+
86
+
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </div>
91
+
92
+ <div id="main">
93
+ <div
94
+ class="sidebar "
95
+ id="sidebarNav"
96
+ >
97
+ <div>
98
+ <span class="mapgis-api-document-span"><a href="index.html">API文档</a></span>
99
+ </div>
100
+
101
+ <div class="search-wrapper">
102
+ <input id="search" type="text" placeholder="搜索文档..." class="input">
103
+ </div>
104
+
105
+ <nav>
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="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
+ 继承自<a href='http://webclient.smaryun.com/static/modules/common/api/common-mapgis/MapView.html' target='_blank'>zondy.MapView</a><br/>
109
+ 参考示例:
110
+ <a href='#MapView'>[初始化二维场景视图]</a>
111
+ <br>[ES5引入方式]:<br/>
112
+ zondy.mapboxgl.MapView() <br/>
113
+ [ES6引入方式]:<br/>
114
+ import { MapView } from '@mapgis/webclient-mapboxgl-plugin' <br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Popup"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Popup.html">Popup</a><span style="display: none;"><p>二维场景信息弹窗(mapboxgl引擎)
115
+ 参考示例:
116
+ <a href='#MapView'>[初始化二维场景视图]</a>
117
+ [ES6引入方式]:<br/>
118
+ import { Popup } from '@mapgis/webclient-mapboxgl-plugin' <br/>
119
+ 自定义样式说明:<br/>
120
+ zondy-popup__container 弹窗容器样式<br/>
121
+ zondy-popup__tip 弹窗对话框箭头样式<br/>
122
+ zondy-popup__header 弹窗头部样式<br/>
123
+ zondy-popup__content 弹窗主体样式<br/>
124
+ zondy-popup__footer 弹窗底部样式<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Screenshot"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Screenshot.html">Screenshot</a><span style="display: none;"><p>打印工具</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="SketchEditor"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditor.html">SketchEditor</a><span style="display: none;"><p>二维Mapboxgl引擎草图编辑类<br/>
125
+ 继承自<a href='http://webclient.smaryun.com/static/modules/common/api/common-mapgis/SketchEditor.html' target='_blank'>zondy.SketchEditor</a><br/>
126
+ <br>[ES5引入方式]:<br/>
127
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch <br/>
128
+ [ES6引入方式]:<br/>
129
+ import { SketchEditor } from &quot;@mapgis/webclient-leaflet-plugin&quot; <br/></p></span></li></ul></div>
130
+
131
+ </nav>
132
+ </div>
133
+ <div class="core" id="main-content-wrapper">
134
+ <div class="content">
135
+ <header id="page-title" class="page-title">
136
+ <span class="page-title-main">类名</span>
137
+ <span class="page-title-sub">SketchEditor</span>
138
+ </header>
139
+
140
+
141
+
142
+
143
+
144
+ <section>
145
+
146
+ <article>
147
+ <div class="container-overview">
148
+
149
+
150
+ <div class='vertical-section'>
151
+ <div class="members">
152
+ <div class="member">
153
+
154
+
155
+
156
+
157
+ <h4 class="name" id="SketchEditor">
158
+ <a class="href-link" href="#SketchEditor">#</a>
159
+
160
+ <span class="code-name" style="font-size:30px">
161
+
162
+ new SketchEditor<span class="signature">(options)</span>
163
+
164
+ </span>
165
+ </h4>
166
+
167
+
168
+
169
+ <div class="description">
170
+ <p>二维Mapboxgl引擎草图编辑类<br/>
171
+ 继承自<a href='http://webclient.smaryun.com/static/modules/common/api/common-mapgis/SketchEditor.html' target='_blank'>zondy.SketchEditor</a><br/>
172
+ <br>[ES5引入方式]:<br/>
173
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch <br/>
174
+ [ES6引入方式]:<br/>
175
+ import { SketchEditor } from &quot;@mapgis/webclient-leaflet-plugin&quot; <br/></p>
176
+ </div>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <h4>参数:</h4>
188
+
189
+ <div class="table-container">
190
+ <table class="params table">
191
+ <thead>
192
+ <tr>
193
+
194
+ <th>名称</th>
195
+
196
+
197
+ <th>类型</th>
198
+
199
+
200
+
201
+ <th class="last">描述</th>
202
+ </tr>
203
+ </thead>
204
+
205
+ <tbody>
206
+
207
+
208
+
209
+ <tr class="deep-level-0">
210
+
211
+ <td class="name"><code>options</code></td>
212
+
213
+
214
+ <td class="type">
215
+
216
+
217
+ <span class="param-type">Object</span>
218
+
219
+
220
+
221
+ </td>
222
+
223
+
224
+
225
+ <td class="description last"><p>构造参数</p></td>
226
+ </tr>
227
+
228
+
229
+
230
+
231
+ <tr class="deep-level-1">
232
+
233
+ <td class="name"><code>view</code></td>
234
+
235
+
236
+ <td class="type">
237
+
238
+
239
+ <span class="param-type"><a href="MapView.html">MapView</a></span>
240
+ |
241
+
242
+ <span class="param-type"><a href="SceneView.html">SceneView</a></span>
243
+
244
+
245
+
246
+ </td>
247
+
248
+
249
+
250
+ <td class="description last"><p>地图视图对象</p></td>
251
+ </tr>
252
+
253
+
254
+
255
+
256
+ <tr class="deep-level-1">
257
+
258
+ <td class="name"><code>layer</code></td>
259
+
260
+
261
+ <td class="type">
262
+
263
+
264
+ <span class="param-type">GraphicsLayer</span>
265
+
266
+
267
+
268
+ </td>
269
+
270
+
271
+
272
+ <td class="description last"><p>草图图层管对象</p></td>
273
+ </tr>
274
+
275
+
276
+
277
+
278
+ <tr class="deep-level-1">
279
+
280
+ <td class="name"><code>sketchStyle</code></td>
281
+
282
+
283
+ <td class="type">
284
+
285
+
286
+ <span class="param-type">SketchStyle</span>
287
+
288
+
289
+
290
+ </td>
291
+
292
+
293
+
294
+ <td class="description last"><p>草图符号</p></td>
295
+ </tr>
296
+
297
+
298
+
299
+
300
+ <tr class="deep-level-1">
301
+
302
+ <td class="name"><code>snapOption</code></td>
303
+
304
+
305
+ <td class="type">
306
+
307
+
308
+ <span class="param-type">Object</span>
309
+
310
+
311
+
312
+ </td>
313
+
314
+
315
+
316
+ <td class="description last"><p>草图捕获配置项</p></td>
317
+ </tr>
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+ </tbody>
326
+ </table>
327
+ </div>
328
+
329
+
330
+
331
+
332
+
333
+
334
+ <dl class="details">
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+ </dl>
367
+
368
+
369
+
370
+
371
+
372
+ <div class="method-parameter columns">
373
+ <div class="column is-2"><label>绑定事件:</label></div>
374
+ <div class="column is-10">
375
+ <ul>
376
+ <li>SketchEditor#event:草图绘制完成事件</li>
377
+
378
+ <li>SketchEditor#event:草图被选中事件</li>
379
+ </ul>
380
+ </div>
381
+ </div>
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+ <p class="summary"><h5>支持如下方法:</h5>
400
+ <a href='#start'>[1、开始绘制草图]</a><br/>
401
+ <a href='#stop'>[2、停止绘制]</a><br/>
402
+ <a href='#remove'>[3、移除当前草图]</a><br/>
403
+ <a href='#addVertex'>[4、向草线或面草图中插入新的顶点]</a><br/>
404
+ <a href='#updateVertex'>[5、更新草图图形的某个顶点]</a><br/>
405
+ <a href='#removeVertex'>[6、移除草图图形的某个顶点]</a><br/>
406
+ <a href='#getSketchDataType'>[7、获取草图图形类型]</a><br/>
407
+ <a href='#setSketchStyle'>[8、设置草图样式]</a><br/>
408
+ <a href='#getSketchStyle'>[9、获取草图样式]</a><br/>
409
+ <a href='#getGeometry'>[10、获取草图几何对象]</a><br/>
410
+ <a href='#union'>[11、合并多个区几何]</a><br/>
411
+ <a href='#split'>[12、分割草图对象或区几何对象]</a><br/>
412
+ <a href='#undo'>[13、撤销当前编辑操作]</a><br/>
413
+ <a href='#redo'>[14、恢复被撤销的草图]</a><br/>
414
+ <a href='#drawPolylineToPolygon'>[15、拓扑线造区]</a><br/></p>
415
+
416
+
417
+
418
+ <h5>示例</h5>
419
+
420
+ <p class="code-caption"><h7>初始化一个二维场景草图编辑类</h7></p>
421
+
422
+
423
+ <pre class="prettyprint"><code>// [ES5引入方式]:
424
+ const { Color } = zondy
425
+ const { SketchDataType } = zondy.enum
426
+ const { SimpleMarkerSymbol } = zondy.symbol
427
+ const { SketchStyle } = zondy.tool.sketch
428
+ const { MapView } = zondy.mapboxgl
429
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
430
+ [ES6引入方式]:
431
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
432
+ import { SketchStyle, SketchEditor, Color, SketchDataType} from "@mapgis/webclient-common" &lt;br/>
433
+ var map = new Map()
434
+ var mapView = new MapView({
435
+ viewId: "mapgis-2d-viewer",
436
+ map: map,
437
+ })
438
+ var simpleMarkerSymbol = new SimpleMarkerSymbol({
439
+ color: new Color(24, 144, 255, 1),
440
+ size: 10,
441
+ });
442
+ var sketchStyle = new SketchStyle({
443
+ vertexStyle: simpleMarkerSymbol,
444
+ lineStyle: undefined,
445
+ fillStyle: undefined
446
+ })
447
+ var sketchEditor = new SketchEditor({
448
+ view: mapView,
449
+ layer: new GraphicsLayer(),
450
+ vertexStyle: vertexStyle
451
+ })
452
+ sketchEditor.start(SketchDataType.point) // 绘制点
453
+ sketchEditor.start(SketchDataType.polyline) // 绘制线
454
+ sketchEditor.start(SketchDataType.polygon) // 绘制区
455
+ *</code></pre>
456
+
457
+
458
+
459
+
460
+ </div>
461
+ </div>
462
+ </div>
463
+
464
+
465
+ </div>
466
+
467
+
468
+ <h3 class="subsection-title">继承关系</h3>
469
+
470
+
471
+
472
+
473
+ <ul>
474
+ <li>zondy.SketchEditor</li>
475
+ </ul>
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+ <div class='vertical-section'>
494
+ <h3 id='function'>方法</h3>
495
+ <div class="members">
496
+
497
+ <div class="member">
498
+
499
+
500
+
501
+ <h4 class="name" id="addVertex">
502
+ <a class="href-link" href="#addVertex">#</a>
503
+
504
+ <span class="code-name" style="font-size:30px">
505
+
506
+ addVertex<span class="signature">(point, index)</span>
507
+
508
+ </span>
509
+ </h4>
510
+
511
+
512
+
513
+ <div class="description">
514
+ <p>向当前线或区草图中插入新的顶点<a id='addVertex'></a></p>
515
+ </div>
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+ <h4>参数:</h4>
527
+
528
+ <div class="table-container">
529
+ <table class="params table">
530
+ <thead>
531
+ <tr>
532
+
533
+ <th>名称</th>
534
+
535
+
536
+ <th>类型</th>
537
+
538
+
539
+
540
+ <th class="last">描述</th>
541
+ </tr>
542
+ </thead>
543
+
544
+ <tbody>
545
+
546
+
547
+
548
+ <tr class="deep-level-0">
549
+
550
+ <td class="name"><code>point</code></td>
551
+
552
+
553
+ <td class="type">
554
+
555
+
556
+ <span class="param-type">Point</span>
557
+
558
+
559
+
560
+ </td>
561
+
562
+
563
+
564
+ <td class="description last"><p>新增/插入顶点</p></td>
565
+ </tr>
566
+
567
+
568
+
569
+
570
+
571
+
572
+ <tr class="deep-level-0">
573
+
574
+ <td class="name"><code>index</code></td>
575
+
576
+
577
+ <td class="type">
578
+
579
+
580
+ <span class="param-type">Number</span>
581
+
582
+
583
+
584
+ </td>
585
+
586
+
587
+
588
+ <td class="description last"><p>新增/新增点的序号</p></td>
589
+ </tr>
590
+
591
+
592
+
593
+
594
+ </tbody>
595
+ </table>
596
+ </div>
597
+
598
+
599
+
600
+
601
+
602
+
603
+ <dl class="details">
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+ </dl>
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+ </div>
660
+
661
+ <div class="member">
662
+
663
+
664
+
665
+ <h4 class="name" id="canRedo">
666
+ <a class="href-link" href="#canRedo">#</a>
667
+
668
+ <span class="code-name" style="font-size:30px">
669
+
670
+ canRedo<span class="signature">()</span>
671
+
672
+ </span>
673
+ </h4>
674
+
675
+
676
+
677
+ <div class="description">
678
+ <p>草图是否可执行恢复操作<a id='canRedo'></a></p>
679
+ </div>
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+ <dl class="details">
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
+
725
+
726
+ </dl>
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+ <div class='columns method-parameter'>
746
+ <div class="column is-2"><label>返回值:</label></div>
747
+ <div class="column is-10">
748
+
749
+
750
+
751
+ <div class="columns">
752
+
753
+
754
+ <div class='column is-5 has-text-left'>
755
+ <label>类型: </label>
756
+
757
+ <span class="param-type">Boolean</span>
758
+
759
+
760
+ </div>
761
+
762
+ </div>
763
+
764
+
765
+ </div>
766
+ </div>
767
+
768
+
769
+
770
+
771
+
772
+
773
+ </div>
774
+
775
+ <div class="member">
776
+
777
+
778
+
779
+ <h4 class="name" id="canUndo">
780
+ <a class="href-link" href="#canUndo">#</a>
781
+
782
+ <span class="code-name" style="font-size:30px">
783
+
784
+ canUndo<span class="signature">()</span>
785
+
786
+ </span>
787
+ </h4>
788
+
789
+
790
+
791
+ <div class="description">
792
+ <p>草图是否可执行撤销操作<a id='canUndo'></a></p>
793
+ </div>
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+ <dl class="details">
809
+
810
+
811
+
812
+
813
+
814
+
815
+
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+ </dl>
841
+
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+
859
+ <div class='columns method-parameter'>
860
+ <div class="column is-2"><label>返回值:</label></div>
861
+ <div class="column is-10">
862
+
863
+
864
+
865
+ <div class="columns">
866
+
867
+
868
+ <div class='column is-5 has-text-left'>
869
+ <label>类型: </label>
870
+
871
+ <span class="param-type">Boolean</span>
872
+
873
+
874
+ </div>
875
+
876
+ </div>
877
+
878
+
879
+ </div>
880
+ </div>
881
+
882
+
883
+
884
+
885
+
886
+
887
+ </div>
888
+
889
+ <div class="member">
890
+
891
+
892
+
893
+ <h4 class="name" id="drawPolylineToPolygon">
894
+ <a class="href-link" href="#drawPolylineToPolygon">#</a>
895
+
896
+ <span class="code-name" style="font-size:30px">
897
+
898
+ drawPolylineToPolygon<span class="signature">(snapAndReferGeometries)</span>
899
+
900
+ </span>
901
+ </h4>
902
+
903
+
904
+
905
+ <div class="description">
906
+ <p>线拓扑造区<a id='drawPolylineToPolygon'></a></p>
907
+ </div>
908
+
909
+
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
918
+ <h4>参数:</h4>
919
+
920
+ <div class="table-container">
921
+ <table class="params table">
922
+ <thead>
923
+ <tr>
924
+
925
+ <th>名称</th>
926
+
927
+
928
+ <th>类型</th>
929
+
930
+
931
+
932
+ <th class="last">描述</th>
933
+ </tr>
934
+ </thead>
935
+
936
+ <tbody>
937
+
938
+
939
+
940
+ <tr class="deep-level-0">
941
+
942
+ <td class="name"><code>snapAndReferGeometries</code></td>
943
+
944
+
945
+ <td class="type">
946
+
947
+
948
+ <span class="param-type">Array.&lt;Polygon></span>
949
+
950
+
951
+
952
+ </td>
953
+
954
+
955
+
956
+ <td class="description last"><p>捕获参考几何对象数组</p></td>
957
+ </tr>
958
+
959
+
960
+
961
+
962
+ </tbody>
963
+ </table>
964
+ </div>
965
+
966
+
967
+
968
+
969
+
970
+
971
+ <dl class="details">
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+
987
+
988
+
989
+
990
+
991
+
992
+
993
+
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+ </dl>
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+ <h5>示例</h5>
1028
+
1029
+ <p class="code-caption"><h7>二维草图线拓扑造区</h7></p>
1030
+
1031
+
1032
+ <pre class="prettyprint"><code>// [ES5引入方式]:
1033
+ const { Polygon, LineString } = zondy.geometry
1034
+ const { MapView } = zondy.mapboxgl
1035
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
1036
+ [ES6引入方式]:
1037
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
1038
+ import { Polygon, LineString } from "@mapgis/webclient-common" &lt;br/>
1039
+ var map = new Map()
1040
+ var mapView = new MapView({
1041
+ viewId: "mapgis-2d-viewer",
1042
+ map: map,
1043
+ })
1044
+ var testGeometries = [
1045
+ new Polygon({
1046
+ coordinates: [
1047
+ [
1048
+ [114.0, 29.0],
1049
+ [117.0, 29.0],
1050
+ [117.0, 35.0],
1051
+ [114.0, 35.0],
1052
+ [114.0, 29.0]
1053
+ ]
1054
+ ]
1055
+ }),
1056
+ new Polygon({
1057
+ coordinates: [
1058
+ [
1059
+ [113.0, 29.0],
1060
+ [116.0, 29.0],
1061
+ [116.0, 35.0],
1062
+ [113.0, 35.0],
1063
+ [113.0, 29.0]
1064
+ ]
1065
+ ]
1066
+ })
1067
+ ]
1068
+ testFeatures = [
1069
+ new Feature({
1070
+ id: '11114',
1071
+ geometry: this.testGeometries[0],
1072
+ symbol: new SimpleFillSymbol({
1073
+ color: new Color(0, 255, 255, 0.5),
1074
+ outline: new SimpleLineSymbol({
1075
+ color: new Color(0, 255, 255, 0.8),
1076
+ width: 2
1077
+ })
1078
+ })
1079
+ }),
1080
+ new Feature({
1081
+ id: '11115',
1082
+ geometry: this.testGeometries[1],
1083
+ symbol: new SimpleFillSymbol({
1084
+ color: new Color(0, 255, 255, 0.5),
1085
+ outline: new SimpleLineSymbol({
1086
+ color: new Color(0, 255, 255, 0.8),
1087
+ width: 2
1088
+ })
1089
+ })
1090
+ }),
1091
+ ]
1092
+ var testLayer = new GraphicsLayer({
1093
+ graphics: this.testFeatures
1094
+ })
1095
+ map.add(testLayer)
1096
+ var sketchEditor = new SketchEditor({
1097
+ view: mapView,
1098
+ layer: new GraphicsLayer()
1099
+ })
1100
+ sketchEditor.drawPolylineToPolygon(testGeometries)</code></pre>
1101
+
1102
+
1103
+
1104
+ </div>
1105
+
1106
+ <div class="member">
1107
+
1108
+
1109
+
1110
+ <h4 class="name" id="getGeometry">
1111
+ <a class="href-link" href="#getGeometry">#</a>
1112
+
1113
+ <span class="code-name" style="font-size:30px">
1114
+
1115
+ getGeometry<span class="signature">()</span>
1116
+
1117
+ </span>
1118
+ </h4>
1119
+
1120
+
1121
+
1122
+ <div class="description">
1123
+ <p>获取草图几何对象<a id='getGeometry'></a></p>
1124
+ </div>
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+ <dl class="details">
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+ </dl>
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+
1189
+
1190
+ <div class='columns method-parameter'>
1191
+ <div class="column is-2"><label>返回值:</label></div>
1192
+ <div class="column is-10">
1193
+
1194
+
1195
+
1196
+ <div class="columns">
1197
+
1198
+
1199
+ <div class='column is-5 has-text-left'>
1200
+ <label>类型: </label>
1201
+
1202
+ <span class="param-type">Geometry</span>
1203
+
1204
+
1205
+ </div>
1206
+
1207
+ </div>
1208
+
1209
+
1210
+ </div>
1211
+ </div>
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+ </div>
1219
+
1220
+ <div class="member">
1221
+
1222
+
1223
+
1224
+ <h4 class="name" id="getSketchStyle">
1225
+ <a class="href-link" href="#getSketchStyle">#</a>
1226
+
1227
+ <span class="code-name" style="font-size:30px">
1228
+
1229
+ getSketchStyle<span class="signature">()</span>
1230
+
1231
+ </span>
1232
+ </h4>
1233
+
1234
+
1235
+
1236
+ <div class="description">
1237
+ <p>获取草图样式<a id='getSketchStyle'></a></p>
1238
+ </div>
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+ <dl class="details">
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+
1264
+
1265
+
1266
+
1267
+
1268
+
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+
1283
+
1284
+
1285
+ </dl>
1286
+
1287
+
1288
+
1289
+
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+ <div class='columns method-parameter'>
1305
+ <div class="column is-2"><label>返回值:</label></div>
1306
+ <div class="column is-10">
1307
+
1308
+
1309
+
1310
+ <div class="columns">
1311
+
1312
+
1313
+ <div class='column is-5 has-text-left'>
1314
+ <label>类型: </label>
1315
+
1316
+ <span class="param-type">SketchStyle</span>
1317
+
1318
+
1319
+ </div>
1320
+
1321
+ </div>
1322
+
1323
+
1324
+ </div>
1325
+ </div>
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+ </div>
1333
+
1334
+ <div class="member">
1335
+
1336
+
1337
+
1338
+ <h4 class="name" id="redo">
1339
+ <a class="href-link" href="#redo">#</a>
1340
+
1341
+ <span class="code-name" style="font-size:30px">
1342
+
1343
+ redo<span class="signature">()</span>
1344
+
1345
+ </span>
1346
+ </h4>
1347
+
1348
+
1349
+
1350
+ <div class="description">
1351
+ <p>恢复被撤销的草图<a id='redo'></a></p>
1352
+ </div>
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+ <dl class="details">
1368
+
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+ </dl>
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+
1416
+
1417
+
1418
+ <div class='columns method-parameter'>
1419
+ <div class="column is-2"><label>返回值:</label></div>
1420
+ <div class="column is-10">
1421
+
1422
+
1423
+
1424
+ <div class="columns">
1425
+
1426
+
1427
+ <div class='column is-5 has-text-left'>
1428
+ <label>类型: </label>
1429
+
1430
+ <span class="param-type">Geometry</span>
1431
+
1432
+
1433
+ </div>
1434
+
1435
+ </div>
1436
+
1437
+
1438
+ </div>
1439
+ </div>
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+ <h5>示例</h5>
1447
+
1448
+ <p class="code-caption"><h7>二维草图几何分割</h7></p>
1449
+
1450
+
1451
+ <pre class="prettyprint"><code>// [ES5引入方式]:
1452
+ const { Polygon, LineString } = zondy.geometry
1453
+ const { MapView } = zondy.mapboxgl
1454
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
1455
+ [ES6引入方式]:
1456
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
1457
+ import { Polygon, LineString } from "@mapgis/webclient-common" &lt;br/>
1458
+ var map = new Map()
1459
+ var mapView = new MapView({
1460
+ viewId: "mapgis-2d-viewer",
1461
+ map: map,
1462
+ })
1463
+ var sketchEditor = new SketchEditor({
1464
+ view: mapView,
1465
+ layer: new GraphicsLayer()
1466
+ })
1467
+ sketchEditor.start(SketchDataType.polygon)
1468
+ console.log("是否可以进行恢复操作:" + sketchEditor.canRedo())
1469
+ const geometry = sketchEditor.redo()
1470
+ console.log("恢复后的几何对象" + geometry)</code></pre>
1471
+
1472
+
1473
+
1474
+ </div>
1475
+
1476
+ <div class="member">
1477
+
1478
+
1479
+
1480
+ <h4 class="name" id="remove">
1481
+ <a class="href-link" href="#remove">#</a>
1482
+
1483
+ <span class="code-name" style="font-size:30px">
1484
+
1485
+ remove<span class="signature">()</span>
1486
+
1487
+ </span>
1488
+ </h4>
1489
+
1490
+
1491
+
1492
+ <div class="description">
1493
+ <p>移除当前草图<a id='remove'></a></p>
1494
+ </div>
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+
1508
+
1509
+ <dl class="details">
1510
+
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+
1518
+
1519
+
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+ </dl>
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+
1564
+
1565
+ </div>
1566
+
1567
+ <div class="member">
1568
+
1569
+
1570
+
1571
+ <h4 class="name" id="removeVertex">
1572
+ <a class="href-link" href="#removeVertex">#</a>
1573
+
1574
+ <span class="code-name" style="font-size:30px">
1575
+
1576
+ removeVertex<span class="signature">(index)</span>
1577
+
1578
+ </span>
1579
+ </h4>
1580
+
1581
+
1582
+
1583
+ <div class="description">
1584
+ <p>移除草图图形的某个顶点<a id='removeVertex'></a></p>
1585
+ </div>
1586
+
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+ <h4>参数:</h4>
1597
+
1598
+ <div class="table-container">
1599
+ <table class="params table">
1600
+ <thead>
1601
+ <tr>
1602
+
1603
+ <th>名称</th>
1604
+
1605
+
1606
+ <th>类型</th>
1607
+
1608
+
1609
+
1610
+ <th class="last">描述</th>
1611
+ </tr>
1612
+ </thead>
1613
+
1614
+ <tbody>
1615
+
1616
+
1617
+
1618
+ <tr class="deep-level-0">
1619
+
1620
+ <td class="name"><code>index</code></td>
1621
+
1622
+
1623
+ <td class="type">
1624
+
1625
+
1626
+ <span class="param-type">Number</span>
1627
+
1628
+
1629
+
1630
+ </td>
1631
+
1632
+
1633
+
1634
+ <td class="description last"><p>需更新的顶点的序号</p></td>
1635
+ </tr>
1636
+
1637
+
1638
+
1639
+
1640
+ </tbody>
1641
+ </table>
1642
+ </div>
1643
+
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+ <dl class="details">
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+
1660
+
1661
+
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+ </dl>
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+
1699
+
1700
+
1701
+
1702
+
1703
+
1704
+
1705
+ </div>
1706
+
1707
+ <div class="member">
1708
+
1709
+
1710
+
1711
+ <h4 class="name" id="setSketchStyle">
1712
+ <a class="href-link" href="#setSketchStyle">#</a>
1713
+
1714
+ <span class="code-name" style="font-size:30px">
1715
+
1716
+ setSketchStyle<span class="signature">(sketchStyle)</span>
1717
+
1718
+ </span>
1719
+ </h4>
1720
+
1721
+
1722
+
1723
+ <div class="description">
1724
+ <p>设置草图样式<a id='setSketchStyle'></a></p>
1725
+ </div>
1726
+
1727
+
1728
+
1729
+
1730
+
1731
+
1732
+
1733
+
1734
+
1735
+
1736
+ <h4>参数:</h4>
1737
+
1738
+ <div class="table-container">
1739
+ <table class="params table">
1740
+ <thead>
1741
+ <tr>
1742
+
1743
+ <th>名称</th>
1744
+
1745
+
1746
+ <th>类型</th>
1747
+
1748
+
1749
+
1750
+ <th class="last">描述</th>
1751
+ </tr>
1752
+ </thead>
1753
+
1754
+ <tbody>
1755
+
1756
+
1757
+
1758
+ <tr class="deep-level-0">
1759
+
1760
+ <td class="name"><code>sketchStyle</code></td>
1761
+
1762
+
1763
+ <td class="type">
1764
+
1765
+
1766
+ <span class="param-type">SketchStyle</span>
1767
+
1768
+
1769
+
1770
+ </td>
1771
+
1772
+
1773
+
1774
+ <td class="description last"></td>
1775
+ </tr>
1776
+
1777
+
1778
+
1779
+
1780
+ </tbody>
1781
+ </table>
1782
+ </div>
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+ <dl class="details">
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+
1804
+
1805
+
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+
1812
+
1813
+
1814
+
1815
+
1816
+
1817
+
1818
+
1819
+
1820
+
1821
+ </dl>
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+
1828
+
1829
+
1830
+
1831
+
1832
+
1833
+
1834
+
1835
+
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+ <h5>示例</h5>
1846
+
1847
+
1848
+ <pre class="prettyprint"><code>// ES5引入方式
1849
+ const { Color, Map } = zondy
1850
+ const { SketchDataType } = zondy.enum
1851
+ const { SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol } = zondy.symbol
1852
+ const { SketchStyle } = zondy.tool.sketch
1853
+ const { MapView } = zondy.mapboxgl
1854
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
1855
+ // ES6引入方式
1856
+ import { Map, SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol, Color, SketchStyle, SketchDataType } from "@mapgis/webclient-common"
1857
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
1858
+ var map = new Map()
1859
+ var mapView = new MapView({
1860
+ viewId: "mapgis-2d-viewer",
1861
+ map: map,
1862
+ })
1863
+ // 新建一个填充样式
1864
+ var fillStyle = new SimpleFillSymbol({
1865
+ color: new Color(0, 255, 255, 1),
1866
+ outline: new SimpleLineSymbol({
1867
+ color: new Color(255, 0, 0, 1),
1868
+ width: 2
1869
+ })
1870
+ })
1871
+ // 新建一个草图样式
1872
+ var sketchStyle = new SketchStyle({
1873
+ vertexStyle: new SimpleMarkerSymbol({
1874
+ color: new Color(0, 255, 255, 1),
1875
+ size: 10,
1876
+ outline: new SimpleLineSymbol({
1877
+ color: new Color(255, 255, 255, 1),
1878
+ width: 3
1879
+ })
1880
+ }),
1881
+ lineStyle: new SimpleLineSymbol({
1882
+ color: new Color(0, 255, 255, 0.8),
1883
+ width: 3
1884
+ }),
1885
+ fillStyle: new SimpleFillSymbol({
1886
+ color: new Color(0, 255, 255, 0.5),
1887
+ outline: new SimpleLineSymbol({
1888
+ color: new Color(0, 255, 255, 0.8),
1889
+ width: 2
1890
+ })
1891
+ }),
1892
+ selectBoxStyle: new SimpleFillSymbol({
1893
+ color: new Color(122, 22, 255, 0.5),
1894
+ outline: new SimpleLineSymbol({
1895
+ color: new Color(122, 22, 255, 0.8),
1896
+ width: 1
1897
+ })
1898
+ }),
1899
+ selectVertexStyle: new SimpleMarkerSymbol({
1900
+ color: new Color(122, 22, 255, 1),
1901
+ size: 12,
1902
+ outline: new SimpleLineSymbol({
1903
+ color: new Color(255, 255, 255, 1),
1904
+ width: 1
1905
+ })
1906
+ }),
1907
+ selectVertexStyle: new SimpleMarkerSymbol({
1908
+ color: new Color(0, 188, 0, 1),
1909
+ size: 11,
1910
+ outline: new SimpleLineSymbol({
1911
+ color: new Color(255, 255, 255, 1),
1912
+ width: 1
1913
+ })
1914
+ }),
1915
+ selectMidVertexStyle: new SimpleMarkerSymbol({
1916
+ color: new Color(0, 0, 255, 1),
1917
+ size: 8,
1918
+ outline: new SimpleLineSymbol({
1919
+ color: new Color(255, 255, 255, 1),
1920
+ width: 1
1921
+ })
1922
+ })
1923
+ })
1924
+ var sketchEditor = new SketchEditor({
1925
+ view: mapView,
1926
+ layer: graphicsLayer,
1927
+ })
1928
+ sketchEditor.setSketchStyle(sketchStyle)
1929
+ sketchEditor.start(SketchDataType.polygon)</code></pre>
1930
+
1931
+
1932
+
1933
+ </div>
1934
+
1935
+ <div class="member">
1936
+
1937
+
1938
+
1939
+ <h4 class="name" id="split">
1940
+ <a class="href-link" href="#split">#</a>
1941
+
1942
+ <span class="code-name" style="font-size:30px">
1943
+
1944
+ split<span class="signature">(target, splitPolyline)</span>
1945
+
1946
+ </span>
1947
+ </h4>
1948
+
1949
+
1950
+
1951
+ <div class="description">
1952
+ <p>分割草图对象或区几何对象<a id='split'></a></p>
1953
+ </div>
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+
1961
+
1962
+
1963
+
1964
+ <h4>参数:</h4>
1965
+
1966
+ <div class="table-container">
1967
+ <table class="params table">
1968
+ <thead>
1969
+ <tr>
1970
+
1971
+ <th>名称</th>
1972
+
1973
+
1974
+ <th>类型</th>
1975
+
1976
+
1977
+
1978
+ <th class="last">描述</th>
1979
+ </tr>
1980
+ </thead>
1981
+
1982
+ <tbody>
1983
+
1984
+
1985
+
1986
+ <tr class="deep-level-0">
1987
+
1988
+ <td class="name"><code>target</code></td>
1989
+
1990
+
1991
+ <td class="type">
1992
+
1993
+
1994
+ <span class="param-type">Polygon</span>
1995
+ |
1996
+
1997
+ <span class="param-type"><a href="SketchEditor.html">SketchEditor</a></span>
1998
+
1999
+
2000
+
2001
+ </td>
2002
+
2003
+
2004
+
2005
+ <td class="description last"><p>被分割的几何/草图对象</p></td>
2006
+ </tr>
2007
+
2008
+
2009
+
2010
+
2011
+
2012
+
2013
+ <tr class="deep-level-0">
2014
+
2015
+ <td class="name"><code>splitPolyline</code></td>
2016
+
2017
+
2018
+ <td class="type">
2019
+
2020
+
2021
+ <span class="param-type">Polyline</span>
2022
+
2023
+
2024
+
2025
+ </td>
2026
+
2027
+
2028
+
2029
+ <td class="description last"><p>线几何对象</p></td>
2030
+ </tr>
2031
+
2032
+
2033
+
2034
+
2035
+ </tbody>
2036
+ </table>
2037
+ </div>
2038
+
2039
+
2040
+
2041
+
2042
+
2043
+
2044
+ <dl class="details">
2045
+
2046
+
2047
+
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+
2056
+
2057
+
2058
+
2059
+
2060
+
2061
+
2062
+
2063
+
2064
+
2065
+
2066
+
2067
+
2068
+
2069
+
2070
+
2071
+
2072
+
2073
+
2074
+
2075
+
2076
+ </dl>
2077
+
2078
+
2079
+
2080
+
2081
+
2082
+
2083
+
2084
+
2085
+
2086
+
2087
+
2088
+
2089
+
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+ <div class='columns method-parameter'>
2096
+ <div class="column is-2"><label>返回值:</label></div>
2097
+ <div class="column is-10">
2098
+
2099
+
2100
+
2101
+ <div class="columns">
2102
+
2103
+ <div class='param-desc column is-7'><p>分割后的几何对象</p></div>
2104
+
2105
+
2106
+ <div class='column is-5 has-text-left'>
2107
+ <label>类型: </label>
2108
+
2109
+ <span class="param-type">Array.&lt;Polygon></span>
2110
+
2111
+
2112
+ </div>
2113
+
2114
+ </div>
2115
+
2116
+
2117
+ </div>
2118
+ </div>
2119
+
2120
+
2121
+
2122
+
2123
+
2124
+
2125
+ <h5>示例</h5>
2126
+
2127
+ <p class="code-caption"><h7>二维草图几何分割</h7></p>
2128
+
2129
+
2130
+ <pre class="prettyprint"><code>// [ES5引入方式]:
2131
+ const { Polygon, LineString } = zondy.geometry
2132
+ const { MapView } = zondy.mapboxgl
2133
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
2134
+ [ES6引入方式]:
2135
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
2136
+ import { Polygon, LineString } from "@mapgis/webclient-common" &lt;br/>
2137
+ var map = new Map()
2138
+ var mapView = new MapView({
2139
+ viewId: "mapgis-2d-viewer",
2140
+ map: map,
2141
+ })
2142
+ var sketchEditor = new SketchEditor({
2143
+ view: mapView,
2144
+ layer: new GraphicsLayer()
2145
+ })
2146
+ const polygon = new Polygon({
2147
+ coordinates: [
2148
+ [
2149
+ [108, 29],
2150
+ [116, 29],
2151
+ [116, 33],
2152
+ [108, 33],
2153
+ [108, 29]
2154
+ ]
2155
+ ]
2156
+ })
2157
+ const polyline = new LineString({
2158
+ coordinates: [
2159
+ [100, 30],
2160
+ [120, 30]
2161
+ ]
2162
+ })
2163
+ const newSketchEditors = SketchEditor.split(polygon,polyline)</code></pre>
2164
+
2165
+
2166
+
2167
+ </div>
2168
+
2169
+ <div class="member">
2170
+
2171
+
2172
+
2173
+ <h4 class="name" id="start">
2174
+ <a class="href-link" href="#start">#</a>
2175
+
2176
+ <span class="code-name" style="font-size:30px">
2177
+
2178
+ start<span class="signature">(dataType, extensionOptions)</span>
2179
+
2180
+ </span>
2181
+ </h4>
2182
+
2183
+
2184
+
2185
+ <div class="description">
2186
+ <p>开始绘制草图<a id='start'></a></p>
2187
+ </div>
2188
+
2189
+
2190
+
2191
+
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+
2198
+ <h4>参数:</h4>
2199
+
2200
+ <div class="table-container">
2201
+ <table class="params table">
2202
+ <thead>
2203
+ <tr>
2204
+
2205
+ <th>名称</th>
2206
+
2207
+
2208
+ <th>类型</th>
2209
+
2210
+
2211
+
2212
+ <th class="last">描述</th>
2213
+ </tr>
2214
+ </thead>
2215
+
2216
+ <tbody>
2217
+
2218
+
2219
+
2220
+ <tr class="deep-level-0">
2221
+
2222
+ <td class="name"><code>dataType</code></td>
2223
+
2224
+
2225
+ <td class="type">
2226
+
2227
+
2228
+ <span class="param-type">SketchDataType</span>
2229
+
2230
+
2231
+
2232
+ </td>
2233
+
2234
+
2235
+
2236
+ <td class="description last"><p>草图编辑类型</p></td>
2237
+ </tr>
2238
+
2239
+
2240
+
2241
+
2242
+
2243
+
2244
+ <tr class="deep-level-0">
2245
+
2246
+ <td class="name"><code>extensionOptions</code></td>
2247
+
2248
+
2249
+ <td class="type">
2250
+
2251
+
2252
+ <span class="param-type">Object</span>
2253
+
2254
+
2255
+
2256
+ </td>
2257
+
2258
+
2259
+
2260
+ <td class="description last"><p>草图编辑的扩展属性,可以通过该属性传入草图编辑额外需要的参数</p></td>
2261
+ </tr>
2262
+
2263
+
2264
+
2265
+
2266
+ </tbody>
2267
+ </table>
2268
+ </div>
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+
2275
+ <dl class="details">
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+
2288
+
2289
+
2290
+
2291
+
2292
+
2293
+
2294
+
2295
+
2296
+
2297
+
2298
+
2299
+
2300
+
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+
2307
+ </dl>
2308
+
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+
2330
+
2331
+ <h5>示例</h5>
2332
+
2333
+ <p class="code-caption"><h7>初始化一个二维场景草图编辑类</h7></p>
2334
+
2335
+
2336
+ <pre class="prettyprint"><code>// [ES5引入方式]:
2337
+ const { Color } = zondy
2338
+ const { SketchDataType } = zondy.enum
2339
+ const { SimpleMarkerSymbol } = zondy.symbol
2340
+ const { SketchStyle } = zondy.tool.sketch
2341
+ const { MapView } = zondy.mapboxgl
2342
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
2343
+ [ES6引入方式]:
2344
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
2345
+ import { SketchStyle, SimpleMarkerSymbol, Color, SketchDataType} from "@mapgis/webclient-common" &lt;br/>
2346
+ var map = new Map()
2347
+ var mapView = new MapView({
2348
+ viewId: "mapgis-2d-viewer",
2349
+ map: map,
2350
+ })
2351
+ var simpleMarkerSymbol = new SimpleMarkerSymbol({
2352
+ color: new Color(24, 144, 255, 1),
2353
+ size: 10,
2354
+ });
2355
+ var sketchStyle = new SketchStyle({
2356
+ vertexStyle: simpleMarkerSymbol,
2357
+ lineStyle: undefined,
2358
+ fillStyle: undefined
2359
+ })
2360
+ var sketchEditor = new SketchEditor({
2361
+ view: mapView,
2362
+ layer: new GraphicsLayer(),
2363
+ vertexStyle: vertexStyle
2364
+ })
2365
+ sketchEditor.start(SketchDataType.point) // 绘制点
2366
+ sketchEditor.start(SketchDataType.polyline) // 绘制线
2367
+ sketchEditor.start(SketchDataType.polygon) // 绘制区</code></pre>
2368
+
2369
+
2370
+
2371
+ </div>
2372
+
2373
+ <div class="member">
2374
+
2375
+
2376
+
2377
+ <h4 class="name" id="startCustomDrawTool">
2378
+ <a class="href-link" href="#startCustomDrawTool">#</a>
2379
+
2380
+ <span class="code-name" style="font-size:30px">
2381
+
2382
+ startCustomDrawTool<span class="signature">(dataType)</span>
2383
+
2384
+ </span>
2385
+ </h4>
2386
+
2387
+
2388
+
2389
+ <div class="description">
2390
+ <p>开始绘制草图<a id='start'></a></p>
2391
+ </div>
2392
+
2393
+
2394
+
2395
+
2396
+
2397
+
2398
+
2399
+
2400
+
2401
+
2402
+ <h4>参数:</h4>
2403
+
2404
+ <div class="table-container">
2405
+ <table class="params table">
2406
+ <thead>
2407
+ <tr>
2408
+
2409
+ <th>名称</th>
2410
+
2411
+
2412
+ <th>类型</th>
2413
+
2414
+
2415
+
2416
+ <th class="last">描述</th>
2417
+ </tr>
2418
+ </thead>
2419
+
2420
+ <tbody>
2421
+
2422
+
2423
+
2424
+ <tr class="deep-level-0">
2425
+
2426
+ <td class="name"><code>dataType</code></td>
2427
+
2428
+
2429
+ <td class="type">
2430
+
2431
+
2432
+ <span class="param-type">SketchDataType</span>
2433
+
2434
+
2435
+
2436
+ </td>
2437
+
2438
+
2439
+
2440
+ <td class="description last"><p>草图编辑类型</p></td>
2441
+ </tr>
2442
+
2443
+
2444
+
2445
+
2446
+ </tbody>
2447
+ </table>
2448
+ </div>
2449
+
2450
+
2451
+
2452
+
2453
+
2454
+
2455
+ <dl class="details">
2456
+
2457
+
2458
+
2459
+
2460
+
2461
+
2462
+
2463
+
2464
+
2465
+
2466
+
2467
+
2468
+
2469
+
2470
+
2471
+
2472
+
2473
+
2474
+
2475
+
2476
+
2477
+
2478
+
2479
+
2480
+
2481
+
2482
+
2483
+
2484
+
2485
+
2486
+
2487
+ </dl>
2488
+
2489
+
2490
+
2491
+
2492
+
2493
+
2494
+
2495
+
2496
+
2497
+
2498
+
2499
+
2500
+
2501
+
2502
+
2503
+
2504
+
2505
+
2506
+
2507
+
2508
+
2509
+
2510
+
2511
+ <h5>示例</h5>
2512
+
2513
+ <p class="code-caption"><h7>初始化一个二维场景草图编辑类</h7></p>
2514
+
2515
+
2516
+ <pre class="prettyprint"><code>// [ES5引入方式]:
2517
+ const { Color } = zondy
2518
+ const { SketchDataType } = zondy.enum
2519
+ const { SimpleMarkerSymbol } = zondy.symbol
2520
+ const { SketchStyle } = zondy.tool.sketch
2521
+ const { MapView } = zondy.mapboxgl
2522
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
2523
+ [ES6引入方式]:
2524
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
2525
+ import { SketchStyle, SketchEditor, Color, SketchDataType} from "@mapgis/webclient-common" &lt;br/>
2526
+ import SketchEllipseDrawTool from "./SketchEllipseDrawTool" &lt;br/>
2527
+ var map = new Map()
2528
+ var mapView = new MapView({
2529
+ viewId: "mapgis-2d-viewer",
2530
+ map: map,
2531
+ })
2532
+ var simpleMarkerSymbol = new SimpleMarkerSymbol({
2533
+ color: new Color(24, 144, 255, 1),
2534
+ size: 10,
2535
+ });
2536
+ var sketchStyle = new SketchStyle({
2537
+ vertexStyle: simpleMarkerSymbol,
2538
+ lineStyle: undefined,
2539
+ fillStyle: undefined
2540
+ })
2541
+ var sketchEditor = new SketchEditor({
2542
+ view: mapView,
2543
+ layer: new GraphicsLayer(),
2544
+ vertexStyle: vertexStyle
2545
+ })
2546
+ sketchEditor.startCustomDrawTool(SketchEllipseDrawTool, "ellipse") // 绘制椭圆</code></pre>
2547
+
2548
+
2549
+
2550
+ </div>
2551
+
2552
+ <div class="member">
2553
+
2554
+
2555
+
2556
+ <h4 class="name" id="stop">
2557
+ <a class="href-link" href="#stop">#</a>
2558
+
2559
+ <span class="code-name" style="font-size:30px">
2560
+
2561
+ stop<span class="signature">()</span>
2562
+
2563
+ </span>
2564
+ </h4>
2565
+
2566
+
2567
+
2568
+ <div class="description">
2569
+ <p>停止绘制<a id='stop'></a></p>
2570
+ </div>
2571
+
2572
+
2573
+
2574
+
2575
+
2576
+
2577
+
2578
+
2579
+
2580
+
2581
+
2582
+
2583
+
2584
+
2585
+ <dl class="details">
2586
+
2587
+
2588
+
2589
+
2590
+
2591
+
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+
2599
+
2600
+
2601
+
2602
+
2603
+
2604
+
2605
+
2606
+
2607
+
2608
+
2609
+
2610
+
2611
+
2612
+
2613
+
2614
+
2615
+
2616
+
2617
+ </dl>
2618
+
2619
+
2620
+
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+
2632
+
2633
+
2634
+
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+
2641
+ </div>
2642
+
2643
+ <div class="member">
2644
+
2645
+
2646
+
2647
+ <h4 class="name" id="undo">
2648
+ <a class="href-link" href="#undo">#</a>
2649
+
2650
+ <span class="code-name" style="font-size:30px">
2651
+
2652
+ undo<span class="signature">()</span>
2653
+
2654
+ </span>
2655
+ </h4>
2656
+
2657
+
2658
+
2659
+ <div class="description">
2660
+ <p>撤销当前编辑操作<a id='undo'></a></p>
2661
+ </div>
2662
+
2663
+
2664
+
2665
+
2666
+
2667
+
2668
+
2669
+
2670
+
2671
+
2672
+
2673
+
2674
+
2675
+
2676
+ <dl class="details">
2677
+
2678
+
2679
+
2680
+
2681
+
2682
+
2683
+
2684
+
2685
+
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2698
+
2699
+
2700
+
2701
+
2702
+
2703
+
2704
+
2705
+
2706
+
2707
+
2708
+ </dl>
2709
+
2710
+
2711
+
2712
+
2713
+
2714
+
2715
+
2716
+
2717
+
2718
+
2719
+
2720
+
2721
+
2722
+
2723
+
2724
+
2725
+
2726
+
2727
+ <div class='columns method-parameter'>
2728
+ <div class="column is-2"><label>返回值:</label></div>
2729
+ <div class="column is-10">
2730
+
2731
+
2732
+
2733
+ <div class="columns">
2734
+
2735
+
2736
+ <div class='column is-5 has-text-left'>
2737
+ <label>类型: </label>
2738
+
2739
+ <span class="param-type">Geometry</span>
2740
+
2741
+
2742
+ </div>
2743
+
2744
+ </div>
2745
+
2746
+
2747
+ </div>
2748
+ </div>
2749
+
2750
+
2751
+
2752
+
2753
+
2754
+
2755
+ <h5>示例</h5>
2756
+
2757
+ <p class="code-caption"><h7>二维草图几何分割</h7></p>
2758
+
2759
+
2760
+ <pre class="prettyprint"><code>// [ES5引入方式]:
2761
+ const { Polygon, LineString } = zondy.geometry
2762
+ const { SketchDataType } = zondy.enum
2763
+ const { MapView } = zondy.mapboxgl
2764
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
2765
+ [ES6引入方式]:
2766
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
2767
+ import { Polygon, LineString, SketchDataType } from "@mapgis/webclient-common" &lt;br/>
2768
+ var map = new Map()
2769
+ var mapView = new MapView({
2770
+ viewId: "mapgis-2d-viewer",
2771
+ map: map,
2772
+ })
2773
+ var sketchEditor = new SketchEditor({
2774
+ view: mapView,
2775
+ layer: new GraphicsLayer()
2776
+ })
2777
+ sketchEditor.start(SketchDataType.polygon)
2778
+ console.log("是否可以进行撤销操作:" + sketchEditor.canUndo())
2779
+ const geometry = sketchEditor.undo()
2780
+ console.log("恢复后的几何对象" + geometry)</code></pre>
2781
+
2782
+
2783
+
2784
+ </div>
2785
+
2786
+ <div class="member">
2787
+
2788
+
2789
+
2790
+ <h4 class="name" id="union">
2791
+ <a class="href-link" href="#union">#</a>
2792
+
2793
+ <span class="code-name" style="font-size:30px">
2794
+
2795
+ union<span class="signature">(polygons)</span>
2796
+
2797
+ </span>
2798
+ </h4>
2799
+
2800
+
2801
+
2802
+ <div class="description">
2803
+ <p>合并多个区几何<a id='union'></a></p>
2804
+ </div>
2805
+
2806
+
2807
+
2808
+
2809
+
2810
+
2811
+
2812
+
2813
+
2814
+
2815
+ <h4>参数:</h4>
2816
+
2817
+ <div class="table-container">
2818
+ <table class="params table">
2819
+ <thead>
2820
+ <tr>
2821
+
2822
+ <th>名称</th>
2823
+
2824
+
2825
+ <th>类型</th>
2826
+
2827
+
2828
+
2829
+ <th class="last">描述</th>
2830
+ </tr>
2831
+ </thead>
2832
+
2833
+ <tbody>
2834
+
2835
+
2836
+
2837
+ <tr class="deep-level-0">
2838
+
2839
+ <td class="name"><code>polygons</code></td>
2840
+
2841
+
2842
+ <td class="type">
2843
+
2844
+
2845
+ <span class="param-type">Polygon</span>
2846
+
2847
+
2848
+
2849
+ </td>
2850
+
2851
+
2852
+
2853
+ <td class="description last"><p>被合并的区几何对象</p></td>
2854
+ </tr>
2855
+
2856
+
2857
+
2858
+
2859
+ </tbody>
2860
+ </table>
2861
+ </div>
2862
+
2863
+
2864
+
2865
+
2866
+
2867
+
2868
+ <dl class="details">
2869
+
2870
+
2871
+
2872
+
2873
+
2874
+
2875
+
2876
+
2877
+
2878
+
2879
+
2880
+
2881
+
2882
+
2883
+
2884
+
2885
+
2886
+
2887
+
2888
+
2889
+
2890
+
2891
+
2892
+
2893
+
2894
+
2895
+
2896
+
2897
+
2898
+
2899
+
2900
+ </dl>
2901
+
2902
+
2903
+
2904
+
2905
+
2906
+
2907
+
2908
+
2909
+
2910
+
2911
+
2912
+
2913
+
2914
+
2915
+
2916
+
2917
+
2918
+
2919
+ <div class='columns method-parameter'>
2920
+ <div class="column is-2"><label>返回值:</label></div>
2921
+ <div class="column is-10">
2922
+
2923
+
2924
+
2925
+ <div class="columns">
2926
+
2927
+ <div class='param-desc column is-7'><p>合并后的几何对象</p></div>
2928
+
2929
+
2930
+ <div class='column is-5 has-text-left'>
2931
+ <label>类型: </label>
2932
+
2933
+ <span class="param-type">Polygon</span>
2934
+
2935
+
2936
+ </div>
2937
+
2938
+ </div>
2939
+
2940
+
2941
+ </div>
2942
+ </div>
2943
+
2944
+
2945
+
2946
+
2947
+
2948
+
2949
+ <h5>示例</h5>
2950
+
2951
+ <p class="code-caption"><h7>二维草图几何合并</h7></p>
2952
+
2953
+
2954
+ <pre class="prettyprint"><code>// [ES5引入方式]:
2955
+ const { Polygon } = zondy.geometry
2956
+ const { MapView } = zondy.mapboxgl
2957
+ const { SketchEditor } = zondy.mapboxgl.tool.sketch
2958
+ [ES6引入方式]:
2959
+ import { MapView, SketchEditor } from "@mapgis/webclient-leaflet-plugin" &lt;br/>
2960
+ import { Polygon } from "@mapgis/webclient-common" &lt;br/>
2961
+ var map = new Map()
2962
+ var mapView = new MapView({
2963
+ viewId: "mapgis-2d-viewer",
2964
+ map: map,
2965
+ })
2966
+ var sketchEditor = new SketchEditor({
2967
+ view: mapView,
2968
+ layer: new GraphicsLayer()
2969
+ })
2970
+ const polygon = new Polygon({
2971
+ coordinates: [
2972
+ [
2973
+ [0, -60],
2974
+ [0, 60],
2975
+ [160, 60],
2976
+ [160, -60],
2977
+ [0, -60]
2978
+ ]
2979
+ ]
2980
+ })
2981
+ const polygon1 = new Polygon({
2982
+ coordinates: [
2983
+ [
2984
+ [10, -60],
2985
+ [10, 60],
2986
+ [170, 60],
2987
+ [170, -60],
2988
+ [10, -60]
2989
+ ]
2990
+ ]
2991
+ })
2992
+ const polygons = [polygon,polygon1]
2993
+ SketchEditor.union(polygons)</code></pre>
2994
+
2995
+
2996
+
2997
+ </div>
2998
+
2999
+ <div class="member">
3000
+
3001
+
3002
+
3003
+ <h4 class="name" id="updateVertex">
3004
+ <a class="href-link" href="#updateVertex">#</a>
3005
+
3006
+ <span class="code-name" style="font-size:30px">
3007
+
3008
+ updateVertex<span class="signature">(point, index)</span>
3009
+
3010
+ </span>
3011
+ </h4>
3012
+
3013
+
3014
+
3015
+ <div class="description">
3016
+ <p>更新当前草图图形的某个顶点<a id='updateVertex'></a></p>
3017
+ </div>
3018
+
3019
+
3020
+
3021
+
3022
+
3023
+
3024
+
3025
+
3026
+
3027
+
3028
+ <h4>参数:</h4>
3029
+
3030
+ <div class="table-container">
3031
+ <table class="params table">
3032
+ <thead>
3033
+ <tr>
3034
+
3035
+ <th>名称</th>
3036
+
3037
+
3038
+ <th>类型</th>
3039
+
3040
+
3041
+
3042
+ <th class="last">描述</th>
3043
+ </tr>
3044
+ </thead>
3045
+
3046
+ <tbody>
3047
+
3048
+
3049
+
3050
+ <tr class="deep-level-0">
3051
+
3052
+ <td class="name"><code>point</code></td>
3053
+
3054
+
3055
+ <td class="type">
3056
+
3057
+
3058
+ <span class="param-type">Point</span>
3059
+
3060
+
3061
+
3062
+ </td>
3063
+
3064
+
3065
+
3066
+ <td class="description last"><p>新的顶点</p></td>
3067
+ </tr>
3068
+
3069
+
3070
+
3071
+
3072
+
3073
+
3074
+ <tr class="deep-level-0">
3075
+
3076
+ <td class="name"><code>index</code></td>
3077
+
3078
+
3079
+ <td class="type">
3080
+
3081
+
3082
+ <span class="param-type">Number</span>
3083
+
3084
+
3085
+
3086
+ </td>
3087
+
3088
+
3089
+
3090
+ <td class="description last"><p>需更新的顶点的序号</p></td>
3091
+ </tr>
3092
+
3093
+
3094
+
3095
+
3096
+ </tbody>
3097
+ </table>
3098
+ </div>
3099
+
3100
+
3101
+
3102
+
3103
+
3104
+
3105
+ <dl class="details">
3106
+
3107
+
3108
+
3109
+
3110
+
3111
+
3112
+
3113
+
3114
+
3115
+
3116
+
3117
+
3118
+
3119
+
3120
+
3121
+
3122
+
3123
+
3124
+
3125
+
3126
+
3127
+
3128
+
3129
+
3130
+
3131
+
3132
+
3133
+
3134
+
3135
+
3136
+
3137
+ </dl>
3138
+
3139
+
3140
+
3141
+
3142
+
3143
+
3144
+
3145
+
3146
+
3147
+
3148
+
3149
+
3150
+
3151
+
3152
+
3153
+
3154
+
3155
+
3156
+
3157
+
3158
+
3159
+
3160
+
3161
+ </div>
3162
+
3163
+ </div>
3164
+ </div>
3165
+
3166
+
3167
+
3168
+
3169
+
3170
+ </article>
3171
+
3172
+ </section>
3173
+
3174
+
3175
+
3176
+
3177
+ </div>
3178
+
3179
+ <footer class="footer">
3180
+ <div class="content has-text-centered">
3181
+ <p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a></p>
3182
+ <p class="sidebar-created-by">
3183
+ <a href="http://www.smaryun.com" target="_blank">司马云</a> <span>© 2023 云生态圈</span>
3184
+ <a href="http://webclient.smaryun.com:8086/#/index" target="_blank">MapGIS Client for JavaScript</a>
3185
+ </p>
3186
+ </div>
3187
+ </footer>
3188
+
3189
+ </div>
3190
+ <div id="side-nav" class="side-nav">
3191
+ <div style="margin-bottom: 10px;">
3192
+ <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#page-title">构造函数</a>
3193
+ </div>
3194
+ <div style="margin-bottom: 10px;">
3195
+ <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#member">成员变量</a>
3196
+ </div>
3197
+ <div style="margin-bottom: 10px;">
3198
+ <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#function">方法</a>
3199
+ </div>
3200
+ <div>
3201
+ <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#event">事件</a>
3202
+ </div>
3203
+ </div>
3204
+ </div>
3205
+ <script src="scripts/linenumber.js"> </script>
3206
+
3207
+ <script src="scripts/search.js"> </script>
3208
+
3209
+ </body>
3210
+ </html>