@@ -75,6 +75,7 @@ const MAP_EVENTS = [
7575 */
7676
7777/**
78+ * @version 12.1.1
7879 * @typedef {Object } VideoMap.VideoTimeParameters - 动态视频配准参数(按视频时间动态更新相机位置)。
7980 * @property {number } time - 视频时间戳,单位秒。用于按视频播放时间匹配对应的相机参数。
8081 * @property {number } pitch - 相机俯仰角,单位:度。
@@ -217,7 +218,11 @@ export class VideoMap extends mapboxgl.Evented {
217218 has : ( target , property ) => Reflect . has ( target , property ) || ! ! ( target . map && property in target . map )
218219 } ) ;
219220 }
220-
221+ /**
222+ *
223+ *
224+ * @version 12.1.1
225+ */
221226 on ( type , layerIds , listener ) {
222227 if ( ! MAP_EVENTS . includes ( type ) || type === 'load' ) {
223228 return arguments . length === 2 ? super . on ( type , layerIds ) : super . on ( type , listener ) ;
@@ -383,6 +388,7 @@ export class VideoMap extends mapboxgl.Evented {
383388 }
384389
385390 /**
391+ * @private
386392 * @function VideoMap.prototype.updateAtTime
387393 * @description 使用视频时间更新相机参数并重新投影已添加的 GeoJSON 数据源。
388394 * @param {number } time - 视频时间,单位秒。
@@ -427,7 +433,8 @@ export class VideoMap extends mapboxgl.Evented {
427433 this . map . fire ( 'move' ) ;
428434 }
429435 /**
430- * @event VideoMap#videoparameterupdate
436+ * @version 12.1.1
437+ `* @event VideoMap#videoparameterupdate
431438 * @description 矢量要素重投影完成时触发。已打开的弹窗可监听此事件跟随要素位置更新。
432439 */
433440 this . fire ( 'videoparameterupdate' , { time : this . currentTime } ) ;
@@ -460,6 +467,7 @@ export class VideoMap extends mapboxgl.Evented {
460467 }
461468
462469 /**
470+ * @private
463471 * @function VideoMap.prototype.project
464472 * @description 将 EPSG:4326 经纬度投影到当前视频地图坐标后,再转换为屏幕像素坐标。
465473 * @param {mapboxgl.LngLat|Object|Array<number> } lngLat - EPSG:4326 坐标。
@@ -515,6 +523,7 @@ export class VideoMap extends mapboxgl.Evented {
515523
516524 /**
517525 * @function VideoMap.prototype.getVideoBounds
526+ * @version 12.1.1
518527 * @description 获取当前视频画面反投影到地面的覆盖多边形。
519528 * 顶点顺序为左上 → 右上 → 右下 → 左下;坐标为 EPSG:4326,经纬度,环自动闭合。
520529 * @param {Object } [options] - 参数。
@@ -570,7 +579,8 @@ export class VideoMap extends mapboxgl.Evented {
570579
571580 /**
572581 * @function VideoMap.prototype.play
573- * @description 播放视频。推荐使用 {@link VideoPlayControl} 提供圆形播放/暂停按钮。
582+ * @version 12.1.1
583+ * @description 播放视频。推荐使用 {@link VideoPlayControl} 提供圆形播放/暂停按钮。
574584 */
575585 play ( ) {
576586 if ( this . videoMapLayer ) {
@@ -580,6 +590,7 @@ export class VideoMap extends mapboxgl.Evented {
580590
581591 /**
582592 * @function VideoMap.prototype.pause
593+ * @version 12.1.1
583594 * @description 暂停视频。
584595 */
585596 pause ( ) {
@@ -590,6 +601,7 @@ export class VideoMap extends mapboxgl.Evented {
590601
591602 /**
592603 * @function VideoMap.prototype.paused
604+ * @version 12.1.1
593605 * @description 获取当前视频播放状态。返回 `true` 表示已暂停,返回 `false` 表示正在播放。
594606 * @returns {boolean } 视频是否暂停。
595607 */
@@ -599,9 +611,10 @@ export class VideoMap extends mapboxgl.Evented {
599611
600612 /**
601613 * @function VideoMap.prototype.addControl
602- * @description 向视频地图添加 MapboxGL 控件。若控件实现了 `setTarget` 且尚无目标,或实现了 `setVideoMap`,会自动注入当前 VideoMap。
614+ * @version 12.1.1
615+ * @description 向视频地图添加 MapboxGL 控件。若控件实现了 `setTarget` 且尚无目标,或实现了 `setVideoMap`,会自动注入当前 VideoMap。
603616 * @param {Object } control - MapboxGL IControl 控件。
604- * @param {string } [position] - MapboxGL 原生控件位置:`'top-left'` | `'top-right'` | `'bottom-left'` | `'bottom-right'`。
617+ * @param {string } [position] - MapboxGL 原生控件位置:`'top-left'` | `'top-right'` | `'bottom-left'` | `'bottom-right'`。
605618 * @returns {VideoMap } this。
606619 */
607620 addControl ( control , position ) {
@@ -615,6 +628,7 @@ export class VideoMap extends mapboxgl.Evented {
615628
616629 /**
617630 * @function VideoMap.prototype.removeControl
631+ * @version 12.1.1
618632 * @description 移除控件。
619633 * @param {Object } control - 已添加的控件。
620634 * @returns {VideoMap } this。
@@ -630,6 +644,7 @@ export class VideoMap extends mapboxgl.Evented {
630644
631645 /**
632646 * @function VideoMap.prototype.startDraw
647+ * @version 12.1.1
633648 * @description 开始点、线、面标绘。单击加点;线、面双击或调用 `finishDraw` 结束当前图形。坐标会转换为真实地理坐标,并随相机更新重投影。推荐使用 {@link VideoMapDrawControl} 提供工具条。
634649 * @param {string } type - 标绘类型,`'Point'` | `'LineString'` | `'Polygon'`。
635650 */
@@ -639,55 +654,64 @@ export class VideoMap extends mapboxgl.Evented {
639654
640655 /**
641656 * @event VideoMap#drawstart
657+ * @version 12.1.1
642658 * @description 开始标绘时触发。
643659 * @property {string } type - 标绘类型。
644660 */
645661
646662 /**
663+ * @version 12.1.1
647664 * @event VideoMap#drawcreate
648665 * @description 完成一个标绘要素时触发。
649666 * @property {Object } feature - 新增的 GeoJSON Feature。
650667 * @property {Object } data - 当前全部标绘结果。
651668 */
652669
653670 /**
671+ * @version 12.1.1
654672 * @event VideoMap#drawupdate
655673 * @description 标绘结果或绘制中的图形发生变化时触发,可用于同步到其它地图。
656674 * @property {Object } data - 已完成的 GeoJSON FeatureCollection。
657675 * @property {Object } live - 已完成图形加上当前草稿的 GeoJSON FeatureCollection。
658676 */
659677
660678 /**
679+ * @version 12.1.1
661680 * @event VideoMap#drawcancel
662681 * @description 取消当前标绘时触发。
663682 */
664683
665684 /**
685+ * @version 12.1.1
666686 * @event VideoMap#drawclear
667687 * @description 清空标绘结果时触发。
668688 */
669689
670690 /**
691+ * @version 12.1.1
671692 * @event VideoMap#drawmodechange
672693 * @description 绘制模式变化时触发。
673694 * @property {string } mode - UI 模式,`'simple_select'` | `'draw_point'` | `'draw_line_string'` | `'draw_polygon'`。
674695 * @property {string|null } type - GeoJSON 类型,`'Point'` | `'LineString'` | `'Polygon'` | `null`。
675696 */
676697
677698 /**
699+ * @version 12.1.1
678700 * @event VideoMap#drawselectionchange
679701 * @description 选中要素变化时触发,供后续要素编辑使用。
680702 * @property {Array } features - 当前选中的 GeoJSON Feature。
681703 */
682704
683705 /**
706+ * @version 12.1.1
684707 * @event VideoMap#drawdelete
685708 * @description 删除选中要素时触发。
686709 * @property {Array } features - 被删除的 GeoJSON Feature。
687710 * @property {Object } data - 删除后的全部标绘结果。
688711 */
689712
690713 /**
714+ * @version 12.1.1
691715 * @function VideoMap.prototype.finishDraw
692716 * @description 结束当前线或面标绘并保存图形。点标绘在单击时即完成,无需调用此方法。
693717 * @returns {Object|null } 完成的 GeoJSON Feature。
@@ -697,6 +721,7 @@ export class VideoMap extends mapboxgl.Evented {
697721 }
698722
699723 /**
724+ * @version 12.1.1
700725 * @function VideoMap.prototype.cancelDraw
701726 * @description 取消当前正在绘制的图形并退出标绘。
702727 */
@@ -707,6 +732,7 @@ export class VideoMap extends mapboxgl.Evented {
707732 }
708733
709734 /**
735+ * @version 12.1.1
710736 * @function VideoMap.prototype.clearDraw
711737 * @description 清空已标绘的点、线、面。
712738 */
@@ -717,6 +743,7 @@ export class VideoMap extends mapboxgl.Evented {
717743 }
718744
719745 /**
746+ * @version 12.1.1
720747 * @function VideoMap.prototype.getDrawData
721748 * @description 获取已标绘要素的 GeoJSON(经纬度,EPSG:4326)。
722749 * @returns {Object } GeoJSON FeatureCollection。
@@ -726,6 +753,7 @@ export class VideoMap extends mapboxgl.Evented {
726753 }
727754
728755 /**
756+ * @version 12.1.1
729757 * @function VideoMap.prototype.getDrawLiveData
730758 * @description 获取已完成标绘加上当前草稿的 GeoJSON(经纬度,EPSG:4326),可用于同步到真实地图。
731759 * @returns {Object } GeoJSON FeatureCollection。
@@ -735,6 +763,7 @@ export class VideoMap extends mapboxgl.Evented {
735763 }
736764
737765 /**
766+ * @version 12.1.1
738767 * @function VideoMap.prototype.getDrawMode
739768 * @description 获取当前标绘类型。未处于标绘状态时返回 `null`。
740769 * @returns {string|null } `'Point'` | `'LineString'` | `'Polygon'` | `null`。
@@ -744,6 +773,7 @@ export class VideoMap extends mapboxgl.Evented {
744773 }
745774
746775 /**
776+ * @version 12.1.1
747777 * @function VideoMap.prototype.getDrawUiMode
748778 * @description 获取当前绘制 UI 模式,对齐 mapbox-gl-draw。
749779 * @returns {string } `'simple_select'` | `'draw_point'` | `'draw_line_string'` | `'draw_polygon'`。
@@ -753,6 +783,7 @@ export class VideoMap extends mapboxgl.Evented {
753783 }
754784
755785 /**
786+ * @version 12.1.1
756787 * @function VideoMap.prototype.changeDrawMode
757788 * @description 切换绘制模式。`direct_select` 预留给后续顶点编辑,当前按选中处理。
758789 * @param {string } mode - `'simple_select'` | `'draw_point'` | `'draw_line_string'` | `'draw_polygon'` | `'direct_select'`。
@@ -763,6 +794,7 @@ export class VideoMap extends mapboxgl.Evented {
763794 }
764795
765796 /**
797+ * @version 12.1.1
766798 * @function VideoMap.prototype.deleteDraw
767799 * @description 删除标绘要素。不传 ids 时删除当前选中要素。
768800 * @param {string|Array<string> } [ids] - 要素 id。
@@ -773,6 +805,7 @@ export class VideoMap extends mapboxgl.Evented {
773805 }
774806
775807 /**
808+ * @version 12.1.1
776809 * @function VideoMap.prototype.getDrawSelected
777810 * @description 获取当前选中的标绘要素。
778811 * @returns {Object } GeoJSON FeatureCollection。
0 commit comments