@tarojs/components 4.0.0-beta.92 → 4.0.0-beta.94
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/LICENSE +8 -8
- package/README.md +1 -1
- package/dist/cjs/{index-f6805218.js → index-b873e40f.js} +45 -27
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/taro-ad-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-animation-video-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-animation-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-ar-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-audio-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-aweme-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-block-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-channel-live-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-channel-video-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-comment-detail-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-comment-list-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +2 -2
- package/dist/cjs/taro-contact-button-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-draggable-sheet-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-follow-swan-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-form-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-grid-builder-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-grid-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-label-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-lifestyle-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-like-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-list-builder-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-list-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-player-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-login-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-lottie-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-map-core.cjs.entry.js +1325 -6
- package/dist/cjs/taro-match-media-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-area-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-native-slot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-nested-scroll-body-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-nested-scroll-header-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-official-account-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-open-container-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-container-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-progress-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-pull-to-refresh-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-rtc-room-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-share-element-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-slider-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-slot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-snapshot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-span-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-sticky-header-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-sticky-section-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-switch-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-tab-item-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +2 -2
- package/dist/cjs/taro-tabs-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-text-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-video-control_3.cjs.entry.js +2 -2
- package/dist/cjs/taro-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
- package/dist/collection/components/map/map.js +1806 -4
- package/dist/collection/components/map/style/map.css +1 -0
- package/dist/components/index2.js +45 -27
- package/dist/components/taro-map-core.js +1349 -6
- package/dist/esm/{index-c3e4004b.js → index-b9522531.js} +45 -27
- package/dist/esm/loader.js +3 -3
- package/dist/esm/taro-ad-core.entry.js +1 -1
- package/dist/esm/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm/taro-animation-video-core.entry.js +1 -1
- package/dist/esm/taro-animation-view-core.entry.js +1 -1
- package/dist/esm/taro-ar-camera-core.entry.js +1 -1
- package/dist/esm/taro-audio-core.entry.js +1 -1
- package/dist/esm/taro-aweme-data-core.entry.js +1 -1
- package/dist/esm/taro-block-core.entry.js +1 -1
- package/dist/esm/taro-button-core.entry.js +2 -2
- package/dist/esm/taro-camera-core.entry.js +1 -1
- package/dist/esm/taro-canvas-core.entry.js +1 -1
- package/dist/esm/taro-channel-live-core.entry.js +1 -1
- package/dist/esm/taro-channel-video-core.entry.js +1 -1
- package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm/taro-comment-detail-core.entry.js +1 -1
- package/dist/esm/taro-comment-list-core.entry.js +1 -1
- package/dist/esm/taro-components.js +3 -3
- package/dist/esm/taro-contact-button-core.entry.js +1 -1
- package/dist/esm/taro-cover-image-core.entry.js +1 -1
- package/dist/esm/taro-cover-view-core.entry.js +2 -2
- package/dist/esm/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm/taro-draggable-sheet-core.entry.js +1 -1
- package/dist/esm/taro-editor-core.entry.js +1 -1
- package/dist/esm/taro-follow-swan-core.entry.js +1 -1
- package/dist/esm/taro-form-core.entry.js +1 -1
- package/dist/esm/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm/taro-grid-builder-core.entry.js +1 -1
- package/dist/esm/taro-grid-view-core.entry.js +1 -1
- package/dist/esm/taro-icon-core.entry.js +2 -2
- package/dist/esm/taro-image-core.entry.js +2 -2
- package/dist/esm/taro-inline-payment-panel-core.entry.js +1 -1
- package/dist/esm/taro-input-core.entry.js +1 -1
- package/dist/esm/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm/taro-label-core.entry.js +1 -1
- package/dist/esm/taro-lifestyle-core.entry.js +1 -1
- package/dist/esm/taro-like-core.entry.js +1 -1
- package/dist/esm/taro-list-builder-core.entry.js +1 -1
- package/dist/esm/taro-list-view-core.entry.js +1 -1
- package/dist/esm/taro-live-player-core.entry.js +1 -1
- package/dist/esm/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm/taro-login-core.entry.js +1 -1
- package/dist/esm/taro-lottie-core.entry.js +1 -1
- package/dist/esm/taro-map-core.entry.js +1321 -6
- package/dist/esm/taro-match-media-core.entry.js +1 -1
- package/dist/esm/taro-movable-area-core_2.entry.js +1 -1
- package/dist/esm/taro-native-slot-core.entry.js +1 -1
- package/dist/esm/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm/taro-navigator-core.entry.js +2 -2
- package/dist/esm/taro-nested-scroll-body-core.entry.js +1 -1
- package/dist/esm/taro-nested-scroll-header-core.entry.js +1 -1
- package/dist/esm/taro-official-account-core.entry.js +1 -1
- package/dist/esm/taro-open-container-core.entry.js +1 -1
- package/dist/esm/taro-open-data-core.entry.js +1 -1
- package/dist/esm/taro-page-container-core.entry.js +1 -1
- package/dist/esm/taro-page-meta-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +2 -2
- package/dist/esm/taro-picker-view-column-core_2.entry.js +2 -2
- package/dist/esm/taro-progress-core.entry.js +1 -1
- package/dist/esm/taro-pull-to-refresh-core.entry.js +2 -2
- package/dist/esm/taro-radio-core_2.entry.js +1 -1
- package/dist/esm/taro-rich-text-core.entry.js +1 -1
- package/dist/esm/taro-root-portal-core.entry.js +1 -1
- package/dist/esm/taro-rtc-room-core.entry.js +1 -1
- package/dist/esm/taro-rtc-room-item-core.entry.js +1 -1
- package/dist/esm/taro-scroll-view-core.entry.js +2 -2
- package/dist/esm/taro-share-element-core.entry.js +1 -1
- package/dist/esm/taro-slider-core.entry.js +1 -1
- package/dist/esm/taro-slot-core.entry.js +1 -1
- package/dist/esm/taro-snapshot-core.entry.js +1 -1
- package/dist/esm/taro-span-core.entry.js +1 -1
- package/dist/esm/taro-sticky-header-core.entry.js +1 -1
- package/dist/esm/taro-sticky-section-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +2 -2
- package/dist/esm/taro-switch-core.entry.js +1 -1
- package/dist/esm/taro-tab-item-core.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +2 -2
- package/dist/esm/taro-tabs-core.entry.js +1 -1
- package/dist/esm/taro-text-core.entry.js +1 -1
- package/dist/esm/taro-textarea-core.entry.js +1 -1
- package/dist/esm/taro-video-control_3.entry.js +2 -2
- package/dist/esm/taro-view-core.entry.js +2 -2
- package/dist/esm/taro-voip-room-core.entry.js +1 -1
- package/dist/esm/taro-web-view-core.entry.js +1 -1
- package/dist/esm-es5/index-b9522531.js +7 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-ad-core.entry.js +1 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm-es5/taro-animation-video-core.entry.js +1 -1
- package/dist/esm-es5/taro-animation-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-ar-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-audio-core.entry.js +1 -1
- package/dist/esm-es5/taro-aweme-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-block-core.entry.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
- package/dist/esm-es5/taro-channel-live-core.entry.js +1 -1
- package/dist/esm-es5/taro-channel-video-core.entry.js +1 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-comment-detail-core.entry.js +1 -1
- package/dist/esm-es5/taro-comment-list-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-contact-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm-es5/taro-draggable-sheet-core.entry.js +1 -1
- package/dist/esm-es5/taro-editor-core.entry.js +1 -1
- package/dist/esm-es5/taro-follow-swan-core.entry.js +1 -1
- package/dist/esm-es5/taro-form-core.entry.js +1 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-grid-builder-core.entry.js +1 -1
- package/dist/esm-es5/taro-grid-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-icon-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-inline-payment-panel-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm-es5/taro-label-core.entry.js +1 -1
- package/dist/esm-es5/taro-lifestyle-core.entry.js +1 -1
- package/dist/esm-es5/taro-like-core.entry.js +1 -1
- package/dist/esm-es5/taro-list-builder-core.entry.js +1 -1
- package/dist/esm-es5/taro-list-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm-es5/taro-login-core.entry.js +1 -1
- package/dist/esm-es5/taro-lottie-core.entry.js +1 -1
- package/dist/esm-es5/taro-map-core.entry.js +1 -1
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-area-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-native-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-nested-scroll-body-core.entry.js +1 -1
- package/dist/esm-es5/taro-nested-scroll-header-core.entry.js +1 -1
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-container-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-progress-core.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh-core.entry.js +1 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-root-portal-core.entry.js +1 -1
- package/dist/esm-es5/taro-rtc-room-core.entry.js +1 -1
- package/dist/esm-es5/taro-rtc-room-item-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
- package/dist/esm-es5/taro-slider-core.entry.js +1 -1
- package/dist/esm-es5/taro-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-snapshot-core.entry.js +1 -1
- package/dist/esm-es5/taro-span-core.entry.js +1 -1
- package/dist/esm-es5/taro-sticky-header-core.entry.js +1 -1
- package/dist/esm-es5/taro-sticky-section-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-switch-core.entry.js +1 -1
- package/dist/esm-es5/taro-tab-item-core.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-tabs-core.entry.js +1 -1
- package/dist/esm-es5/taro-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
- package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
- package/dist/hydrate/index.js +1396 -33
- package/dist/taro-components/{p-7b3ce3af.system.entry.js → p-02465454.system.entry.js} +1 -1
- package/dist/taro-components/{p-62df5526.entry.js → p-02d4d104.entry.js} +1 -1
- package/dist/taro-components/{p-0f95be56.entry.js → p-03dc0283.entry.js} +1 -1
- package/dist/taro-components/{p-7f3d9184.entry.js → p-047e4bfe.entry.js} +1 -1
- package/dist/taro-components/{p-0044961f.system.entry.js → p-06adeb65.system.entry.js} +1 -1
- package/dist/taro-components/{p-ead6e57b.entry.js → p-078cb65e.entry.js} +1 -1
- package/dist/taro-components/{p-194ace03.system.entry.js → p-07ae6678.system.entry.js} +1 -1
- package/dist/taro-components/{p-7bc6aa36.entry.js → p-07f27474.entry.js} +1 -1
- package/dist/taro-components/{p-a997cf7c.system.entry.js → p-083c3147.system.entry.js} +1 -1
- package/dist/taro-components/{p-3430d520.system.entry.js → p-0a64f78c.system.entry.js} +1 -1
- package/dist/taro-components/p-0f2c1ecc.entry.js +1 -0
- package/dist/taro-components/{p-8b7e37c9.system.entry.js → p-0f480c38.system.entry.js} +1 -1
- package/dist/taro-components/{p-b655e854.system.entry.js → p-0fc790c0.system.entry.js} +1 -1
- package/dist/taro-components/{p-370cc947.entry.js → p-0ff5a55b.entry.js} +1 -1
- package/dist/taro-components/{p-19b04eb7.entry.js → p-12582166.entry.js} +1 -1
- package/dist/taro-components/{p-2f8ebd28.system.entry.js → p-12beb90a.system.entry.js} +1 -1
- package/dist/taro-components/{p-1d102ddb.system.entry.js → p-156e9634.system.entry.js} +1 -1
- package/dist/taro-components/p-160d710a.js +7 -0
- package/dist/taro-components/{p-46ccb393.system.entry.js → p-17938fa0.system.entry.js} +1 -1
- package/dist/taro-components/{p-e6a2f1bd.system.entry.js → p-17b9f865.system.entry.js} +1 -1
- package/dist/taro-components/{p-43932446.entry.js → p-17e72555.entry.js} +1 -1
- package/dist/taro-components/{p-e41ed824.system.entry.js → p-1bd4da3b.system.entry.js} +1 -1
- package/dist/taro-components/{p-f470ce9f.system.entry.js → p-1c37143a.system.entry.js} +1 -1
- package/dist/taro-components/{p-3e4b5391.system.entry.js → p-1eac5291.system.entry.js} +1 -1
- package/dist/taro-components/{p-5bfdb5f3.entry.js → p-1eea2828.entry.js} +1 -1
- package/dist/taro-components/{p-1acf7537.entry.js → p-204996e7.entry.js} +1 -1
- package/dist/taro-components/{p-d29a59cd.entry.js → p-26eb2f3f.entry.js} +1 -1
- package/dist/taro-components/{p-aed23034.system.entry.js → p-27041d86.system.entry.js} +1 -1
- package/dist/taro-components/{p-f0056aca.system.entry.js → p-27d372b4.system.entry.js} +1 -1
- package/dist/taro-components/{p-a6790f39.entry.js → p-280795f2.entry.js} +1 -1
- package/dist/taro-components/{p-16705ca9.entry.js → p-292470e5.entry.js} +1 -1
- package/dist/taro-components/{p-2ebc3182.entry.js → p-2d537212.entry.js} +1 -1
- package/dist/taro-components/{p-87b0d22f.entry.js → p-2f177716.entry.js} +1 -1
- package/dist/taro-components/{p-fe1dd94f.system.entry.js → p-3293c5d9.system.entry.js} +1 -1
- package/dist/taro-components/{p-12b967fd.entry.js → p-32c0f326.entry.js} +1 -1
- package/dist/taro-components/{p-80228985.entry.js → p-35dec732.entry.js} +1 -1
- package/dist/taro-components/{p-ae99551a.entry.js → p-38b29261.entry.js} +1 -1
- package/dist/taro-components/{p-756aa971.entry.js → p-3a180dc7.entry.js} +1 -1
- package/dist/taro-components/{p-970a4199.system.entry.js → p-3b36196b.system.entry.js} +1 -1
- package/dist/taro-components/{p-dc366f18.entry.js → p-3cf08137.entry.js} +1 -1
- package/dist/taro-components/{p-28bc8a48.entry.js → p-402c7f93.entry.js} +1 -1
- package/dist/taro-components/{p-4a748c0d.entry.js → p-425d1d69.entry.js} +1 -1
- package/dist/taro-components/{p-c0d93f74.entry.js → p-43367dd1.entry.js} +1 -1
- package/dist/taro-components/p-443b9a72.system.js +7 -0
- package/dist/taro-components/{p-cc993977.system.entry.js → p-443e31ab.system.entry.js} +1 -1
- package/dist/taro-components/{p-77e030e9.system.entry.js → p-450f7b39.system.entry.js} +1 -1
- package/dist/taro-components/{p-e23769c4.entry.js → p-4523b1c7.entry.js} +1 -1
- package/dist/taro-components/{p-4824cc94.entry.js → p-46a66c43.entry.js} +1 -1
- package/dist/taro-components/{p-ffaac078.system.entry.js → p-47790dc0.system.entry.js} +1 -1
- package/dist/taro-components/{p-618ee593.system.entry.js → p-4979e93c.system.entry.js} +1 -1
- package/dist/taro-components/{p-bdafd94c.system.entry.js → p-4a8b4d58.system.entry.js} +1 -1
- package/dist/taro-components/{p-eda34d91.system.entry.js → p-4ac48df1.system.entry.js} +1 -1
- package/dist/taro-components/{p-f782ee74.system.entry.js → p-4fad4beb.system.entry.js} +1 -1
- package/dist/taro-components/{p-e2694a79.system.entry.js → p-50849470.system.entry.js} +1 -1
- package/dist/taro-components/{p-4e63d3bd.entry.js → p-55e12654.entry.js} +1 -1
- package/dist/taro-components/{p-6f8926e3.entry.js → p-56552c9e.entry.js} +1 -1
- package/dist/taro-components/{p-c58627f4.entry.js → p-56a82bf3.entry.js} +1 -1
- package/dist/taro-components/{p-7b80637e.system.entry.js → p-57911e2c.system.entry.js} +1 -1
- package/dist/taro-components/{p-3eedb8d7.system.entry.js → p-57b77f17.system.entry.js} +1 -1
- package/dist/taro-components/{p-04f97133.system.entry.js → p-5884c108.system.entry.js} +1 -1
- package/dist/taro-components/{p-55934653.system.entry.js → p-5b9aa4b0.system.entry.js} +1 -1
- package/dist/taro-components/{p-5b86e66b.system.entry.js → p-5c156db3.system.entry.js} +1 -1
- package/dist/taro-components/{p-342a2594.entry.js → p-5c98f478.entry.js} +1 -1
- package/dist/taro-components/{p-829157b1.system.entry.js → p-61a325d2.system.entry.js} +1 -1
- package/dist/taro-components/{p-9f3e0019.system.entry.js → p-6282bdee.system.entry.js} +1 -1
- package/dist/taro-components/{p-fbb789a4.system.entry.js → p-65d11e99.system.entry.js} +1 -1
- package/dist/taro-components/{p-66029061.system.entry.js → p-6654374e.system.entry.js} +1 -1
- package/dist/taro-components/{p-aa11b00c.system.entry.js → p-6664a2ca.system.entry.js} +1 -1
- package/dist/taro-components/{p-0d8a0733.entry.js → p-68197378.entry.js} +1 -1
- package/dist/taro-components/p-6989c232.entry.js +1 -0
- package/dist/taro-components/{p-6c06b440.system.entry.js → p-6b83388c.system.entry.js} +1 -1
- package/dist/taro-components/{p-4621b303.system.entry.js → p-6ba08ce0.system.entry.js} +1 -1
- package/dist/taro-components/{p-0fe4660a.entry.js → p-6cc0bcb9.entry.js} +1 -1
- package/dist/taro-components/p-7163d09e.system.js +1 -0
- package/dist/taro-components/{p-e5b43c80.system.entry.js → p-75b4c1fc.system.entry.js} +1 -1
- package/dist/taro-components/{p-069ae782.system.entry.js → p-75ded8a0.system.entry.js} +1 -1
- package/dist/taro-components/{p-da4c4cad.entry.js → p-77e82dfa.entry.js} +1 -1
- package/dist/taro-components/{p-dde26531.entry.js → p-79cad66b.entry.js} +1 -1
- package/dist/taro-components/{p-f94c0445.system.entry.js → p-7ca2d075.system.entry.js} +1 -1
- package/dist/taro-components/{p-5a78fbdf.system.entry.js → p-7e054ae7.system.entry.js} +1 -1
- package/dist/taro-components/{p-b4047b11.entry.js → p-7e564b00.entry.js} +1 -1
- package/dist/taro-components/p-7e692c70.entry.js +1 -0
- package/dist/taro-components/{p-baea6a63.entry.js → p-7ebd4310.entry.js} +1 -1
- package/dist/taro-components/p-7fdbcf4d.entry.js +1 -0
- package/dist/taro-components/{p-11c0dc59.system.entry.js → p-8179438b.system.entry.js} +1 -1
- package/dist/taro-components/{p-3d423adc.entry.js → p-84998109.entry.js} +1 -1
- package/dist/taro-components/{p-3a3d40de.system.entry.js → p-855619b6.system.entry.js} +1 -1
- package/dist/taro-components/{p-e2a22cd1.entry.js → p-8b0c9d3f.entry.js} +1 -1
- package/dist/taro-components/{p-d12b6a84.system.entry.js → p-91ee1f8a.system.entry.js} +1 -1
- package/dist/taro-components/{p-8a6e93ed.entry.js → p-937a6c36.entry.js} +1 -1
- package/dist/taro-components/{p-90ee19f8.system.entry.js → p-938f9036.system.entry.js} +1 -1
- package/dist/taro-components/{p-4fcb258a.entry.js → p-93a2b2e9.entry.js} +1 -1
- package/dist/taro-components/p-93b02321.entry.js +1 -0
- package/dist/taro-components/p-9571836f.entry.js +1 -0
- package/dist/taro-components/{p-923aa1c8.system.entry.js → p-97b09fb4.system.entry.js} +1 -1
- package/dist/taro-components/{p-34ba9330.system.entry.js → p-9b6b17c4.system.entry.js} +1 -1
- package/dist/taro-components/{p-37bc198d.entry.js → p-9c8bb0e6.entry.js} +1 -1
- package/dist/taro-components/{p-36ea0ac1.system.entry.js → p-9e359fff.system.entry.js} +1 -1
- package/dist/taro-components/{p-b3419d7f.system.entry.js → p-9f53e26c.system.entry.js} +1 -1
- package/dist/taro-components/{p-cee51d71.system.entry.js → p-a25aca16.system.entry.js} +1 -1
- package/dist/taro-components/{p-d184903b.entry.js → p-a50c6736.entry.js} +1 -1
- package/dist/taro-components/{p-1087c51a.system.entry.js → p-a96f8f60.system.entry.js} +1 -1
- package/dist/taro-components/{p-4b5f75b9.system.entry.js → p-a9ca8247.system.entry.js} +1 -1
- package/dist/taro-components/p-aabac550.entry.js +1 -0
- package/dist/taro-components/{p-48a84765.entry.js → p-ac2be5f3.entry.js} +1 -1
- package/dist/taro-components/{p-b0f12e64.system.entry.js → p-ac714300.system.entry.js} +1 -1
- package/dist/taro-components/{p-b66dfc82.system.entry.js → p-ac9fb309.system.entry.js} +1 -1
- package/dist/taro-components/p-acb113bd.entry.js +1 -0
- package/dist/taro-components/{p-6ffc9bda.system.entry.js → p-b087ad2a.system.entry.js} +1 -1
- package/dist/taro-components/{p-317c4cad.entry.js → p-b1f80b6b.entry.js} +1 -1
- package/dist/taro-components/{p-99440bcc.system.entry.js → p-b4577a12.system.entry.js} +1 -1
- package/dist/taro-components/{p-fe8ee676.entry.js → p-b4c7bb48.entry.js} +1 -1
- package/dist/taro-components/{p-ec00e517.entry.js → p-ba11ef7d.entry.js} +1 -1
- package/dist/taro-components/{p-97177863.system.entry.js → p-ba5e7ec4.system.entry.js} +1 -1
- package/dist/taro-components/{p-49e9b2ff.entry.js → p-bb67318d.entry.js} +1 -1
- package/dist/taro-components/{p-92b7b545.entry.js → p-bd57edcd.entry.js} +1 -1
- package/dist/taro-components/{p-5b4de079.entry.js → p-be055537.entry.js} +1 -1
- package/dist/taro-components/{p-c0f16127.entry.js → p-be1701b2.entry.js} +1 -1
- package/dist/taro-components/{p-ba241824.system.entry.js → p-c056d527.system.entry.js} +1 -1
- package/dist/taro-components/{p-3a0a05fd.system.entry.js → p-c0c567e5.system.entry.js} +1 -1
- package/dist/taro-components/{p-f662c928.entry.js → p-c3dc7072.entry.js} +1 -1
- package/dist/taro-components/{p-6f1034a6.system.entry.js → p-c677414d.system.entry.js} +1 -1
- package/dist/taro-components/{p-fa9dbb6f.system.entry.js → p-c71d5745.system.entry.js} +1 -1
- package/dist/taro-components/{p-50b21f94.entry.js → p-c7836e2b.entry.js} +1 -1
- package/dist/taro-components/{p-55e54f2a.system.entry.js → p-c7d8c076.system.entry.js} +1 -1
- package/dist/taro-components/{p-8bde1f48.entry.js → p-c8cd6e16.entry.js} +1 -1
- package/dist/taro-components/{p-2d382d0e.entry.js → p-c95d2b90.entry.js} +1 -1
- package/dist/taro-components/{p-c863ac7f.system.entry.js → p-ca6a5916.system.entry.js} +1 -1
- package/dist/taro-components/{p-5c0f97d3.system.entry.js → p-cae6c5d0.system.entry.js} +1 -1
- package/dist/taro-components/{p-80fa706c.system.entry.js → p-cafbb3d9.system.entry.js} +1 -1
- package/dist/taro-components/{p-5f4c6ca5.entry.js → p-ccbaba23.entry.js} +1 -1
- package/dist/taro-components/{p-69e70cd5.system.entry.js → p-d05eb105.system.entry.js} +1 -1
- package/dist/taro-components/{p-19b993d8.system.entry.js → p-d2203687.system.entry.js} +1 -1
- package/dist/taro-components/{p-5dbabb65.entry.js → p-d5603857.entry.js} +1 -1
- package/dist/taro-components/{p-82d52f00.system.entry.js → p-d73b3a94.system.entry.js} +1 -1
- package/dist/taro-components/p-d87a68f6.entry.js +1 -0
- package/dist/taro-components/{p-7e3f0837.entry.js → p-d973d536.entry.js} +1 -1
- package/dist/taro-components/{p-b3129dec.entry.js → p-d9884371.entry.js} +1 -1
- package/dist/taro-components/{p-82c5b9d3.entry.js → p-dc08715a.entry.js} +1 -1
- package/dist/taro-components/{p-13bf0192.entry.js → p-dc25fa81.entry.js} +1 -1
- package/dist/taro-components/{p-5186ab96.system.entry.js → p-dcf5747c.system.entry.js} +1 -1
- package/dist/taro-components/{p-de1d495a.system.entry.js → p-ddf75d6a.system.entry.js} +1 -1
- package/dist/taro-components/{p-562eace8.system.entry.js → p-ded98693.system.entry.js} +1 -1
- package/dist/taro-components/{p-4ffae31c.entry.js → p-dedf50a9.entry.js} +1 -1
- package/dist/taro-components/{p-ee9d6467.system.entry.js → p-df7c6216.system.entry.js} +1 -1
- package/dist/taro-components/{p-b4707cdd.entry.js → p-e1cce2f1.entry.js} +1 -1
- package/dist/taro-components/{p-895982a4.entry.js → p-e2e7bc16.entry.js} +1 -1
- package/dist/taro-components/p-e3d825d1.system.entry.js +1 -0
- package/dist/taro-components/{p-111fadd7.system.entry.js → p-e5ef41f2.system.entry.js} +1 -1
- package/dist/taro-components/{p-6f3187bc.entry.js → p-e681d764.entry.js} +1 -1
- package/dist/taro-components/{p-b259a558.system.entry.js → p-e853a2c8.system.entry.js} +1 -1
- package/dist/taro-components/{p-e5a80896.system.entry.js → p-ebad862a.system.entry.js} +1 -1
- package/dist/taro-components/{p-b43fa9b0.entry.js → p-ebb1ae64.entry.js} +1 -1
- package/dist/taro-components/{p-a2f848cc.entry.js → p-f034a433.entry.js} +1 -1
- package/dist/taro-components/{p-c253be9f.entry.js → p-f12feb2a.entry.js} +1 -1
- package/dist/taro-components/{p-39b3e34d.entry.js → p-f168fffc.entry.js} +1 -1
- package/dist/taro-components/p-f367a754.entry.js +1 -0
- package/dist/taro-components/{p-0132e803.entry.js → p-f43f26cf.entry.js} +1 -1
- package/dist/taro-components/{p-15c1ce79.entry.js → p-f5f3a111.entry.js} +1 -1
- package/dist/taro-components/{p-13e80cf7.entry.js → p-f8f2461f.entry.js} +1 -1
- package/dist/taro-components/p-f9935901.system.entry.js +1 -0
- package/dist/taro-components/{p-019124ae.system.entry.js → p-fa31b2de.system.entry.js} +1 -1
- package/dist/taro-components/p-fab63183.entry.js +1 -0
- package/dist/taro-components/{p-93b39a89.system.entry.js → p-fbf13159.system.entry.js} +1 -1
- package/dist/taro-components/{p-f7198b67.system.entry.js → p-fe5eefdc.system.entry.js} +1 -1
- package/dist/taro-components/{p-adee7f1b.system.entry.js → p-feb89474.system.entry.js} +1 -1
- package/dist/taro-components/{p-76c0f443.entry.js → p-ff772345.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/taro-components/taro-components.js +1 -1
- package/dist/types/components/map/map.d.ts +145 -2
- package/dist/types/components.d.ts +214 -1
- package/lib/react/component-lib/index.d.ts +53 -53
- package/lib/react/component-lib/input.d.ts +1 -1
- package/lib/react/component-lib/input.js.map +1 -1
- package/lib/react/component-lib/reactify-wc.d.ts +1 -1
- package/lib/react/component-lib/reactify-wc.js.map +1 -1
- package/lib/react/components.d.ts +92 -92
- package/lib/react/components.js +2 -0
- package/lib/react/components.js.map +1 -1
- package/lib/react/helper.d.ts +4 -2
- package/lib/react/helper.js.map +1 -1
- package/lib/react/index.d.ts +1 -1
- package/lib/react/node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.18.0_tslib@2.6.2_typescript@5.4.5/node_modules/tslib/tslib.es6.js +373 -0
- package/lib/react/node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.18.0_tslib@2.6.2_typescript@5.4.5/node_modules/tslib/tslib.es6.js.map +1 -0
- package/lib/react/react-component-lib/createComponent.d.ts +3 -3
- package/lib/react/react-component-lib/createComponent.js +1 -1
- package/lib/react/react-component-lib/createComponent.js.map +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.d.ts +5 -5
- package/lib/react/react-component-lib/createOverlayComponent.js +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/lib/react/react-component-lib/index.d.ts +2 -2
- package/lib/react/{interfaces-f526f1a2.d.ts → react-component-lib/interfaces.d.ts} +4 -5
- package/lib/react/react-component-lib/utils/attachProps.d.ts +6 -6
- package/lib/react/react-component-lib/utils/attachProps.js +2 -2
- package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/lib/react/react-component-lib/utils/case.d.ts +2 -3
- package/lib/react/react-component-lib/utils/dev.d.ts +6 -0
- package/lib/react/react-component-lib/utils/index.d.ts +9 -10
- package/lib/react/react-component-lib/utils/index.js.map +1 -1
- package/lib/solid/component-lib/index.d.ts +53 -0
- package/lib/solid/component-lib/index.js +69 -0
- package/lib/solid/component-lib/index.js.map +1 -0
- package/lib/solid/components.d.ts +92 -0
- package/lib/solid/components.js +102 -0
- package/lib/solid/components.js.map +1 -0
- package/lib/solid/helper.d.ts +3 -0
- package/lib/solid/helper.js +7 -0
- package/lib/solid/helper.js.map +1 -0
- package/lib/solid/index.d.ts +1 -0
- package/lib/solid/solid-component-lib/createComponent.d.ts +10 -0
- package/lib/solid/solid-component-lib/createComponent.js +67 -0
- package/lib/solid/solid-component-lib/createComponent.js.map +1 -0
- package/lib/solid/solid-component-lib/index.d.ts +1 -0
- package/lib/solid/solid-component-lib/index.js +2 -0
- package/lib/solid/solid-component-lib/index.js.map +1 -0
- package/lib/solid/solid-component-lib/interfaces.d.ts +33 -0
- package/lib/solid/solid-component-lib/utils/case.d.ts +3 -0
- package/lib/solid/solid-component-lib/utils/case.js +6 -0
- package/lib/solid/solid-component-lib/utils/case.js.map +1 -0
- package/lib/solid/solid-component-lib/utils/element.d.ts +6 -0
- package/lib/solid/solid-component-lib/utils/element.js +48 -0
- package/lib/solid/solid-component-lib/utils/element.js.map +1 -0
- package/lib/solid/solid-component-lib/utils/index.d.ts +2 -0
- package/lib/solid/solid-component-lib/utils/index.js +3 -0
- package/lib/solid/solid-component-lib/utils/index.js.map +1 -0
- package/lib/vue3/component-lib/createComponent.d.ts +1 -2
- package/lib/vue3/component-lib/createFormsComponent.d.ts +1 -2
- package/lib/vue3/component-lib/createFormsComponent.js.map +1 -1
- package/lib/vue3/component-lib/forwardRef.d.ts +1 -2
- package/lib/vue3/component-lib/icon.d.ts +1 -1
- package/lib/vue3/component-lib/image.d.ts +1 -1
- package/lib/vue3/component-lib/index.d.ts +52 -53
- package/lib/vue3/component-lib/scroll-view.d.ts +1 -1
- package/lib/vue3/component-lib/scroll-view.js.map +1 -1
- package/lib/vue3/component-lib/text.d.ts +1 -1
- package/lib/vue3/components-loader.d.ts +1 -2
- package/lib/vue3/components-loader.js.map +1 -1
- package/lib/vue3/components.d.ts +91 -92
- package/lib/vue3/components.js +31 -1
- package/lib/vue3/components.js.map +1 -1
- package/lib/vue3/index.d.ts +1 -1
- package/lib/vue3/vue-component-lib/utils.d.ts +2 -3
- package/lib/vue3/vue-component-lib/utils.js.map +1 -1
- package/package.json +23 -15
- package/types/GridBuilder.d.ts +1 -1
- package/types/ListBuilder.d.ts +1 -1
- package/types/NestedScrollBody.d.ts +1 -1
- package/types/NestedScrollHeader.d.ts +1 -1
- package/types/OpenContainer.d.ts +3 -3
- package/dist/esm-es5/index-c3e4004b.js +0 -7
- package/dist/taro-components/p-25636983.entry.js +0 -1
- package/dist/taro-components/p-2ec68968.system.js +0 -7
- package/dist/taro-components/p-378b504c.entry.js +0 -1
- package/dist/taro-components/p-477f8fbd.system.js +0 -1
- package/dist/taro-components/p-4c30ea10.entry.js +0 -1
- package/dist/taro-components/p-518a9b73.entry.js +0 -1
- package/dist/taro-components/p-52ad5213.system.entry.js +0 -1
- package/dist/taro-components/p-6dd357b9.entry.js +0 -1
- package/dist/taro-components/p-751d42cb.entry.js +0 -1
- package/dist/taro-components/p-9f1b0ae1.entry.js +0 -1
- package/dist/taro-components/p-a0f42e7f.entry.js +0 -1
- package/dist/taro-components/p-d1a095bd.system.entry.js +0 -1
- package/dist/taro-components/p-d6bd1a5b.entry.js +0 -1
- package/dist/taro-components/p-de951a46.js +0 -7
- package/dist/taro-components/p-ed081b3d.entry.js +0 -1
- package/dist/taro-components/p-f9a13a5c.entry.js +0 -1
- package/lib/vue2/component-lib/components.d.ts +0 -111
- package/lib/vue2/component-lib/components.js +0 -74
- package/lib/vue2/component-lib/components.js.map +0 -1
- package/lib/vue2/component-lib/createComponent.d.ts +0 -14
- package/lib/vue2/component-lib/createComponent.js +0 -23
- package/lib/vue2/component-lib/createComponent.js.map +0 -1
- package/lib/vue2/component-lib/createFormsComponent.d.ts +0 -22
- package/lib/vue2/component-lib/createFormsComponent.js +0 -53
- package/lib/vue2/component-lib/createFormsComponent.js.map +0 -1
- package/lib/vue2/component-lib/icon.d.ts +0 -16
- package/lib/vue2/component-lib/icon.js +0 -23
- package/lib/vue2/component-lib/icon.js.map +0 -1
- package/lib/vue2/component-lib/image.d.ts +0 -16
- package/lib/vue2/component-lib/image.js +0 -24
- package/lib/vue2/component-lib/image.js.map +0 -1
- package/lib/vue2/component-lib/index.d.ts +0 -1
- package/lib/vue2/component-lib/index.js +0 -25
- package/lib/vue2/component-lib/index.js.map +0 -1
- package/lib/vue2/component-lib/mixins/listeners.d.ts +0 -6
- package/lib/vue2/component-lib/mixins/listeners.js +0 -14
- package/lib/vue2/component-lib/mixins/listeners.js.map +0 -1
- package/lib/vue2/component-lib/mixins/refs.d.ts +0 -5
- package/lib/vue2/component-lib/mixins/refs.js +0 -53
- package/lib/vue2/component-lib/mixins/refs.js.map +0 -1
- package/lib/vue2/component-lib/picker.d.ts +0 -25
- package/lib/vue2/component-lib/picker.js +0 -41
- package/lib/vue2/component-lib/picker.js.map +0 -1
- package/lib/vue2/component-lib/scroll-view.d.ts +0 -17
- package/lib/vue2/component-lib/scroll-view.js +0 -35
- package/lib/vue2/component-lib/scroll-view.js.map +0 -1
- package/lib/vue2/component-lib/text.d.ts +0 -16
- package/lib/vue2/component-lib/text.js +0 -24
- package/lib/vue2/component-lib/text.js.map +0 -1
- package/lib/vue2/components-loader.d.ts +0 -2
- package/lib/vue2/components-loader.js +0 -21
- package/lib/vue2/components-loader.js.map +0 -1
- package/lib/vue2/components.d.ts +0 -381
- package/lib/vue2/components.js +0 -605
- package/lib/vue2/components.js.map +0 -1
- package/lib/vue2/index.d.ts +0 -1
- package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue-fragment@1.6.0_vue@2.7.14/node_modules/vue-fragment/dist/vue-fragment.esm.js +0 -4
- package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue-fragment@1.6.0_vue@2.7.14/node_modules/vue-fragment/dist/vue-fragment.esm.js.map +0 -1
- package/lib/vue2/vue-component-lib/utils.d.ts +0 -10
- package/lib/vue2/vue-component-lib/utils.js +0 -51
- package/lib/vue2/vue-component-lib/utils.js.map +0 -1
- /package/dist/cjs/{index-5b029707.js → index-09efe07d.js} +0 -0
- /package/dist/esm/{index-ab3c86da.js → index-9924aee9.js} +0 -0
- /package/dist/esm-es5/{index-ab3c86da.js → index-9924aee9.js} +0 -0
- /package/dist/taro-components/{p-2b70c348.system.js → p-75d01c60.system.js} +0 -0
- /package/dist/taro-components/{p-dd7a128d.js → p-e62a1287.js} +0 -0
- /package/lib/{vue2 → solid}/index.js +0 -0
- /package/lib/{vue2 → solid}/index.js.map +0 -0
package/dist/hydrate/index.js
CHANGED
|
@@ -4943,6 +4943,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
4943
4943
|
|
|
4944
4944
|
|
|
4945
4945
|
var Taro = require('@tarojs/taro');
|
|
4946
|
+
var Hammer = require('hammerjs');
|
|
4946
4947
|
var SwiperJS = require('swiper/swiper-bundle.esm.js');
|
|
4947
4948
|
var runtime = require('@tarojs/runtime');
|
|
4948
4949
|
var resolvePathname = require('resolve-pathname');
|
|
@@ -4970,6 +4971,7 @@ function _interopNamespace(e) {
|
|
|
4970
4971
|
}
|
|
4971
4972
|
|
|
4972
4973
|
var Taro__default = /*#__PURE__*/_interopDefaultLegacy(Taro);
|
|
4974
|
+
var Hammer__default = /*#__PURE__*/_interopDefaultLegacy(Hammer);
|
|
4973
4975
|
var SwiperJS__default = /*#__PURE__*/_interopDefaultLegacy(SwiperJS);
|
|
4974
4976
|
var resolvePathname__default = /*#__PURE__*/_interopDefaultLegacy(resolvePathname);
|
|
4975
4977
|
|
|
@@ -6098,39 +6100,57 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
6098
6100
|
|
|
6099
6101
|
var hasOwn = {}.hasOwnProperty;
|
|
6100
6102
|
|
|
6101
|
-
function classNames() {
|
|
6102
|
-
var classes =
|
|
6103
|
+
function classNames () {
|
|
6104
|
+
var classes = '';
|
|
6103
6105
|
|
|
6104
6106
|
for (var i = 0; i < arguments.length; i++) {
|
|
6105
6107
|
var arg = arguments[i];
|
|
6106
|
-
if (
|
|
6107
|
-
|
|
6108
|
-
var argType = typeof arg;
|
|
6109
|
-
|
|
6110
|
-
if (argType === 'string' || argType === 'number') {
|
|
6111
|
-
classes.push(arg);
|
|
6112
|
-
} else if (Array.isArray(arg)) {
|
|
6113
|
-
if (arg.length) {
|
|
6114
|
-
var inner = classNames.apply(null, arg);
|
|
6115
|
-
if (inner) {
|
|
6116
|
-
classes.push(inner);
|
|
6117
|
-
}
|
|
6118
|
-
}
|
|
6119
|
-
} else if (argType === 'object') {
|
|
6120
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
6121
|
-
classes.push(arg.toString());
|
|
6122
|
-
continue;
|
|
6123
|
-
}
|
|
6124
|
-
|
|
6125
|
-
for (var key in arg) {
|
|
6126
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
6127
|
-
classes.push(key);
|
|
6128
|
-
}
|
|
6129
|
-
}
|
|
6108
|
+
if (arg) {
|
|
6109
|
+
classes = appendClass(classes, parseValue(arg));
|
|
6130
6110
|
}
|
|
6131
6111
|
}
|
|
6132
6112
|
|
|
6133
|
-
return classes
|
|
6113
|
+
return classes;
|
|
6114
|
+
}
|
|
6115
|
+
|
|
6116
|
+
function parseValue (arg) {
|
|
6117
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
6118
|
+
return arg;
|
|
6119
|
+
}
|
|
6120
|
+
|
|
6121
|
+
if (typeof arg !== 'object') {
|
|
6122
|
+
return '';
|
|
6123
|
+
}
|
|
6124
|
+
|
|
6125
|
+
if (Array.isArray(arg)) {
|
|
6126
|
+
return classNames.apply(null, arg);
|
|
6127
|
+
}
|
|
6128
|
+
|
|
6129
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
6130
|
+
return arg.toString();
|
|
6131
|
+
}
|
|
6132
|
+
|
|
6133
|
+
var classes = '';
|
|
6134
|
+
|
|
6135
|
+
for (var key in arg) {
|
|
6136
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
6137
|
+
classes = appendClass(classes, key);
|
|
6138
|
+
}
|
|
6139
|
+
}
|
|
6140
|
+
|
|
6141
|
+
return classes;
|
|
6142
|
+
}
|
|
6143
|
+
|
|
6144
|
+
function appendClass (value, newClass) {
|
|
6145
|
+
if (!newClass) {
|
|
6146
|
+
return value;
|
|
6147
|
+
}
|
|
6148
|
+
|
|
6149
|
+
if (value) {
|
|
6150
|
+
return value + ' ' + newClass;
|
|
6151
|
+
}
|
|
6152
|
+
|
|
6153
|
+
return value + newClass;
|
|
6134
6154
|
}
|
|
6135
6155
|
|
|
6136
6156
|
if (module.exports) {
|
|
@@ -6980,7 +7000,7 @@ class Icon {
|
|
|
6980
7000
|
|
|
6981
7001
|
const indexCss$h = "img[src=\"\"]{opacity:0}taro-image-core{width:320px;height:240px;font-size:0;display:inline-block;position:relative;overflow:hidden}.taro-img.taro-img__widthfix{height:100%}.taro-img__mode-scaletofill{width:100%;height:100%}.taro-img__mode-aspectfit{max-width:100%;max-height:100%}.taro-img__mode-aspectfill{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.taro-img__mode-aspectfill--width{min-width:100%;height:100%}.taro-img__mode-aspectfill--height{width:100%;min-height:100%}.taro-img__mode-widthfix{width:100%}.taro-img__mode-heightfix{height:100%}.taro-img__mode-top{width:100%}.taro-img__mode-bottom{width:100%;position:absolute;bottom:0}.taro-img__mode-left{height:100%}.taro-img__mode-right{height:100%;position:absolute;right:0}.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{position:absolute;bottom:0}.taro-img__mode-bottomright{position:absolute;bottom:0;right:0}";
|
|
6982
7002
|
|
|
6983
|
-
class Image {
|
|
7003
|
+
class Image$1 {
|
|
6984
7004
|
constructor(hostRef) {
|
|
6985
7005
|
registerInstance(this, hostRef);
|
|
6986
7006
|
this.onLoad = createEvent(this, "load", 7);
|
|
@@ -7494,20 +7514,1363 @@ class Lottie {
|
|
|
7494
7514
|
}; }
|
|
7495
7515
|
}
|
|
7496
7516
|
|
|
7517
|
+
const mapCss = ".BMap_cpyCtrl,.anchorBL img,.BMap_bubble_buttons{display:none}";
|
|
7518
|
+
|
|
7497
7519
|
class Map$1 {
|
|
7498
7520
|
constructor(hostRef) {
|
|
7499
7521
|
registerInstance(this, hostRef);
|
|
7522
|
+
this.onTap = createEvent(this, "tap", 7);
|
|
7523
|
+
this.currentRotation = 0;
|
|
7524
|
+
/* 获取当前地图中心的经纬度 */
|
|
7525
|
+
this._getCenterLocation = (option) => {
|
|
7526
|
+
// 遍历当前的覆盖物,找到之前添加的中心点图标并删除它
|
|
7527
|
+
this.map.getOverlays().forEach((overlay) => {
|
|
7528
|
+
if (overlay instanceof BMapGL.Marker && overlay.isCenterMarker) {
|
|
7529
|
+
this.map.removeOverlay(overlay);
|
|
7530
|
+
}
|
|
7531
|
+
});
|
|
7532
|
+
// 创建自定义图标并设置图标位置
|
|
7533
|
+
option.iconPath = 'https://img0.baidu.com/it/u=2604176863,3349829508&fm=253&fmt=auto&app=138&f=PNG?w=243&h=243';
|
|
7534
|
+
const icon = new BMapGL.Icon(option.iconPath, new BMapGL.Size(20, 30));
|
|
7535
|
+
// 将经纬度从BD09转换为GCJ02
|
|
7536
|
+
const gcj02Point = [this.longitude, this.latitude];
|
|
7537
|
+
const marker = new BMapGL.Marker(new BMapGL.Point(this.longitude, this.latitude), { icon });
|
|
7538
|
+
marker.isCenterMarker = true; // 标记该覆盖物是中心点图标
|
|
7539
|
+
// 添加新的图标
|
|
7540
|
+
this.map.addOverlay(marker);
|
|
7541
|
+
return gcj02Point;
|
|
7542
|
+
};
|
|
7543
|
+
/* 设置定位点图标,支持网络路径、本地路径、代码包路径 */
|
|
7544
|
+
this._setLocMarkerIcon = (option) => {
|
|
7545
|
+
// 创建自定义图标
|
|
7546
|
+
const icon = new BMapGL.Icon(option.iconPath, new BMapGL.Size(20, 30));
|
|
7547
|
+
// 创建定位点并设置图标
|
|
7548
|
+
const point = new BMapGL.Point(116.404, 39.915);
|
|
7549
|
+
const marker = new BMapGL.Marker(point, { icon });
|
|
7550
|
+
this.map.addOverlay(marker);
|
|
7551
|
+
};
|
|
7552
|
+
/* 平移marker,带动画 */
|
|
7553
|
+
this._translateMarker = (option) => {
|
|
7554
|
+
let latitude = option.destination.latitude;
|
|
7555
|
+
const longitude = option.destination.longitude;
|
|
7556
|
+
if (latitude < -80 && latitude >= -90) {
|
|
7557
|
+
latitude = option.destination.latitude + 10;
|
|
7558
|
+
}
|
|
7559
|
+
const destinationPoint = new BMapGL.Point(longitude, latitude);
|
|
7560
|
+
const obj = {
|
|
7561
|
+
flagId: true,
|
|
7562
|
+
flagCoordinate: true // 标记是否有有效经纬度
|
|
7563
|
+
};
|
|
7564
|
+
const animationEndResult = {
|
|
7565
|
+
errMsg: 'animationEnd:ok',
|
|
7566
|
+
};
|
|
7567
|
+
// 获取所有覆盖物
|
|
7568
|
+
const overlays = this.map.getOverlays();
|
|
7569
|
+
// 查找指定 id 的 Marker 对象
|
|
7570
|
+
const targetMarker = overlays.find((overlay) => overlay instanceof BMapGL.Marker && overlay.id === option.markerId);
|
|
7571
|
+
if (!targetMarker) {
|
|
7572
|
+
console.error(`Marker "${option.markerId}" not found.`);
|
|
7573
|
+
obj.flagId = false;
|
|
7574
|
+
return obj;
|
|
7575
|
+
}
|
|
7576
|
+
if (latitude > 90 || latitude < -90 || longitude > 180 || longitude < -180 || isNaN(latitude) || isNaN(longitude)) {
|
|
7577
|
+
obj.flagCoordinate = false;
|
|
7578
|
+
return obj;
|
|
7579
|
+
}
|
|
7580
|
+
// 计算平移步长
|
|
7581
|
+
const startLngLat = targetMarker.getPosition();
|
|
7582
|
+
const step = {
|
|
7583
|
+
lng: (destinationPoint.lng - startLngLat.lng) / (option.duration / 16),
|
|
7584
|
+
lat: (destinationPoint.lat - startLngLat.lat) / (option.duration / 16), // 每帧移动的纬度增量
|
|
7585
|
+
};
|
|
7586
|
+
// 计算旋转角度的步长
|
|
7587
|
+
const startRotation = targetMarker.getRotation(); // 获取起始旋转角度
|
|
7588
|
+
const targetRotation = option.rotate; // 设置目标旋转角度
|
|
7589
|
+
if (!this.currentRotation) {
|
|
7590
|
+
this.currentRotation = targetRotation;
|
|
7591
|
+
}
|
|
7592
|
+
else {
|
|
7593
|
+
this.currentRotation += targetRotation;
|
|
7594
|
+
}
|
|
7595
|
+
const rotationStep = (this.currentRotation - startRotation) / (option.duration / 16);
|
|
7596
|
+
// 执行平移动画
|
|
7597
|
+
let currentLngLat = startLngLat;
|
|
7598
|
+
let currentRotation = startRotation;
|
|
7599
|
+
if (!option.moveWithRotate && option.autoRotate) {
|
|
7600
|
+
let currentFrame = 0; // 用于平移动画的计数器
|
|
7601
|
+
// 执行平移动画
|
|
7602
|
+
const animationInterval = setInterval(() => {
|
|
7603
|
+
currentLngLat = new BMapGL.Point(currentLngLat.lng + step.lng, currentLngLat.lat + step.lat);
|
|
7604
|
+
targetMarker.setPosition(currentLngLat);
|
|
7605
|
+
currentFrame++;
|
|
7606
|
+
if (currentFrame >= option.duration / 16) {
|
|
7607
|
+
clearInterval(animationInterval);
|
|
7608
|
+
let rotationFrame = 0; // 用于旋转动画的计数器
|
|
7609
|
+
// 在到达目的地后执行旋转动画
|
|
7610
|
+
const rotationInterval = setInterval(() => {
|
|
7611
|
+
currentRotation += rotationStep;
|
|
7612
|
+
targetMarker.setRotation(currentRotation);
|
|
7613
|
+
rotationFrame++;
|
|
7614
|
+
if (rotationFrame >= option.duration / 16) {
|
|
7615
|
+
clearInterval(rotationInterval); // 清除旋转动画的定时器
|
|
7616
|
+
option === null || option === void 0 ? void 0 : option.animationEnd(animationEndResult);
|
|
7617
|
+
}
|
|
7618
|
+
}, 16);
|
|
7619
|
+
}
|
|
7620
|
+
}, 16);
|
|
7621
|
+
}
|
|
7622
|
+
else if (option.moveWithRotate && option.autoRotate) {
|
|
7623
|
+
let currentFrame = 0; // 定义局部变量
|
|
7624
|
+
const animationInterval = setInterval(() => {
|
|
7625
|
+
currentLngLat = new BMapGL.Point(currentLngLat.lng + step.lng, currentLngLat.lat + step.lat);
|
|
7626
|
+
targetMarker.setPosition(currentLngLat);
|
|
7627
|
+
currentRotation += rotationStep;
|
|
7628
|
+
targetMarker.setRotation(currentRotation);
|
|
7629
|
+
currentFrame++;
|
|
7630
|
+
if (currentFrame >= option.duration / 16) {
|
|
7631
|
+
clearInterval(animationInterval);
|
|
7632
|
+
option === null || option === void 0 ? void 0 : option.animationEnd(animationEndResult);
|
|
7633
|
+
}
|
|
7634
|
+
}, 16);
|
|
7635
|
+
}
|
|
7636
|
+
else if (option.moveWithRotate && !option.autoRotate) {
|
|
7637
|
+
let currentFrame = 0; // 定义局部变量
|
|
7638
|
+
const animationInterval = setInterval(() => {
|
|
7639
|
+
currentLngLat = new BMapGL.Point(currentLngLat.lng + step.lng, currentLngLat.lat + step.lat);
|
|
7640
|
+
targetMarker.setPosition(currentLngLat);
|
|
7641
|
+
currentFrame++;
|
|
7642
|
+
if (currentFrame >= option.duration / 16) {
|
|
7643
|
+
clearInterval(animationInterval);
|
|
7644
|
+
option === null || option === void 0 ? void 0 : option.animationEnd(animationEndResult);
|
|
7645
|
+
}
|
|
7646
|
+
}, 16);
|
|
7647
|
+
}
|
|
7648
|
+
return obj;
|
|
7649
|
+
};
|
|
7650
|
+
/* 缩放视野展示所有经纬度 */
|
|
7651
|
+
this._includePoints = (option) => {
|
|
7652
|
+
const bPoints = option.points.map((point) => new BMapGL.Point(point.longitude, point.latitude));
|
|
7653
|
+
const originalZoom = this.map.getZoom();
|
|
7654
|
+
const originalCenter = this.map.getCenter();
|
|
7655
|
+
const view = this.map.getViewport(bPoints);
|
|
7656
|
+
// 地图缩放后
|
|
7657
|
+
this.map.centerAndZoom(view.center, view.zoom);
|
|
7658
|
+
const bounds = this.map.getBounds();
|
|
7659
|
+
let flag = true;
|
|
7660
|
+
for (let i = 0; i < bPoints.length; i++) {
|
|
7661
|
+
if (!bounds.containsPoint(bPoints[i])) {
|
|
7662
|
+
this.map.centerAndZoom(originalCenter, originalZoom);
|
|
7663
|
+
flag = false;
|
|
7664
|
+
break;
|
|
7665
|
+
}
|
|
7666
|
+
}
|
|
7667
|
+
return flag;
|
|
7668
|
+
};
|
|
7669
|
+
/* 获取当前地图的视野范围 */
|
|
7670
|
+
this._getRegion = () => {
|
|
7671
|
+
// 获取地图当前视野范围
|
|
7672
|
+
const bounds = this.map.getBounds();
|
|
7673
|
+
const sw = bounds.getSouthWest(); // 西南角坐标
|
|
7674
|
+
const ne = bounds.getNorthEast(); // 东北角坐标
|
|
7675
|
+
return {
|
|
7676
|
+
southwest: { lat: sw.lat, lng: sw.lng },
|
|
7677
|
+
northeast: { lat: ne.lat, lng: ne.lng },
|
|
7678
|
+
};
|
|
7679
|
+
};
|
|
7680
|
+
/* 获取当前地图的旋转角 */
|
|
7681
|
+
this._getRotate = () => {
|
|
7682
|
+
// 获取地图当前旋转角度
|
|
7683
|
+
let rotation = this.rotate;
|
|
7684
|
+
if (rotation < 0 || rotation > 360) {
|
|
7685
|
+
rotation = 0;
|
|
7686
|
+
}
|
|
7687
|
+
return rotation;
|
|
7688
|
+
};
|
|
7689
|
+
/* 获取当前地图的倾斜角 */
|
|
7690
|
+
this._getSkew = () => {
|
|
7691
|
+
let Skew = this.skew;
|
|
7692
|
+
if (Skew < 0 || Skew > 40) {
|
|
7693
|
+
Skew = 0;
|
|
7694
|
+
}
|
|
7695
|
+
return Skew;
|
|
7696
|
+
};
|
|
7697
|
+
/* 获取当前地图的缩放级别 */
|
|
7698
|
+
this._getScale = () => {
|
|
7699
|
+
const Scale = this.scale;
|
|
7700
|
+
return Scale;
|
|
7701
|
+
};
|
|
7702
|
+
/* 设置地图中心点偏移,向后向下为增长 */
|
|
7703
|
+
this._setCenterOffset = (option) => {
|
|
7704
|
+
// 解构获取偏移量参数
|
|
7705
|
+
const [x, y] = option.offset;
|
|
7706
|
+
// 获取地图尺寸
|
|
7707
|
+
const mapSize = this.map.getSize();
|
|
7708
|
+
// 计算水平偏移量
|
|
7709
|
+
const offsetX = Math.max(0.25 * mapSize.width, Math.min(0.75 * mapSize.width, x * mapSize.width));
|
|
7710
|
+
// 计算垂直偏移量
|
|
7711
|
+
const offsetY = Math.max(0.25 * mapSize.height, Math.min(0.75 * mapSize.height, y * mapSize.height));
|
|
7712
|
+
// 创建像素坐标对象
|
|
7713
|
+
const pixel = new BMapGL.Pixel(offsetX, offsetY);
|
|
7714
|
+
// 将像素坐标转换为地理坐标
|
|
7715
|
+
const center = this.map.pixelToPoint(pixel);
|
|
7716
|
+
// 平移地图至指定中心点
|
|
7717
|
+
this.map.panTo(center);
|
|
7718
|
+
};
|
|
7719
|
+
/* 添加 marker */
|
|
7720
|
+
this._addMarkers = (option) => {
|
|
7721
|
+
if (option.clear) {
|
|
7722
|
+
// 清除地图上所有marker
|
|
7723
|
+
this.map.clearOverlays(this.markers);
|
|
7724
|
+
}
|
|
7725
|
+
option.markers.forEach((marker) => {
|
|
7726
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
7727
|
+
if (marker.latitude && marker.longitude && marker.iconPath) {
|
|
7728
|
+
const pt = new BMapGL.Point(marker.longitude, marker.latitude);
|
|
7729
|
+
const markerObj = new BMapGL.Marker(pt, { enableClicking: true });
|
|
7730
|
+
this.map.addOverlay(markerObj);
|
|
7731
|
+
markerObj.id = marker.id; // 设置标记点的唯一标识符
|
|
7732
|
+
markerObj.alpha = marker.alpha;
|
|
7733
|
+
if (marker.zIndex) {
|
|
7734
|
+
markerObj.setZIndex(marker.zIndex);
|
|
7735
|
+
}
|
|
7736
|
+
if (marker.width && marker.height && marker.iconPath) {
|
|
7737
|
+
const icon = new BMapGL.Icon(marker.iconPath, new BMapGL.Size(marker.width, marker.height));
|
|
7738
|
+
markerObj.setIcon(icon);
|
|
7739
|
+
}
|
|
7740
|
+
else if (marker.iconPath) {
|
|
7741
|
+
const img = new Image();
|
|
7742
|
+
img.src = marker.iconPath;
|
|
7743
|
+
img.style.opacity = String(marker.alpha);
|
|
7744
|
+
img.onload = () => {
|
|
7745
|
+
const iconSize = new BMapGL.Size(img.width, img.height);
|
|
7746
|
+
const icon = new BMapGL.Icon(img.src, iconSize);
|
|
7747
|
+
icon.imageOffset = new BMapGL.Size(0, 0, marker.alpha || 1);
|
|
7748
|
+
markerObj.setIcon(icon);
|
|
7749
|
+
};
|
|
7750
|
+
}
|
|
7751
|
+
else {
|
|
7752
|
+
console.error('没有找到iconPath图片路径');
|
|
7753
|
+
return;
|
|
7754
|
+
}
|
|
7755
|
+
const rotate = marker.rotate ? marker.rotate : 0;
|
|
7756
|
+
if (rotate) {
|
|
7757
|
+
markerObj.setRotation(rotate);
|
|
7758
|
+
}
|
|
7759
|
+
if (marker.anchor) {
|
|
7760
|
+
const offsetX = ((_b = (_a = marker.anchor) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0) * (marker.width || 0);
|
|
7761
|
+
const offsetY = ((_d = (_c = marker.anchor) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0) * (marker.height || 0);
|
|
7762
|
+
markerObj.setOffset(new BMapGL.Size(offsetX, offsetY));
|
|
7763
|
+
}
|
|
7764
|
+
// 创建title
|
|
7765
|
+
if (!marker.callout && marker.title) {
|
|
7766
|
+
const hammer = new Hammer__default['default'](this.mapRef); // 创建Hammer对象,绑定到地图容器
|
|
7767
|
+
hammer.on('tap', (e) => {
|
|
7768
|
+
// 使用tap事件替代click事件
|
|
7769
|
+
const touch = e.center;
|
|
7770
|
+
const x = touch.x;
|
|
7771
|
+
const y = touch.y;
|
|
7772
|
+
// 假设阈值为 10,表示点击距离小于 10 个像素时认为是点击到了标记点
|
|
7773
|
+
const threshold = 15;
|
|
7774
|
+
// 遍历标记点数组,计算触摸位置与每个标记点的距离
|
|
7775
|
+
option.markers.forEach((marker) => {
|
|
7776
|
+
// 通过class名获取地图容器
|
|
7777
|
+
const mapContainer = document.getElementsByClassName('bmap-container')[0];
|
|
7778
|
+
// 获取地图容器在屏幕上的偏移量
|
|
7779
|
+
const mapContainerRect = mapContainer.getBoundingClientRect();
|
|
7780
|
+
const mapOffsetX = mapContainerRect.left;
|
|
7781
|
+
const mapOffsetY = mapContainerRect.top;
|
|
7782
|
+
const point = new BMapGL.Point(marker.longitude, marker.latitude);
|
|
7783
|
+
const pixel = this.map.pointToPixel(point);
|
|
7784
|
+
const markerX = pixel.x + mapOffsetX;
|
|
7785
|
+
const markerY = pixel.y + mapOffsetY;
|
|
7786
|
+
// 计算触摸位置与标记点的距离
|
|
7787
|
+
const distance = Math.sqrt(Math.pow(x - markerX, 2) + Math.pow(y - markerY, 2));
|
|
7788
|
+
if (distance < threshold && marker.id === markerObj.id) {
|
|
7789
|
+
// 最近的标记点距离小于阈值,表示用户点击到了标记点
|
|
7790
|
+
const content = `<div style="text-align:center">${marker.title}</div>`;
|
|
7791
|
+
const infoWindow = new BMapGL.InfoWindow(content);
|
|
7792
|
+
this.map.openInfoWindow(infoWindow, pt);
|
|
7793
|
+
}
|
|
7794
|
+
});
|
|
7795
|
+
});
|
|
7796
|
+
}
|
|
7797
|
+
if (marker.callout) {
|
|
7798
|
+
const offsetX = ((_e = marker.callout) === null || _e === void 0 ? void 0 : _e.anchorX) ? (_f = marker.callout) === null || _f === void 0 ? void 0 : _f.anchorX : 0; // 横向偏移量
|
|
7799
|
+
const offsetY = ((_g = marker.callout) === null || _g === void 0 ? void 0 : _g.anchorY) ? (_h = marker.callout) === null || _h === void 0 ? void 0 : _h.anchorY : 0; // 纵向偏移量
|
|
7800
|
+
// 创建气泡(callout)对象
|
|
7801
|
+
const callout = new BMapGL.InfoWindow(`<div style="
|
|
7802
|
+
padding: ${(_j = marker.callout) === null || _j === void 0 ? void 0 : _j.padding}px;
|
|
7803
|
+
color:${(_k = marker.callout) === null || _k === void 0 ? void 0 : _k.color};
|
|
7804
|
+
text-align:${(_l = marker.callout) === null || _l === void 0 ? void 0 : _l.textAlign};"
|
|
7805
|
+
>
|
|
7806
|
+
<p style="font-size:${(_m = marker.callout) === null || _m === void 0 ? void 0 : _m.fontSize}px">${((_o = marker.callout) === null || _o === void 0 ? void 0 : _o.content) || ''}</p>
|
|
7807
|
+
</div>`, {
|
|
7808
|
+
width: 200,
|
|
7809
|
+
height: 100,
|
|
7810
|
+
offset: new BMapGL.Size(offsetX - 24, offsetY - 20), // 设置偏移量
|
|
7811
|
+
});
|
|
7812
|
+
// 自定义属性存储气泡(callout)对象
|
|
7813
|
+
markerObj.callout = callout;
|
|
7814
|
+
// 将气泡(callout)对象绑定到标记(marker)对象上
|
|
7815
|
+
this.map.addOverlay(markerObj);
|
|
7816
|
+
if (((_p = marker.callout) === null || _p === void 0 ? void 0 : _p.display) === 'ALWAYS') {
|
|
7817
|
+
markerObj.callout.disableCloseOnClick();
|
|
7818
|
+
const point = markerObj.getPosition(); // 获取marker标记点的位置
|
|
7819
|
+
markerObj.callout.addEventListener('open', function () {
|
|
7820
|
+
var _a, _b, _c, _d;
|
|
7821
|
+
console.log(markerObj.callout);
|
|
7822
|
+
const infoWindowElement = document.querySelector('.BMap_bubble_pop');
|
|
7823
|
+
if (infoWindowElement) {
|
|
7824
|
+
let triangle = infoWindowElement.querySelector('.triangle');
|
|
7825
|
+
if (!triangle) {
|
|
7826
|
+
// 如果不存在,则创建并添加新的三角形 div
|
|
7827
|
+
triangle = document.createElement('div');
|
|
7828
|
+
triangle.className = 'triangle'; // 添加一个类名以便日后查找
|
|
7829
|
+
infoWindowElement.appendChild(triangle);
|
|
7830
|
+
}
|
|
7831
|
+
const img = document.querySelector('.BMap_bubble_pop>img');
|
|
7832
|
+
if (img) {
|
|
7833
|
+
img.setAttribute('style', `position: absolute;transform: translate(-50%, 0); top: ${point.lat - 100}px; left: ${point.lng - 20}px;display:none`);
|
|
7834
|
+
}
|
|
7835
|
+
const backgroundcolor = (_a = marker.callout) === null || _a === void 0 ? void 0 : _a.bgColor;
|
|
7836
|
+
let borderWidth = ((_b = marker.callout) === null || _b === void 0 ? void 0 : _b.borderWidth) || 5;
|
|
7837
|
+
const borderColor = (_c = marker.callout) === null || _c === void 0 ? void 0 : _c.borderColor;
|
|
7838
|
+
const borderRadius = (_d = marker.callout) === null || _d === void 0 ? void 0 : _d.borderRadius;
|
|
7839
|
+
// 确保边框大小不超过15
|
|
7840
|
+
borderWidth = Math.min(borderWidth, 15);
|
|
7841
|
+
triangle.setAttribute('style', `width:0;height:0;border-left:${borderWidth}px solid transparent;border-right:${borderWidth}px solid transparent;border-top:${borderWidth}px solid ${borderColor};position:absolute;left:83px;bottom:-${2 * borderWidth}px`);
|
|
7842
|
+
infoWindowElement.setAttribute('style', `background-color:${backgroundcolor};top:${point.lat - 120}px; left:${point.lng - 100}px;position: absolute;border: ${borderWidth}px solid ${borderColor};border-radius:${borderRadius}px; `);
|
|
7843
|
+
}
|
|
7844
|
+
});
|
|
7845
|
+
this.map.openInfoWindow(markerObj.callout, pt);
|
|
7846
|
+
}
|
|
7847
|
+
else {
|
|
7848
|
+
const hammer = new Hammer__default['default'](this.mapRef); // 创建Hammer对象,绑定到地图容器
|
|
7849
|
+
hammer.on('tap', (e) => {
|
|
7850
|
+
// 使用tap事件替代click事件
|
|
7851
|
+
const touch = e.center;
|
|
7852
|
+
const x = touch.x;
|
|
7853
|
+
const y = touch.y;
|
|
7854
|
+
// 假设阈值为 10,表示点击距离小于 10 个像素时认为是点击到了标记点
|
|
7855
|
+
const threshold = 15;
|
|
7856
|
+
// 遍历标记点数组,计算触摸位置与每个标记点的距离
|
|
7857
|
+
option.markers.forEach((marker) => {
|
|
7858
|
+
// 通过class名获取地图容器
|
|
7859
|
+
const mapContainer = document.getElementsByClassName('bmap-container')[0];
|
|
7860
|
+
// 获取地图容器在屏幕上的偏移量
|
|
7861
|
+
const mapContainerRect = mapContainer.getBoundingClientRect();
|
|
7862
|
+
const mapOffsetX = mapContainerRect.left;
|
|
7863
|
+
const mapOffsetY = mapContainerRect.top;
|
|
7864
|
+
const point = new BMapGL.Point(marker.longitude, marker.latitude);
|
|
7865
|
+
const pixel = this.map.pointToPixel(point);
|
|
7866
|
+
const markerX = pixel.x + mapOffsetX;
|
|
7867
|
+
const markerY = pixel.y + mapOffsetY;
|
|
7868
|
+
// 计算触摸位置与标记点的距离
|
|
7869
|
+
const distance = Math.sqrt(Math.pow(x - markerX, 2) + Math.pow(y - markerY, 2));
|
|
7870
|
+
if (distance < threshold && marker.id === markerObj.id) {
|
|
7871
|
+
const point = markerObj.getPosition(); // 获取marker标记点的位置
|
|
7872
|
+
markerObj.callout.addEventListener('open', function () {
|
|
7873
|
+
var _a, _b, _c, _d;
|
|
7874
|
+
console.log(markerObj.callout);
|
|
7875
|
+
const infoWindowElement = document.querySelector('.BMap_bubble_pop');
|
|
7876
|
+
if (infoWindowElement) {
|
|
7877
|
+
let triangle = infoWindowElement.querySelector('.triangle');
|
|
7878
|
+
if (!triangle) {
|
|
7879
|
+
// 如果不存在,则创建并添加新的三角形 div
|
|
7880
|
+
triangle = document.createElement('div');
|
|
7881
|
+
triangle.className = 'triangle'; // 添加一个类名以便日后查找
|
|
7882
|
+
infoWindowElement.appendChild(triangle);
|
|
7883
|
+
}
|
|
7884
|
+
const img = document.querySelector('.BMap_bubble_pop>img');
|
|
7885
|
+
if (img) {
|
|
7886
|
+
img.setAttribute('style', `position: absolute;transform: translate(-50%, 0); top: ${point.lat - 100}px; left: ${point.lng - 20}px;display:none`);
|
|
7887
|
+
}
|
|
7888
|
+
const backgroundcolor = (_a = marker.callout) === null || _a === void 0 ? void 0 : _a.bgColor;
|
|
7889
|
+
let borderWidth = ((_b = marker.callout) === null || _b === void 0 ? void 0 : _b.borderWidth) || 5;
|
|
7890
|
+
const borderColor = (_c = marker.callout) === null || _c === void 0 ? void 0 : _c.borderColor;
|
|
7891
|
+
const borderRadius = (_d = marker.callout) === null || _d === void 0 ? void 0 : _d.borderRadius;
|
|
7892
|
+
// 确保边框大小不超过15
|
|
7893
|
+
borderWidth = Math.min(borderWidth, 15);
|
|
7894
|
+
triangle.setAttribute('style', `width:0;height:0;border-left:${borderWidth}px solid transparent;border-right:${borderWidth}px solid transparent;border-top:${borderWidth}px solid ${borderColor};position:absolute;left:83px;bottom:-${2 * borderWidth}px`);
|
|
7895
|
+
infoWindowElement.setAttribute('style', `background-color:${backgroundcolor};top:${point.lat - 120}px; left:${point.lng - 100}px;position: absolute;border: ${borderWidth}px solid ${borderColor};border-radius:${borderRadius}px; `);
|
|
7896
|
+
}
|
|
7897
|
+
});
|
|
7898
|
+
// 最近的标记点距离小于阈值,表示用户点击到了标记点
|
|
7899
|
+
this.map.openInfoWindow(markerObj.callout, pt);
|
|
7900
|
+
}
|
|
7901
|
+
else {
|
|
7902
|
+
markerObj.callout.enableCloseOnClick();
|
|
7903
|
+
// 用户点击到了地图上的其他位置,不是标记点
|
|
7904
|
+
}
|
|
7905
|
+
});
|
|
7906
|
+
});
|
|
7907
|
+
}
|
|
7908
|
+
}
|
|
7909
|
+
// 判断是否有label属性
|
|
7910
|
+
if (marker.label) {
|
|
7911
|
+
const labelContent = marker.label.content || '';
|
|
7912
|
+
const labelOpts = {
|
|
7913
|
+
position: pt,
|
|
7914
|
+
offset: new BMapGL.Size(marker.label.anchorX || 0, marker.label.anchorY || 0),
|
|
7915
|
+
};
|
|
7916
|
+
const label = new BMapGL.Label(labelContent, labelOpts);
|
|
7917
|
+
// 设置标签样式
|
|
7918
|
+
label.setStyle({
|
|
7919
|
+
color: marker.label.color,
|
|
7920
|
+
fontSize: marker.label.fontSize + 'px',
|
|
7921
|
+
borderWidth: marker.label.borderWidth + 'px',
|
|
7922
|
+
borderColor: marker.label.borderColor,
|
|
7923
|
+
borderRadius: marker.label.borderRadius + 'px',
|
|
7924
|
+
background: marker.label.bgColor,
|
|
7925
|
+
padding: marker.label.padding + 'px',
|
|
7926
|
+
});
|
|
7927
|
+
markerObj.setLabel(label);
|
|
7928
|
+
}
|
|
7929
|
+
}
|
|
7930
|
+
});
|
|
7931
|
+
};
|
|
7932
|
+
/* 移除 marker */
|
|
7933
|
+
this._removeMarkers = (option) => {
|
|
7934
|
+
// 获取所有覆盖物
|
|
7935
|
+
const overlays = this.map.getOverlays();
|
|
7936
|
+
let newTargetMarker = {};
|
|
7937
|
+
option.markerIds.forEach((id) => {
|
|
7938
|
+
// 查找指定 id 的 Marker 对象
|
|
7939
|
+
const targetMarker = overlays.find((overlay) => overlay instanceof BMapGL.Marker && String(overlay.id) === id);
|
|
7940
|
+
newTargetMarker = targetMarker;
|
|
7941
|
+
this.map.removeOverlay(targetMarker);
|
|
7942
|
+
});
|
|
7943
|
+
return newTargetMarker;
|
|
7944
|
+
};
|
|
7945
|
+
/* 沿指定路径移动 marker,用于轨迹回放等场景。动画完成时触发回调事件,若动画进行中,对同一 marker 再次调用 moveAlong 方法,前一次的动画将被打断 */
|
|
7946
|
+
this._moveAlong = (object) => {
|
|
7947
|
+
const path = object.path;
|
|
7948
|
+
const targetMarkerId = object.markerId;
|
|
7949
|
+
const duration = object.duration;
|
|
7950
|
+
const autoRotate = object.autoRotate;
|
|
7951
|
+
const targetMarker = this.map.getOverlays().find((overlay) => overlay instanceof BMapGL.Marker && overlay.id === targetMarkerId);
|
|
7952
|
+
const points = path.map((p) => new BMapGL.Point(p.longitude, p.latitude));
|
|
7953
|
+
const obj = {
|
|
7954
|
+
flagId: true,
|
|
7955
|
+
flagCoordinate: true // 标记是否有有效经纬度
|
|
7956
|
+
};
|
|
7957
|
+
if (!targetMarker) {
|
|
7958
|
+
console.error(`Marker "${targetMarkerId}" not found.`);
|
|
7959
|
+
obj.flagId = false;
|
|
7960
|
+
return obj;
|
|
7961
|
+
}
|
|
7962
|
+
for (let i = 0; i < points.length; i++) {
|
|
7963
|
+
const point = points[i];
|
|
7964
|
+
if (point.lat < -80 && point.lat >= -90) {
|
|
7965
|
+
point.lat += 10;
|
|
7966
|
+
}
|
|
7967
|
+
if (point.lng < -180 || point.lng > 180 || point.lat < -90 || point.lat > 90 || isNaN(point.lng) || isNaN(point.lat)) {
|
|
7968
|
+
obj.flagCoordinate = false;
|
|
7969
|
+
return obj;
|
|
7970
|
+
}
|
|
7971
|
+
}
|
|
7972
|
+
if (obj.flagId && obj.flagCoordinate) {
|
|
7973
|
+
const startTime = performance.now();
|
|
7974
|
+
const animate = (timestamp) => {
|
|
7975
|
+
const elapsedTime = timestamp - startTime;
|
|
7976
|
+
const progress = Math.min(elapsedTime / duration, 1);
|
|
7977
|
+
const currentPoint = this.getPointOnPath(points, progress);
|
|
7978
|
+
targetMarker.setPosition(currentPoint);
|
|
7979
|
+
if (autoRotate && progress < 1) {
|
|
7980
|
+
const nextPoint = this.getPointOnPath(points, Math.min(progress + 0.01, 1)); // 获取前进一点的点
|
|
7981
|
+
const rotation = this.calculateRotation(currentPoint, nextPoint);
|
|
7982
|
+
targetMarker.setRotation(rotation);
|
|
7983
|
+
}
|
|
7984
|
+
if (progress < 1) {
|
|
7985
|
+
requestAnimationFrame(animate);
|
|
7986
|
+
}
|
|
7987
|
+
else {
|
|
7988
|
+
// 动画结束
|
|
7989
|
+
targetMarker.setPosition(points[points.length - 1]); // 设置 marker 位置为路径的最后一个点
|
|
7990
|
+
targetMarker.setRotation(0); // 恢复旋转角度为0
|
|
7991
|
+
}
|
|
7992
|
+
};
|
|
7993
|
+
requestAnimationFrame(animate);
|
|
7994
|
+
}
|
|
7995
|
+
return obj;
|
|
7996
|
+
};
|
|
7997
|
+
this.getPointOnPath = (points, progress) => {
|
|
7998
|
+
const totalLength = this.calculateTotalLength(points);
|
|
7999
|
+
const targetLength = totalLength * progress;
|
|
8000
|
+
let currentLength = 0;
|
|
8001
|
+
for (let i = 0; i < points.length - 1; i++) {
|
|
8002
|
+
const segmentLength = this.map.getDistance(points[i], points[i + 1]);
|
|
8003
|
+
if (currentLength + segmentLength >= targetLength) {
|
|
8004
|
+
const ratio = (targetLength - currentLength) / segmentLength;
|
|
8005
|
+
const deltaX = points[i + 1].lng - points[i].lng;
|
|
8006
|
+
const deltaY = points[i + 1].lat - points[i].lat;
|
|
8007
|
+
const newLng = points[i].lng + deltaX * ratio;
|
|
8008
|
+
const newLat = points[i].lat + deltaY * ratio;
|
|
8009
|
+
return new BMapGL.Point(newLng, newLat);
|
|
8010
|
+
}
|
|
8011
|
+
currentLength += segmentLength;
|
|
8012
|
+
}
|
|
8013
|
+
// 如果进度超出路径长度,返回路径的最后一个点
|
|
8014
|
+
return points[points.length - 1];
|
|
8015
|
+
};
|
|
8016
|
+
this.calculateTotalLength = (points) => {
|
|
8017
|
+
let totalLength = 0;
|
|
8018
|
+
for (let i = 0; i < points.length - 1; i++) {
|
|
8019
|
+
totalLength += this.map.getDistance(points[i], points[i + 1]);
|
|
8020
|
+
}
|
|
8021
|
+
return totalLength;
|
|
8022
|
+
};
|
|
8023
|
+
this.calculateRotation = (currentPoint, nextPoint) => {
|
|
8024
|
+
const dx = nextPoint.lng - currentPoint.lng;
|
|
8025
|
+
const dy = nextPoint.lat - currentPoint.lat;
|
|
8026
|
+
let angle = Math.atan2(dy, dx) * (180 / Math.PI);
|
|
8027
|
+
angle = 90 - angle;
|
|
8028
|
+
return angle;
|
|
8029
|
+
};
|
|
8030
|
+
/* 创建自定义图片图层,图片会随着地图缩放而缩放 */
|
|
8031
|
+
this._addGroundOverlay = (option) => {
|
|
8032
|
+
const { src, opacity, bounds, visible, id, zIndex } = option;
|
|
8033
|
+
let flag = true;
|
|
8034
|
+
if (bounds.southwest.longitude >= bounds.northeast.longitude || bounds.southwest.latitude >= bounds.northeast.latitude) {
|
|
8035
|
+
flag = false;
|
|
8036
|
+
return;
|
|
8037
|
+
}
|
|
8038
|
+
if (bounds.southwest.latitude > 90 || bounds.southwest.latitude < -90 || bounds.southwest.longitude > 180 || bounds.southwest.longitude < -180 || isNaN(bounds.southwest.latitude) || isNaN(bounds.southwest.longitude)) {
|
|
8039
|
+
flag = false;
|
|
8040
|
+
return;
|
|
8041
|
+
}
|
|
8042
|
+
if (bounds.northeast.latitude > 90 || bounds.northeast.latitude < -90 || bounds.northeast.longitude > 180 || bounds.northeast.longitude < -180 || isNaN(bounds.northeast.latitude) || isNaN(bounds.northeast.longitude)) {
|
|
8043
|
+
flag = false;
|
|
8044
|
+
return;
|
|
8045
|
+
}
|
|
8046
|
+
// 创建覆盖物边界对象
|
|
8047
|
+
const overlayBounds = new BMapGL.Bounds(new BMapGL.Point(bounds.southwest.longitude, bounds.southwest.latitude), new BMapGL.Point(bounds.northeast.longitude, bounds.northeast.latitude));
|
|
8048
|
+
// 定义 GroundOverlay类
|
|
8049
|
+
function GroundOverlay(bounds, imageUrl, map, visible, opacity, zIndex, id) {
|
|
8050
|
+
this._bounds = bounds;
|
|
8051
|
+
this._imageUrl = imageUrl;
|
|
8052
|
+
this._map = map;
|
|
8053
|
+
this._visible = visible;
|
|
8054
|
+
this._opacity = opacity;
|
|
8055
|
+
this._zIndex = zIndex;
|
|
8056
|
+
this._id = id;
|
|
8057
|
+
}
|
|
8058
|
+
// 继承 BMapGL.Overlay
|
|
8059
|
+
GroundOverlay.prototype = new BMapGL.Overlay();
|
|
8060
|
+
// 初始化方法
|
|
8061
|
+
GroundOverlay.prototype.initialize = function (map) {
|
|
8062
|
+
// 移除已存在的元素
|
|
8063
|
+
if (document.getElementById(this._id)) {
|
|
8064
|
+
const element = document.getElementById(this._id);
|
|
8065
|
+
element === null || element === void 0 ? void 0 : element.remove();
|
|
8066
|
+
}
|
|
8067
|
+
this._map = map;
|
|
8068
|
+
if (!this._div) {
|
|
8069
|
+
// 创建 div 元素并设置样式
|
|
8070
|
+
const div = document.createElement('div');
|
|
8071
|
+
div.id = this._id;
|
|
8072
|
+
div.style.position = 'absolute';
|
|
8073
|
+
div.style.border = 'none';
|
|
8074
|
+
div.style.zIndex = this._zIndex;
|
|
8075
|
+
// 创建 img 元素并设置样式
|
|
8076
|
+
const img = document.createElement('img');
|
|
8077
|
+
img.src = this._imageUrl;
|
|
8078
|
+
// 确保opacity值在0到1之间
|
|
8079
|
+
const validOpacity = (this._opacity < 0) ? '1' : this._opacity;
|
|
8080
|
+
img.style.opacity = validOpacity;
|
|
8081
|
+
div.appendChild(img);
|
|
8082
|
+
this._div = div;
|
|
8083
|
+
}
|
|
8084
|
+
// 监听地图缩放事件,调整覆盖物尺寸
|
|
8085
|
+
map.addEventListener('zoomend', () => {
|
|
8086
|
+
const swPixel = map.pointToOverlayPixel(this._bounds.getSouthWest());
|
|
8087
|
+
const nePixel = map.pointToOverlayPixel(this._bounds.getNorthEast());
|
|
8088
|
+
const width = nePixel.x - swPixel.x;
|
|
8089
|
+
const height = swPixel.y - nePixel.y;
|
|
8090
|
+
this._div.style.width = width + 'px';
|
|
8091
|
+
this._div.style.height = height + 'px';
|
|
8092
|
+
const img = this._div.querySelector('img');
|
|
8093
|
+
img.style.width = width + 'px';
|
|
8094
|
+
img.style.height = height + 'px';
|
|
8095
|
+
});
|
|
8096
|
+
// 将 div 元素添加到地图覆盖物层
|
|
8097
|
+
map.getPanes().labelPane.appendChild(this._div);
|
|
8098
|
+
return this._div;
|
|
8099
|
+
};
|
|
8100
|
+
// 绘制方法
|
|
8101
|
+
GroundOverlay.prototype.draw = function () {
|
|
8102
|
+
// 设置 div 元素位置和尺寸
|
|
8103
|
+
const _northeast = {
|
|
8104
|
+
lat: option.bounds.northeast.latitude,
|
|
8105
|
+
lng: option.bounds.southwest.longitude
|
|
8106
|
+
};
|
|
8107
|
+
const position = this._map.pointToOverlayPixel(_northeast);
|
|
8108
|
+
this._div.style.left = position.x + 'px';
|
|
8109
|
+
this._div.style.top = position.y + 'px';
|
|
8110
|
+
const bounds = this._map.getBounds();
|
|
8111
|
+
const sw = this._map.pointToPixel(bounds.getSouthWest());
|
|
8112
|
+
const ne = this._map.pointToPixel(bounds.getNorthEast());
|
|
8113
|
+
const width = ne.x - sw.x;
|
|
8114
|
+
const height = ne.y - sw.y;
|
|
8115
|
+
const zoom = this._map.getZoom();
|
|
8116
|
+
const imageWidth = width * Math.pow(2, 18 - zoom);
|
|
8117
|
+
const imageHeight = height * Math.pow(2, 18 - zoom);
|
|
8118
|
+
this._div.style.width = imageWidth + 'px';
|
|
8119
|
+
this._div.style.height = imageHeight + 'px';
|
|
8120
|
+
this._div.style.display = this._visible ? 'block' : 'none';
|
|
8121
|
+
const validOpacity = (this._opacity < 0) ? '1' : this._opacity;
|
|
8122
|
+
this._div.getElementsByTagName('img')[0].style.opacity = validOpacity;
|
|
8123
|
+
};
|
|
8124
|
+
// 创建 GroundOverlay 实例
|
|
8125
|
+
const overlay = new GroundOverlay(overlayBounds, src, this.map, visible, opacity, zIndex, id);
|
|
8126
|
+
this.map.addOverlay(overlay);
|
|
8127
|
+
// 对所有覆盖物进行排序
|
|
8128
|
+
const overlays = this.map.getOverlays().sort((a, b) => a._zIndex - b._zIndex);
|
|
8129
|
+
this.groundOverlay = overlay;
|
|
8130
|
+
// 将所有覆盖物重新绘制
|
|
8131
|
+
overlays.forEach((overlay) => overlay.draw());
|
|
8132
|
+
const zoom = this.map.getZoom();
|
|
8133
|
+
if (zoom < 20) {
|
|
8134
|
+
this.map.setZoom(zoom + 1);
|
|
8135
|
+
this.map.setZoom(zoom);
|
|
8136
|
+
}
|
|
8137
|
+
else {
|
|
8138
|
+
this.map.setZoom(zoom - 1);
|
|
8139
|
+
this.map.setZoom(zoom);
|
|
8140
|
+
}
|
|
8141
|
+
return flag;
|
|
8142
|
+
};
|
|
8143
|
+
/* 更新自定义图片图层 */
|
|
8144
|
+
this._updateGroundOverlay = (option) => {
|
|
8145
|
+
const { src, opacity, bounds, visible, id, zIndex } = option;
|
|
8146
|
+
let obj;
|
|
8147
|
+
let flagId = true; // 标记是否有id
|
|
8148
|
+
let flagCoordinate = true; // 标记是否有有效经纬度
|
|
8149
|
+
let flagObj = {};
|
|
8150
|
+
// 获取所有图层
|
|
8151
|
+
const overlays = this.map.getOverlays();
|
|
8152
|
+
// 找到要更新的图层
|
|
8153
|
+
const targetOverlay = overlays.find((overlay) => overlay._id === id);
|
|
8154
|
+
if (!targetOverlay) {
|
|
8155
|
+
flagId = false;
|
|
8156
|
+
flagObj = {
|
|
8157
|
+
flagId: flagId,
|
|
8158
|
+
flagCoordinate: flagCoordinate
|
|
8159
|
+
};
|
|
8160
|
+
obj = Object.assign({}, flagObj);
|
|
8161
|
+
return obj;
|
|
8162
|
+
}
|
|
8163
|
+
if (bounds.southwest.longitude >= bounds.northeast.longitude || bounds.southwest.latitude >= bounds.northeast.latitude) {
|
|
8164
|
+
flagCoordinate = false;
|
|
8165
|
+
flagObj = {
|
|
8166
|
+
flagId: flagId,
|
|
8167
|
+
flagCoordinate: flagCoordinate
|
|
8168
|
+
};
|
|
8169
|
+
obj = Object.assign({}, flagObj);
|
|
8170
|
+
}
|
|
8171
|
+
if (bounds.southwest.latitude > 90 || bounds.southwest.latitude < -90 || bounds.southwest.longitude > 180 || bounds.southwest.longitude < -180 || isNaN(bounds.southwest.latitude) || isNaN(bounds.southwest.longitude)) {
|
|
8172
|
+
flagCoordinate = false;
|
|
8173
|
+
flagObj = {
|
|
8174
|
+
flagId: flagId,
|
|
8175
|
+
flagCoordinate: flagCoordinate
|
|
8176
|
+
};
|
|
8177
|
+
obj = Object.assign({}, flagObj);
|
|
8178
|
+
}
|
|
8179
|
+
if (bounds.northeast.latitude > 90 || bounds.northeast.latitude < -90 || bounds.northeast.longitude > 180 || bounds.northeast.longitude < -180 || isNaN(bounds.northeast.latitude) || isNaN(bounds.northeast.longitude)) {
|
|
8180
|
+
flagCoordinate = false;
|
|
8181
|
+
flagObj = {
|
|
8182
|
+
flagId: flagId,
|
|
8183
|
+
flagCoordinate: flagCoordinate
|
|
8184
|
+
};
|
|
8185
|
+
obj = Object.assign({}, flagObj);
|
|
8186
|
+
}
|
|
8187
|
+
if (flagId && flagCoordinate) {
|
|
8188
|
+
const targetBounds = new BMapGL.Bounds(new BMapGL.Point(bounds.southwest.longitude, bounds.southwest.latitude), new BMapGL.Point(bounds.northeast.longitude, bounds.northeast.latitude));
|
|
8189
|
+
const zoom = this.map.getZoom();
|
|
8190
|
+
if (targetOverlay) {
|
|
8191
|
+
// 更新DOM元素
|
|
8192
|
+
const element = document.getElementById(id);
|
|
8193
|
+
if (element) {
|
|
8194
|
+
const imgElement = element.querySelector('img');
|
|
8195
|
+
if (imgElement) {
|
|
8196
|
+
// 找到了对应的元素
|
|
8197
|
+
const validOpacity = (opacity < 0) ? '1' : opacity;
|
|
8198
|
+
element.style.opacity = validOpacity;
|
|
8199
|
+
imgElement.style.display = visible ? 'block' : 'none';
|
|
8200
|
+
element.style.zIndex = zIndex;
|
|
8201
|
+
// 加载图片
|
|
8202
|
+
const image = new Image();
|
|
8203
|
+
image.onload = () => {
|
|
8204
|
+
// 图片加载完成后执行
|
|
8205
|
+
imgElement.src = src; // 设置图片的src
|
|
8206
|
+
// 根据当前缩放级别设置图片宽高
|
|
8207
|
+
const lngSpan = targetBounds.getNorthEast().lng - targetBounds.getSouthWest().lng;
|
|
8208
|
+
const mapWidth = this.map.getSize().width; // 获取地图容器的宽度
|
|
8209
|
+
const updatedImageWidth = (mapWidth / Math.pow(2, 18 - zoom)) * lngSpan;
|
|
8210
|
+
const imageAspectRatio = image.naturalHeight / image.naturalWidth;
|
|
8211
|
+
const updatedImageHeight = updatedImageWidth * imageAspectRatio;
|
|
8212
|
+
imgElement.style.width = `${updatedImageWidth}px`;
|
|
8213
|
+
imgElement.style.height = `${updatedImageHeight}px`;
|
|
8214
|
+
// 重新绘制图层
|
|
8215
|
+
targetOverlay._bounds = targetBounds;
|
|
8216
|
+
targetOverlay.draw();
|
|
8217
|
+
// 更新完图片后,立即重绘地图
|
|
8218
|
+
this.map.panTo(this.map.getCenter());
|
|
8219
|
+
targetOverlay.draw();
|
|
8220
|
+
};
|
|
8221
|
+
image.src = src;
|
|
8222
|
+
}
|
|
8223
|
+
}
|
|
8224
|
+
}
|
|
8225
|
+
else {
|
|
8226
|
+
// 没有找到对应的元素
|
|
8227
|
+
console.error(`未找到id为${id}的元素`);
|
|
8228
|
+
}
|
|
8229
|
+
flagObj = {
|
|
8230
|
+
flagId: flagId,
|
|
8231
|
+
flagCoordinate: flagCoordinate
|
|
8232
|
+
};
|
|
8233
|
+
obj = Object.assign({}, flagObj);
|
|
8234
|
+
return obj;
|
|
8235
|
+
}
|
|
8236
|
+
else {
|
|
8237
|
+
return obj;
|
|
8238
|
+
}
|
|
8239
|
+
};
|
|
8240
|
+
/* 移除自定义图片图层 */
|
|
8241
|
+
this._removeGroundOverlay = (option) => {
|
|
8242
|
+
// 获取所有图层
|
|
8243
|
+
const overlays = this.map.getOverlays();
|
|
8244
|
+
let newTargetOverlay = '';
|
|
8245
|
+
// 找到要更新的图层
|
|
8246
|
+
const targetOverlay = overlays.find((overlay) => overlay._id === option.id);
|
|
8247
|
+
newTargetOverlay = targetOverlay;
|
|
8248
|
+
if (targetOverlay) {
|
|
8249
|
+
// 如果找到了对应的图层,执行删除操作
|
|
8250
|
+
this.map.removeOverlay(targetOverlay);
|
|
8251
|
+
}
|
|
8252
|
+
return newTargetOverlay;
|
|
8253
|
+
};
|
|
8254
|
+
/* 限制地图的显示范围。此接口同时会限制地图的最小缩放整数级别。 */
|
|
8255
|
+
this._setBoundary = (option) => {
|
|
8256
|
+
let nth = option.northeast.latitude;
|
|
8257
|
+
let sth = option.southwest.latitude;
|
|
8258
|
+
let flag = true;
|
|
8259
|
+
if (option.northeast.latitude <= -80 && option.northeast.latitude >= -90) {
|
|
8260
|
+
nth = option.northeast.latitude + 10;
|
|
8261
|
+
}
|
|
8262
|
+
if (option.southwest.latitude <= -80 && option.southwest.latitude >= -90) {
|
|
8263
|
+
sth = option.southwest.latitude + 10;
|
|
8264
|
+
}
|
|
8265
|
+
if (option.northeast.latitude < -90 || option.northeast.latitude > 90 || option.northeast.longitude < -180 || option.northeast.longitude > 180 || isNaN(option.northeast.latitude) || isNaN(option.northeast.longitude) || option.northeast.longitude < option.southwest.longitude || option.northeast.latitude < option.southwest.latitude) {
|
|
8266
|
+
flag = false;
|
|
8267
|
+
return;
|
|
8268
|
+
}
|
|
8269
|
+
if (option.southwest.latitude < -90 || option.southwest.latitude > 90 || option.southwest.longitude < -180 || option.southwest.longitude > 180 || isNaN(option.southwest.latitude) || isNaN(option.southwest.longitude)) {
|
|
8270
|
+
flag = false;
|
|
8271
|
+
return;
|
|
8272
|
+
}
|
|
8273
|
+
const ne = new BMapGL.Point(option.northeast.longitude, nth);
|
|
8274
|
+
const sw = new BMapGL.Point(option.southwest.longitude, sth);
|
|
8275
|
+
const bounds = new BMapGL.Bounds(sw, ne);
|
|
8276
|
+
const viewport = this.map.getViewport([ne, sw]);
|
|
8277
|
+
this.map.centerAndZoom(new BMapGL.Point(viewport.center.lng, viewport.center.lat), viewport.zoom + 2);
|
|
8278
|
+
this.map.addOverlay(new BMapGL.Polygon([
|
|
8279
|
+
new BMapGL.Point(bounds.sw.lng, bounds.sw.lat),
|
|
8280
|
+
new BMapGL.Point(bounds.sw.lng, bounds.ne.lat),
|
|
8281
|
+
new BMapGL.Point(bounds.ne.lng, bounds.ne.lat),
|
|
8282
|
+
new BMapGL.Point(bounds.ne.lng, bounds.sw.lat)
|
|
8283
|
+
], {
|
|
8284
|
+
fillOpacity: 0
|
|
8285
|
+
}));
|
|
8286
|
+
BMapGLLib.AreaRestriction.setBounds(this.map, bounds);
|
|
8287
|
+
return flag;
|
|
8288
|
+
};
|
|
8289
|
+
this.latitude = undefined;
|
|
8290
|
+
this.longitude = undefined;
|
|
8291
|
+
this.scale = undefined;
|
|
8292
|
+
this.minScale = undefined;
|
|
8293
|
+
this.maxScale = undefined;
|
|
8294
|
+
this.markers = undefined;
|
|
8295
|
+
this.polyline = undefined;
|
|
8296
|
+
this.circles = undefined;
|
|
8297
|
+
this.polygons = undefined;
|
|
8298
|
+
this.subkey = undefined;
|
|
8299
|
+
this.layerStyle = undefined;
|
|
8300
|
+
this.rotate = undefined;
|
|
8301
|
+
this.skew = undefined;
|
|
8302
|
+
this.showCompass = undefined;
|
|
8303
|
+
this.showScale = undefined;
|
|
8304
|
+
this.enableOverlooking = undefined;
|
|
8305
|
+
this.enableZoom = undefined;
|
|
8306
|
+
this.enableScroll = undefined;
|
|
8307
|
+
this.enableRotate = undefined;
|
|
8308
|
+
this.enableSatellite = undefined;
|
|
8309
|
+
this.enableTraffic = undefined;
|
|
8310
|
+
this.enableBuilding = undefined;
|
|
8311
|
+
this.enableAutoMaxOverlooking = undefined;
|
|
8312
|
+
this.enable3D = undefined;
|
|
8313
|
+
this.width = '100%';
|
|
8314
|
+
this.height = '100%';
|
|
8315
|
+
}
|
|
8316
|
+
async componentDidLoad() {
|
|
8317
|
+
// 加载地图脚本
|
|
8318
|
+
await this.loadMapScript();
|
|
8319
|
+
// 记载BmapLib工具库
|
|
8320
|
+
await this.LoadBmapLibScript();
|
|
8321
|
+
// 如果容器元素存在
|
|
8322
|
+
if (this.mapRef) {
|
|
8323
|
+
this.mapRef.addEventListener('touchmove', (e) => {
|
|
8324
|
+
if (e.cancelable) {
|
|
8325
|
+
e.preventDefault();
|
|
8326
|
+
}
|
|
8327
|
+
});
|
|
8328
|
+
// 创建地图对象
|
|
8329
|
+
this.map = new BMapGL.Map(this.mapRef);
|
|
8330
|
+
// 移除百度地图版权信息
|
|
8331
|
+
this.map.removeControl(this.map.getMapType());
|
|
8332
|
+
// 创建中心点坐标对象
|
|
8333
|
+
// 中心经纬度为必填值
|
|
8334
|
+
if (this.latitude < -90 || this.latitude > 90 || this.longitude < -180 || this.longitude > 180 || isNaN(this.latitude) || isNaN(this.longitude)) {
|
|
8335
|
+
console.error('请正确设置中心经纬度');
|
|
8336
|
+
return;
|
|
8337
|
+
}
|
|
8338
|
+
let scale = isNaN(this.scale) ? 16 : this.scale;
|
|
8339
|
+
let minScale = isNaN(this.minScale) ? 3 : this.minScale;
|
|
8340
|
+
let maxScale = isNaN(this.maxScale) ? 16 : this.maxScale;
|
|
8341
|
+
const point = new BMapGL.Point(this.longitude, this.latitude);
|
|
8342
|
+
if (minScale < 3 || minScale > 20) {
|
|
8343
|
+
minScale = 3;
|
|
8344
|
+
this.map.setMinZoom(3);
|
|
8345
|
+
}
|
|
8346
|
+
else {
|
|
8347
|
+
// 设置最小缩放级别
|
|
8348
|
+
this.map.setMinZoom(minScale);
|
|
8349
|
+
}
|
|
8350
|
+
if (maxScale > 20 || maxScale < 3) {
|
|
8351
|
+
maxScale = 20;
|
|
8352
|
+
this.map.setMaxZoom(20);
|
|
8353
|
+
}
|
|
8354
|
+
else {
|
|
8355
|
+
// 设置最大缩放级别
|
|
8356
|
+
this.map.setMaxZoom(maxScale);
|
|
8357
|
+
}
|
|
8358
|
+
if (minScale > maxScale) {
|
|
8359
|
+
minScale = 3;
|
|
8360
|
+
this.map.setMinZoom(3);
|
|
8361
|
+
maxScale = 20;
|
|
8362
|
+
this.map.setMaxZoom(20);
|
|
8363
|
+
}
|
|
8364
|
+
// 设置地图中心和缩放级别
|
|
8365
|
+
if (minScale <= 16 && maxScale >= 16) {
|
|
8366
|
+
if (scale >= minScale && scale <= maxScale) {
|
|
8367
|
+
// 使用this.scale来设置缩放级别
|
|
8368
|
+
this.map.centerAndZoom(point, scale);
|
|
8369
|
+
}
|
|
8370
|
+
else {
|
|
8371
|
+
scale = 16;
|
|
8372
|
+
this.map.centerAndZoom(point, scale);
|
|
8373
|
+
}
|
|
8374
|
+
}
|
|
8375
|
+
else {
|
|
8376
|
+
if (scale >= minScale && scale <= maxScale) {
|
|
8377
|
+
// 使用this.scale来设置缩放级别
|
|
8378
|
+
this.map.centerAndZoom(point, scale);
|
|
8379
|
+
}
|
|
8380
|
+
else if (scale < minScale) {
|
|
8381
|
+
scale = minScale;
|
|
8382
|
+
this.map.centerAndZoom(point, minScale);
|
|
8383
|
+
}
|
|
8384
|
+
else {
|
|
8385
|
+
scale = maxScale;
|
|
8386
|
+
this.map.centerAndZoom(point, maxScale);
|
|
8387
|
+
}
|
|
8388
|
+
}
|
|
8389
|
+
// 添加标记点markers
|
|
8390
|
+
if (Array.isArray(this.markers)) {
|
|
8391
|
+
this.addMarkers(this.markers);
|
|
8392
|
+
}
|
|
8393
|
+
// 创建polyline路线
|
|
8394
|
+
if (Array.isArray(this.polyline)) {
|
|
8395
|
+
this.polyline.forEach((line) => {
|
|
8396
|
+
if (line.points) {
|
|
8397
|
+
const points = line.points.map((point) => new BMapGL.Point(point.longitude, point.latitude));
|
|
8398
|
+
const polyline = new BMapGL.Polyline(points, {
|
|
8399
|
+
strokeColor: line.color,
|
|
8400
|
+
strokeWeight: line.width,
|
|
8401
|
+
strokeStyle: line.dottedLine ? 'dashed' : 'solid',
|
|
8402
|
+
strokeOpacity: 1,
|
|
8403
|
+
});
|
|
8404
|
+
// 将polyline路线添加到地图上
|
|
8405
|
+
this.map.addOverlay(polyline);
|
|
8406
|
+
}
|
|
8407
|
+
});
|
|
8408
|
+
}
|
|
8409
|
+
// 添加圆形覆盖物circles
|
|
8410
|
+
if (Array.isArray(this.circles)) {
|
|
8411
|
+
this.circles.forEach((circle) => {
|
|
8412
|
+
if (circle.latitude && circle.longitude && circle.radius) {
|
|
8413
|
+
const point = new BMapGL.Point(circle.longitude, circle.latitude);
|
|
8414
|
+
const circleObj = new BMapGL.Circle(point, circle.radius, {
|
|
8415
|
+
strokeColor: circle.color,
|
|
8416
|
+
fillColor: circle.fillColor,
|
|
8417
|
+
strokeWeight: circle.strokeWidth,
|
|
8418
|
+
});
|
|
8419
|
+
this.map.addOverlay(circleObj);
|
|
8420
|
+
}
|
|
8421
|
+
});
|
|
8422
|
+
}
|
|
8423
|
+
// 多边形
|
|
8424
|
+
if (Array.isArray(this.polygons)) {
|
|
8425
|
+
this.polygons.forEach((polygon) => {
|
|
8426
|
+
// 创建多边形的点坐标数组
|
|
8427
|
+
const points = polygon.points.map((point) => new BMapGL.Point(point.longitude, point.latitude));
|
|
8428
|
+
// 创建多边形对象
|
|
8429
|
+
const polygonObj = new BMapGL.Polygon(points, {
|
|
8430
|
+
strokeColor: polygon.strokeColor,
|
|
8431
|
+
fillColor: polygon.fillColor,
|
|
8432
|
+
strokeWeight: polygon.strokeWidth,
|
|
8433
|
+
});
|
|
8434
|
+
// 将多边形添加到地图上
|
|
8435
|
+
this.map.addOverlay(polygonObj);
|
|
8436
|
+
});
|
|
8437
|
+
}
|
|
8438
|
+
if (this.layerStyle === 0) {
|
|
8439
|
+
const layerStyle = this.layerStyle;
|
|
8440
|
+
if (layerStyle) {
|
|
8441
|
+
// 使用个性化地图样式
|
|
8442
|
+
this.map.setMapStyleV2({ styleId: this.subkey });
|
|
8443
|
+
}
|
|
8444
|
+
}
|
|
8445
|
+
else {
|
|
8446
|
+
const layerStyle = this.layerStyle ? this.layerStyle : 1;
|
|
8447
|
+
if (layerStyle === 1) {
|
|
8448
|
+
// 使用个性化地图样式
|
|
8449
|
+
this.map.setMapStyleV2({ styleId: this.subkey });
|
|
8450
|
+
}
|
|
8451
|
+
}
|
|
8452
|
+
const enable3D = this.enable3D === true ? this.enable3D : false;
|
|
8453
|
+
const enableOverlooking = this.enableOverlooking === true ? this.enableOverlooking : false;
|
|
8454
|
+
const enableAutoMaxOverlooking = this.enableAutoMaxOverlooking === true ? this.enableAutoMaxOverlooking : false;
|
|
8455
|
+
const skew = this.skew ? this.skew : 0;
|
|
8456
|
+
if (enable3D === true) {
|
|
8457
|
+
if (enableOverlooking === true) {
|
|
8458
|
+
// /开启最大俯视角
|
|
8459
|
+
if (enableAutoMaxOverlooking === true) {
|
|
8460
|
+
this.map.setTilt(75);
|
|
8461
|
+
}
|
|
8462
|
+
else {
|
|
8463
|
+
// 开启俯视角度
|
|
8464
|
+
this.map.setTilt(45);
|
|
8465
|
+
}
|
|
8466
|
+
}
|
|
8467
|
+
else if (skew >= 0 && skew <= 40) {
|
|
8468
|
+
// 设置倾斜角度
|
|
8469
|
+
this.map.setTilt(skew);
|
|
8470
|
+
}
|
|
8471
|
+
else {
|
|
8472
|
+
this.map.setTilt(0);
|
|
8473
|
+
}
|
|
8474
|
+
}
|
|
8475
|
+
else {
|
|
8476
|
+
this.map.setTilt(0);
|
|
8477
|
+
}
|
|
8478
|
+
// 显示指南针
|
|
8479
|
+
const showCompass = this.showCompass === true ? this.showCompass : false;
|
|
8480
|
+
if (showCompass === true) {
|
|
8481
|
+
const compassControl = new BMapGL.NavigationControl3D({
|
|
8482
|
+
anchor: BMAP_ANCHOR_TOP_RIGHT,
|
|
8483
|
+
type: 3, // 3代表显示指南针
|
|
8484
|
+
});
|
|
8485
|
+
this.map.addControl(compassControl);
|
|
8486
|
+
}
|
|
8487
|
+
// 显示比例尺
|
|
8488
|
+
const showScale = this.showScale === true ? this.showScale : false;
|
|
8489
|
+
if (showScale === true) {
|
|
8490
|
+
const scaleControl = new BMapGL.ScaleControl({
|
|
8491
|
+
anchor: BMAP_ANCHOR_BOTTOM_RIGHT,
|
|
8492
|
+
});
|
|
8493
|
+
this.map.addControl(scaleControl);
|
|
8494
|
+
}
|
|
8495
|
+
const enableZoom = this.enableZoom === false ? this.enableZoom : true;
|
|
8496
|
+
if (enableZoom === true) {
|
|
8497
|
+
// 启用缩放
|
|
8498
|
+
this.map.enableScrollWheelZoom(this.enableZoom);
|
|
8499
|
+
}
|
|
8500
|
+
// 启用缩放
|
|
8501
|
+
if (this.enableZoom === true && this.mapRef) {
|
|
8502
|
+
this.map.enablePinchToZoom();
|
|
8503
|
+
}
|
|
8504
|
+
else {
|
|
8505
|
+
this.map.disablePinchToZoom();
|
|
8506
|
+
}
|
|
8507
|
+
// 拖拽
|
|
8508
|
+
const enableScroll = this.enableScroll === false ? this.enableScroll : true;
|
|
8509
|
+
if (enableScroll === true) {
|
|
8510
|
+
this.map.enableDragging();
|
|
8511
|
+
}
|
|
8512
|
+
else {
|
|
8513
|
+
this.map.disableDragging();
|
|
8514
|
+
}
|
|
8515
|
+
const rotate = this.rotate ? this.rotate : 0;
|
|
8516
|
+
if (rotate >= 0 && this.rotate <= 360) {
|
|
8517
|
+
this.map.setHeading(this.rotate);
|
|
8518
|
+
}
|
|
8519
|
+
else {
|
|
8520
|
+
this.map.setHeading(0);
|
|
8521
|
+
}
|
|
8522
|
+
// 设置旋转角度
|
|
8523
|
+
if (this.enableRotate === true) {
|
|
8524
|
+
this.map.enableRotateGestures();
|
|
8525
|
+
}
|
|
8526
|
+
// 启用卫星图
|
|
8527
|
+
const enableSatellite = this.enableSatellite === true ? this.enableSatellite : false;
|
|
8528
|
+
if (enableSatellite === true && this.mapRef) {
|
|
8529
|
+
const mapTypeControl = new BMapGL.MapTypeControl({
|
|
8530
|
+
mapTypes: [BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP],
|
|
8531
|
+
});
|
|
8532
|
+
this.map.addControl(mapTypeControl);
|
|
8533
|
+
}
|
|
8534
|
+
const enableTraffic = this.enableTraffic === true ? this.enableTraffic : false;
|
|
8535
|
+
if (enableTraffic === true && this.mapRef) {
|
|
8536
|
+
this.map.setTrafficOn();
|
|
8537
|
+
}
|
|
8538
|
+
// 是否开启建筑物
|
|
8539
|
+
const enableBuilding = this.enableBuilding === false ? this.enableBuilding : true;
|
|
8540
|
+
if (enableBuilding === false) {
|
|
8541
|
+
this.map.setDisplayOptions({ building: false });
|
|
8542
|
+
}
|
|
8543
|
+
}
|
|
8544
|
+
if (this.map) {
|
|
8545
|
+
// 创建Hammer对象,绑定到地图容器
|
|
8546
|
+
const hammer = new Hammer__default['default'](this.mapRef);
|
|
8547
|
+
hammer.on('tap', (e) => {
|
|
8548
|
+
// 将Hammer事件对象中的坐标转换为百度地图坐标
|
|
8549
|
+
const point = this.map.pixelToPoint({ x: e.center.x, y: e.center.y });
|
|
8550
|
+
this.onTap.emit({
|
|
8551
|
+
longitude: point.lng,
|
|
8552
|
+
latitude: point.lat,
|
|
8553
|
+
});
|
|
8554
|
+
});
|
|
8555
|
+
}
|
|
7500
8556
|
}
|
|
7501
|
-
|
|
7502
|
-
|
|
8557
|
+
disconnectedCallback() {
|
|
8558
|
+
if (this.map) {
|
|
8559
|
+
this.map.destroy();
|
|
8560
|
+
}
|
|
8561
|
+
}
|
|
8562
|
+
addMarkers(markers) {
|
|
8563
|
+
// 维护已存在的marker id 列表
|
|
8564
|
+
const existingIds = [];
|
|
8565
|
+
markers.forEach((marker) => {
|
|
8566
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
8567
|
+
if (existingIds.includes(marker.id)) {
|
|
8568
|
+
// 如果id已存在,直接返回,不执行后续操作
|
|
8569
|
+
console.error('请输入不同的marker的id');
|
|
8570
|
+
return;
|
|
8571
|
+
}
|
|
8572
|
+
existingIds.push(marker.id);
|
|
8573
|
+
if (marker.latitude && marker.longitude && marker.iconPath && marker.id) {
|
|
8574
|
+
if (marker.latitude < -90 || marker.latitude > 90 || marker.longitude < -180 || marker.longitude > 180) {
|
|
8575
|
+
console.error('请正确设置marker的经纬度');
|
|
8576
|
+
return;
|
|
8577
|
+
}
|
|
8578
|
+
const pt = new BMapGL.Point(marker.longitude, marker.latitude);
|
|
8579
|
+
const markerObj = new BMapGL.Marker(pt, { enableClicking: true });
|
|
8580
|
+
markerObj.id = marker.id; // 设置标记点的唯一标识符
|
|
8581
|
+
markerObj.alpha = marker.alpha;
|
|
8582
|
+
if (marker.zIndex) {
|
|
8583
|
+
markerObj.setZIndex(marker.zIndex);
|
|
8584
|
+
}
|
|
8585
|
+
if (marker.width && marker.height) {
|
|
8586
|
+
const canvas = document.createElement('canvas');
|
|
8587
|
+
canvas.width = marker.width * 2;
|
|
8588
|
+
canvas.height = marker.height * 2;
|
|
8589
|
+
// 获取 Canvas 上下文
|
|
8590
|
+
const ctx = canvas.getContext('2d');
|
|
8591
|
+
// 创建一个新的图片对象
|
|
8592
|
+
const img = new Image();
|
|
8593
|
+
// 设置图片的跨域属性
|
|
8594
|
+
img.crossOrigin = 'Anonymous';
|
|
8595
|
+
img.src = marker.iconPath;
|
|
8596
|
+
// 当图片加载完成后,将其绘制到Canvas上
|
|
8597
|
+
img.onload = function () {
|
|
8598
|
+
ctx.drawImage(img, 0, 0, marker.width * 2, marker.height * 2);
|
|
8599
|
+
// 创建 BMapGL.Icon 对象,并将 Canvas 元素作为图标的内容
|
|
8600
|
+
// 设置锚点偏移量为(0, 0),表示图标的左上角将与经纬度对齐
|
|
8601
|
+
const icon = new BMapGL.Icon(canvas.toDataURL(), new BMapGL.Size(marker.width, marker.height), {
|
|
8602
|
+
anchor: new BMapGL.Size(0, 0)
|
|
8603
|
+
});
|
|
8604
|
+
markerObj.setIcon(icon);
|
|
8605
|
+
};
|
|
8606
|
+
}
|
|
8607
|
+
else {
|
|
8608
|
+
const img = new Image();
|
|
8609
|
+
img.src = marker.iconPath;
|
|
8610
|
+
img.style.opacity = String(marker.alpha);
|
|
8611
|
+
img.onload = () => {
|
|
8612
|
+
const iconSize = new BMapGL.Size(img.width, img.height);
|
|
8613
|
+
const icon = new BMapGL.Icon(img.src, iconSize);
|
|
8614
|
+
icon.imageOffset = new BMapGL.Size(0, 0, marker.alpha || 1);
|
|
8615
|
+
markerObj.setIcon(icon);
|
|
8616
|
+
};
|
|
8617
|
+
}
|
|
8618
|
+
const rotate = marker.rotate ? marker.rotate : 0;
|
|
8619
|
+
if (rotate >= 0 && rotate <= 360) {
|
|
8620
|
+
markerObj.setRotation(rotate);
|
|
8621
|
+
}
|
|
8622
|
+
// 如果anchor.x和anchor.y被定义,则使用它们的值,否则使用默认值
|
|
8623
|
+
const anchorX = (_b = (_a = marker.anchor) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0.5;
|
|
8624
|
+
const anchorY = (_d = (_c = marker.anchor) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 1;
|
|
8625
|
+
if (anchorX >= 0 && anchorX <= 1 && anchorY >= 0 && anchorY <= 1) {
|
|
8626
|
+
// 锚点设置为图标宽度的负值乘以x,以向左移动
|
|
8627
|
+
const offsetX = -(anchorX) * (marker.width || 0);
|
|
8628
|
+
// 锚点设置为图标高度的负值乘以y,以向上移动
|
|
8629
|
+
const offsetY = -(anchorY) * (marker.height || 0);
|
|
8630
|
+
// 使用计算出的偏移量设置标注对象的偏移
|
|
8631
|
+
markerObj.setOffset(new BMapGL.Size(offsetX, offsetY));
|
|
8632
|
+
}
|
|
8633
|
+
else {
|
|
8634
|
+
const offsetX = -0.5 * (marker.width || 0);
|
|
8635
|
+
const offsetY = -1 * (marker.height || 0);
|
|
8636
|
+
markerObj.setOffset(new BMapGL.Size(offsetX, offsetY));
|
|
8637
|
+
}
|
|
8638
|
+
// 创建title
|
|
8639
|
+
if (!marker.callout && marker.title) {
|
|
8640
|
+
const hammer = new Hammer__default['default'](this.mapRef); // 创建Hammer对象,绑定到地图容器
|
|
8641
|
+
hammer.on('tap', (e) => {
|
|
8642
|
+
// 使用tap事件替代click事件
|
|
8643
|
+
const touch = e.center;
|
|
8644
|
+
const x = touch.x;
|
|
8645
|
+
const y = touch.y;
|
|
8646
|
+
// 假设阈值为 10,表示点击距离小于 10 个像素时认为是点击到了标记点
|
|
8647
|
+
const threshold = 15;
|
|
8648
|
+
// 遍历标记点数组,计算触摸位置与每个标记点的距离
|
|
8649
|
+
this.markers.forEach((marker) => {
|
|
8650
|
+
// 通过class名获取地图容器
|
|
8651
|
+
const mapContainer = document.getElementsByClassName('bmap-container')[0];
|
|
8652
|
+
// 获取地图容器在屏幕上的偏移量
|
|
8653
|
+
const mapContainerRect = mapContainer.getBoundingClientRect();
|
|
8654
|
+
const mapOffsetX = mapContainerRect.left;
|
|
8655
|
+
const mapOffsetY = mapContainerRect.top;
|
|
8656
|
+
const point = new BMapGL.Point(marker.longitude, marker.latitude);
|
|
8657
|
+
const pixel = this.map.pointToPixel(point);
|
|
8658
|
+
const markerX = pixel.x + mapOffsetX;
|
|
8659
|
+
const markerY = pixel.y + mapOffsetY;
|
|
8660
|
+
// 计算触摸位置与标记点的距离
|
|
8661
|
+
const distance = Math.sqrt(Math.pow(x - markerX, 2) + Math.pow(y - markerY, 2));
|
|
8662
|
+
if (distance < threshold && marker.id === markerObj.id) {
|
|
8663
|
+
// 最近的标记点距离小于阈值,表示用户点击到了标记点
|
|
8664
|
+
const content = `<div style="text-align:center">${marker.title}</div>`;
|
|
8665
|
+
const infoWindow = new BMapGL.InfoWindow(content);
|
|
8666
|
+
this.map.openInfoWindow(infoWindow, pt);
|
|
8667
|
+
}
|
|
8668
|
+
});
|
|
8669
|
+
});
|
|
8670
|
+
}
|
|
8671
|
+
if (marker.callout) {
|
|
8672
|
+
const offsetX = ((_e = marker.callout) === null || _e === void 0 ? void 0 : _e.anchorX) ? (_f = marker.callout) === null || _f === void 0 ? void 0 : _f.anchorX : 0; // 横向偏移量
|
|
8673
|
+
const offsetY = ((_g = marker.callout) === null || _g === void 0 ? void 0 : _g.anchorY) ? (_h = marker.callout) === null || _h === void 0 ? void 0 : _h.anchorY : 0; // 纵向偏移量
|
|
8674
|
+
// 创建气泡(callout)对象
|
|
8675
|
+
const callout = new BMapGL.InfoWindow(`<div style="
|
|
8676
|
+
padding: ${(_j = marker.callout) === null || _j === void 0 ? void 0 : _j.padding}px;
|
|
8677
|
+
color:${(_k = marker.callout) === null || _k === void 0 ? void 0 : _k.color};
|
|
8678
|
+
text-align:${(_l = marker.callout) === null || _l === void 0 ? void 0 : _l.textAlign};"
|
|
8679
|
+
>
|
|
8680
|
+
<p style="font-size:${(_m = marker.callout) === null || _m === void 0 ? void 0 : _m.fontSize}px">${((_o = marker.callout) === null || _o === void 0 ? void 0 : _o.content) || ''}</p>
|
|
8681
|
+
</div>`, {
|
|
8682
|
+
width: 200,
|
|
8683
|
+
height: 100,
|
|
8684
|
+
offset: new BMapGL.Size(offsetX - 24, offsetY - 20), // 设置偏移量
|
|
8685
|
+
});
|
|
8686
|
+
// 自定义属性存储气泡(callout)对象
|
|
8687
|
+
markerObj.callout = callout;
|
|
8688
|
+
// 将气泡(callout)对象绑定到标记(marker)对象上
|
|
8689
|
+
this.map.addOverlay(markerObj);
|
|
8690
|
+
if (((_p = marker.callout) === null || _p === void 0 ? void 0 : _p.display) === 'ALWAYS') {
|
|
8691
|
+
markerObj.callout.disableCloseOnClick();
|
|
8692
|
+
const point = markerObj.getPosition(); // 获取marker标记点的位置
|
|
8693
|
+
markerObj.callout.addEventListener('open', function () {
|
|
8694
|
+
var _a, _b, _c, _d;
|
|
8695
|
+
const infoWindowElement = document.querySelector('.BMap_bubble_pop');
|
|
8696
|
+
if (infoWindowElement) {
|
|
8697
|
+
let triangle = infoWindowElement.querySelector('.triangle');
|
|
8698
|
+
if (!triangle) {
|
|
8699
|
+
// 如果不存在,则创建并添加新的三角形 div
|
|
8700
|
+
triangle = document.createElement('div');
|
|
8701
|
+
triangle.className = 'triangle'; // 添加一个类名以便日后查找
|
|
8702
|
+
infoWindowElement.appendChild(triangle);
|
|
8703
|
+
}
|
|
8704
|
+
const img = document.querySelector('.BMap_bubble_pop>img');
|
|
8705
|
+
if (img) {
|
|
8706
|
+
img.setAttribute('style', `position: absolute;transform: translate(-50%, 0); top: ${point.lat - 100}px; left: ${point.lng - 20}px;display:none`);
|
|
8707
|
+
}
|
|
8708
|
+
const backgroundcolor = (_a = marker.callout) === null || _a === void 0 ? void 0 : _a.bgColor;
|
|
8709
|
+
let borderWidth = ((_b = marker.callout) === null || _b === void 0 ? void 0 : _b.borderWidth) || 5;
|
|
8710
|
+
const borderColor = (_c = marker.callout) === null || _c === void 0 ? void 0 : _c.borderColor;
|
|
8711
|
+
const borderRadius = (_d = marker.callout) === null || _d === void 0 ? void 0 : _d.borderRadius;
|
|
8712
|
+
// 确保边框大小不超过15
|
|
8713
|
+
borderWidth = Math.min(borderWidth, 15);
|
|
8714
|
+
triangle.setAttribute('style', `width:0;height:0;borderLeft:${borderWidth}px solid transparent;borderRight:${borderWidth}px solid transparent;borderTop:${borderWidth}px solid ${borderColor};position:absolute;left:83px;bottom:-${2 * borderWidth}px`);
|
|
8715
|
+
infoWindowElement.setAttribute('style', `background-color:${backgroundcolor};top:${point.lat - 120}px; left:${point.lng - 100}px;position: absolute;border: ${borderWidth}px solid ${borderColor};border-radius:${borderRadius}px; `);
|
|
8716
|
+
}
|
|
8717
|
+
});
|
|
8718
|
+
this.map.openInfoWindow(markerObj.callout, pt);
|
|
8719
|
+
}
|
|
8720
|
+
else {
|
|
8721
|
+
const hammer = new Hammer__default['default'](this.mapRef); // 创建Hammer对象,绑定到地图容器
|
|
8722
|
+
hammer.on('tap', (e) => {
|
|
8723
|
+
// 使用tap事件替代click事件
|
|
8724
|
+
const touch = e.center;
|
|
8725
|
+
const x = touch.x;
|
|
8726
|
+
const y = touch.y;
|
|
8727
|
+
// 假设阈值为 10,表示点击距离小于 10 个像素时认为是点击到了标记点
|
|
8728
|
+
const threshold = 15;
|
|
8729
|
+
// 遍历标记点数组,计算触摸位置与每个标记点的距离
|
|
8730
|
+
this.markers.forEach((marker) => {
|
|
8731
|
+
// 通过class名获取地图容器
|
|
8732
|
+
const mapContainer = document.getElementsByClassName('bmap-container')[0];
|
|
8733
|
+
// 获取地图容器在屏幕上的偏移量
|
|
8734
|
+
const mapContainerRect = mapContainer.getBoundingClientRect();
|
|
8735
|
+
const mapOffsetX = mapContainerRect.left;
|
|
8736
|
+
const mapOffsetY = mapContainerRect.top;
|
|
8737
|
+
const point = new BMapGL.Point(marker.longitude, marker.latitude);
|
|
8738
|
+
const pixel = this.map.pointToPixel(point);
|
|
8739
|
+
const markerX = pixel.x + mapOffsetX;
|
|
8740
|
+
const markerY = pixel.y + mapOffsetY;
|
|
8741
|
+
// 计算触摸位置与标记点的距离
|
|
8742
|
+
const distance = Math.sqrt(Math.pow(x - markerX, 2) + Math.pow(y - markerY, 2));
|
|
8743
|
+
if (distance < threshold && marker.id === markerObj.id) {
|
|
8744
|
+
const point = markerObj.getPosition(); // 获取marker标记点的位置
|
|
8745
|
+
markerObj.callout.addEventListener('open', function () {
|
|
8746
|
+
var _a, _b, _c, _d;
|
|
8747
|
+
const infoWindowElement = document.querySelector('.BMap_bubble_pop');
|
|
8748
|
+
if (infoWindowElement) {
|
|
8749
|
+
let triangle = infoWindowElement.querySelector('.triangle');
|
|
8750
|
+
if (!triangle) {
|
|
8751
|
+
// 如果不存在,则创建并添加新的三角形 div
|
|
8752
|
+
triangle = document.createElement('div');
|
|
8753
|
+
triangle.className = 'triangle'; // 添加一个类名以便日后查找
|
|
8754
|
+
infoWindowElement.appendChild(triangle);
|
|
8755
|
+
}
|
|
8756
|
+
const img = document.querySelector('.BMap_bubble_pop>img');
|
|
8757
|
+
if (img) {
|
|
8758
|
+
img.setAttribute('style', `position: absolute;transform: translate(-50%, 0); top: ${point.lat - 100}px; left: ${point.lng - 20}px;display:none`);
|
|
8759
|
+
}
|
|
8760
|
+
const backgroundcolor = (_a = marker.callout) === null || _a === void 0 ? void 0 : _a.bgColor;
|
|
8761
|
+
let borderWidth = ((_b = marker.callout) === null || _b === void 0 ? void 0 : _b.borderWidth) || 5;
|
|
8762
|
+
const borderColor = (_c = marker.callout) === null || _c === void 0 ? void 0 : _c.borderColor;
|
|
8763
|
+
const borderRadius = (_d = marker.callout) === null || _d === void 0 ? void 0 : _d.borderRadius;
|
|
8764
|
+
// 确保边框大小不超过15
|
|
8765
|
+
borderWidth = Math.min(borderWidth, 15);
|
|
8766
|
+
triangle.setAttribute('style', `width:0;height:0;border-left:${borderWidth}px solid transparent;border-right:${borderWidth}px solid transparent;border-top:${borderWidth}px solid ${borderColor};position:absolute;left:83px;bottom:-${2 * borderWidth}px`);
|
|
8767
|
+
infoWindowElement.setAttribute('style', `background-color:${backgroundcolor};top:${point.lat - 120}px; left:${point.lng - 100}px;position: absolute;border: ${borderWidth}px solid ${borderColor};border-radius:${borderRadius}px; `);
|
|
8768
|
+
}
|
|
8769
|
+
});
|
|
8770
|
+
// 最近的标记点距离小于阈值,表示用户点击到了标记点
|
|
8771
|
+
this.map.openInfoWindow(markerObj.callout, pt);
|
|
8772
|
+
}
|
|
8773
|
+
else {
|
|
8774
|
+
markerObj.callout.enableCloseOnClick();
|
|
8775
|
+
// 用户点击到了地图上的其他位置,不是标记点
|
|
8776
|
+
}
|
|
8777
|
+
});
|
|
8778
|
+
});
|
|
8779
|
+
}
|
|
8780
|
+
}
|
|
8781
|
+
// 判断是否有label属性
|
|
8782
|
+
if (marker.label) {
|
|
8783
|
+
const labelContent = marker.label.content || '';
|
|
8784
|
+
const labelOpts = {
|
|
8785
|
+
position: pt,
|
|
8786
|
+
offset: new BMapGL.Size(marker.label.anchorX || 0, marker.label.anchorY || 0),
|
|
8787
|
+
};
|
|
8788
|
+
const label = new BMapGL.Label(labelContent, labelOpts);
|
|
8789
|
+
const borderColor = marker.label.borderColor ? marker.label.borderColor : 'white';
|
|
8790
|
+
// 设置标签样式
|
|
8791
|
+
label.setStyle({
|
|
8792
|
+
color: marker.label.color,
|
|
8793
|
+
fontSize: marker.label.fontSize + 'px',
|
|
8794
|
+
borderWidth: marker.label.borderWidth + 'px',
|
|
8795
|
+
borderColor: borderColor,
|
|
8796
|
+
borderRadius: marker.label.borderRadius + 'px',
|
|
8797
|
+
background: marker.label.bgColor,
|
|
8798
|
+
padding: marker.label.padding + 'px',
|
|
8799
|
+
});
|
|
8800
|
+
markerObj.setLabel(label);
|
|
8801
|
+
}
|
|
8802
|
+
this.map.addOverlay(markerObj);
|
|
8803
|
+
}
|
|
8804
|
+
else {
|
|
8805
|
+
console.error('请检查marker经纬度和marker自定义图标路径和id值');
|
|
8806
|
+
}
|
|
8807
|
+
});
|
|
8808
|
+
}
|
|
8809
|
+
loadMapScript() {
|
|
8810
|
+
return new Promise((resolve, reject) => {
|
|
8811
|
+
const script = document.createElement('script');
|
|
8812
|
+
script.src = 'https://api.map.baidu.com/getscript?v=3.0&type=webgl&ak=Mb1FLBD3gfnY6bup4v6zEWh6MXwsZ9eo';
|
|
8813
|
+
script.defer = true;
|
|
8814
|
+
script.onload = () => resolve();
|
|
8815
|
+
script.onerror = reject;
|
|
8816
|
+
script.type = 'text/javascript';
|
|
8817
|
+
document.head.appendChild(script);
|
|
8818
|
+
});
|
|
8819
|
+
}
|
|
8820
|
+
async LoadBmapLibScript() {
|
|
8821
|
+
return new Promise((resolve, reject) => {
|
|
8822
|
+
// 地图加载完成后再加载BMapGLLib
|
|
8823
|
+
const bmapLibScript = document.createElement('script');
|
|
8824
|
+
bmapLibScript.src = '//mapopen.bj.bcebos.com/github/BMapGLLib/AreaRestriction/src/AreaRestriction.min.js';
|
|
8825
|
+
bmapLibScript.defer = true;
|
|
8826
|
+
bmapLibScript.type = 'text/javascript';
|
|
8827
|
+
bmapLibScript.onload = () => {
|
|
8828
|
+
resolve();
|
|
8829
|
+
};
|
|
8830
|
+
bmapLibScript.onerror = reject;
|
|
8831
|
+
document.head.appendChild(bmapLibScript);
|
|
8832
|
+
});
|
|
7503
8833
|
}
|
|
7504
8834
|
render() {
|
|
7505
|
-
return (hAsync(Host, null)
|
|
8835
|
+
return (hAsync(Host, null, hAsync("div", { id: "mapContainer", ref: (dom) => {
|
|
8836
|
+
if (dom) {
|
|
8837
|
+
this.mapRef = dom;
|
|
8838
|
+
}
|
|
8839
|
+
}, style: { width: this.width, height: this.height } })));
|
|
7506
8840
|
}
|
|
8841
|
+
get el() { return getElement(this); }
|
|
8842
|
+
static get style() { return mapCss; }
|
|
7507
8843
|
static get cmpMeta() { return {
|
|
7508
8844
|
"$flags$": 0,
|
|
7509
8845
|
"$tagName$": "taro-map-core",
|
|
7510
|
-
"$members$":
|
|
8846
|
+
"$members$": {
|
|
8847
|
+
"latitude": [2],
|
|
8848
|
+
"longitude": [2],
|
|
8849
|
+
"scale": [2],
|
|
8850
|
+
"minScale": [2, "min-scale"],
|
|
8851
|
+
"maxScale": [2, "max-scale"],
|
|
8852
|
+
"markers": [16],
|
|
8853
|
+
"polyline": [16],
|
|
8854
|
+
"circles": [16],
|
|
8855
|
+
"polygons": [16],
|
|
8856
|
+
"subkey": [1],
|
|
8857
|
+
"layerStyle": [2, "layer-style"],
|
|
8858
|
+
"rotate": [2],
|
|
8859
|
+
"skew": [2],
|
|
8860
|
+
"showCompass": [4, "show-compass"],
|
|
8861
|
+
"showScale": [4, "show-scale"],
|
|
8862
|
+
"enableOverlooking": [4, "enable-overlooking"],
|
|
8863
|
+
"enableZoom": [4, "enable-zoom"],
|
|
8864
|
+
"enableScroll": [4, "enable-scroll"],
|
|
8865
|
+
"enableRotate": [4, "enable-rotate"],
|
|
8866
|
+
"enableSatellite": [4, "enable-satellite"],
|
|
8867
|
+
"enableTraffic": [4, "enable-traffic"],
|
|
8868
|
+
"enableBuilding": [4, "enable-building"],
|
|
8869
|
+
"enableAutoMaxOverlooking": [4, "enable-auto-max-overlooking"],
|
|
8870
|
+
"enable3D": [4, "enable-3-d"],
|
|
8871
|
+
"width": [1],
|
|
8872
|
+
"height": [1]
|
|
8873
|
+
},
|
|
7511
8874
|
"$listeners$": undefined,
|
|
7512
8875
|
"$lazyBundleId$": "-",
|
|
7513
8876
|
"$attrsToReflect$": []
|
|
@@ -12389,7 +13752,7 @@ registerComponents([
|
|
|
12389
13752
|
GridBuilder,
|
|
12390
13753
|
GridView,
|
|
12391
13754
|
Icon,
|
|
12392
|
-
Image,
|
|
13755
|
+
Image$1,
|
|
12393
13756
|
InlinePaymentPanel,
|
|
12394
13757
|
Input,
|
|
12395
13758
|
KeyboardAccessory,
|