@tarojs/components 4.0.0-alpha.19 → 4.0.0-alpha.20

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.
Files changed (57) hide show
  1. package/LICENSE +7 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/taro-components.cjs.js +1 -1
  4. package/dist/cjs/taro-map-core.cjs.entry.js +1324 -5
  5. package/dist/collection/components/map/map.js +1806 -4
  6. package/dist/collection/components/map/style/map.css +1 -0
  7. package/dist/components/taro-map-core.js +1349 -6
  8. package/dist/esm/loader.js +1 -1
  9. package/dist/esm/taro-components.js +1 -1
  10. package/dist/esm/taro-map-core.entry.js +1321 -6
  11. package/dist/esm-es5/loader.js +1 -1
  12. package/dist/esm-es5/taro-components.js +1 -1
  13. package/dist/esm-es5/taro-map-core.entry.js +1 -1
  14. package/dist/hydrate/index.js +1351 -6
  15. package/dist/taro-components/p-7163d09e.system.js +1 -1
  16. package/dist/taro-components/p-d87a68f6.entry.js +1 -0
  17. package/dist/taro-components/p-e3d825d1.system.entry.js +1 -0
  18. package/dist/taro-components/taro-components.esm.js +1 -1
  19. package/dist/types/components/map/map.d.ts +145 -2
  20. package/dist/types/components.d.ts +214 -1
  21. package/lib/react/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.17.2_tslib@2.6.2_typescript@5.4.5 → @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 -1
  22. package/lib/react/react-component-lib/createComponent.js +1 -1
  23. package/lib/react/react-component-lib/createOverlayComponent.js +1 -1
  24. package/lib/solid/component-lib/index.d.ts +53 -0
  25. package/lib/solid/component-lib/index.js +69 -0
  26. package/lib/solid/component-lib/index.js.map +1 -0
  27. package/lib/solid/components.d.ts +92 -0
  28. package/lib/solid/components.js +102 -0
  29. package/lib/solid/components.js.map +1 -0
  30. package/lib/solid/helper.d.ts +3 -0
  31. package/lib/solid/helper.js +7 -0
  32. package/lib/solid/helper.js.map +1 -0
  33. package/lib/solid/index.d.ts +1 -0
  34. package/lib/solid/index.js +2 -0
  35. package/lib/solid/index.js.map +1 -0
  36. package/lib/solid/solid-component-lib/createComponent.d.ts +10 -0
  37. package/lib/solid/solid-component-lib/createComponent.js +67 -0
  38. package/lib/solid/solid-component-lib/createComponent.js.map +1 -0
  39. package/lib/solid/solid-component-lib/index.d.ts +1 -0
  40. package/lib/solid/solid-component-lib/index.js +2 -0
  41. package/lib/solid/solid-component-lib/index.js.map +1 -0
  42. package/lib/solid/solid-component-lib/interfaces.d.ts +33 -0
  43. package/lib/solid/solid-component-lib/utils/case.d.ts +3 -0
  44. package/lib/solid/solid-component-lib/utils/case.js +6 -0
  45. package/lib/solid/solid-component-lib/utils/case.js.map +1 -0
  46. package/lib/solid/solid-component-lib/utils/element.d.ts +6 -0
  47. package/lib/solid/solid-component-lib/utils/element.js +48 -0
  48. package/lib/solid/solid-component-lib/utils/element.js.map +1 -0
  49. package/lib/solid/solid-component-lib/utils/index.d.ts +2 -0
  50. package/lib/solid/solid-component-lib/utils/index.js +3 -0
  51. package/lib/solid/solid-component-lib/utils/index.js.map +1 -0
  52. package/lib/vue3/components.js +29 -1
  53. package/lib/vue3/components.js.map +1 -1
  54. package/package.json +10 -7
  55. package/dist/taro-components/p-53e1c442.system.entry.js +0 -1
  56. package/dist/taro-components/p-bed518a3.entry.js +0 -1
  57. /package/lib/react/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.17.2_tslib@2.6.2_typescript@5.4.5 → @rollup_plugin-typescript@11.1.6_rollup@4.18.0_tslib@2.6.2_typescript@5.4.5}/node_modules/tslib/tslib.es6.js +0 -0
@@ -1 +1 @@
1
- System.register(["./p-75d01c60.system.js"],(function(e,o){"use strict";var t,r;return{setters:[function(o){t=o.p;r=o.b;e("setNonce",o.s)}],execute:function(){var e=function(){var e=o.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return t(r)};e().then((function(e){return r(JSON.parse('[["p-9f53e26c.system",[[4,"taro-checkbox-core",{"name":[1],"value":[1032],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-b087ad2a.system",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-ca6a5916.system",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-ded98693.system",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-ac714300.system",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"currentItemId":[1,"current-item-id"],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"],"deep":[4]}]]],["p-8179438b.system",[[0,"taro-ad-core"]]],["p-06adeb65.system",[[0,"taro-ad-custom-core"]]],["p-df7c6216.system",[[0,"taro-animation-video-core"]]],["p-d73b3a94.system",[[0,"taro-animation-view-core"]]],["p-a96f8f60.system",[[0,"taro-ar-camera-core"]]],["p-4fad4beb.system",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-d05eb105.system",[[0,"taro-aweme-data-core"]]],["p-c0c567e5.system",[[0,"taro-block-core"]]],["p-fe5eefdc.system",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-57b77f17.system",[[0,"taro-camera-core"]]],["p-c677414d.system",[[0,"taro-canvas-core",{"canvasId":[1,"id"],"height":[1537],"width":[1537],"nativeProps":[16]}]]],["p-ac9fb309.system",[[0,"taro-channel-live-core"]]],["p-6b83388c.system",[[0,"taro-channel-video-core"]]],["p-17938fa0.system",[[0,"taro-comment-detail-core"]]],["p-9e359fff.system",[[0,"taro-comment-list-core"]]],["p-47790dc0.system",[[0,"taro-contact-button-core"]]],["p-fbf13159.system",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-3293c5d9.system",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-07ae6678.system",[[0,"taro-custom-wrapper-core"]]],["p-c7d8c076.system",[[0,"taro-draggable-sheet-core"]]],["p-083c3147.system",[[0,"taro-editor-core"]]],["p-c056d527.system",[[0,"taro-follow-swan-core"]]],["p-97b09fb4.system",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-feb89474.system",[[0,"taro-functional-page-navigator-core"]]],["p-9b6b17c4.system",[[0,"taro-grid-builder-core"]]],["p-50849470.system",[[0,"taro-grid-view-core"]]],["p-e853a2c8.system",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-4a8b4d58.system",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32],"didLoad":[32]}]]],["p-d2203687.system",[[0,"taro-inline-payment-panel-core"]]],["p-450f7b39.system",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-27d372b4.system",[[0,"taro-keyboard-accessory-core"]]],["p-a9ca8247.system",[[4,"taro-label-core",{"for":[1]}]]],["p-6654374e.system",[[0,"taro-lifestyle-core"]]],["p-cae6c5d0.system",[[0,"taro-like-core"]]],["p-c71d5745.system",[[0,"taro-list-builder-core"]]],["p-65d11e99.system",[[0,"taro-list-view-core"]]],["p-ddf75d6a.system",[[0,"taro-live-player-core"]]],["p-7e054ae7.system",[[0,"taro-live-pusher-core"]]],["p-a25aca16.system",[[0,"taro-login-core"]]],["p-938f9036.system",[[0,"taro-lottie-core"]]],["p-53e1c442.system",[[0,"taro-map-core"]]],["p-5b9aa4b0.system",[[0,"taro-match-media-core"]]],["p-cafbb3d9.system",[[0,"taro-native-slot-core"]]],["p-ba5e7ec4.system",[[0,"taro-navigation-bar-core"]]],["p-f9935901.system",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-dcf5747c.system",[[0,"taro-nested-scroll-body-core"]]],["p-6ba08ce0.system",[[0,"taro-nested-scroll-header-core"]]],["p-5c156db3.system",[[0,"taro-official-account-core"]]],["p-443e31ab.system",[[0,"taro-open-container-core"]]],["p-17b9f865.system",[[0,"taro-open-data-core"]]],["p-4979e93c.system",[[0,"taro-page-container-core"]]],["p-fa31b2de.system",[[0,"taro-page-meta-core"]]],["p-7ca2d075.system",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-02465454.system",[[4,"taro-pull-to-refresh-core",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-27041d86.system",[[0,"taro-rich-text-core",{"nodes":[1],"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1]}]]],["p-3b36196b.system",[[0,"taro-root-portal-core"]]],["p-0fc790c0.system",[[0,"taro-rtc-room-core"]]],["p-6282bdee.system",[[0,"taro-rtc-room-item-core"]]],["p-ebad862a.system",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"mpScrollIntoViewAlignment":[1,"scroll-into-view-alignment"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[1,"scroll","handleScroll"],[1,"touchmove","handleTouchMove"]]]]],["p-75b4c1fc.system",[[0,"taro-share-element-core"]]],["p-6664a2ca.system",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-5884c108.system",[[0,"taro-slot-core"]]],["p-855619b6.system",[[0,"taro-snapshot-core"]]],["p-156e9634.system",[[0,"taro-span-core"]]],["p-75ded8a0.system",[[0,"taro-sticky-header-core"]]],["p-61a325d2.system",[[0,"taro-sticky-section-core"]]],["p-b4577a12.system",[[0,"taro-switch-core",{"type":[1],"checked":[1028],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}]]],["p-1bd4da3b.system",[[0,"taro-tab-item-core"]]],["p-1eac5291.system",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-0f480c38.system",[[0,"taro-tabs-core"]]],["p-57911e2c.system",[[4,"taro-text-core",{"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1025],"numberOfLines":[2,"number-of-lines"]}]]],["p-1c37143a.system",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-12beb90a.system",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-91ee1f8a.system",[[0,"taro-voip-room-core"]]],["p-4ac48df1.system",[[0,"taro-web-view-core",{"src":[1]}]]],["p-0a64f78c.system",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"textProps":[16],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[3,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[3,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-e5ef41f2.system",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)}))}}}));
1
+ System.register(["./p-75d01c60.system.js"],(function(e,o){"use strict";var t,a;return{setters:[function(o){t=o.p;a=o.b;e("setNonce",o.s)}],execute:function(){var e=function(){var e=o.meta.url;var a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return t(a)};e().then((function(e){return a(JSON.parse('[["p-9f53e26c.system",[[4,"taro-checkbox-core",{"name":[1],"value":[1032],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-b087ad2a.system",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-ca6a5916.system",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-ded98693.system",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-ac714300.system",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"currentItemId":[1,"current-item-id"],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"],"deep":[4]}]]],["p-8179438b.system",[[0,"taro-ad-core"]]],["p-06adeb65.system",[[0,"taro-ad-custom-core"]]],["p-df7c6216.system",[[0,"taro-animation-video-core"]]],["p-d73b3a94.system",[[0,"taro-animation-view-core"]]],["p-a96f8f60.system",[[0,"taro-ar-camera-core"]]],["p-4fad4beb.system",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-d05eb105.system",[[0,"taro-aweme-data-core"]]],["p-c0c567e5.system",[[0,"taro-block-core"]]],["p-fe5eefdc.system",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-57b77f17.system",[[0,"taro-camera-core"]]],["p-c677414d.system",[[0,"taro-canvas-core",{"canvasId":[1,"id"],"height":[1537],"width":[1537],"nativeProps":[16]}]]],["p-ac9fb309.system",[[0,"taro-channel-live-core"]]],["p-6b83388c.system",[[0,"taro-channel-video-core"]]],["p-17938fa0.system",[[0,"taro-comment-detail-core"]]],["p-9e359fff.system",[[0,"taro-comment-list-core"]]],["p-47790dc0.system",[[0,"taro-contact-button-core"]]],["p-fbf13159.system",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-3293c5d9.system",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-07ae6678.system",[[0,"taro-custom-wrapper-core"]]],["p-c7d8c076.system",[[0,"taro-draggable-sheet-core"]]],["p-083c3147.system",[[0,"taro-editor-core"]]],["p-c056d527.system",[[0,"taro-follow-swan-core"]]],["p-97b09fb4.system",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-feb89474.system",[[0,"taro-functional-page-navigator-core"]]],["p-9b6b17c4.system",[[0,"taro-grid-builder-core"]]],["p-50849470.system",[[0,"taro-grid-view-core"]]],["p-e853a2c8.system",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-4a8b4d58.system",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32],"didLoad":[32]}]]],["p-d2203687.system",[[0,"taro-inline-payment-panel-core"]]],["p-450f7b39.system",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-27d372b4.system",[[0,"taro-keyboard-accessory-core"]]],["p-a9ca8247.system",[[4,"taro-label-core",{"for":[1]}]]],["p-6654374e.system",[[0,"taro-lifestyle-core"]]],["p-cae6c5d0.system",[[0,"taro-like-core"]]],["p-c71d5745.system",[[0,"taro-list-builder-core"]]],["p-65d11e99.system",[[0,"taro-list-view-core"]]],["p-ddf75d6a.system",[[0,"taro-live-player-core"]]],["p-7e054ae7.system",[[0,"taro-live-pusher-core"]]],["p-a25aca16.system",[[0,"taro-login-core"]]],["p-938f9036.system",[[0,"taro-lottie-core"]]],["p-e3d825d1.system",[[0,"taro-map-core",{"latitude":[2],"longitude":[2],"scale":[2],"minScale":[2,"min-scale"],"maxScale":[2,"max-scale"],"markers":[16],"polyline":[16],"circles":[16],"polygons":[16],"subkey":[1],"layerStyle":[2,"layer-style"],"rotate":[2],"skew":[2],"showCompass":[4,"show-compass"],"showScale":[4,"show-scale"],"enableOverlooking":[4,"enable-overlooking"],"enableZoom":[4,"enable-zoom"],"enableScroll":[4,"enable-scroll"],"enableRotate":[4,"enable-rotate"],"enableSatellite":[4,"enable-satellite"],"enableTraffic":[4,"enable-traffic"],"enableBuilding":[4,"enable-building"],"enableAutoMaxOverlooking":[4,"enable-auto-max-overlooking"],"enable3D":[4,"enable-3-d"],"width":[1],"height":[1]}]]],["p-5b9aa4b0.system",[[0,"taro-match-media-core"]]],["p-cafbb3d9.system",[[0,"taro-native-slot-core"]]],["p-ba5e7ec4.system",[[0,"taro-navigation-bar-core"]]],["p-f9935901.system",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-dcf5747c.system",[[0,"taro-nested-scroll-body-core"]]],["p-6ba08ce0.system",[[0,"taro-nested-scroll-header-core"]]],["p-5c156db3.system",[[0,"taro-official-account-core"]]],["p-443e31ab.system",[[0,"taro-open-container-core"]]],["p-17b9f865.system",[[0,"taro-open-data-core"]]],["p-4979e93c.system",[[0,"taro-page-container-core"]]],["p-fa31b2de.system",[[0,"taro-page-meta-core"]]],["p-7ca2d075.system",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-02465454.system",[[4,"taro-pull-to-refresh-core",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-27041d86.system",[[0,"taro-rich-text-core",{"nodes":[1],"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1]}]]],["p-3b36196b.system",[[0,"taro-root-portal-core"]]],["p-0fc790c0.system",[[0,"taro-rtc-room-core"]]],["p-6282bdee.system",[[0,"taro-rtc-room-item-core"]]],["p-ebad862a.system",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"mpScrollIntoViewAlignment":[1,"scroll-into-view-alignment"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[1,"scroll","handleScroll"],[1,"touchmove","handleTouchMove"]]]]],["p-75b4c1fc.system",[[0,"taro-share-element-core"]]],["p-6664a2ca.system",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-5884c108.system",[[0,"taro-slot-core"]]],["p-855619b6.system",[[0,"taro-snapshot-core"]]],["p-156e9634.system",[[0,"taro-span-core"]]],["p-75ded8a0.system",[[0,"taro-sticky-header-core"]]],["p-61a325d2.system",[[0,"taro-sticky-section-core"]]],["p-b4577a12.system",[[0,"taro-switch-core",{"type":[1],"checked":[1028],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}]]],["p-1bd4da3b.system",[[0,"taro-tab-item-core"]]],["p-1eac5291.system",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-0f480c38.system",[[0,"taro-tabs-core"]]],["p-57911e2c.system",[[4,"taro-text-core",{"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1025],"numberOfLines":[2,"number-of-lines"]}]]],["p-1c37143a.system",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-12beb90a.system",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-91ee1f8a.system",[[0,"taro-voip-room-core"]]],["p-4ac48df1.system",[[0,"taro-web-view-core",{"src":[1]}]]],["p-0a64f78c.system",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"textProps":[16],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[3,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[3,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-e5ef41f2.system",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)}))}}}));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as o,g as n}from"./p-e62a1287.js";import e from"hammerjs";const a=class{constructor(s){t(this,s),this.onTap=i(this,"tap",7),this.currentRotation=0,this._getCenterLocation=t=>{this.map.getOverlays().forEach((t=>{t instanceof BMapGL.Marker&&t.isCenterMarker&&this.map.removeOverlay(t)})),t.iconPath="https://img0.baidu.com/it/u=2604176863,3349829508&fm=253&fmt=auto&app=138&f=PNG?w=243&h=243";const i=new BMapGL.Icon(t.iconPath,new BMapGL.Size(20,30)),s=[this.longitude,this.latitude],o=new BMapGL.Marker(new BMapGL.Point(this.longitude,this.latitude),{icon:i});return o.isCenterMarker=!0,this.map.addOverlay(o),s},this._setLocMarkerIcon=t=>{const i=new BMapGL.Icon(t.iconPath,new BMapGL.Size(20,30)),s=new BMapGL.Point(116.404,39.915),o=new BMapGL.Marker(s,{icon:i});this.map.addOverlay(o)},this._translateMarker=t=>{let i=t.destination.latitude;const s=t.destination.longitude;i<-80&&i>=-90&&(i=t.destination.latitude+10);const o=new BMapGL.Point(s,i),n={flagId:!0,flagCoordinate:!0},e={errMsg:"animationEnd:ok"},a=this.map.getOverlays().find((i=>i instanceof BMapGL.Marker&&i.id===t.markerId));if(!a)return console.error(`Marker "${t.markerId}" not found.`),n.flagId=!1,n;if(i>90||i<-90||s>180||s<-180||isNaN(i)||isNaN(s))return n.flagCoordinate=!1,n;const h=a.getPosition(),l=(o.lng-h.lng)/(t.duration/16),r=(o.lat-h.lat)/(t.duration/16),d=a.getRotation(),p=t.rotate;this.currentRotation?this.currentRotation+=p:this.currentRotation=p;const c=(this.currentRotation-d)/(t.duration/16);let u=h,v=d;if(!t.moveWithRotate&&t.autoRotate){let i=0;const s=setInterval((()=>{if(u=new BMapGL.Point(u.lng+l,u.lat+r),a.setPosition(u),i++,i>=t.duration/16){clearInterval(s);let i=0;const o=setInterval((()=>{v+=c,a.setRotation(v),i++,i>=t.duration/16&&(clearInterval(o),null==t||t.animationEnd(e))}),16)}}),16)}else if(t.moveWithRotate&&t.autoRotate){let i=0;const s=setInterval((()=>{u=new BMapGL.Point(u.lng+l,u.lat+r),a.setPosition(u),v+=c,a.setRotation(v),i++,i>=t.duration/16&&(clearInterval(s),null==t||t.animationEnd(e))}),16)}else if(t.moveWithRotate&&!t.autoRotate){let i=0;const s=setInterval((()=>{u=new BMapGL.Point(u.lng+l,u.lat+r),a.setPosition(u),i++,i>=t.duration/16&&(clearInterval(s),null==t||t.animationEnd(e))}),16)}return n},this._includePoints=t=>{const i=t.points.map((t=>new BMapGL.Point(t.longitude,t.latitude))),s=this.map.getZoom(),o=this.map.getCenter(),n=this.map.getViewport(i);this.map.centerAndZoom(n.center,n.zoom);const e=this.map.getBounds();let a=!0;for(let t=0;t<i.length;t++)if(!e.containsPoint(i[t])){this.map.centerAndZoom(o,s),a=!1;break}return a},this._getRegion=()=>{const t=this.map.getBounds(),i=t.getSouthWest(),s=t.getNorthEast();return{southwest:{lat:i.lat,lng:i.lng},northeast:{lat:s.lat,lng:s.lng}}},this._getRotate=()=>{let t=this.rotate;return(t<0||t>360)&&(t=0),t},this._getSkew=()=>{let t=this.skew;return(t<0||t>40)&&(t=0),t},this._getScale=()=>this.scale,this._setCenterOffset=t=>{const[i,s]=t.offset,o=this.map.getSize(),n=Math.max(.25*o.width,Math.min(.75*o.width,i*o.width)),e=Math.max(.25*o.height,Math.min(.75*o.height,s*o.height)),a=new BMapGL.Pixel(n,e),h=this.map.pixelToPoint(a);this.map.panTo(h)},this._addMarkers=t=>{t.clear&&this.map.clearOverlays(this.markers),t.markers.forEach((i=>{var s,o,n,a,h,l,r,d,p,c,u,v,M,f;if(i.latitude&&i.longitude&&i.iconPath){const b=new BMapGL.Point(i.longitude,i.latitude),w=new BMapGL.Marker(b,{enableClicking:!0});if(this.map.addOverlay(w),w.id=i.id,w.alpha=i.alpha,i.zIndex&&w.setZIndex(i.zIndex),i.width&&i.height&&i.iconPath){const t=new BMapGL.Icon(i.iconPath,new BMapGL.Size(i.width,i.height));w.setIcon(t)}else{if(!i.iconPath)return void console.error("没有找到iconPath图片路径");{const t=new Image;t.src=i.iconPath,t.style.opacity=String(i.alpha),t.onload=()=>{const s=new BMapGL.Size(t.width,t.height),o=new BMapGL.Icon(t.src,s);o.imageOffset=new BMapGL.Size(0,0,i.alpha||1),w.setIcon(o)}}}const B=i.rotate?i.rotate:0;if(B&&w.setRotation(B),i.anchor){const t=(null!==(o=null===(s=i.anchor)||void 0===s?void 0:s.x)&&void 0!==o?o:0)*(i.width||0),e=(null!==(a=null===(n=i.anchor)||void 0===n?void 0:n.y)&&void 0!==a?a:0)*(i.height||0);w.setOffset(new BMapGL.Size(t,e))}if(!i.callout&&i.title&&new e(this.mapRef).on("tap",(i=>{const s=i.center,o=s.x,n=s.y;t.markers.forEach((t=>{const i=document.getElementsByClassName("bmap-container")[0].getBoundingClientRect(),s=i.left,e=i.top,a=new BMapGL.Point(t.longitude,t.latitude),h=this.map.pointToPixel(a),l=h.y+e;if(Math.sqrt(Math.pow(o-(h.x+s),2)+Math.pow(n-l,2))<15&&t.id===w.id){const i=new BMapGL.InfoWindow(`<div style="text-align:center">${t.title}</div>`);this.map.openInfoWindow(i,b)}}))})),i.callout){const s=(null===(h=i.callout)||void 0===h?void 0:h.anchorX)?null===(l=i.callout)||void 0===l?void 0:l.anchorX:0,o=(null===(r=i.callout)||void 0===r?void 0:r.anchorY)?null===(d=i.callout)||void 0===d?void 0:d.anchorY:0,n=new BMapGL.InfoWindow(`<div style="\n padding: ${null===(p=i.callout)||void 0===p?void 0:p.padding}px;\n color:${null===(c=i.callout)||void 0===c?void 0:c.color};\n text-align:${null===(u=i.callout)||void 0===u?void 0:u.textAlign};"\n >\n <p style="font-size:${null===(v=i.callout)||void 0===v?void 0:v.fontSize}px">${(null===(M=i.callout)||void 0===M?void 0:M.content)||""}</p>\n </div>`,{width:200,height:100,offset:new BMapGL.Size(s-24,o-20)});if(w.callout=n,this.map.addOverlay(w),"ALWAYS"===(null===(f=i.callout)||void 0===f?void 0:f.display)){w.callout.disableCloseOnClick();const t=w.getPosition();w.callout.addEventListener("open",(function(){var s,o,n,e;console.log(w.callout);const a=document.querySelector(".BMap_bubble_pop");if(a){let h=a.querySelector(".triangle");h||(h=document.createElement("div"),h.className="triangle",a.appendChild(h));const l=document.querySelector(".BMap_bubble_pop>img");l&&l.setAttribute("style",`position: absolute;transform: translate(-50%, 0); top: ${t.lat-100}px; left: ${t.lng-20}px;display:none`);const r=null===(s=i.callout)||void 0===s?void 0:s.bgColor;let d=(null===(o=i.callout)||void 0===o?void 0:o.borderWidth)||5;const p=null===(n=i.callout)||void 0===n?void 0:n.borderColor,c=null===(e=i.callout)||void 0===e?void 0:e.borderRadius;d=Math.min(d,15),h.setAttribute("style",`width:0;height:0;border-left:${d}px solid transparent;border-right:${d}px solid transparent;border-top:${d}px solid ${p};position:absolute;left:83px;bottom:-${2*d}px`),a.setAttribute("style",`background-color:${r};top:${t.lat-120}px; left:${t.lng-100}px;position: absolute;border: ${d}px solid ${p};border-radius:${c}px; `)}})),this.map.openInfoWindow(w.callout,b)}else new e(this.mapRef).on("tap",(i=>{const s=i.center,o=s.x,n=s.y;t.markers.forEach((t=>{const i=document.getElementsByClassName("bmap-container")[0].getBoundingClientRect(),s=i.left,e=i.top,a=new BMapGL.Point(t.longitude,t.latitude),h=this.map.pointToPixel(a),l=h.y+e;if(Math.sqrt(Math.pow(o-(h.x+s),2)+Math.pow(n-l,2))<15&&t.id===w.id){const i=w.getPosition();w.callout.addEventListener("open",(function(){var s,o,n,e;console.log(w.callout);const a=document.querySelector(".BMap_bubble_pop");if(a){let h=a.querySelector(".triangle");h||(h=document.createElement("div"),h.className="triangle",a.appendChild(h));const l=document.querySelector(".BMap_bubble_pop>img");l&&l.setAttribute("style",`position: absolute;transform: translate(-50%, 0); top: ${i.lat-100}px; left: ${i.lng-20}px;display:none`);const r=null===(s=t.callout)||void 0===s?void 0:s.bgColor;let d=(null===(o=t.callout)||void 0===o?void 0:o.borderWidth)||5;const p=null===(n=t.callout)||void 0===n?void 0:n.borderColor,c=null===(e=t.callout)||void 0===e?void 0:e.borderRadius;d=Math.min(d,15),h.setAttribute("style",`width:0;height:0;border-left:${d}px solid transparent;border-right:${d}px solid transparent;border-top:${d}px solid ${p};position:absolute;left:83px;bottom:-${2*d}px`),a.setAttribute("style",`background-color:${r};top:${i.lat-120}px; left:${i.lng-100}px;position: absolute;border: ${d}px solid ${p};border-radius:${c}px; `)}})),this.map.openInfoWindow(w.callout,b)}else w.callout.enableCloseOnClick()}))}))}if(i.label){const t=i.label.content||"",s={position:b,offset:new BMapGL.Size(i.label.anchorX||0,i.label.anchorY||0)},o=new BMapGL.Label(t,s);o.setStyle({color:i.label.color,fontSize:i.label.fontSize+"px",borderWidth:i.label.borderWidth+"px",borderColor:i.label.borderColor,borderRadius:i.label.borderRadius+"px",background:i.label.bgColor,padding:i.label.padding+"px"}),w.setLabel(o)}}}))},this._removeMarkers=t=>{const i=this.map.getOverlays();let s={};return t.markerIds.forEach((t=>{const o=i.find((i=>i instanceof BMapGL.Marker&&String(i.id)===t));s=o,this.map.removeOverlay(o)})),s},this._moveAlong=t=>{const i=t.path,s=t.markerId,o=t.duration,n=t.autoRotate,e=this.map.getOverlays().find((t=>t instanceof BMapGL.Marker&&t.id===s)),a=i.map((t=>new BMapGL.Point(t.longitude,t.latitude))),h={flagId:!0,flagCoordinate:!0};if(!e)return console.error(`Marker "${s}" not found.`),h.flagId=!1,h;for(let t=0;t<a.length;t++){const i=a[t];if(i.lat<-80&&i.lat>=-90&&(i.lat+=10),i.lng<-180||i.lng>180||i.lat<-90||i.lat>90||isNaN(i.lng)||isNaN(i.lat))return h.flagCoordinate=!1,h}if(h.flagId&&h.flagCoordinate){const t=performance.now(),i=s=>{const h=Math.min((s-t)/o,1),l=this.getPointOnPath(a,h);if(e.setPosition(l),n&&h<1){const t=this.getPointOnPath(a,Math.min(h+.01,1)),i=this.calculateRotation(l,t);e.setRotation(i)}h<1?requestAnimationFrame(i):(e.setPosition(a[a.length-1]),e.setRotation(0))};requestAnimationFrame(i)}return h},this.getPointOnPath=(t,i)=>{const s=this.calculateTotalLength(t)*i;let o=0;for(let i=0;i<t.length-1;i++){const n=this.map.getDistance(t[i],t[i+1]);if(o+n>=s){const e=(s-o)/n;return new BMapGL.Point(t[i].lng+(t[i+1].lng-t[i].lng)*e,t[i].lat+(t[i+1].lat-t[i].lat)*e)}o+=n}return t[t.length-1]},this.calculateTotalLength=t=>{let i=0;for(let s=0;s<t.length-1;s++)i+=this.map.getDistance(t[s],t[s+1]);return i},this.calculateRotation=(t,i)=>{let s=Math.atan2(i.lat-t.lat,i.lng-t.lng)*(180/Math.PI);return s=90-s,s},this._addGroundOverlay=t=>{const{src:i,opacity:s,bounds:o,visible:n,id:e,zIndex:a}=t;let h=!0;if(o.southwest.longitude>=o.northeast.longitude||o.southwest.latitude>=o.northeast.latitude)return void(h=!1);if(o.southwest.latitude>90||o.southwest.latitude<-90||o.southwest.longitude>180||o.southwest.longitude<-180||isNaN(o.southwest.latitude)||isNaN(o.southwest.longitude))return void(h=!1);if(o.northeast.latitude>90||o.northeast.latitude<-90||o.northeast.longitude>180||o.northeast.longitude<-180||isNaN(o.northeast.latitude)||isNaN(o.northeast.longitude))return void(h=!1);const l=new BMapGL.Bounds(new BMapGL.Point(o.southwest.longitude,o.southwest.latitude),new BMapGL.Point(o.northeast.longitude,o.northeast.latitude));function r(t,i,s,o,n,e,a){this._bounds=t,this._imageUrl=i,this._map=s,this._visible=o,this._opacity=n,this._zIndex=e,this._id=a}(r.prototype=new BMapGL.Overlay).initialize=function(t){if(document.getElementById(this._id)){const t=document.getElementById(this._id);null==t||t.remove()}if(this._map=t,!this._div){const t=document.createElement("div");t.id=this._id,t.style.position="absolute",t.style.border="none",t.style.zIndex=this._zIndex;const i=document.createElement("img");i.src=this._imageUrl,i.style.opacity=this._opacity<0?"1":this._opacity,t.appendChild(i),this._div=t}return t.addEventListener("zoomend",(()=>{const i=t.pointToOverlayPixel(this._bounds.getSouthWest()),s=t.pointToOverlayPixel(this._bounds.getNorthEast()),o=s.x-i.x,n=i.y-s.y;this._div.style.width=o+"px",this._div.style.height=n+"px";const e=this._div.querySelector("img");e.style.width=o+"px",e.style.height=n+"px"})),t.getPanes().labelPane.appendChild(this._div),this._div},r.prototype.draw=function(){const i=this._map.pointToOverlayPixel({lat:t.bounds.northeast.latitude,lng:t.bounds.southwest.longitude});this._div.style.left=i.x+"px",this._div.style.top=i.y+"px";const s=this._map.getBounds(),o=this._map.pointToPixel(s.getSouthWest()),n=this._map.pointToPixel(s.getNorthEast()),e=n.x-o.x,a=n.y-o.y,h=this._map.getZoom(),l=e*Math.pow(2,18-h),r=a*Math.pow(2,18-h);this._div.style.width=l+"px",this._div.style.height=r+"px",this._div.style.display=this._visible?"block":"none";const d=this._opacity<0?"1":this._opacity;this._div.getElementsByTagName("img")[0].style.opacity=d};const d=new r(l,i,this.map,n,s,a,e);this.map.addOverlay(d);const p=this.map.getOverlays().sort(((t,i)=>t._zIndex-i._zIndex));this.groundOverlay=d,p.forEach((t=>t.draw()));const c=this.map.getZoom();return c<20?(this.map.setZoom(c+1),this.map.setZoom(c)):(this.map.setZoom(c-1),this.map.setZoom(c)),h},this._updateGroundOverlay=t=>{const{src:i,opacity:s,bounds:o,visible:n,id:e,zIndex:a}=t;let h,l=!0,r=!0,d={};const p=this.map.getOverlays().find((t=>t._id===e));if(!p)return l=!1,d={flagId:l,flagCoordinate:r},h=Object.assign({},d),h;if((o.southwest.longitude>=o.northeast.longitude||o.southwest.latitude>=o.northeast.latitude)&&(r=!1,d={flagId:l,flagCoordinate:r},h=Object.assign({},d)),(o.southwest.latitude>90||o.southwest.latitude<-90||o.southwest.longitude>180||o.southwest.longitude<-180||isNaN(o.southwest.latitude)||isNaN(o.southwest.longitude))&&(r=!1,d={flagId:l,flagCoordinate:r},h=Object.assign({},d)),(o.northeast.latitude>90||o.northeast.latitude<-90||o.northeast.longitude>180||o.northeast.longitude<-180||isNaN(o.northeast.latitude)||isNaN(o.northeast.longitude))&&(r=!1,d={flagId:l,flagCoordinate:r},h=Object.assign({},d)),l&&r){const t=new BMapGL.Bounds(new BMapGL.Point(o.southwest.longitude,o.southwest.latitude),new BMapGL.Point(o.northeast.longitude,o.northeast.latitude)),c=this.map.getZoom();if(p){const o=document.getElementById(e);if(o){const e=o.querySelector("img");if(e){o.style.opacity=s<0?"1":s,e.style.display=n?"block":"none",o.style.zIndex=a;const h=new Image;h.onload=()=>{e.src=i;const s=t.getNorthEast().lng-t.getSouthWest().lng,o=this.map.getSize().width/Math.pow(2,18-c)*s,n=o*(h.naturalHeight/h.naturalWidth);e.style.width=`${o}px`,e.style.height=`${n}px`,p._bounds=t,p.draw(),this.map.panTo(this.map.getCenter()),p.draw()},h.src=i}}}else console.error(`未找到id为${e}的元素`);return d={flagId:l,flagCoordinate:r},h=Object.assign({},d),h}return h},this._removeGroundOverlay=t=>{let i="";const s=this.map.getOverlays().find((i=>i._id===t.id));return i=s,s&&this.map.removeOverlay(s),i},this._setBoundary=t=>{let i=t.northeast.latitude,s=t.southwest.latitude,o=!0;if(t.northeast.latitude<=-80&&t.northeast.latitude>=-90&&(i=t.northeast.latitude+10),t.southwest.latitude<=-80&&t.southwest.latitude>=-90&&(s=t.southwest.latitude+10),t.northeast.latitude<-90||t.northeast.latitude>90||t.northeast.longitude<-180||t.northeast.longitude>180||isNaN(t.northeast.latitude)||isNaN(t.northeast.longitude)||t.northeast.longitude<t.southwest.longitude||t.northeast.latitude<t.southwest.latitude)return void(o=!1);if(t.southwest.latitude<-90||t.southwest.latitude>90||t.southwest.longitude<-180||t.southwest.longitude>180||isNaN(t.southwest.latitude)||isNaN(t.southwest.longitude))return void(o=!1);const n=new BMapGL.Point(t.northeast.longitude,i),e=new BMapGL.Point(t.southwest.longitude,s),a=new BMapGL.Bounds(e,n),h=this.map.getViewport([n,e]);return this.map.centerAndZoom(new BMapGL.Point(h.center.lng,h.center.lat),h.zoom+2),this.map.addOverlay(new BMapGL.Polygon([new BMapGL.Point(a.sw.lng,a.sw.lat),new BMapGL.Point(a.sw.lng,a.ne.lat),new BMapGL.Point(a.ne.lng,a.ne.lat),new BMapGL.Point(a.ne.lng,a.sw.lat)],{fillOpacity:0})),BMapGLLib.AreaRestriction.setBounds(this.map,a),o},this.latitude=void 0,this.longitude=void 0,this.scale=void 0,this.minScale=void 0,this.maxScale=void 0,this.markers=void 0,this.polyline=void 0,this.circles=void 0,this.polygons=void 0,this.subkey=void 0,this.layerStyle=void 0,this.rotate=void 0,this.skew=void 0,this.showCompass=void 0,this.showScale=void 0,this.enableOverlooking=void 0,this.enableZoom=void 0,this.enableScroll=void 0,this.enableRotate=void 0,this.enableSatellite=void 0,this.enableTraffic=void 0,this.enableBuilding=void 0,this.enableAutoMaxOverlooking=void 0,this.enable3D=void 0,this.width="100%",this.height="100%"}async componentDidLoad(){if(await this.loadMapScript(),await this.LoadBmapLibScript(),this.mapRef){if(this.mapRef.addEventListener("touchmove",(t=>{t.cancelable&&t.preventDefault()})),this.map=new BMapGL.Map(this.mapRef),this.map.removeControl(this.map.getMapType()),this.latitude<-90||this.latitude>90||this.longitude<-180||this.longitude>180||isNaN(this.latitude)||isNaN(this.longitude))return void console.error("请正确设置中心经纬度");let t=isNaN(this.scale)?16:this.scale,i=isNaN(this.minScale)?3:this.minScale,s=isNaN(this.maxScale)?16:this.maxScale;const o=new BMapGL.Point(this.longitude,this.latitude);i<3||i>20?(i=3,this.map.setMinZoom(3)):this.map.setMinZoom(i),s>20||s<3?(s=20,this.map.setMaxZoom(20)):this.map.setMaxZoom(s),i>s&&(i=3,this.map.setMinZoom(3),s=20,this.map.setMaxZoom(20)),i<=16&&s>=16?(t>=i&&t<=s||(t=16),this.map.centerAndZoom(o,t)):t>=i&&t<=s?this.map.centerAndZoom(o,t):t<i?(t=i,this.map.centerAndZoom(o,i)):(t=s,this.map.centerAndZoom(o,s)),Array.isArray(this.markers)&&this.addMarkers(this.markers),Array.isArray(this.polyline)&&this.polyline.forEach((t=>{if(t.points){const i=t.points.map((t=>new BMapGL.Point(t.longitude,t.latitude))),s=new BMapGL.Polyline(i,{strokeColor:t.color,strokeWeight:t.width,strokeStyle:t.dottedLine?"dashed":"solid",strokeOpacity:1});this.map.addOverlay(s)}})),Array.isArray(this.circles)&&this.circles.forEach((t=>{if(t.latitude&&t.longitude&&t.radius){const i=new BMapGL.Point(t.longitude,t.latitude),s=new BMapGL.Circle(i,t.radius,{strokeColor:t.color,fillColor:t.fillColor,strokeWeight:t.strokeWidth});this.map.addOverlay(s)}})),Array.isArray(this.polygons)&&this.polygons.forEach((t=>{const i=t.points.map((t=>new BMapGL.Point(t.longitude,t.latitude))),s=new BMapGL.Polygon(i,{strokeColor:t.strokeColor,fillColor:t.fillColor,strokeWeight:t.strokeWidth});this.map.addOverlay(s)})),0===this.layerStyle?this.layerStyle&&this.map.setMapStyleV2({styleId:this.subkey}):1===(this.layerStyle?this.layerStyle:1)&&this.map.setMapStyleV2({styleId:this.subkey});const n=this.skew?this.skew:0;if(this.map.setTilt(!0===(!0===this.enable3D&&this.enable3D)?!0===(!0===this.enableOverlooking&&this.enableOverlooking)?!0===(!0===this.enableAutoMaxOverlooking&&this.enableAutoMaxOverlooking)?75:45:n>=0&&n<=40?n:0:0),!0===(!0===this.showCompass&&this.showCompass)){const t=new BMapGL.NavigationControl3D({anchor:BMAP_ANCHOR_TOP_RIGHT,type:3});this.map.addControl(t)}if(!0===(!0===this.showScale&&this.showScale)){const t=new BMapGL.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT});this.map.addControl(t)}if(!0===(!1!==this.enableZoom||this.enableZoom)&&this.map.enableScrollWheelZoom(this.enableZoom),!0===this.enableZoom&&this.mapRef?this.map.enablePinchToZoom():this.map.disablePinchToZoom(),!0===(!1!==this.enableScroll||this.enableScroll)?this.map.enableDragging():this.map.disableDragging(),this.map.setHeading((this.rotate?this.rotate:0)>=0&&this.rotate<=360?this.rotate:0),!0===this.enableRotate&&this.map.enableRotateGestures(),!0===(!0===this.enableSatellite&&this.enableSatellite)&&this.mapRef){const t=new BMapGL.MapTypeControl({mapTypes:[BMAP_NORMAL_MAP,BMAP_SATELLITE_MAP]});this.map.addControl(t)}!0===(!0===this.enableTraffic&&this.enableTraffic)&&this.mapRef&&this.map.setTrafficOn(),!1===(!1!==this.enableBuilding||this.enableBuilding)&&this.map.setDisplayOptions({building:!1})}this.map&&new e(this.mapRef).on("tap",(t=>{const i=this.map.pixelToPoint({x:t.center.x,y:t.center.y});this.onTap.emit({longitude:i.lng,latitude:i.lat})}))}disconnectedCallback(){this.map&&this.map.destroy()}addMarkers(t){const i=[];t.forEach((t=>{var s,o,n,a,h,l,r,d,p,c,u,v,M,f;if(i.includes(t.id))console.error("请输入不同的marker的id");else if(i.push(t.id),t.latitude&&t.longitude&&t.iconPath&&t.id){if(t.latitude<-90||t.latitude>90||t.longitude<-180||t.longitude>180)return void console.error("请正确设置marker的经纬度");const i=new BMapGL.Point(t.longitude,t.latitude),b=new BMapGL.Marker(i,{enableClicking:!0});if(b.id=t.id,b.alpha=t.alpha,t.zIndex&&b.setZIndex(t.zIndex),t.width&&t.height){const i=document.createElement("canvas");i.width=2*t.width,i.height=2*t.height;const s=i.getContext("2d"),o=new Image;o.crossOrigin="Anonymous",o.src=t.iconPath,o.onload=function(){s.drawImage(o,0,0,2*t.width,2*t.height);const n=new BMapGL.Icon(i.toDataURL(),new BMapGL.Size(t.width,t.height),{anchor:new BMapGL.Size(0,0)});b.setIcon(n)}}else{const i=new Image;i.src=t.iconPath,i.style.opacity=String(t.alpha),i.onload=()=>{const s=new BMapGL.Size(i.width,i.height),o=new BMapGL.Icon(i.src,s);o.imageOffset=new BMapGL.Size(0,0,t.alpha||1),b.setIcon(o)}}const w=t.rotate?t.rotate:0;w>=0&&w<=360&&b.setRotation(w);const B=null!==(o=null===(s=t.anchor)||void 0===s?void 0:s.x)&&void 0!==o?o:.5,L=null!==(a=null===(n=t.anchor)||void 0===n?void 0:n.y)&&void 0!==a?a:1;if(b.setOffset(B>=0&&B<=1&&L>=0&&L<=1?new BMapGL.Size(-B*(t.width||0),-L*(t.height||0)):new BMapGL.Size(-.5*(t.width||0),-1*(t.height||0))),!t.callout&&t.title&&new e(this.mapRef).on("tap",(t=>{const s=t.center,o=s.x,n=s.y;this.markers.forEach((t=>{const s=document.getElementsByClassName("bmap-container")[0].getBoundingClientRect(),e=s.left,a=s.top,h=new BMapGL.Point(t.longitude,t.latitude),l=this.map.pointToPixel(h),r=l.y+a;if(Math.sqrt(Math.pow(o-(l.x+e),2)+Math.pow(n-r,2))<15&&t.id===b.id){const s=new BMapGL.InfoWindow(`<div style="text-align:center">${t.title}</div>`);this.map.openInfoWindow(s,i)}}))})),t.callout){const s=(null===(h=t.callout)||void 0===h?void 0:h.anchorX)?null===(l=t.callout)||void 0===l?void 0:l.anchorX:0,o=(null===(r=t.callout)||void 0===r?void 0:r.anchorY)?null===(d=t.callout)||void 0===d?void 0:d.anchorY:0,n=new BMapGL.InfoWindow(`<div style="\n padding: ${null===(p=t.callout)||void 0===p?void 0:p.padding}px;\n color:${null===(c=t.callout)||void 0===c?void 0:c.color};\n text-align:${null===(u=t.callout)||void 0===u?void 0:u.textAlign};"\n >\n <p style="font-size:${null===(v=t.callout)||void 0===v?void 0:v.fontSize}px">${(null===(M=t.callout)||void 0===M?void 0:M.content)||""}</p>\n </div>`,{width:200,height:100,offset:new BMapGL.Size(s-24,o-20)});if(b.callout=n,this.map.addOverlay(b),"ALWAYS"===(null===(f=t.callout)||void 0===f?void 0:f.display)){b.callout.disableCloseOnClick();const s=b.getPosition();b.callout.addEventListener("open",(function(){var i,o,n,e;const a=document.querySelector(".BMap_bubble_pop");if(a){let h=a.querySelector(".triangle");h||(h=document.createElement("div"),h.className="triangle",a.appendChild(h));const l=document.querySelector(".BMap_bubble_pop>img");l&&l.setAttribute("style",`position: absolute;transform: translate(-50%, 0); top: ${s.lat-100}px; left: ${s.lng-20}px;display:none`);const r=null===(i=t.callout)||void 0===i?void 0:i.bgColor;let d=(null===(o=t.callout)||void 0===o?void 0:o.borderWidth)||5;const p=null===(n=t.callout)||void 0===n?void 0:n.borderColor,c=null===(e=t.callout)||void 0===e?void 0:e.borderRadius;d=Math.min(d,15),h.setAttribute("style",`width:0;height:0;borderLeft:${d}px solid transparent;borderRight:${d}px solid transparent;borderTop:${d}px solid ${p};position:absolute;left:83px;bottom:-${2*d}px`),a.setAttribute("style",`background-color:${r};top:${s.lat-120}px; left:${s.lng-100}px;position: absolute;border: ${d}px solid ${p};border-radius:${c}px; `)}})),this.map.openInfoWindow(b.callout,i)}else new e(this.mapRef).on("tap",(t=>{const s=t.center,o=s.x,n=s.y;this.markers.forEach((t=>{const s=document.getElementsByClassName("bmap-container")[0].getBoundingClientRect(),e=s.left,a=s.top,h=new BMapGL.Point(t.longitude,t.latitude),l=this.map.pointToPixel(h),r=l.y+a;if(Math.sqrt(Math.pow(o-(l.x+e),2)+Math.pow(n-r,2))<15&&t.id===b.id){const s=b.getPosition();b.callout.addEventListener("open",(function(){var i,o,n,e;const a=document.querySelector(".BMap_bubble_pop");if(a){let h=a.querySelector(".triangle");h||(h=document.createElement("div"),h.className="triangle",a.appendChild(h));const l=document.querySelector(".BMap_bubble_pop>img");l&&l.setAttribute("style",`position: absolute;transform: translate(-50%, 0); top: ${s.lat-100}px; left: ${s.lng-20}px;display:none`);const r=null===(i=t.callout)||void 0===i?void 0:i.bgColor;let d=(null===(o=t.callout)||void 0===o?void 0:o.borderWidth)||5;const p=null===(n=t.callout)||void 0===n?void 0:n.borderColor,c=null===(e=t.callout)||void 0===e?void 0:e.borderRadius;d=Math.min(d,15),h.setAttribute("style",`width:0;height:0;border-left:${d}px solid transparent;border-right:${d}px solid transparent;border-top:${d}px solid ${p};position:absolute;left:83px;bottom:-${2*d}px`),a.setAttribute("style",`background-color:${r};top:${s.lat-120}px; left:${s.lng-100}px;position: absolute;border: ${d}px solid ${p};border-radius:${c}px; `)}})),this.map.openInfoWindow(b.callout,i)}else b.callout.enableCloseOnClick()}))}))}if(t.label){const s=t.label.content||"",o={position:i,offset:new BMapGL.Size(t.label.anchorX||0,t.label.anchorY||0)},n=new BMapGL.Label(s,o);n.setStyle({color:t.label.color,fontSize:t.label.fontSize+"px",borderWidth:t.label.borderWidth+"px",borderColor:t.label.borderColor?t.label.borderColor:"white",borderRadius:t.label.borderRadius+"px",background:t.label.bgColor,padding:t.label.padding+"px"}),b.setLabel(n)}this.map.addOverlay(b)}else console.error("请检查marker经纬度和marker自定义图标路径和id值")}))}loadMapScript(){return new Promise(((t,i)=>{const s=document.createElement("script");s.src="https://api.map.baidu.com/getscript?v=3.0&type=webgl&ak=Mb1FLBD3gfnY6bup4v6zEWh6MXwsZ9eo",s.defer=!0,s.onload=()=>t(),s.onerror=i,s.type="text/javascript",document.head.appendChild(s)}))}async LoadBmapLibScript(){return new Promise(((t,i)=>{const s=document.createElement("script");s.src="//mapopen.bj.bcebos.com/github/BMapGLLib/AreaRestriction/src/AreaRestriction.min.js",s.defer=!0,s.type="text/javascript",s.onload=()=>{t()},s.onerror=i,document.head.appendChild(s)}))}render(){return s(o,null,s("div",{id:"mapContainer",ref:t=>{t&&(this.mapRef=t)},style:{width:this.width,height:this.height}}))}get el(){return n(this)}};a.style=".BMap_cpyCtrl,.anchorBL img,.BMap_bubble_buttons{display:none}";export{a as taro_map_core}
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,e,a,o){function n(t){return t instanceof a?t:new a((function(e){e(t)}))}return new(a||(a=Promise))((function(a,i){function r(t){try{s(o.next(t))}catch(t){i(t)}}function l(t){try{s(o["throw"](t))}catch(t){i(t)}}function s(t){t.done?a(t.value):n(t.value).then(r,l)}s((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(t){return function(e){return s([t,e])}}function s(l){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,l[0]&&(a=0)),a)try{if(o=1,n&&(i=l[0]&2?n["return"]:l[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;if(n=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;n=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(l[0]===6&&a.label<i[1]){a.label=i[1];i=l;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(l);break}if(i[2])a.ops.pop();a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t];n=0}finally{o=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-75d01c60.system.js","hammerjs"],(function(t){"use strict";var e,a,o,n,i,r;return{setters:[function(t){e=t.r;a=t.c;o=t.h;n=t.H;i=t.g},function(t){r=t.default}],execute:function(){var l=".BMap_cpyCtrl,.anchorBL img,.BMap_bubble_buttons{display:none}";var s=t("taro_map_core",function(){function t(t){var o=this;e(this,t);this.onTap=a(this,"tap",7);this.currentRotation=0;this._getCenterLocation=function(t){o.map.getOverlays().forEach((function(t){if(t instanceof BMapGL.Marker&&t.isCenterMarker){o.map.removeOverlay(t)}}));t.iconPath="https://img0.baidu.com/it/u=2604176863,3349829508&fm=253&fmt=auto&app=138&f=PNG?w=243&h=243";var e=new BMapGL.Icon(t.iconPath,new BMapGL.Size(20,30));var a=[o.longitude,o.latitude];var n=new BMapGL.Marker(new BMapGL.Point(o.longitude,o.latitude),{icon:e});n.isCenterMarker=true;o.map.addOverlay(n);return a};this._setLocMarkerIcon=function(t){var e=new BMapGL.Icon(t.iconPath,new BMapGL.Size(20,30));var a=new BMapGL.Point(116.404,39.915);var n=new BMapGL.Marker(a,{icon:e});o.map.addOverlay(n)};this._translateMarker=function(t){var e=t.destination.latitude;var a=t.destination.longitude;if(e<-80&&e>=-90){e=t.destination.latitude+10}var n=new BMapGL.Point(a,e);var i={flagId:true,flagCoordinate:true};var r={errMsg:"animationEnd:ok"};var l=o.map.getOverlays();var s=l.find((function(e){return e instanceof BMapGL.Marker&&e.id===t.markerId}));if(!s){console.error('Marker "'.concat(t.markerId,'" not found.'));i.flagId=false;return i}if(e>90||e<-90||a>180||a<-180||isNaN(e)||isNaN(a)){i.flagCoordinate=false;return i}var d=s.getPosition();var u={lng:(n.lng-d.lng)/(t.duration/16),lat:(n.lat-d.lat)/(t.duration/16)};var c=s.getRotation();var p=t.rotate;if(!o.currentRotation){o.currentRotation=p}else{o.currentRotation+=p}var h=(o.currentRotation-c)/(t.duration/16);var v=d;var f=c;if(!t.moveWithRotate&&t.autoRotate){var g=0;var m=setInterval((function(){v=new BMapGL.Point(v.lng+u.lng,v.lat+u.lat);s.setPosition(v);g++;if(g>=t.duration/16){clearInterval(m);var e=0;var a=setInterval((function(){f+=h;s.setRotation(f);e++;if(e>=t.duration/16){clearInterval(a);t===null||t===void 0?void 0:t.animationEnd(r)}}),16)}}),16)}else if(t.moveWithRotate&&t.autoRotate){var b=0;var w=setInterval((function(){v=new BMapGL.Point(v.lng+u.lng,v.lat+u.lat);s.setPosition(v);f+=h;s.setRotation(f);b++;if(b>=t.duration/16){clearInterval(w);t===null||t===void 0?void 0:t.animationEnd(r)}}),16)}else if(t.moveWithRotate&&!t.autoRotate){var y=0;var M=setInterval((function(){v=new BMapGL.Point(v.lng+u.lng,v.lat+u.lat);s.setPosition(v);y++;if(y>=t.duration/16){clearInterval(M);t===null||t===void 0?void 0:t.animationEnd(r)}}),16)}return i};this._includePoints=function(t){var e=t.points.map((function(t){return new BMapGL.Point(t.longitude,t.latitude)}));var a=o.map.getZoom();var n=o.map.getCenter();var i=o.map.getViewport(e);o.map.centerAndZoom(i.center,i.zoom);var r=o.map.getBounds();var l=true;for(var s=0;s<e.length;s++){if(!r.containsPoint(e[s])){o.map.centerAndZoom(n,a);l=false;break}}return l};this._getRegion=function(){var t=o.map.getBounds();var e=t.getSouthWest();var a=t.getNorthEast();return{southwest:{lat:e.lat,lng:e.lng},northeast:{lat:a.lat,lng:a.lng}}};this._getRotate=function(){var t=o.rotate;if(t<0||t>360){t=0}return t};this._getSkew=function(){var t=o.skew;if(t<0||t>40){t=0}return t};this._getScale=function(){var t=o.scale;return t};this._setCenterOffset=function(t){var e=t.offset,a=e[0],n=e[1];var i=o.map.getSize();var r=Math.max(.25*i.width,Math.min(.75*i.width,a*i.width));var l=Math.max(.25*i.height,Math.min(.75*i.height,n*i.height));var s=new BMapGL.Pixel(r,l);var d=o.map.pixelToPoint(s);o.map.panTo(d)};this._addMarkers=function(t){if(t.clear){o.map.clearOverlays(o.markers)}t.markers.forEach((function(e){var a,n,i,l,s,d,u,c,p,h,v,f,g,m;if(e.latitude&&e.longitude&&e.iconPath){var b=new BMapGL.Point(e.longitude,e.latitude);var w=new BMapGL.Marker(b,{enableClicking:true});o.map.addOverlay(w);w.id=e.id;w.alpha=e.alpha;if(e.zIndex){w.setZIndex(e.zIndex)}if(e.width&&e.height&&e.iconPath){var y=new BMapGL.Icon(e.iconPath,new BMapGL.Size(e.width,e.height));w.setIcon(y)}else if(e.iconPath){var M=new Image;M.src=e.iconPath;M.style.opacity=String(e.alpha);M.onload=function(){var t=new BMapGL.Size(M.width,M.height);var a=new BMapGL.Icon(M.src,t);a.imageOffset=new BMapGL.Size(0,0,e.alpha||1);w.setIcon(a)}}else{console.error("没有找到iconPath图片路径");return}var x=e.rotate?e.rotate:0;if(x){w.setRotation(x)}if(e.anchor){var B=((n=(a=e.anchor)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)*(e.width||0);var L=((l=(i=e.anchor)===null||i===void 0?void 0:i.y)!==null&&l!==void 0?l:0)*(e.height||0);w.setOffset(new BMapGL.Size(B,L))}if(!e.callout&&e.title){var _=new r(o.mapRef);_.on("tap",(function(e){var a=e.center;var n=a.x;var i=a.y;var r=15;t.markers.forEach((function(t){var e=document.getElementsByClassName("bmap-container")[0];var a=e.getBoundingClientRect();var l=a.left;var s=a.top;var d=new BMapGL.Point(t.longitude,t.latitude);var u=o.map.pointToPixel(d);var c=u.x+l;var p=u.y+s;var h=Math.sqrt(Math.pow(n-c,2)+Math.pow(i-p,2));if(h<r&&t.id===w.id){var v='<div style="text-align:center">'.concat(t.title,"</div>");var f=new BMapGL.InfoWindow(v);o.map.openInfoWindow(f,b)}}))}))}if(e.callout){var B=((s=e.callout)===null||s===void 0?void 0:s.anchorX)?(d=e.callout)===null||d===void 0?void 0:d.anchorX:0;var L=((u=e.callout)===null||u===void 0?void 0:u.anchorY)?(c=e.callout)===null||c===void 0?void 0:c.anchorY:0;var P=new BMapGL.InfoWindow('<div style="\n padding: '.concat((p=e.callout)===null||p===void 0?void 0:p.padding,"px;\n color:").concat((h=e.callout)===null||h===void 0?void 0:h.color,";\n text-align:").concat((v=e.callout)===null||v===void 0?void 0:v.textAlign,';"\n >\n <p style="font-size:').concat((f=e.callout)===null||f===void 0?void 0:f.fontSize,'px">').concat(((g=e.callout)===null||g===void 0?void 0:g.content)||"","</p>\n </div>"),{width:200,height:100,offset:new BMapGL.Size(B-24,L-20)});w.callout=P;o.map.addOverlay(w);if(((m=e.callout)===null||m===void 0?void 0:m.display)==="ALWAYS"){w.callout.disableCloseOnClick();var G=w.getPosition();w.callout.addEventListener("open",(function(){var t,a,o,n;console.log(w.callout);var i=document.querySelector(".BMap_bubble_pop");if(i){var r=i.querySelector(".triangle");if(!r){r=document.createElement("div");r.className="triangle";i.appendChild(r)}var l=document.querySelector(".BMap_bubble_pop>img");if(l){l.setAttribute("style","position: absolute;transform: translate(-50%, 0); top: ".concat(G.lat-100,"px; left: ").concat(G.lng-20,"px;display:none"))}var s=(t=e.callout)===null||t===void 0?void 0:t.bgColor;var d=((a=e.callout)===null||a===void 0?void 0:a.borderWidth)||5;var u=(o=e.callout)===null||o===void 0?void 0:o.borderColor;var c=(n=e.callout)===null||n===void 0?void 0:n.borderRadius;d=Math.min(d,15);r.setAttribute("style","width:0;height:0;border-left:".concat(d,"px solid transparent;border-right:").concat(d,"px solid transparent;border-top:").concat(d,"px solid ").concat(u,";position:absolute;left:83px;bottom:-").concat(2*d,"px"));i.setAttribute("style","background-color:".concat(s,";top:").concat(G.lat-120,"px; left:").concat(G.lng-100,"px;position: absolute;border: ").concat(d,"px solid ").concat(u,";border-radius:").concat(c,"px; "))}}));o.map.openInfoWindow(w.callout,b)}else{var _=new r(o.mapRef);_.on("tap",(function(e){var a=e.center;var n=a.x;var i=a.y;var r=15;t.markers.forEach((function(t){var e=document.getElementsByClassName("bmap-container")[0];var a=e.getBoundingClientRect();var l=a.left;var s=a.top;var d=new BMapGL.Point(t.longitude,t.latitude);var u=o.map.pointToPixel(d);var c=u.x+l;var p=u.y+s;var h=Math.sqrt(Math.pow(n-c,2)+Math.pow(i-p,2));if(h<r&&t.id===w.id){var v=w.getPosition();w.callout.addEventListener("open",(function(){var e,a,o,n;console.log(w.callout);var i=document.querySelector(".BMap_bubble_pop");if(i){var r=i.querySelector(".triangle");if(!r){r=document.createElement("div");r.className="triangle";i.appendChild(r)}var l=document.querySelector(".BMap_bubble_pop>img");if(l){l.setAttribute("style","position: absolute;transform: translate(-50%, 0); top: ".concat(v.lat-100,"px; left: ").concat(v.lng-20,"px;display:none"))}var s=(e=t.callout)===null||e===void 0?void 0:e.bgColor;var d=((a=t.callout)===null||a===void 0?void 0:a.borderWidth)||5;var u=(o=t.callout)===null||o===void 0?void 0:o.borderColor;var c=(n=t.callout)===null||n===void 0?void 0:n.borderRadius;d=Math.min(d,15);r.setAttribute("style","width:0;height:0;border-left:".concat(d,"px solid transparent;border-right:").concat(d,"px solid transparent;border-top:").concat(d,"px solid ").concat(u,";position:absolute;left:83px;bottom:-").concat(2*d,"px"));i.setAttribute("style","background-color:".concat(s,";top:").concat(v.lat-120,"px; left:").concat(v.lng-100,"px;position: absolute;border: ").concat(d,"px solid ").concat(u,";border-radius:").concat(c,"px; "))}}));o.map.openInfoWindow(w.callout,b)}else{w.callout.enableCloseOnClick()}}))}))}}if(e.label){var S=e.label.content||"";var k={position:b,offset:new BMapGL.Size(e.label.anchorX||0,e.label.anchorY||0)};var C=new BMapGL.Label(S,k);C.setStyle({color:e.label.color,fontSize:e.label.fontSize+"px",borderWidth:e.label.borderWidth+"px",borderColor:e.label.borderColor,borderRadius:e.label.borderRadius+"px",background:e.label.bgColor,padding:e.label.padding+"px"});w.setLabel(C)}}}))};this._removeMarkers=function(t){var e=o.map.getOverlays();var a={};t.markerIds.forEach((function(t){var n=e.find((function(e){return e instanceof BMapGL.Marker&&String(e.id)===t}));a=n;o.map.removeOverlay(n)}));return a};this._moveAlong=function(t){var e=t.path;var a=t.markerId;var n=t.duration;var i=t.autoRotate;var r=o.map.getOverlays().find((function(t){return t instanceof BMapGL.Marker&&t.id===a}));var l=e.map((function(t){return new BMapGL.Point(t.longitude,t.latitude)}));var s={flagId:true,flagCoordinate:true};if(!r){console.error('Marker "'.concat(a,'" not found.'));s.flagId=false;return s}for(var d=0;d<l.length;d++){var u=l[d];if(u.lat<-80&&u.lat>=-90){u.lat+=10}if(u.lng<-180||u.lng>180||u.lat<-90||u.lat>90||isNaN(u.lng)||isNaN(u.lat)){s.flagCoordinate=false;return s}}if(s.flagId&&s.flagCoordinate){var c=performance.now();var p=function(t){var e=t-c;var a=Math.min(e/n,1);var s=o.getPointOnPath(l,a);r.setPosition(s);if(i&&a<1){var d=o.getPointOnPath(l,Math.min(a+.01,1));var u=o.calculateRotation(s,d);r.setRotation(u)}if(a<1){requestAnimationFrame(p)}else{r.setPosition(l[l.length-1]);r.setRotation(0)}};requestAnimationFrame(p)}return s};this.getPointOnPath=function(t,e){var a=o.calculateTotalLength(t);var n=a*e;var i=0;for(var r=0;r<t.length-1;r++){var l=o.map.getDistance(t[r],t[r+1]);if(i+l>=n){var s=(n-i)/l;var d=t[r+1].lng-t[r].lng;var u=t[r+1].lat-t[r].lat;var c=t[r].lng+d*s;var p=t[r].lat+u*s;return new BMapGL.Point(c,p)}i+=l}return t[t.length-1]};this.calculateTotalLength=function(t){var e=0;for(var a=0;a<t.length-1;a++){e+=o.map.getDistance(t[a],t[a+1])}return e};this.calculateRotation=function(t,e){var a=e.lng-t.lng;var o=e.lat-t.lat;var n=Math.atan2(o,a)*(180/Math.PI);n=90-n;return n};this._addGroundOverlay=function(t){var e=t.src,a=t.opacity,n=t.bounds,i=t.visible,r=t.id,l=t.zIndex;var s=true;if(n.southwest.longitude>=n.northeast.longitude||n.southwest.latitude>=n.northeast.latitude){s=false;return}if(n.southwest.latitude>90||n.southwest.latitude<-90||n.southwest.longitude>180||n.southwest.longitude<-180||isNaN(n.southwest.latitude)||isNaN(n.southwest.longitude)){s=false;return}if(n.northeast.latitude>90||n.northeast.latitude<-90||n.northeast.longitude>180||n.northeast.longitude<-180||isNaN(n.northeast.latitude)||isNaN(n.northeast.longitude)){s=false;return}var d=new BMapGL.Bounds(new BMapGL.Point(n.southwest.longitude,n.southwest.latitude),new BMapGL.Point(n.northeast.longitude,n.northeast.latitude));function u(t,e,a,o,n,i,r){this._bounds=t;this._imageUrl=e;this._map=a;this._visible=o;this._opacity=n;this._zIndex=i;this._id=r}u.prototype=new BMapGL.Overlay;u.prototype.initialize=function(t){var e=this;if(document.getElementById(this._id)){var a=document.getElementById(this._id);a===null||a===void 0?void 0:a.remove()}this._map=t;if(!this._div){var o=document.createElement("div");o.id=this._id;o.style.position="absolute";o.style.border="none";o.style.zIndex=this._zIndex;var n=document.createElement("img");n.src=this._imageUrl;var i=this._opacity<0?"1":this._opacity;n.style.opacity=i;o.appendChild(n);this._div=o}t.addEventListener("zoomend",(function(){var a=t.pointToOverlayPixel(e._bounds.getSouthWest());var o=t.pointToOverlayPixel(e._bounds.getNorthEast());var n=o.x-a.x;var i=a.y-o.y;e._div.style.width=n+"px";e._div.style.height=i+"px";var r=e._div.querySelector("img");r.style.width=n+"px";r.style.height=i+"px"}));t.getPanes().labelPane.appendChild(this._div);return this._div};u.prototype.draw=function(){var e={lat:t.bounds.northeast.latitude,lng:t.bounds.southwest.longitude};var a=this._map.pointToOverlayPixel(e);this._div.style.left=a.x+"px";this._div.style.top=a.y+"px";var o=this._map.getBounds();var n=this._map.pointToPixel(o.getSouthWest());var i=this._map.pointToPixel(o.getNorthEast());var r=i.x-n.x;var l=i.y-n.y;var s=this._map.getZoom();var d=r*Math.pow(2,18-s);var u=l*Math.pow(2,18-s);this._div.style.width=d+"px";this._div.style.height=u+"px";this._div.style.display=this._visible?"block":"none";var c=this._opacity<0?"1":this._opacity;this._div.getElementsByTagName("img")[0].style.opacity=c};var c=new u(d,e,o.map,i,a,l,r);o.map.addOverlay(c);var p=o.map.getOverlays().sort((function(t,e){return t._zIndex-e._zIndex}));o.groundOverlay=c;p.forEach((function(t){return t.draw()}));var h=o.map.getZoom();if(h<20){o.map.setZoom(h+1);o.map.setZoom(h)}else{o.map.setZoom(h-1);o.map.setZoom(h)}return s};this._updateGroundOverlay=function(t){var e=t.src,a=t.opacity,n=t.bounds,i=t.visible,r=t.id,l=t.zIndex;var s;var d=true;var u=true;var c={};var p=o.map.getOverlays();var h=p.find((function(t){return t._id===r}));if(!h){d=false;c={flagId:d,flagCoordinate:u};s=Object.assign({},c);return s}if(n.southwest.longitude>=n.northeast.longitude||n.southwest.latitude>=n.northeast.latitude){u=false;c={flagId:d,flagCoordinate:u};s=Object.assign({},c)}if(n.southwest.latitude>90||n.southwest.latitude<-90||n.southwest.longitude>180||n.southwest.longitude<-180||isNaN(n.southwest.latitude)||isNaN(n.southwest.longitude)){u=false;c={flagId:d,flagCoordinate:u};s=Object.assign({},c)}if(n.northeast.latitude>90||n.northeast.latitude<-90||n.northeast.longitude>180||n.northeast.longitude<-180||isNaN(n.northeast.latitude)||isNaN(n.northeast.longitude)){u=false;c={flagId:d,flagCoordinate:u};s=Object.assign({},c)}if(d&&u){var v=new BMapGL.Bounds(new BMapGL.Point(n.southwest.longitude,n.southwest.latitude),new BMapGL.Point(n.northeast.longitude,n.northeast.latitude));var f=o.map.getZoom();if(h){var g=document.getElementById(r);if(g){var m=g.querySelector("img");if(m){var b=a<0?"1":a;g.style.opacity=b;m.style.display=i?"block":"none";g.style.zIndex=l;var w=new Image;w.onload=function(){m.src=e;var t=v.getNorthEast().lng-v.getSouthWest().lng;var a=o.map.getSize().width;var n=a/Math.pow(2,18-f)*t;var i=w.naturalHeight/w.naturalWidth;var r=n*i;m.style.width="".concat(n,"px");m.style.height="".concat(r,"px");h._bounds=v;h.draw();o.map.panTo(o.map.getCenter());h.draw()};w.src=e}}}else{console.error("未找到id为".concat(r,"的元素"))}c={flagId:d,flagCoordinate:u};s=Object.assign({},c);return s}else{return s}};this._removeGroundOverlay=function(t){var e=o.map.getOverlays();var a="";var n=e.find((function(e){return e._id===t.id}));a=n;if(n){o.map.removeOverlay(n)}return a};this._setBoundary=function(t){var e=t.northeast.latitude;var a=t.southwest.latitude;var n=true;if(t.northeast.latitude<=-80&&t.northeast.latitude>=-90){e=t.northeast.latitude+10}if(t.southwest.latitude<=-80&&t.southwest.latitude>=-90){a=t.southwest.latitude+10}if(t.northeast.latitude<-90||t.northeast.latitude>90||t.northeast.longitude<-180||t.northeast.longitude>180||isNaN(t.northeast.latitude)||isNaN(t.northeast.longitude)||t.northeast.longitude<t.southwest.longitude||t.northeast.latitude<t.southwest.latitude){n=false;return}if(t.southwest.latitude<-90||t.southwest.latitude>90||t.southwest.longitude<-180||t.southwest.longitude>180||isNaN(t.southwest.latitude)||isNaN(t.southwest.longitude)){n=false;return}var i=new BMapGL.Point(t.northeast.longitude,e);var r=new BMapGL.Point(t.southwest.longitude,a);var l=new BMapGL.Bounds(r,i);var s=o.map.getViewport([i,r]);o.map.centerAndZoom(new BMapGL.Point(s.center.lng,s.center.lat),s.zoom+2);o.map.addOverlay(new BMapGL.Polygon([new BMapGL.Point(l.sw.lng,l.sw.lat),new BMapGL.Point(l.sw.lng,l.ne.lat),new BMapGL.Point(l.ne.lng,l.ne.lat),new BMapGL.Point(l.ne.lng,l.sw.lat)],{fillOpacity:0}));BMapGLLib.AreaRestriction.setBounds(o.map,l);return n};this.latitude=undefined;this.longitude=undefined;this.scale=undefined;this.minScale=undefined;this.maxScale=undefined;this.markers=undefined;this.polyline=undefined;this.circles=undefined;this.polygons=undefined;this.subkey=undefined;this.layerStyle=undefined;this.rotate=undefined;this.skew=undefined;this.showCompass=undefined;this.showScale=undefined;this.enableOverlooking=undefined;this.enableZoom=undefined;this.enableScroll=undefined;this.enableRotate=undefined;this.enableSatellite=undefined;this.enableTraffic=undefined;this.enableBuilding=undefined;this.enableAutoMaxOverlooking=undefined;this.enable3D=undefined;this.width="100%";this.height="100%"}t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,a,o,n,n,i,l,s,d,u,c,p,h,v,f,g,m,b,w,y,M;var x=this;return __generator(this,(function(B){switch(B.label){case 0:return[4,this.loadMapScript()];case 1:B.sent();return[4,this.LoadBmapLibScript()];case 2:B.sent();if(this.mapRef){this.mapRef.addEventListener("touchmove",(function(t){if(t.cancelable){t.preventDefault()}}));this.map=new BMapGL.Map(this.mapRef);this.map.removeControl(this.map.getMapType());if(this.latitude<-90||this.latitude>90||this.longitude<-180||this.longitude>180||isNaN(this.latitude)||isNaN(this.longitude)){console.error("请正确设置中心经纬度");return[2]}t=isNaN(this.scale)?16:this.scale;e=isNaN(this.minScale)?3:this.minScale;a=isNaN(this.maxScale)?16:this.maxScale;o=new BMapGL.Point(this.longitude,this.latitude);if(e<3||e>20){e=3;this.map.setMinZoom(3)}else{this.map.setMinZoom(e)}if(a>20||a<3){a=20;this.map.setMaxZoom(20)}else{this.map.setMaxZoom(a)}if(e>a){e=3;this.map.setMinZoom(3);a=20;this.map.setMaxZoom(20)}if(e<=16&&a>=16){if(t>=e&&t<=a){this.map.centerAndZoom(o,t)}else{t=16;this.map.centerAndZoom(o,t)}}else{if(t>=e&&t<=a){this.map.centerAndZoom(o,t)}else if(t<e){t=e;this.map.centerAndZoom(o,e)}else{t=a;this.map.centerAndZoom(o,a)}}if(Array.isArray(this.markers)){this.addMarkers(this.markers)}if(Array.isArray(this.polyline)){this.polyline.forEach((function(t){if(t.points){var e=t.points.map((function(t){return new BMapGL.Point(t.longitude,t.latitude)}));var a=new BMapGL.Polyline(e,{strokeColor:t.color,strokeWeight:t.width,strokeStyle:t.dottedLine?"dashed":"solid",strokeOpacity:1});x.map.addOverlay(a)}}))}if(Array.isArray(this.circles)){this.circles.forEach((function(t){if(t.latitude&&t.longitude&&t.radius){var e=new BMapGL.Point(t.longitude,t.latitude);var a=new BMapGL.Circle(e,t.radius,{strokeColor:t.color,fillColor:t.fillColor,strokeWeight:t.strokeWidth});x.map.addOverlay(a)}}))}if(Array.isArray(this.polygons)){this.polygons.forEach((function(t){var e=t.points.map((function(t){return new BMapGL.Point(t.longitude,t.latitude)}));var a=new BMapGL.Polygon(e,{strokeColor:t.strokeColor,fillColor:t.fillColor,strokeWeight:t.strokeWidth});x.map.addOverlay(a)}))}if(this.layerStyle===0){n=this.layerStyle;if(n){this.map.setMapStyleV2({styleId:this.subkey})}}else{n=this.layerStyle?this.layerStyle:1;if(n===1){this.map.setMapStyleV2({styleId:this.subkey})}}i=this.enable3D===true?this.enable3D:false;l=this.enableOverlooking===true?this.enableOverlooking:false;s=this.enableAutoMaxOverlooking===true?this.enableAutoMaxOverlooking:false;d=this.skew?this.skew:0;if(i===true){if(l===true){if(s===true){this.map.setTilt(75)}else{this.map.setTilt(45)}}else if(d>=0&&d<=40){this.map.setTilt(d)}else{this.map.setTilt(0)}}else{this.map.setTilt(0)}u=this.showCompass===true?this.showCompass:false;if(u===true){c=new BMapGL.NavigationControl3D({anchor:BMAP_ANCHOR_TOP_RIGHT,type:3});this.map.addControl(c)}p=this.showScale===true?this.showScale:false;if(p===true){h=new BMapGL.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT});this.map.addControl(h)}v=this.enableZoom===false?this.enableZoom:true;if(v===true){this.map.enableScrollWheelZoom(this.enableZoom)}if(this.enableZoom===true&&this.mapRef){this.map.enablePinchToZoom()}else{this.map.disablePinchToZoom()}f=this.enableScroll===false?this.enableScroll:true;if(f===true){this.map.enableDragging()}else{this.map.disableDragging()}g=this.rotate?this.rotate:0;if(g>=0&&this.rotate<=360){this.map.setHeading(this.rotate)}else{this.map.setHeading(0)}if(this.enableRotate===true){this.map.enableRotateGestures()}m=this.enableSatellite===true?this.enableSatellite:false;if(m===true&&this.mapRef){b=new BMapGL.MapTypeControl({mapTypes:[BMAP_NORMAL_MAP,BMAP_SATELLITE_MAP]});this.map.addControl(b)}w=this.enableTraffic===true?this.enableTraffic:false;if(w===true&&this.mapRef){this.map.setTrafficOn()}y=this.enableBuilding===false?this.enableBuilding:true;if(y===false){this.map.setDisplayOptions({building:false})}}if(this.map){M=new r(this.mapRef);M.on("tap",(function(t){var e=x.map.pixelToPoint({x:t.center.x,y:t.center.y});x.onTap.emit({longitude:e.lng,latitude:e.lat})}))}return[2]}}))}))};t.prototype.disconnectedCallback=function(){if(this.map){this.map.destroy()}};t.prototype.addMarkers=function(t){var e=this;var a=[];t.forEach((function(t){var o,n,i,l,s,d,u,c,p,h,v,f,g,m;if(a.includes(t.id)){console.error("请输入不同的marker的id");return}a.push(t.id);if(t.latitude&&t.longitude&&t.iconPath&&t.id){if(t.latitude<-90||t.latitude>90||t.longitude<-180||t.longitude>180){console.error("请正确设置marker的经纬度");return}var b=new BMapGL.Point(t.longitude,t.latitude);var w=new BMapGL.Marker(b,{enableClicking:true});w.id=t.id;w.alpha=t.alpha;if(t.zIndex){w.setZIndex(t.zIndex)}if(t.width&&t.height){var y=document.createElement("canvas");y.width=t.width*2;y.height=t.height*2;var M=y.getContext("2d");var x=new Image;x.crossOrigin="Anonymous";x.src=t.iconPath;x.onload=function(){M.drawImage(x,0,0,t.width*2,t.height*2);var e=new BMapGL.Icon(y.toDataURL(),new BMapGL.Size(t.width,t.height),{anchor:new BMapGL.Size(0,0)});w.setIcon(e)}}else{var B=new Image;B.src=t.iconPath;B.style.opacity=String(t.alpha);B.onload=function(){var e=new BMapGL.Size(B.width,B.height);var a=new BMapGL.Icon(B.src,e);a.imageOffset=new BMapGL.Size(0,0,t.alpha||1);w.setIcon(a)}}var L=t.rotate?t.rotate:0;if(L>=0&&L<=360){w.setRotation(L)}var _=(n=(o=t.anchor)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:.5;var P=(l=(i=t.anchor)===null||i===void 0?void 0:i.y)!==null&&l!==void 0?l:1;if(_>=0&&_<=1&&P>=0&&P<=1){var G=-_*(t.width||0);var S=-P*(t.height||0);w.setOffset(new BMapGL.Size(G,S))}else{var G=-.5*(t.width||0);var S=-1*(t.height||0);w.setOffset(new BMapGL.Size(G,S))}if(!t.callout&&t.title){var k=new r(e.mapRef);k.on("tap",(function(t){var a=t.center;var o=a.x;var n=a.y;var i=15;e.markers.forEach((function(t){var a=document.getElementsByClassName("bmap-container")[0];var r=a.getBoundingClientRect();var l=r.left;var s=r.top;var d=new BMapGL.Point(t.longitude,t.latitude);var u=e.map.pointToPixel(d);var c=u.x+l;var p=u.y+s;var h=Math.sqrt(Math.pow(o-c,2)+Math.pow(n-p,2));if(h<i&&t.id===w.id){var v='<div style="text-align:center">'.concat(t.title,"</div>");var f=new BMapGL.InfoWindow(v);e.map.openInfoWindow(f,b)}}))}))}if(t.callout){var G=((s=t.callout)===null||s===void 0?void 0:s.anchorX)?(d=t.callout)===null||d===void 0?void 0:d.anchorX:0;var S=((u=t.callout)===null||u===void 0?void 0:u.anchorY)?(c=t.callout)===null||c===void 0?void 0:c.anchorY:0;var C=new BMapGL.InfoWindow('<div style="\n padding: '.concat((p=t.callout)===null||p===void 0?void 0:p.padding,"px;\n color:").concat((h=t.callout)===null||h===void 0?void 0:h.color,";\n text-align:").concat((v=t.callout)===null||v===void 0?void 0:v.textAlign,';"\n >\n <p style="font-size:').concat((f=t.callout)===null||f===void 0?void 0:f.fontSize,'px">').concat(((g=t.callout)===null||g===void 0?void 0:g.content)||"","</p>\n </div>"),{width:200,height:100,offset:new BMapGL.Size(G-24,S-20)});w.callout=C;e.map.addOverlay(w);if(((m=t.callout)===null||m===void 0?void 0:m.display)==="ALWAYS"){w.callout.disableCloseOnClick();var I=w.getPosition();w.callout.addEventListener("open",(function(){var e,a,o,n;var i=document.querySelector(".BMap_bubble_pop");if(i){var r=i.querySelector(".triangle");if(!r){r=document.createElement("div");r.className="triangle";i.appendChild(r)}var l=document.querySelector(".BMap_bubble_pop>img");if(l){l.setAttribute("style","position: absolute;transform: translate(-50%, 0); top: ".concat(I.lat-100,"px; left: ").concat(I.lng-20,"px;display:none"))}var s=(e=t.callout)===null||e===void 0?void 0:e.bgColor;var d=((a=t.callout)===null||a===void 0?void 0:a.borderWidth)||5;var u=(o=t.callout)===null||o===void 0?void 0:o.borderColor;var c=(n=t.callout)===null||n===void 0?void 0:n.borderRadius;d=Math.min(d,15);r.setAttribute("style","width:0;height:0;borderLeft:".concat(d,"px solid transparent;borderRight:").concat(d,"px solid transparent;borderTop:").concat(d,"px solid ").concat(u,";position:absolute;left:83px;bottom:-").concat(2*d,"px"));i.setAttribute("style","background-color:".concat(s,";top:").concat(I.lat-120,"px; left:").concat(I.lng-100,"px;position: absolute;border: ").concat(d,"px solid ").concat(u,";border-radius:").concat(c,"px; "))}}));e.map.openInfoWindow(w.callout,b)}else{var k=new r(e.mapRef);k.on("tap",(function(t){var a=t.center;var o=a.x;var n=a.y;var i=15;e.markers.forEach((function(t){var a=document.getElementsByClassName("bmap-container")[0];var r=a.getBoundingClientRect();var l=r.left;var s=r.top;var d=new BMapGL.Point(t.longitude,t.latitude);var u=e.map.pointToPixel(d);var c=u.x+l;var p=u.y+s;var h=Math.sqrt(Math.pow(o-c,2)+Math.pow(n-p,2));if(h<i&&t.id===w.id){var v=w.getPosition();w.callout.addEventListener("open",(function(){var e,a,o,n;var i=document.querySelector(".BMap_bubble_pop");if(i){var r=i.querySelector(".triangle");if(!r){r=document.createElement("div");r.className="triangle";i.appendChild(r)}var l=document.querySelector(".BMap_bubble_pop>img");if(l){l.setAttribute("style","position: absolute;transform: translate(-50%, 0); top: ".concat(v.lat-100,"px; left: ").concat(v.lng-20,"px;display:none"))}var s=(e=t.callout)===null||e===void 0?void 0:e.bgColor;var d=((a=t.callout)===null||a===void 0?void 0:a.borderWidth)||5;var u=(o=t.callout)===null||o===void 0?void 0:o.borderColor;var c=(n=t.callout)===null||n===void 0?void 0:n.borderRadius;d=Math.min(d,15);r.setAttribute("style","width:0;height:0;border-left:".concat(d,"px solid transparent;border-right:").concat(d,"px solid transparent;border-top:").concat(d,"px solid ").concat(u,";position:absolute;left:83px;bottom:-").concat(2*d,"px"));i.setAttribute("style","background-color:".concat(s,";top:").concat(v.lat-120,"px; left:").concat(v.lng-100,"px;position: absolute;border: ").concat(d,"px solid ").concat(u,";border-radius:").concat(c,"px; "))}}));e.map.openInfoWindow(w.callout,b)}else{w.callout.enableCloseOnClick()}}))}))}}if(t.label){var O=t.label.content||"";var N={position:b,offset:new BMapGL.Size(t.label.anchorX||0,t.label.anchorY||0)};var R=new BMapGL.Label(O,N);var A=t.label.borderColor?t.label.borderColor:"white";R.setStyle({color:t.label.color,fontSize:t.label.fontSize+"px",borderWidth:t.label.borderWidth+"px",borderColor:A,borderRadius:t.label.borderRadius+"px",background:t.label.bgColor,padding:t.label.padding+"px"});w.setLabel(R)}e.map.addOverlay(w)}else{console.error("请检查marker经纬度和marker自定义图标路径和id值")}}))};t.prototype.loadMapScript=function(){return new Promise((function(t,e){var a=document.createElement("script");a.src="https://api.map.baidu.com/getscript?v=3.0&type=webgl&ak=Mb1FLBD3gfnY6bup4v6zEWh6MXwsZ9eo";a.defer=true;a.onload=function(){return t()};a.onerror=e;a.type="text/javascript";document.head.appendChild(a)}))};t.prototype.LoadBmapLibScript=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,new Promise((function(t,e){var a=document.createElement("script");a.src="//mapopen.bj.bcebos.com/github/BMapGLLib/AreaRestriction/src/AreaRestriction.min.js";a.defer=true;a.type="text/javascript";a.onload=function(){t()};a.onerror=e;document.head.appendChild(a)}))]}))}))};t.prototype.render=function(){var t=this;return o(n,null,o("div",{id:"mapContainer",ref:function(e){if(e){t.mapRef=e}},style:{width:this.width,height:this.height}}))};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());s.style=l}}}));
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-e62a1287.js";export{s as setNonce}from"./p-e62a1287.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o(JSON.parse('[["p-e1cce2f1",[[4,"taro-checkbox-core",{"name":[1],"value":[1032],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-204996e7",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-46a66c43",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-3cf08137",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-2f177716",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"currentItemId":[1,"current-item-id"],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"],"deep":[4]}]]],["p-c7836e2b",[[0,"taro-ad-core"]]],["p-79cad66b",[[0,"taro-ad-custom-core"]]],["p-68197378",[[0,"taro-animation-video-core"]]],["p-56552c9e",[[0,"taro-animation-view-core"]]],["p-c8cd6e16",[[0,"taro-ar-camera-core"]]],["p-f168fffc",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-8b0c9d3f",[[0,"taro-aweme-data-core"]]],["p-9571836f",[[0,"taro-block-core"]]],["p-1eea2828",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-292470e5",[[0,"taro-camera-core"]]],["p-f43f26cf",[[0,"taro-canvas-core",{"canvasId":[1,"id"],"height":[1537],"width":[1537],"nativeProps":[16]}]]],["p-77e82dfa",[[0,"taro-channel-live-core"]]],["p-047e4bfe",[[0,"taro-channel-video-core"]]],["p-ebb1ae64",[[0,"taro-comment-detail-core"]]],["p-e681d764",[[0,"taro-comment-list-core"]]],["p-937a6c36",[[0,"taro-contact-button-core"]]],["p-5c98f478",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-dedf50a9",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-93b02321",[[0,"taro-custom-wrapper-core"]]],["p-acb113bd",[[0,"taro-draggable-sheet-core"]]],["p-fab63183",[[0,"taro-editor-core"]]],["p-0ff5a55b",[[0,"taro-follow-swan-core"]]],["p-dc25fa81",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-c95d2b90",[[0,"taro-functional-page-navigator-core"]]],["p-aabac550",[[0,"taro-grid-builder-core"]]],["p-7e692c70",[[0,"taro-grid-view-core"]]],["p-b1f80b6b",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-43367dd1",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32],"didLoad":[32]}]]],["p-ccbaba23",[[0,"taro-inline-payment-panel-core"]]],["p-9c8bb0e6",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-bb67318d",[[0,"taro-keyboard-accessory-core"]]],["p-0f2c1ecc",[[4,"taro-label-core",{"for":[1]}]]],["p-84998109",[[0,"taro-lifestyle-core"]]],["p-f034a433",[[0,"taro-like-core"]]],["p-7fdbcf4d",[[0,"taro-list-builder-core"]]],["p-ba11ef7d",[[0,"taro-list-view-core"]]],["p-4523b1c7",[[0,"taro-live-player-core"]]],["p-be055537",[[0,"taro-live-pusher-core"]]],["p-7ebd4310",[[0,"taro-login-core"]]],["p-35dec732",[[0,"taro-lottie-core"]]],["p-bed518a3",[[0,"taro-map-core"]]],["p-be1701b2",[[0,"taro-match-media-core"]]],["p-402c7f93",[[0,"taro-native-slot-core"]]],["p-425d1d69",[[0,"taro-navigation-bar-core"]]],["p-078cb65e",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-6989c232",[[0,"taro-nested-scroll-body-core"]]],["p-f367a754",[[0,"taro-nested-scroll-header-core"]]],["p-26eb2f3f",[[0,"taro-official-account-core"]]],["p-07f27474",[[0,"taro-open-container-core"]]],["p-f8f2461f",[[0,"taro-open-data-core"]]],["p-32c0f326",[[0,"taro-page-container-core"]]],["p-2d537212",[[0,"taro-page-meta-core"]]],["p-dc08715a",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-12582166",[[4,"taro-pull-to-refresh-core",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-d5603857",[[0,"taro-rich-text-core",{"nodes":[1],"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1]}]]],["p-38b29261",[[0,"taro-root-portal-core"]]],["p-b4c7bb48",[[0,"taro-rtc-room-core"]]],["p-a50c6736",[[0,"taro-rtc-room-item-core"]]],["p-d973d536",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"mpScrollIntoViewAlignment":[1,"scroll-into-view-alignment"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[1,"scroll","handleScroll"],[1,"touchmove","handleTouchMove"]]]]],["p-c3dc7072",[[0,"taro-share-element-core"]]],["p-55e12654",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-bd57edcd",[[0,"taro-slot-core"]]],["p-f5f3a111",[[0,"taro-snapshot-core"]]],["p-ff772345",[[0,"taro-span-core"]]],["p-17e72555",[[0,"taro-sticky-header-core"]]],["p-ac2be5f3",[[0,"taro-sticky-section-core"]]],["p-03dc0283",[[0,"taro-switch-core",{"type":[1],"checked":[1028],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}]]],["p-280795f2",[[0,"taro-tab-item-core"]]],["p-7e564b00",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-3a180dc7",[[0,"taro-tabs-core"]]],["p-56a82bf3",[[4,"taro-text-core",{"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1025],"numberOfLines":[2,"number-of-lines"]}]]],["p-6cc0bcb9",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-f12feb2a",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-93a2b2e9",[[0,"taro-voip-room-core"]]],["p-d9884371",[[0,"taro-web-view-core",{"src":[1]}]]],["p-02d4d104",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"textProps":[16],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[3,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[3,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-e2e7bc16",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)));
1
+ import{p as e,b as o}from"./p-e62a1287.js";export{s as setNonce}from"./p-e62a1287.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o(JSON.parse('[["p-e1cce2f1",[[4,"taro-checkbox-core",{"name":[1],"value":[1032],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-204996e7",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-46a66c43",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-3cf08137",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-2f177716",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"currentItemId":[1,"current-item-id"],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"],"deep":[4]}]]],["p-c7836e2b",[[0,"taro-ad-core"]]],["p-79cad66b",[[0,"taro-ad-custom-core"]]],["p-68197378",[[0,"taro-animation-video-core"]]],["p-56552c9e",[[0,"taro-animation-view-core"]]],["p-c8cd6e16",[[0,"taro-ar-camera-core"]]],["p-f168fffc",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-8b0c9d3f",[[0,"taro-aweme-data-core"]]],["p-9571836f",[[0,"taro-block-core"]]],["p-1eea2828",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-292470e5",[[0,"taro-camera-core"]]],["p-f43f26cf",[[0,"taro-canvas-core",{"canvasId":[1,"id"],"height":[1537],"width":[1537],"nativeProps":[16]}]]],["p-77e82dfa",[[0,"taro-channel-live-core"]]],["p-047e4bfe",[[0,"taro-channel-video-core"]]],["p-ebb1ae64",[[0,"taro-comment-detail-core"]]],["p-e681d764",[[0,"taro-comment-list-core"]]],["p-937a6c36",[[0,"taro-contact-button-core"]]],["p-5c98f478",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-dedf50a9",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-93b02321",[[0,"taro-custom-wrapper-core"]]],["p-acb113bd",[[0,"taro-draggable-sheet-core"]]],["p-fab63183",[[0,"taro-editor-core"]]],["p-0ff5a55b",[[0,"taro-follow-swan-core"]]],["p-dc25fa81",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-c95d2b90",[[0,"taro-functional-page-navigator-core"]]],["p-aabac550",[[0,"taro-grid-builder-core"]]],["p-7e692c70",[[0,"taro-grid-view-core"]]],["p-b1f80b6b",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-43367dd1",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32],"didLoad":[32]}]]],["p-ccbaba23",[[0,"taro-inline-payment-panel-core"]]],["p-9c8bb0e6",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-bb67318d",[[0,"taro-keyboard-accessory-core"]]],["p-0f2c1ecc",[[4,"taro-label-core",{"for":[1]}]]],["p-84998109",[[0,"taro-lifestyle-core"]]],["p-f034a433",[[0,"taro-like-core"]]],["p-7fdbcf4d",[[0,"taro-list-builder-core"]]],["p-ba11ef7d",[[0,"taro-list-view-core"]]],["p-4523b1c7",[[0,"taro-live-player-core"]]],["p-be055537",[[0,"taro-live-pusher-core"]]],["p-7ebd4310",[[0,"taro-login-core"]]],["p-35dec732",[[0,"taro-lottie-core"]]],["p-d87a68f6",[[0,"taro-map-core",{"latitude":[2],"longitude":[2],"scale":[2],"minScale":[2,"min-scale"],"maxScale":[2,"max-scale"],"markers":[16],"polyline":[16],"circles":[16],"polygons":[16],"subkey":[1],"layerStyle":[2,"layer-style"],"rotate":[2],"skew":[2],"showCompass":[4,"show-compass"],"showScale":[4,"show-scale"],"enableOverlooking":[4,"enable-overlooking"],"enableZoom":[4,"enable-zoom"],"enableScroll":[4,"enable-scroll"],"enableRotate":[4,"enable-rotate"],"enableSatellite":[4,"enable-satellite"],"enableTraffic":[4,"enable-traffic"],"enableBuilding":[4,"enable-building"],"enableAutoMaxOverlooking":[4,"enable-auto-max-overlooking"],"enable3D":[4,"enable-3-d"],"width":[1],"height":[1]}]]],["p-be1701b2",[[0,"taro-match-media-core"]]],["p-402c7f93",[[0,"taro-native-slot-core"]]],["p-425d1d69",[[0,"taro-navigation-bar-core"]]],["p-078cb65e",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-6989c232",[[0,"taro-nested-scroll-body-core"]]],["p-f367a754",[[0,"taro-nested-scroll-header-core"]]],["p-26eb2f3f",[[0,"taro-official-account-core"]]],["p-07f27474",[[0,"taro-open-container-core"]]],["p-f8f2461f",[[0,"taro-open-data-core"]]],["p-32c0f326",[[0,"taro-page-container-core"]]],["p-2d537212",[[0,"taro-page-meta-core"]]],["p-dc08715a",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-12582166",[[4,"taro-pull-to-refresh-core",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-d5603857",[[0,"taro-rich-text-core",{"nodes":[1],"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1]}]]],["p-38b29261",[[0,"taro-root-portal-core"]]],["p-b4c7bb48",[[0,"taro-rtc-room-core"]]],["p-a50c6736",[[0,"taro-rtc-room-item-core"]]],["p-d973d536",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"mpScrollIntoViewAlignment":[1,"scroll-into-view-alignment"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[1,"scroll","handleScroll"],[1,"touchmove","handleTouchMove"]]]]],["p-c3dc7072",[[0,"taro-share-element-core"]]],["p-55e12654",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-bd57edcd",[[0,"taro-slot-core"]]],["p-f5f3a111",[[0,"taro-snapshot-core"]]],["p-ff772345",[[0,"taro-span-core"]]],["p-17e72555",[[0,"taro-sticky-header-core"]]],["p-ac2be5f3",[[0,"taro-sticky-section-core"]]],["p-03dc0283",[[0,"taro-switch-core",{"type":[1],"checked":[1028],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}]]],["p-280795f2",[[0,"taro-tab-item-core"]]],["p-7e564b00",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-3a180dc7",[[0,"taro-tabs-core"]]],["p-56a82bf3",[[4,"taro-text-core",{"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1025],"numberOfLines":[2,"number-of-lines"]}]]],["p-6cc0bcb9",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-f12feb2a",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-93a2b2e9",[[0,"taro-voip-room-core"]]],["p-d9884371",[[0,"taro-web-view-core",{"src":[1]}]]],["p-02d4d104",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"textProps":[16],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[3,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[3,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-e2e7bc16",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)));
@@ -1,5 +1,148 @@
1
- import { ComponentInterface } from '../../stencil-public-runtime';
1
+ import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
2
+ import { MapProps } from 'types';
2
3
  export declare class Map implements ComponentInterface {
3
- componentDidLoad(): void;
4
+ /**
5
+ * 纬度
6
+ */
7
+ latitude: number;
8
+ /**
9
+ * 经度
10
+ */
11
+ longitude: number;
12
+ /**
13
+ * 缩放级别
14
+ */
15
+ scale: number;
16
+ /**
17
+ * 最小缩放级别
18
+ */
19
+ minScale: number;
20
+ /**
21
+ * 最大缩放级别
22
+ */
23
+ maxScale: number;
24
+ /**
25
+ *标记点
26
+ */
27
+ markers: MapProps.marker[];
28
+ /**
29
+ * 路线(问题)
30
+ */
31
+ polyline: MapProps.polyline[];
32
+ /**
33
+ * 圆(问题)
34
+ */
35
+ circles: MapProps.circle[];
36
+ /**
37
+ * 多边形(参数问题)
38
+ */
39
+ polygons: MapProps.polygon[];
40
+ /**
41
+ * 个性化地图】使用的key
42
+ */
43
+ subkey: string;
44
+ /**
45
+ * 【个性化地图】配置的 style
46
+ */
47
+ layerStyle: number;
48
+ /**
49
+ * 旋转
50
+ */
51
+ rotate: number;
52
+ /**
53
+ * 倾斜
54
+ */
55
+ skew: number;
56
+ /**
57
+ * 指南针
58
+ */
59
+ showCompass: boolean;
60
+ /**
61
+ * 比例尺
62
+ */
63
+ showScale: boolean;
64
+ /**
65
+ * 是否开启俯视
66
+ */
67
+ enableOverlooking: boolean;
68
+ /**
69
+ * 是否支持缩放
70
+ */
71
+ enableZoom: boolean;
72
+ /**
73
+ * 是否支持拖动
74
+ */
75
+ enableScroll: boolean;
76
+ /**
77
+ * 是否支持旋转
78
+ */
79
+ enableRotate: boolean;
80
+ /**
81
+ * 是否开启卫星图
82
+ */
83
+ enableSatellite: boolean;
84
+ /**
85
+ * 是否开启实时路况
86
+ */
87
+ enableTraffic: boolean;
88
+ /**
89
+ * 是否展示建筑
90
+ */
91
+ enableBuilding: boolean;
92
+ /**
93
+ * 是否开启最大俯视角
94
+ */
95
+ enableAutoMaxOverlooking: boolean;
96
+ /**
97
+ * 3D楼块
98
+ */
99
+ enable3D: boolean;
100
+ /**
101
+ * 添加宽度属性
102
+ */
103
+ width: string;
104
+ /**
105
+ * 添加高度属性
106
+ */
107
+ height: string;
108
+ onTap: EventEmitter;
109
+ private currentRotation;
110
+ private map;
111
+ private mapRef;
112
+ el: HTMLElement;
113
+ groundOverlay: any;
114
+ componentDidLoad(): Promise<void>;
115
+ disconnectedCallback(): void;
116
+ addMarkers(markers: any): void;
117
+ loadMapScript(): Promise<void>;
118
+ LoadBmapLibScript(): Promise<void>;
119
+ _getCenterLocation: (option: any) => number[];
120
+ _setLocMarkerIcon: (option: any) => void;
121
+ _translateMarker: (option: any) => any;
122
+ _includePoints: (option: any) => boolean;
123
+ _getRegion: () => {
124
+ southwest: {
125
+ lat: any;
126
+ lng: any;
127
+ };
128
+ northeast: {
129
+ lat: any;
130
+ lng: any;
131
+ };
132
+ };
133
+ _getRotate: () => number;
134
+ _getSkew: () => number;
135
+ _getScale: () => number;
136
+ _setCenterOffset: (option: any) => void;
137
+ _addMarkers: (option: any) => void;
138
+ _removeMarkers: (option: any) => {};
139
+ _moveAlong: (object: any) => any;
140
+ getPointOnPath: (points: any, progress: any) => any;
141
+ calculateTotalLength: (points: any) => number;
142
+ calculateRotation: (currentPoint: any, nextPoint: any) => number;
143
+ _addGroundOverlay: (option: any) => true | undefined;
144
+ _updateGroundOverlay: (option: any) => any;
145
+ _removeGroundOverlay: (option: any) => string;
146
+ _setBoundary: (option: any) => true | undefined;
4
147
  render(): any;
5
148
  }