@mapgis/webclient-common 17.2.2 → 17.2.3
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 +8 -0
- package/dist/es5/webclient-common.min.js +3 -3
- package/dist/webclient-common-es6.min.js +3 -3
- package/documention/ArcGISMapImageSubLayer.html +14 -14
- package/documention/ArcGISTileLayer.html +14 -14
- package/documention/BaseScene.html +320 -6791
- package/documention/BaseView.html +18 -18
- package/documention/Callout3D.html +5 -5
- package/documention/Cesium3DTilesCacheLayer.html +16 -16
- package/documention/Circle.html +5 -5
- package/documention/Extent.html +5 -5
- package/documention/ExtrudeSymbol3DLayer.html +5 -5
- package/documention/FeatureLayer.html +14 -14
- package/documention/FillSymbol.html +5 -5
- package/documention/FillSymbol3DLayer.html +5 -5
- package/documention/GeoJSONLayer.html +14 -14
- package/documention/Geometry.html +5 -5
- package/documention/GraphicsLayer.html +14 -14
- package/documention/GroupLayer.html +14 -14
- package/documention/IGSMapImageSubLayer.html +14 -14
- package/documention/IGSSceneLayer.html +5 -5
- package/documention/IGSSceneSubLayer.html +14 -14
- package/documention/IGSTileLayer.html +14 -14
- package/documention/ISSceneSubLayer.html +14 -744
- package/documention/IconSymbol3DLayer.html +5 -5
- package/documention/LabelClass.html +5 -5
- package/documention/Layer.html +13 -13
- package/documention/LineCallout3D.html +5 -5
- package/documention/LineString.html +5 -5
- package/documention/LineSymbol.html +5 -5
- package/documention/LineSymbol3DLayer.html +5 -5
- package/documention/M3DModelCacheLayer.html +19 -19
- package/documention/MapGISTextSymbol.html +5 -5
- package/documention/MapImageLayer.html +28 -28
- package/documention/MapView.html +19 -19
- package/documention/MarkerSymbol.html +5 -5
- package/documention/MultiLineString.html +5 -5
- package/documention/MultiPoint.html +5 -5
- package/documention/MultiPolygon.html +5 -5
- package/documention/OGCLayer.html +14 -14
- package/documention/ObjectSymbol3DLayer.html +5 -5
- package/documention/OverlayLayer.html +14 -14
- package/documention/PathSymbol3DLayer.html +5 -5
- package/documention/PictureFillSymbol.html +5 -5
- package/documention/Point.html +5 -5
- package/documention/Polygon.html +5 -5
- package/documention/S3MTilesCacheLayer.html +14 -14
- package/documention/SceneLayer.html +14 -14
- package/documention/SceneView.html +19 -19
- package/documention/SimpleFillSymbol.html +5 -5
- package/documention/SketchBaseDrawTool.html +5 -5
- package/documention/SketchCircleDrawTool.html +5 -5
- package/documention/SketchEditor.html +2 -2
- package/documention/SketchEditorCesium.html +2 -2
- package/documention/SketchExtentDrawTool.html +5 -5
- package/documention/SketchFreehandPolygonDrawTool.html +5 -5
- package/documention/SketchFreehandPolylineDrawTool.html +5 -5
- package/documention/SketchPointDrawTool.html +5 -5
- package/documention/SketchPolygonDrawTool.html +10 -10
- package/documention/SketchPolylineDrawTool.html +10 -10
- package/documention/SubLayer.html +13 -13
- package/documention/Symbol.html +5 -5
- package/documention/Symbol3DLayer.html +5 -5
- package/documention/Symbol3DVerticalOffset.html +5 -5
- package/documention/TerrainCacheLayer.html +14 -14
- package/documention/TextSymbol.html +5 -5
- package/documention/TextSymbol3DLayer.html +5 -5
- package/documention/TileLayer.html +14 -14
- package/documention/UnknownLayer.html +14 -14
- package/documention/VectorTileGroupSubLayer.html +14 -14
- package/documention/VectorTileLayer.html +14 -14
- package/documention/VectorTileSubLayer.html +14 -14
- package/documention/WFSLayer.html +14 -14
- package/documention/WMSLayer.html +14 -14
- package/documention/WMSSubLayer.html +14 -14
- package/documention/WMTSLayer.html +14 -14
- package/documention/WMTSSubLayer.html +14 -14
- package/documention/WaterSymbol3DLayer.html +5 -5
- package/documention/WebTileLayer.html +14 -14
- package/documention/index.html +38 -38
- package/package.json +1 -1
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
</tr>
|
|
318
318
|
|
|
319
319
|
<tr class="deep-level-0">
|
|
320
|
-
<td class="name"><code><a href="#
|
|
320
|
+
<td class="name"><code><a href="#extendProps">extendProps</a></code></td>
|
|
321
321
|
<td class="name">
|
|
322
322
|
<code>
|
|
323
323
|
|
|
@@ -331,11 +331,11 @@
|
|
|
331
331
|
|
|
332
332
|
</code>
|
|
333
333
|
</td>
|
|
334
|
-
<td class="name"><code><p
|
|
334
|
+
<td class="name"><code><p>初始化当前图层对象上不支持的属性,二次开发用户希望挂在图层对像上的属性可以存储到该属性中</p></code></td>
|
|
335
335
|
</tr>
|
|
336
336
|
|
|
337
337
|
<tr class="deep-level-0">
|
|
338
|
-
<td class="name"><code><a href="#
|
|
338
|
+
<td class="name"><code><a href="#extensionOptions">extensionOptions</a></code></td>
|
|
339
339
|
<td class="name">
|
|
340
340
|
<code>
|
|
341
341
|
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
|
|
350
350
|
</code>
|
|
351
351
|
</td>
|
|
352
|
-
<td class="name"><code><p
|
|
352
|
+
<td class="name"><code><p>初始化图层的额外参数,可以通过该参数传入引擎原生的构造参数</p></code></td>
|
|
353
353
|
</tr>
|
|
354
354
|
|
|
355
355
|
<tr class="deep-level-0">
|
|
@@ -811,11 +811,11 @@
|
|
|
811
811
|
|
|
812
812
|
</span>
|
|
813
813
|
|
|
814
|
-
<h4 class="name" id="
|
|
815
|
-
<a class="href-link" href="#
|
|
814
|
+
<h4 class="name" id="extendProps">
|
|
815
|
+
<a class="href-link" href="#extendProps">#</a>
|
|
816
816
|
|
|
817
817
|
<span class="code-name">
|
|
818
|
-
|
|
818
|
+
extendProps
|
|
819
819
|
</span>
|
|
820
820
|
|
|
821
821
|
</h4>
|
|
@@ -824,7 +824,7 @@
|
|
|
824
824
|
|
|
825
825
|
|
|
826
826
|
<div class="description">
|
|
827
|
-
<p
|
|
827
|
+
<p>初始化当前图层对象上不支持的属性,二次开发用户希望挂在图层对像上的属性可以存储到该属性中</p>
|
|
828
828
|
</div>
|
|
829
829
|
|
|
830
830
|
|
|
@@ -840,7 +840,7 @@
|
|
|
840
840
|
|
|
841
841
|
<dt class="inherited-from">Inherited From:</dt>
|
|
842
842
|
<dd class="inherited-from"><ul class="dummy"><li>
|
|
843
|
-
<a goto="
|
|
843
|
+
<a goto="extendProps" link="SubLayer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SubLayer#extendProps" SubLayer.html#extendProps>SubLayer#extendProps</a>
|
|
844
844
|
</li></ul></dd>
|
|
845
845
|
|
|
846
846
|
|
|
@@ -896,11 +896,11 @@
|
|
|
896
896
|
|
|
897
897
|
</span>
|
|
898
898
|
|
|
899
|
-
<h4 class="name" id="
|
|
900
|
-
<a class="href-link" href="#
|
|
899
|
+
<h4 class="name" id="extensionOptions">
|
|
900
|
+
<a class="href-link" href="#extensionOptions">#</a>
|
|
901
901
|
|
|
902
902
|
<span class="code-name">
|
|
903
|
-
|
|
903
|
+
extensionOptions
|
|
904
904
|
</span>
|
|
905
905
|
|
|
906
906
|
</h4>
|
|
@@ -909,7 +909,7 @@
|
|
|
909
909
|
|
|
910
910
|
|
|
911
911
|
<div class="description">
|
|
912
|
-
<p
|
|
912
|
+
<p>初始化图层的额外参数,可以通过该参数传入引擎原生的构造参数</p>
|
|
913
913
|
</div>
|
|
914
914
|
|
|
915
915
|
|
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
|
|
926
926
|
<dt class="inherited-from">Inherited From:</dt>
|
|
927
927
|
<dd class="inherited-from"><ul class="dummy"><li>
|
|
928
|
-
<a goto="
|
|
928
|
+
<a goto="extensionOptions" link="SubLayer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SubLayer#extensionOptions" SubLayer.html#extensionOptions>SubLayer#extensionOptions</a>
|
|
929
929
|
</li></ul></dd>
|
|
930
930
|
|
|
931
931
|
|
|
@@ -2236,50 +2236,6 @@
|
|
|
2236
2236
|
<td class="name"><code><p>克隆方法</p></code></td>
|
|
2237
2237
|
</tr>
|
|
2238
2238
|
|
|
2239
|
-
<tr class="deep-level-0">
|
|
2240
|
-
<td class="name"><code><a href="#off">off</a></code></td>
|
|
2241
|
-
<td class="name">
|
|
2242
|
-
<code>
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
<span class="param-type">
|
|
2246
|
-
|
|
2247
|
-
Object
|
|
2248
|
-
|
|
2249
|
-
</span>
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
</code>
|
|
2255
|
-
</td>
|
|
2256
|
-
<td class="name"><code><p>移除事件<br/>
|
|
2257
|
-
示例如下:<br/>
|
|
2258
|
-
</code></td>
|
|
2259
|
-
</tr>
|
|
2260
|
-
|
|
2261
|
-
<tr class="deep-level-0">
|
|
2262
|
-
<td class="name"><code><a href="#on">on</a></code></td>
|
|
2263
|
-
<td class="name">
|
|
2264
|
-
<code>
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
<span class="param-type">
|
|
2268
|
-
|
|
2269
|
-
Object
|
|
2270
|
-
|
|
2271
|
-
</span>
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
</code>
|
|
2277
|
-
</td>
|
|
2278
|
-
<td class="name"><code><p>注册一个新的监听事件;<br/>
|
|
2279
|
-
示例如下:<br/>
|
|
2280
|
-
</code></td>
|
|
2281
|
-
</tr>
|
|
2282
|
-
|
|
2283
2239
|
<tr class="deep-level-0">
|
|
2284
2240
|
<td class="name"><code><a href="#reset">reset</a></code></td>
|
|
2285
2241
|
<td class="name">
|
|
@@ -2439,692 +2395,6 @@
|
|
|
2439
2395
|
|
|
2440
2396
|
|
|
2441
2397
|
|
|
2442
|
-
</div>
|
|
2443
|
-
|
|
2444
|
-
<div class="member">
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
<h4 class="name" id="off">
|
|
2449
|
-
<a class="href-link" href="#off">#</a>
|
|
2450
|
-
|
|
2451
|
-
<span class="code-name" id="off" style="font-size:30px">
|
|
2452
|
-
|
|
2453
|
-
off<span class="signature">(types<span class="signature-attributes">opt</span>, fn<span class="signature-attributes">opt</span>, context<span class="signature-attributes">opt</span>)</span>
|
|
2454
|
-
|
|
2455
|
-
</span>
|
|
2456
|
-
</h4>
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
<div class="description">
|
|
2461
|
-
<p>移除事件<br/>
|
|
2462
|
-
示例如下:<br/>
|
|
2463
|
-
<a href='#off1'>[1、移除一个事件的指定回调函数]</a><br/>
|
|
2464
|
-
<a href='#off2'>[2、移除一个事件的所有回调函数]</a><br/>
|
|
2465
|
-
<a href='#off3'>[3、移除多个事件的同一个指定的回调函数]</a><br/>
|
|
2466
|
-
<a href='#off4'>[4、移除多个指定事件的回调函数]</a><br/>
|
|
2467
|
-
<a href='#off5'>[5、删除时指定上下文 - types类型为字符串]</a><br/>
|
|
2468
|
-
<a href='#off6'>[6、删除时指定上下文 - types类型为对象]</a><br/></p>
|
|
2469
|
-
</div>
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
<h4>参数</h4>
|
|
2481
|
-
|
|
2482
|
-
<div class="table-container">
|
|
2483
|
-
<table class="params table">
|
|
2484
|
-
<thead>
|
|
2485
|
-
<tr>
|
|
2486
|
-
|
|
2487
|
-
<th>名称</th>
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
<th>类型</th>
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
<th class="last">描述</th>
|
|
2495
|
-
</tr>
|
|
2496
|
-
</thead>
|
|
2497
|
-
|
|
2498
|
-
<tbody>
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
<tr class="deep-level-0">
|
|
2503
|
-
|
|
2504
|
-
<td class="name"><code>types</code></td>
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
<td class="type">
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
<span class="param-type">
|
|
2511
|
-
|
|
2512
|
-
string
|
|
2513
|
-
|
|
2514
|
-
</span>
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
</td>
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
<td class="description last"><p>移除指定事件类型上绑定的回调函数<br/>
|
|
2524
|
-
当类型为字符串时,可以移除单个或多个事件类型绑定的回调函数,单个事件:"click",多个事件:以空格分割:"click double-click";<br/>
|
|
2525
|
-
当types为对象时,使用如下方式移除事件:{'click': onClickFun, 'mouse-move': onMouseMoveFun}</p></td>
|
|
2526
|
-
</tr>
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
<tr class="deep-level-0">
|
|
2534
|
-
|
|
2535
|
-
<td class="name"><code>fn</code></td>
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
<td class="type">
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
<span class="param-type">
|
|
2542
|
-
|
|
2543
|
-
function
|
|
2544
|
-
|
|
2545
|
-
</span>
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
</td>
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
<td class="description last"><p>事件回调函数,当types为字符串,且不指定要删除的回调函数时,删除该事件上的所有回调函数</p></td>
|
|
2555
|
-
</tr>
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
<tr class="deep-level-0">
|
|
2563
|
-
|
|
2564
|
-
<td class="name"><code>context</code></td>
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
<td class="type">
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
<span class="param-type">
|
|
2571
|
-
|
|
2572
|
-
Object
|
|
2573
|
-
|
|
2574
|
-
</span>
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
</td>
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
<td class="description last"><p>事件回调函数的this关键字将指向的对象</p></td>
|
|
2584
|
-
</tr>
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
</tbody>
|
|
2590
|
-
</table>
|
|
2591
|
-
</div>
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
<dl class="details">
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
<dt class="inherited-from">Inherited From:</dt>
|
|
2606
|
-
<dd class="inherited-from"><ul class="dummy"><li>
|
|
2607
|
-
<a goto="off" link="Evented.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Evented#off" Evented.html#off>Evented#off</a>
|
|
2608
|
-
</li></ul></dd>
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
</dl>
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
<div class='columns method-parameter'>
|
|
2655
|
-
<div class="column is-2"><label>返回值</label></div>
|
|
2656
|
-
<div class="column is-10">
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
<div class="columns">
|
|
2661
|
-
|
|
2662
|
-
<div class='param-desc column is-7'><p>当前实例</p></div>
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
<div class='column is-5 has-text-left'>
|
|
2666
|
-
<label>类型: </label>
|
|
2667
|
-
|
|
2668
|
-
<span class="param-type">
|
|
2669
|
-
|
|
2670
|
-
Object
|
|
2671
|
-
|
|
2672
|
-
</span>
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
</div>
|
|
2677
|
-
|
|
2678
|
-
</div>
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
</div>
|
|
2682
|
-
</div>
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
<h5>示例</h5>
|
|
2690
|
-
|
|
2691
|
-
<p class="code-caption"><h5 id='off1'>移除一个事件的指定回调函数</h5></p>
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
<pre class="prettyprint"><code>// 一个事件的回调函数
|
|
2695
|
-
const clickFunction = function (event) {
|
|
2696
|
-
console.log("点击事件:", event)
|
|
2697
|
-
}
|
|
2698
|
-
// 调用MapView或SceneView的off方法移除一个事件的回调函数
|
|
2699
|
-
view.off('click', clickFunction)</code></pre>
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
<p class="code-caption"><h5 id='off2'>移除一个事件的所有回调函数</h5></p>
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
<pre class="prettyprint"><code>// 一个事件的回调函数1
|
|
2706
|
-
const clickFunction1 = function (event) {
|
|
2707
|
-
console.log("点击事件1:", event)
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
|
-
// 一个事件的回调函数2
|
|
2711
|
-
const clickFunction2 = function (event) {
|
|
2712
|
-
console.log("点击事件2:", event)
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
// 调用MapView或SceneView的off方法移除一个事件的所有回调函数
|
|
2716
|
-
// 不指定回调函数,则移除该事件上的所有绑定的回调函数
|
|
2717
|
-
view.off('click')</code></pre>
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
<p class="code-caption"><h5 id='off3'>移除多个事件的同一个指定的回调函数</h5></p>
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
<pre class="prettyprint"><code>// 多个事件的同一个回调函数
|
|
2724
|
-
const eventFunction = function (event) {
|
|
2725
|
-
console.log("事件:", event)
|
|
2726
|
-
}
|
|
2727
|
-
// 调用MapView或SceneView的off方法移除多个事件的同一个指定的回调函数
|
|
2728
|
-
view.off('click double-click', eventFunction)</code></pre>
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
<p class="code-caption"><h5 id='off4'>移除多个指定事件的回调函数</h5></p>
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
<pre class="prettyprint"><code>// 一个事件的回调函数
|
|
2735
|
-
const clickFunction = function (event) {
|
|
2736
|
-
console.log("click事件:", event)
|
|
2737
|
-
}
|
|
2738
|
-
// 调用MapView或SceneView的off方法移除多个指定事件的回调函数
|
|
2739
|
-
view.off({
|
|
2740
|
-
// 移除click事件上一个指定的函数
|
|
2741
|
-
"click": clickFunction,
|
|
2742
|
-
// 移除double-click上所有指定的函数
|
|
2743
|
-
"double-click": undefined
|
|
2744
|
-
})</code></pre>
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
<p class="code-caption"><h5 id='off5'>删除时指定上下文 - types类型为字符串</h5></p>
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
<pre class="prettyprint"><code>// 一个事件的回调函数
|
|
2751
|
-
const clickFunction = function (event) {
|
|
2752
|
-
console.log("点击事件:", event)
|
|
2753
|
-
}
|
|
2754
|
-
// 调用MapView或SceneView的off方法移除一个事件的回调函数
|
|
2755
|
-
view.off('click', clickFunction, view)
|
|
2756
|
-
// 调用MapView或SceneView的off方法移除一个事件的所有回调函数
|
|
2757
|
-
view.off('click', undefined, view)</code></pre>
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
<p class="code-caption"><h5 id='off6'>删除时指定上下文 - types类型为对象</h5></p>
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
<pre class="prettyprint"><code>// 一个事件的回调函数
|
|
2764
|
-
const clickFunction = function (event) {
|
|
2765
|
-
console.log("click事件:", event)
|
|
2766
|
-
}
|
|
2767
|
-
// 调用MapView或SceneView的off方法移除多个指定事件的回调函数
|
|
2768
|
-
view.off({
|
|
2769
|
-
// 移除click事件上一个指定的函数
|
|
2770
|
-
"click": clickFunction,
|
|
2771
|
-
// 移除double-click上所有指定的函数
|
|
2772
|
-
"double-click": undefined
|
|
2773
|
-
}, view)</code></pre>
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
</div>
|
|
2778
|
-
|
|
2779
|
-
<div class="member">
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
<h4 class="name" id="on">
|
|
2784
|
-
<a class="href-link" href="#on">#</a>
|
|
2785
|
-
|
|
2786
|
-
<span class="code-name" id="on" style="font-size:30px">
|
|
2787
|
-
|
|
2788
|
-
on<span class="signature">(types<span class="signature-attributes">opt</span>, fn<span class="signature-attributes">opt</span>, context<span class="signature-attributes">opt</span>)</span>
|
|
2789
|
-
|
|
2790
|
-
</span>
|
|
2791
|
-
</h4>
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
<div class="description">
|
|
2796
|
-
<p>注册一个新的监听事件;<br/>
|
|
2797
|
-
示例如下:<br/>
|
|
2798
|
-
<a href='#event1'>[1、注册一个事件]</a><br/>
|
|
2799
|
-
<a href='#event2'>[2、一次注册多个事件 - 同一个回调函数]</a><br/>
|
|
2800
|
-
<a href='#event3'>[3、一次注册多个事件 - 分别指回调应函数]</a><br/>
|
|
2801
|
-
<a href='#event4'>[4、当types为字符串时 - 指定上下文]</a><br/>
|
|
2802
|
-
<a href='#event5'>[5、当types为对象时 - 指定上下文]</a><br/></p>
|
|
2803
|
-
</div>
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
<h4>参数</h4>
|
|
2815
|
-
|
|
2816
|
-
<div class="table-container">
|
|
2817
|
-
<table class="params table">
|
|
2818
|
-
<thead>
|
|
2819
|
-
<tr>
|
|
2820
|
-
|
|
2821
|
-
<th>名称</th>
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
<th>类型</th>
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
<th style="min-width: 100px;">默认值</th>
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
<th class="last">描述</th>
|
|
2831
|
-
</tr>
|
|
2832
|
-
</thead>
|
|
2833
|
-
|
|
2834
|
-
<tbody>
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
<tr class="deep-level-0">
|
|
2839
|
-
|
|
2840
|
-
<td class="name"><code>types</code></td>
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
<td class="type">
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
<span class="param-type">
|
|
2847
|
-
|
|
2848
|
-
String
|
|
2849
|
-
|
|
2850
|
-
</span>
|
|
2851
|
-
|
|
|
2852
|
-
|
|
2853
|
-
<span class="param-type">
|
|
2854
|
-
|
|
2855
|
-
Object
|
|
2856
|
-
|
|
2857
|
-
</span>
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
</td>
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
<td class="default">
|
|
2866
|
-
|
|
2867
|
-
null
|
|
2868
|
-
|
|
2869
|
-
</td>
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
<td class="description last"><p>事件类型<br/>
|
|
2873
|
-
当types为字符串时,可以定义单个或多个事件,单个事件:"click",多个事件:以空格分割:"click double-click";<br/>
|
|
2874
|
-
当types为对象时,使用如下方式指定事件:{'click': onClickFun, 'mouse-move': onMouseMoveFun}</p></td>
|
|
2875
|
-
</tr>
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
<tr class="deep-level-0">
|
|
2883
|
-
|
|
2884
|
-
<td class="name"><code>fn</code></td>
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
<td class="type">
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
<span class="param-type">
|
|
2891
|
-
|
|
2892
|
-
function
|
|
2893
|
-
|
|
2894
|
-
</span>
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
</td>
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
<td class="default">
|
|
2903
|
-
|
|
2904
|
-
null
|
|
2905
|
-
|
|
2906
|
-
</td>
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
<td class="description last"><p>事件回调函数</p></td>
|
|
2910
|
-
</tr>
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
<tr class="deep-level-0">
|
|
2918
|
-
|
|
2919
|
-
<td class="name"><code>context</code></td>
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
<td class="type">
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
<span class="param-type">
|
|
2926
|
-
|
|
2927
|
-
Object
|
|
2928
|
-
|
|
2929
|
-
</span>
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
</td>
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
<td class="default">
|
|
2938
|
-
|
|
2939
|
-
null
|
|
2940
|
-
|
|
2941
|
-
</td>
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
<td class="description last"><p>事件回调函数的this关键字将指向的对象</p></td>
|
|
2945
|
-
</tr>
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
</tbody>
|
|
2951
|
-
</table>
|
|
2952
|
-
</div>
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
<dl class="details">
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
<dt class="inherited-from">Inherited From:</dt>
|
|
2967
|
-
<dd class="inherited-from"><ul class="dummy"><li>
|
|
2968
|
-
<a goto="on" link="Evented.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Evented#on" Evented.html#on>Evented#on</a>
|
|
2969
|
-
</li></ul></dd>
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
</dl>
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
<div class='columns method-parameter'>
|
|
3016
|
-
<div class="column is-2"><label>返回值</label></div>
|
|
3017
|
-
<div class="column is-10">
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
<div class="columns">
|
|
3022
|
-
|
|
3023
|
-
<div class='param-desc column is-7'><p>当前实例</p></div>
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
<div class='column is-5 has-text-left'>
|
|
3027
|
-
<label>类型: </label>
|
|
3028
|
-
|
|
3029
|
-
<span class="param-type">
|
|
3030
|
-
|
|
3031
|
-
Object
|
|
3032
|
-
|
|
3033
|
-
</span>
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
</div>
|
|
3038
|
-
|
|
3039
|
-
</div>
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
</div>
|
|
3043
|
-
</div>
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
<h5>示例</h5>
|
|
3051
|
-
|
|
3052
|
-
<p class="code-caption"><h5 id='event1'>注册一个事件</h5></p>
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
<pre class="prettyprint"><code>// 初始化一个点击事件回调函数
|
|
3056
|
-
const clickFunction = function (event) {
|
|
3057
|
-
console.log("点击事件:", event)
|
|
3058
|
-
}
|
|
3059
|
-
// 调用MapView或SceneView的on方法注册一个点击事件
|
|
3060
|
-
view.on('click', clickFunction)</code></pre>
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
<p class="code-caption"><h5 id='event2'>一次注册多个事件 - 同一个回调函数</h5></p>
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
<pre class="prettyprint"><code>// 初始化一个事件回调函数
|
|
3067
|
-
const eventFunction = function (event) {
|
|
3068
|
-
console.log("事件:", event)
|
|
3069
|
-
}
|
|
3070
|
-
|
|
3071
|
-
// 调用MapView或SceneView的on方法注册多个事件
|
|
3072
|
-
// 多个事件类型使用同一个回调函数
|
|
3073
|
-
view.on('click right-click-down', eventFunction)</code></pre>
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
<p class="code-caption"><h5 id='event3'>一次注册多个事件 - 分别指回调应函数</h5></p>
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
<pre class="prettyprint"><code>// 初始化一个左键点击事件回调函数
|
|
3080
|
-
const clickFunction = function (event) {
|
|
3081
|
-
console.log("click事件:", event)
|
|
3082
|
-
}
|
|
3083
|
-
|
|
3084
|
-
// 初始化一个右键按下事件回调函数
|
|
3085
|
-
const rightClickFunction = function (event) {
|
|
3086
|
-
console.log("right-click-down事件:", event)
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
// 调用MapView或SceneView的on方法注册多个事件
|
|
3090
|
-
// 每一个事件类型,使用单独的回调函数
|
|
3091
|
-
// 注意使用此种方式,一种类型的事件仅能指定一个回调函数
|
|
3092
|
-
view.on({
|
|
3093
|
-
"click": clickFunction,
|
|
3094
|
-
"right-click-down": rightClickFunction
|
|
3095
|
-
})</code></pre>
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
<p class="code-caption"><h5 id='event4'>指定上下文 - types类型为字符串</h5></p>
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
<pre class="prettyprint"><code>// 初始化一个点击事件回调函数
|
|
3102
|
-
const clickFunction = function (event) {
|
|
3103
|
-
console.log("点击事件:", event)
|
|
3104
|
-
console.log("上下文对象:", this)
|
|
3105
|
-
}
|
|
3106
|
-
// 调用MapView或SceneView的on方法注册一个点击事件
|
|
3107
|
-
// 指定view为回调函数的上下文对象
|
|
3108
|
-
view.on('click', clickFunction, view)</code></pre>
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
<p class="code-caption"><h5 id='event5'>指定上下文 - types类型为对象</h5></p>
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
<pre class="prettyprint"><code>// 初始化一个点击事件回调函数
|
|
3115
|
-
const clickFunction = function (event) {
|
|
3116
|
-
console.log("点击事件:", event)
|
|
3117
|
-
console.log("上下文对象:", this)
|
|
3118
|
-
}
|
|
3119
|
-
// 调用MapView或SceneView的on方法注册一个点击事件
|
|
3120
|
-
// 指定view为回调函数的上下文对象
|
|
3121
|
-
view.on({
|
|
3122
|
-
"click": clickFunction,
|
|
3123
|
-
"right-click-down": clickFunction
|
|
3124
|
-
}, view)</code></pre>
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
2398
|
</div>
|
|
3129
2399
|
|
|
3130
2400
|
<div class="member">
|