qy-vue-plugins 1.0.0-beta → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beijihua-map-icon/hiper-map-icon-1.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-10.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-11.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-12.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-13.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-14.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-15.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-16.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-17.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-18.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-19.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-2.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-20.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-21.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-22.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-23.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-24.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-25.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-26.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-27.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-28.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-29.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-3.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-30.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-31.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-32.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-33.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-34.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-35.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-36.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-37.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-38.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-39.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-4.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-40.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-41.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-42.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-43.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-44.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-45.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-46.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-47.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-48.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-49.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-5.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-50.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-51.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-52.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-53.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-54.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-55.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-56.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-57.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-58.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-59.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-6.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-60.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-61.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-62.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-63.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-64.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-65.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-7.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-8.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-9.png +0 -0
- package/dist/chunks/{EventKeys-CXd5zco-.js → EventKeys-BanfFMDH.js} +3 -3
- package/dist/chunks/EventKeys-BvyQ87Zy.js +1 -0
- package/dist/chunks/EventKeys-DZ_Hahro.js +18 -0
- package/dist/chunks/MapTools.vue_vue_type_style_index_0_lang-C0C9opKY.js +1 -0
- package/dist/chunks/MapTools.vue_vue_type_style_index_0_lang-CZ_dEmHg.js +286 -0
- package/dist/chunks/MapTools.vue_vue_type_style_index_0_lang-Ch4c7Qoj.js +1 -0
- package/dist/chunks/MapTools.vue_vue_type_style_index_0_lang-CyLnNIRE.js +286 -0
- package/dist/chunks/ProvideKeys-91lTuLnq.js +1 -0
- package/dist/chunks/ProvideKeys-CBXsWszp.js +10 -0
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-B5_AnLuD.js +1 -0
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-Cm6_FuA4.js +102 -0
- package/dist/chunks/aria-BQcIVO4d.js +115 -0
- package/dist/chunks/aria-DSSjwg9N.js +5 -0
- package/dist/chunks/base-DiDWGUIe.js +1 -0
- package/dist/chunks/base-Yks2VbyG.js +525 -0
- package/dist/chunks/{constant-sg1_DRTW.js → constant-BCrwD19Q.js} +3 -3
- package/dist/chunks/constant-Bq4ASE9Q.js +1 -0
- package/dist/chunks/constant-E83OJqPQ.js +339 -0
- package/dist/chunks/debounce-8mXAo6g6.js +55 -0
- package/dist/chunks/debounce-CRwCg2X7.js +1 -0
- package/dist/chunks/el-button-CSf4ltog.js +1 -0
- package/dist/chunks/el-button-DGYjh5z8.js +790 -0
- package/dist/chunks/el-color-picker-panel-BWVOB7oP.js +1 -0
- package/dist/chunks/el-color-picker-panel-DRvDKfHE.js +975 -0
- package/dist/chunks/el-form-item-DVC_Cc2e.js +12 -0
- package/dist/chunks/el-form-item-gDX0cqEN.js +1332 -0
- package/dist/chunks/el-input-87yLaQuL.js +1 -0
- package/dist/chunks/el-input-DhiVzuzU.js +560 -0
- package/dist/chunks/el-loading-VVcaaEVz.js +1 -0
- package/dist/chunks/el-loading-afnbZIgK.js +204 -0
- package/dist/chunks/el-overlay-39fFi1gf.js +584 -0
- package/dist/chunks/el-overlay-DJXARy6r.js +1 -0
- package/dist/chunks/el-popper-DnNZqKE4.js +1 -0
- package/dist/chunks/el-popper-uUWfWupq.js +1663 -0
- package/dist/chunks/el-select-Y_pKIpZ6.js +1905 -0
- package/dist/chunks/el-select-gS7tMqpt.js +1 -0
- package/dist/chunks/geotiff-BXWVtao5.js +1839 -0
- package/dist/chunks/geotiff-OzcRsIeD.js +5 -0
- package/dist/chunks/img_c-B-7oksYM.js +6 -0
- package/dist/chunks/img_c-DUz-J5Tj.js +1 -0
- package/dist/chunks/index-BLKrXung.js +178 -0
- package/dist/chunks/index-BU0pHIVc.js +1 -0
- package/dist/chunks/index-BVI5n4YF.js +14 -0
- package/dist/chunks/index-BmhAIVei.js +13 -0
- package/dist/chunks/index-C9sTU0IM.js +305 -0
- package/dist/chunks/index-CVk8BRaX.js +3 -0
- package/dist/chunks/index-Cm2KpSqK.js +1 -0
- package/dist/chunks/index-Dq757wJI.js +578 -0
- package/dist/chunks/index-aZtm4DKf.js +2 -0
- package/dist/chunks/index-eDMHfmRJ.js +1 -0
- package/dist/chunks/{lerc-1-RDQEUw.js → lerc-CmCGYt99.js} +1 -1
- package/dist/chunks/{lerc-CJUDp0gx.js → lerc-pz_5d_yq.js} +1 -1
- package/dist/chunks/mapSetting-ChTZShcE.js +1 -0
- package/dist/chunks/mapSetting-p2kJ0sD5.js +635 -0
- package/dist/chunks/{MapTools.vue_vue_type_style_index_0_lang-CXvD_9dm.js → mapbox-gl-draw-CKTcXDzM.js} +884 -1163
- package/dist/chunks/mapbox-gl-draw-Dg_Inye3.js +1 -0
- package/dist/chunks/toNumber-BYHg62qt.js +30 -0
- package/dist/chunks/toNumber-CoP0zQbS.js +1 -0
- package/dist/chunks/use-form-common-props-Cat5OZJJ.js +66 -0
- package/dist/chunks/use-form-common-props-CerlsINt.js +1 -0
- package/dist/chunks/use-global-config-BOm9tY73.js +72 -0
- package/dist/chunks/use-global-config-DhqqgchV.js +1 -0
- package/dist/chunks/utils-BJ8Lu8TY.js +516 -0
- package/dist/chunks/{utils-Co-GE89c.js → utils-CLoHY5o3.js} +1 -1
- package/dist/chunks/utils-CrwGKkIz.js +1 -0
- package/dist/chunks/vnode-CFt3qKsd.js +70 -0
- package/dist/chunks/vnode-DdzDGWC_.js +1 -0
- package/dist/manageTable/ReplaceSpeciesNameDialog.cjs +1 -1
- package/dist/manageTable/ReplaceSpeciesNameDialog.mjs +1 -1
- package/dist/manageTable/manageTable.cjs +1 -1
- package/dist/manageTable/manageTable.mjs +1 -1
- package/dist/mapbox/MapView.cjs +1 -1
- package/dist/mapbox/MapView.mjs +950 -3
- package/dist/mapbox/components/MapLegend.mjs +2 -2
- package/dist/mapbox/components/MapTools.cjs +1 -1
- package/dist/mapbox/components/MapTools.mjs +1 -1
- package/dist/mapbox/components/VideoDialog.cjs +1 -3
- package/dist/mapbox/components/VideoDialog.mjs +42 -1701
- package/dist/mapbox/components/mapLayer.cjs +1 -1
- package/dist/mapbox/components/mapLayer.mjs +37 -36
- package/dist/mapbox/components/mapTopic.mjs +1 -1
- package/dist/mapbox/utils.mjs +1 -1
- package/dist/mapbox/widgets/CustomShapeDialog.mjs +9 -9
- package/dist/mapbox/widgets/IconPicker.mjs +1 -1
- package/dist/mapbox/widgets/LayerAttributeDialog.cjs +1 -1
- package/dist/mapbox/widgets/LayerAttributeDialog.mjs +141 -339
- package/dist/mapbox/widgets/LayerDialog.mjs +2 -2
- package/dist/mapbox/widgets/LegendDialogLine.mjs +3 -3
- package/dist/mapbox/widgets/LegendDialogPoint.mjs +7 -7
- package/dist/mapbox/widgets/LegendLine.mjs +2 -2
- package/dist/mapbox/widgets/LegendPoint.mjs +2 -2
- package/dist/mapbox/widgets/LegendPopLine.mjs +9 -9
- package/dist/mapbox/widgets/LegendPopPoint.mjs +18 -18
- package/dist/mapbox/widgets/LegendShape.mjs +2 -2
- package/dist/mapbox/widgets/LegendSymbol.mjs +4 -4
- package/dist/mapbox/widgets/ShapeDialog.cjs +1 -1
- package/dist/mapbox/widgets/ShapeDialog.mjs +3 -3
- package/dist/mapbox/widgets/TopicItemPop.mjs +1 -1
- package/dist/mapbox/widgets/TopicPop.mjs +1 -1
- package/dist/mapbox.cjs +1 -1
- package/dist/mapbox.mjs +9 -9
- package/dist/mapboxV2/EventKeys.cjs +1 -0
- package/dist/mapboxV2/EventKeys.mjs +21 -0
- package/dist/mapboxV2/MapView.cjs +1 -0
- package/dist/mapboxV2/MapView.mjs +4879 -0
- package/dist/mapboxV2/ProvideKeys.cjs +1 -0
- package/dist/mapboxV2/ProvideKeys.mjs +10 -0
- package/dist/mapboxV2/components/MapLegend.cjs +1 -0
- package/dist/mapboxV2/components/MapLegend.mjs +87 -0
- package/dist/mapboxV2/components/MapTools.cjs +1 -0
- package/dist/mapboxV2/components/MapTools.mjs +4 -0
- package/dist/mapboxV2/components/VideoDialog.cjs +1 -0
- package/dist/mapboxV2/components/VideoDialog.mjs +82 -0
- package/dist/mapboxV2/components/mapCompass.cjs +1 -0
- package/dist/mapboxV2/components/mapCompass.mjs +75 -0
- package/dist/mapboxV2/components/mapLayer.cjs +1 -0
- package/dist/mapboxV2/components/mapLayer.mjs +56 -0
- package/dist/mapboxV2/components/mapLevel.cjs +1 -0
- package/dist/mapboxV2/components/mapLevel.mjs +90 -0
- package/dist/mapboxV2/components/mapPitch.cjs +1 -0
- package/dist/mapboxV2/components/mapPitch.mjs +36 -0
- package/dist/mapboxV2/components/mapPos.cjs +1 -0
- package/dist/mapboxV2/components/mapPos.mjs +40 -0
- package/dist/mapboxV2/components/mapSetting.cjs +1 -0
- package/dist/mapboxV2/components/mapSetting.mjs +5 -0
- package/dist/mapboxV2/components/mapTopic.cjs +1 -0
- package/dist/mapboxV2/components/mapTopic.mjs +606 -0
- package/dist/mapboxV2/constant.cjs +1 -0
- package/dist/mapboxV2/constant.mjs +426 -0
- package/dist/mapboxV2/useTif.cjs +1 -0
- package/dist/mapboxV2/useTif.mjs +142 -0
- package/dist/mapboxV2/utils.cjs +1 -0
- package/dist/mapboxV2/utils.mjs +577 -0
- package/dist/mapboxV2/utilsFun.cjs +1 -0
- package/dist/mapboxV2/utilsFun.mjs +82 -0
- package/dist/mapboxV2/widgets/CustomShapeDialog.cjs +1 -0
- package/dist/mapboxV2/widgets/CustomShapeDialog.mjs +191 -0
- package/dist/mapboxV2/widgets/IconPicker.cjs +1 -0
- package/dist/mapboxV2/widgets/IconPicker.mjs +141 -0
- package/dist/mapboxV2/widgets/LayerAttributeDialog.cjs +1 -0
- package/dist/mapboxV2/widgets/LayerAttributeDialog.mjs +261 -0
- package/dist/mapboxV2/widgets/LayerDialog.cjs +1 -0
- package/dist/mapboxV2/widgets/LayerDialog.mjs +262 -0
- package/dist/mapboxV2/widgets/LegendDialogLine.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendDialogLine.mjs +233 -0
- package/dist/mapboxV2/widgets/LegendDialogPoint.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendDialogPoint.mjs +201 -0
- package/dist/mapboxV2/widgets/LegendLine.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendLine.mjs +42 -0
- package/dist/mapboxV2/widgets/LegendPoint.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendPoint.mjs +85 -0
- package/dist/mapboxV2/widgets/LegendPopInterestPoint.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendPopInterestPoint.mjs +207 -0
- package/dist/mapboxV2/widgets/LegendPopLine.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendPopLine.mjs +300 -0
- package/dist/mapboxV2/widgets/LegendPopPoint.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendPopPoint.mjs +331 -0
- package/dist/mapboxV2/widgets/LegendShape.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendShape.mjs +37 -0
- package/dist/mapboxV2/widgets/LegendSymbol.cjs +1 -0
- package/dist/mapboxV2/widgets/LegendSymbol.mjs +32 -0
- package/dist/mapboxV2/widgets/Point.cjs +1 -0
- package/dist/mapboxV2/widgets/Point.mjs +22 -0
- package/dist/mapboxV2/widgets/ShapeDialog.cjs +1 -0
- package/dist/mapboxV2/widgets/ShapeDialog.mjs +2507 -0
- package/dist/mapboxV2/widgets/TopicItemPop.cjs +1 -0
- package/dist/mapboxV2/widgets/TopicItemPop.mjs +116 -0
- package/dist/mapboxV2/widgets/TopicPop.cjs +1 -0
- package/dist/mapboxV2/widgets/TopicPop.mjs +164 -0
- package/dist/mapboxV2.cjs +13 -0
- package/dist/mapboxV2.mjs +1331 -0
- package/dist/qy-vue-plugins.css +1 -1
- package/dist/types/mapboxV2/MapView.vue.d.ts +130 -3
- package/dist/types/mapboxV2/components/mapTopic.vue.d.ts +10 -591
- package/dist/types/mapboxV2/index.d.ts +1 -1
- package/dist/types/mapboxV2/pages/MapLayer.vue.d.ts +31 -0
- package/dist/types/mapboxV2/types/map-layer.d.ts +185 -3
- package/dist/types/mapboxV2/useTif.d.ts +2 -2
- package/dist/types/mapboxV2/utils/geojsonRenderer.d.ts +123 -0
- package/dist/types/mapboxV2/utils.d.ts +5 -0
- package/dist/types/mapboxV2/widgets/IconPicker.vue.d.ts +8 -10
- package/dist/types/mapboxV2/widgets/index.d.ts +3 -0
- package/dist/types/mapboxV2/widgets/track/TrackImageDialog.vue.d.ts +11 -0
- package/dist/types/mapboxV2/widgets/track/TrackTextDialog.vue.d.ts +11 -0
- package/dist/types/mapboxV2/widgets/track/TrackVoiceDialog.vue.d.ts +11 -0
- package/dist/types/mapboxV2/widgets/track/index.d.ts +3 -0
- package/dist/types/mapboxV2-EventKeys.d.ts +2 -0
- package/dist/types/mapboxV2-MapView.d.ts +4 -0
- package/dist/types/mapboxV2-ProvideKeys.d.ts +2 -0
- package/dist/types/mapboxV2-components-MapLegend.d.ts +4 -0
- package/dist/types/mapboxV2-components-MapTools.d.ts +4 -0
- package/dist/types/mapboxV2-components-VideoDialog.d.ts +4 -0
- package/dist/types/mapboxV2-components-mapCompass.d.ts +4 -0
- package/dist/types/mapboxV2-components-mapLayer.d.ts +4 -0
- package/dist/types/mapboxV2-components-mapLevel.d.ts +4 -0
- package/dist/types/mapboxV2-components-mapPitch.d.ts +4 -0
- package/dist/types/mapboxV2-components-mapPos.d.ts +4 -0
- package/dist/types/mapboxV2-components-mapSetting.d.ts +4 -0
- package/dist/types/mapboxV2-components-mapTopic.d.ts +4 -0
- package/dist/types/mapboxV2-constant.d.ts +2 -0
- package/dist/types/mapboxV2-useTif.d.ts +2 -0
- package/dist/types/mapboxV2-utils.d.ts +2 -0
- package/dist/types/mapboxV2-utilsFun.d.ts +2 -0
- package/dist/types/mapboxV2-widgets-CustomShapeDialog.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-IconPicker.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LayerAttributeDialog.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LayerDialog.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendDialogLine.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendDialogPoint.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendLine.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendPoint.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendPopInterestPoint.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendPopLine.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendPopPoint.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendShape.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-LegendSymbol.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-Point.d.ts +1 -0
- package/dist/types/mapboxV2-widgets-ShapeDialog.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-TopicItemPop.d.ts +4 -0
- package/dist/types/mapboxV2-widgets-TopicPop.d.ts +4 -0
- package/dist/types/mapboxV2.d.ts +2 -0
- package/dist/types/store/mapStore.d.ts +122 -0
- package/dist/types/types/map.d.ts +111 -7
- package/package/mapboxV2/EventKeys.ts +97 -0
- package/package/mapboxV2/ProvideKeys.ts +23 -0
- package/package/mapboxV2/components/index.ts +9 -0
- package/package/mapboxV2/constant.ts +448 -0
- package/package/mapboxV2/index.ts +15 -0
- package/package/mapboxV2/useTif.ts +346 -0
- package/package/mapboxV2/utils.ts +1173 -0
- package/package/mapboxV2/utilsFun.ts +155 -0
- package/package/mapboxV2/widgets/index.ts +19 -0
- package/package/types/map.ts +129 -32
- package/package.json +203 -1
- package/dist/chunks/MapTools.vue_vue_type_style_index_0_lang-cJJE47_x.js +0 -1
- package/dist/chunks/MapView-CiaAGUDi.js +0 -2786
- package/dist/chunks/MapView-SCh7CmY2.js +0 -5
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-BFusb3rd.js +0 -880
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-C0OTINr4.js +0 -1
- package/dist/chunks/aria-CU11fhFG.js +0 -5
- package/dist/chunks/aria-Lnh-oIIU.js +0 -173
- package/dist/chunks/base-BBPoamOf.js +0 -438
- package/dist/chunks/base-Dbw4YzZq.js +0 -1
- package/dist/chunks/use-global-config-D_HRwVvW.js +0 -301
- package/dist/chunks/use-global-config-Wtw3ujWW.js +0 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -3,11 +3,11 @@ const o = Symbol("delete-topic"), g = e(o), a = Symbol("create-topic"), m = e(a)
|
|
|
3
3
|
e(t);
|
|
4
4
|
const c = Symbol("topic-panel-click"), K = e(c), s = Symbol("render-geographic-data"), h = e(s), y = Symbol("toggle-geographic-layer"), u = e(y), l = Symbol("show-layer-edit"), S = e(l), n = Symbol("locate-to-layer-center"), b = e(n), r = Symbol("show-layer-dialog"), B = e(r), p = Symbol("map-loaded"), L = e(p), i = Symbol("map-style-changed"), T = e(i);
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
L as a,
|
|
7
|
+
B as b,
|
|
8
8
|
m as c,
|
|
9
9
|
g as d,
|
|
10
|
-
|
|
10
|
+
K as e,
|
|
11
11
|
b as l,
|
|
12
12
|
T as m,
|
|
13
13
|
h as r,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("@vueuse/core"),s=Symbol("delete-topic"),o=e.useEventBus(s),t=Symbol("create-topic"),a=e.useEventBus(t),c=Symbol("update-topic");e.useEventBus(c);const y=Symbol("topic-panel-click"),n=e.useEventBus(y),u=Symbol("render-geographic-data"),r=e.useEventBus(u),l=Symbol("toggle-geographic-layer"),i=e.useEventBus(l),p=Symbol("show-layer-edit"),B=e.useEventBus(p),g=Symbol("locate-to-layer-center"),d=e.useEventBus(g),h=Symbol("show-layer-dialog"),K=e.useEventBus(h),m=Symbol("map-loaded"),S=e.useEventBus(m),L=Symbol("map-style-changed"),E=e.useEventBus(L),b=Symbol("show-map-settings"),v=e.useEventBus(b),w=Symbol("search-layer"),T=e.useEventBus(w);exports.createTopicBus=a;exports.deleteTopicBus=o;exports.locateToLayerCenterKeyBus=d;exports.mapLoadedBus=S;exports.mapStyleChangedBus=E;exports.renderGeographicDataKeyBus=r;exports.searchLayerBus=T;exports.showLayerDialogKeyBus=K;exports.showLayerEditKeyBus=B;exports.showMapSettingsBus=v;exports.toggleGeographicLayerKeyBus=i;exports.topicPanelClickBus=n;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEventBus as e } from "@vueuse/core";
|
|
2
|
+
const o = Symbol("delete-topic"), h = e(o), a = Symbol("create-topic"), K = e(a), s = Symbol("update-topic");
|
|
3
|
+
e(s);
|
|
4
|
+
const t = Symbol("topic-panel-click"), S = e(t), c = Symbol("render-geographic-data"), u = e(c), y = Symbol("toggle-geographic-layer"), b = e(y), l = Symbol("show-layer-edit"), B = e(l), n = Symbol("locate-to-layer-center"), L = e(n), r = Symbol("show-layer-dialog"), w = e(r), p = Symbol("map-loaded"), T = e(p), i = Symbol("map-style-changed"), C = e(i), g = Symbol("show-map-settings"), D = e(g), d = Symbol("search-layer"), G = e(d);
|
|
5
|
+
export {
|
|
6
|
+
w as a,
|
|
7
|
+
G as b,
|
|
8
|
+
K as c,
|
|
9
|
+
h as d,
|
|
10
|
+
b as e,
|
|
11
|
+
D as f,
|
|
12
|
+
C as g,
|
|
13
|
+
L as l,
|
|
14
|
+
T as m,
|
|
15
|
+
u as r,
|
|
16
|
+
B as s,
|
|
17
|
+
S as t
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),h=require("./mapbox-gl-draw-Dg_Inye3.js"),P=require("./ProvideKeys-91lTuLnq.js"),N=require("./EventKeys-BvyQ87Zy.js"),q=require("./constant-Bq4ASE9Q.js"),B=require("@turf/turf"),I=require("@element-plus/icons-vue"),j=require("element-plus");function $(i){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const n in i)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(m,n,r.get?r:{enumerable:!0,get:()=>i[n]})}}return m.default=i,Object.freeze(m)}const p=$(B),O={key:0,class:"measure-info-panel"},A={class:"measure-info-content"},R={class:"measure-label"},z={class:"measure-value"},K={class:"qy-flex-row hiper-map-tools-bar"},J=a.defineComponent({__name:"MapTools",props:{tools:{default:()=>["point","line","polygon","measure_distance","measure_area","clear_all"]}},setup(i){const m=a.inject("mapRootId"),n=a.ref(),r=a.ref([]),L=a.ref(null),M=a.ref(null),v=a.ref(!1),c=a.ref("distance"),y=t=>{switch(v.value&&t!=="measure_distance"&&t!=="clear_all"&&D(),n.value=t,t){case"point":s.changeMode("draw_point");break;case"line":s.changeMode("draw_line_string");break;case"polygon":s.changeMode("draw_polygon");break;case"measure_distance":s.changeMode("simple_select"),c.value="distance",x();break;case"measure_area":s.changeMode("simple_select"),c.value="area",x();break;case"clear_all":s.deleteAll(),D();break}},e=a.inject(P.mapInstanceKey),s=new h.MapboxDraw({userProperties:!0,displayControlsDefault:!1,modes:{...h.MapboxDraw.modes,draw_rectangle:h.DrawRectangle,static:h.StaticMode}});let _=null;_=N.mapLoadedBus.on(({mapRootId:t})=>{m!==t||!e?.value||(console.log("hiper-map-tools-bar mounted",e),e.value.addControl(s,"top-left"),e.value.on("draw.create",w))});function w(t){const l=s.getAll();if(!l.features.length)return;l.features=[l.features[0]];const o={point:{layerType:"symbol",config:{textColor:"rgba(0,0,0,1)",iconName:q.DefaultIcon}},line:{layerType:"line",config:{lineWidth:1,lineColor:"rgba(255, 0, 0, 1)",lineStyle:"solid"}},polygon:{layerType:"shape",config:{fillColor:"rgba(241, 131, 127, 1)",lineWidth:1}}}[n.value];o&&N.showLayerEditKeyBus.emit({mapRootId:m,e:new MouseEvent("click"),layer:{layerType:o.layerType,customLayerConfig:JSON.stringify(o.config),geoJSON:JSON.stringify(l),...n.value==="polygon"?{pid:""}:{}}}),s.deleteAll()}function x(){e?.value&&(v.value=!0,r.value=[],e.value.getCanvas().style.cursor="crosshair",e.value.on("click",b),e.value.on("dblclick",g))}function g(t){if(v.value){if(t.preventDefault(),c.value==="distance")r.value.length>=2&&C();else if(r.value.length>=3){const l=r.value[0],u=r.value[r.value.length-1];(l[0]!==u[0]||l[1]!==u[1])&&r.value.push(l),C()}e?.value?.off("click",b),e?.value?.off("dblclick",g),e?.value&&(e.value.getCanvas().style.cursor=""),v.value=!1}}function b(t){if(!v.value||!e?.value)return;t.originalEvent.stopPropagation();const l=[t.lngLat.lng,t.lngLat.lat];r.value.push(l),r.value.length===1?(c.value==="distance"?d.value=0:f.value=0,e.value.getSource("measure-point-source")?e.value.getSource("measure-point-source").setData({type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}):(e.value.addSource("measure-point-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}}),e.value.addLayer({id:"measure-point-layer",type:"circle",source:"measure-point-source",paint:{"circle-radius":5,"circle-color":"#16aaff"}}))):(e.value.getSource("measure-point-source")&&e.value.getSource("measure-point-source").setData({type:"FeatureCollection",features:r.value.map(u=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:u}}))}),C(),c.value==="area"&&r.value.length>=3&&(e.value.getCanvas().style.cursor="pointer"))}function C(){if(!e?.value||r.value.length<2)return;const t=p.lineString(r.value);if(c.value==="distance"){const l=p.length(t,{units:"kilometers"});d.value=l,l<1?`${(l*1e3).toFixed(2)}`:`${l.toFixed(3)}`;const u=Math.floor(r.value.length/2)-1;u<0?r.value[0]:r.value[u],S(t)}else if(r.value.length>=3){const l=[...r.value];l[0]!==l[l.length-1]&&l.push(l[0]);const u=p.polygon([l]),o=p.area(u)/1e6;f.value=o,o<1?`${(o*1e6).toFixed(2)}`:`${o.toFixed(3)}`;const k=p.centroid(u);S(t,k.geometry.coordinates)}else S(t,t.geometry.coordinates[0])}function S(t,l,u){if(e?.value){if(e.value.getSource("measure-line-source")?e.value.getSource("measure-line-source").setData(t):(e.value.addSource("measure-line-source",{type:"geojson",data:t}),e.value.addLayer({id:"measure-line-layer",type:"line",source:"measure-line-source",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#16aaff","line-width":2,"line-dasharray":[2,1]}}),L.value="measure-line-layer"),c.value==="area"&&r.value.length>=3){const o=[...r.value];o[0]!==o[o.length-1]&&o.push(o[0]);const k=p.polygon([o]);e.value.getSource("measure-fill-source")?e.value.getSource("measure-fill-source").setData(k):(e.value.addSource("measure-fill-source",{type:"geojson",data:k}),e.value.addLayer({id:"measure-fill-layer",type:"fill",source:"measure-fill-source",paint:{"fill-color":"#16aaff","fill-opacity":.2,"fill-outline-color":"#16aaff"}},"measure-line-layer"))}e.value.getSource("measure-label-source")&&e.value.getLayer("measure-label-layer")&&(e.value.removeLayer("measure-label-layer"),e.value.removeSource("measure-label-source"),M.value=null)}}function D(){e?.value&&(e.value?.off("click",b),e.value?.off("dblclick",g),e.value.getCanvas().style.cursor="",e.value.getLayer("measure-point-layer")&&(e.value.removeLayer("measure-point-layer"),e.value.removeSource("measure-point-source")),e.value.getLayer("measure-line-layer")&&(e.value.removeLayer("measure-line-layer"),e.value.removeSource("measure-line-source")),e.value.getLayer("measure-fill-layer")&&(e.value.removeLayer("measure-fill-layer"),e.value.removeSource("measure-fill-source")),e.value.getLayer("measure-label-layer")&&(e.value.removeLayer("measure-label-layer"),e.value.removeSource("measure-label-source")),r.value=[],L.value=null,M.value=null,v.value=!1,d.value=0,f.value=0,e.value.getLayer("measure-label-layer")&&e.value.removeLayer("measure-label-layer"),e.value.getSource("measure-label-source")&&e.value.removeSource("measure-label-source"))}a.onUnmounted(()=>{D(),_&&_(),e?.value&&(e.value?.removeControl(s),e.value?.off("draw.create",w),e.value?.off("click",b),e.value?.off("dblclick",g))});const d=a.ref(0),E=a.computed(()=>d.value<1?`${(d.value*1e3).toFixed(2)} 米`:`${d.value.toFixed(3)} 公里`),f=a.ref(0),T=a.computed(()=>f.value<1?`${(f.value*1e6).toFixed(2)} 平方米`:`${f.value.toFixed(3)} 平方公里`),V=a.computed(()=>c.value==="distance"?E.value:T.value),F=a.computed(()=>c.value==="distance"?"总长度: ":"总面积: ");return(t,l)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[v.value||r.value.length>0&&(n.value=="measure_distance"||n.value=="measure_area")?(a.openBlock(),a.createElementBlock("div",O,[a.createElementVNode("div",A,[a.createElementVNode("span",R,a.toDisplayString(F.value),1),a.createElementVNode("span",z,a.toDisplayString(V.value),1),a.createVNode(a.unref(j.ElIcon),{style:{display:"block","margin-left":"10px",cursor:"pointer"},onClick:l[0]||(l[0]=u=>y("clear_all")),size:"20px"},{default:a.withCtx(()=>[a.createVNode(a.unref(I.Close))]),_:1})])])):a.createCommentVNode("",!0),a.createElementVNode("div",K,[l[7]||(l[7]=a.createElementVNode("div",{class:"tools-label"},"测绘工具",-1)),i.tools.includes("measure_distance")?(a.openBlock(),a.createElementBlock("div",{key:0,title:"测距",class:a.normalizeClass(["hiper-map-tools-btn",n.value=="measure_distance"?"active":null]),onClick:l[1]||(l[1]=()=>y("measure_distance"))},[...l[4]||(l[4]=[a.createElementVNode("span",{class:"qyuan icon-ruler"},null,-1)])],2)):a.createCommentVNode("",!0),i.tools.includes("measure_area")?(a.openBlock(),a.createElementBlock("div",{key:1,title:"测面",class:a.normalizeClass(["hiper-map-tools-btn",n.value=="measure_area"?"active":null]),onClick:l[2]||(l[2]=()=>y("measure_area"))},[...l[5]||(l[5]=[a.createElementVNode("span",{class:"qyuan icon-multi-triangular"},null,-1)])],2)):a.createCommentVNode("",!0),i.tools.includes("clear_all")?(a.openBlock(),a.createElementBlock("div",{key:2,title:"清除所有临时绘制图形",class:"hiper-map-tools-btn",style:{border:"none"},onClick:l[3]||(l[3]=()=>y("clear_all"))},[...l[6]||(l[6]=[a.createElementVNode("span",{class:"qyuan icon-clear"},null,-1)])])):a.createCommentVNode("",!0)])],64))}});exports._sfc_main=J;
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { defineComponent as V, inject as $, ref as n, onUnmounted as z, computed as S, createElementBlock as f, openBlock as y, Fragment as K, createCommentVNode as _, createElementVNode as i, createVNode as N, toDisplayString as E, unref as j, withCtx as U, normalizeClass as A } from "vue";
|
|
2
|
+
import { M as R, S as W, D as H } from "./mapbox-gl-draw-CKTcXDzM.js";
|
|
3
|
+
import { m as G } from "./ProvideKeys-CBXsWszp.js";
|
|
4
|
+
import { m as Q, s as X } from "./EventKeys-DZ_Hahro.js";
|
|
5
|
+
import { D as Y } from "./constant-E83OJqPQ.js";
|
|
6
|
+
import * as d from "@turf/turf";
|
|
7
|
+
import { Close as Z } from "@element-plus/icons-vue";
|
|
8
|
+
import { ElIcon as ee } from "element-plus";
|
|
9
|
+
const ae = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "measure-info-panel"
|
|
12
|
+
}, le = { class: "measure-info-content" }, re = { class: "measure-label" }, oe = { class: "measure-value" }, te = { class: "qy-flex-row hiper-map-tools-bar" }, pe = /* @__PURE__ */ V({
|
|
13
|
+
__name: "MapTools",
|
|
14
|
+
props: {
|
|
15
|
+
tools: { default: () => [
|
|
16
|
+
"point",
|
|
17
|
+
"line",
|
|
18
|
+
"polygon",
|
|
19
|
+
"measure_distance",
|
|
20
|
+
"measure_area",
|
|
21
|
+
"clear_all"
|
|
22
|
+
] }
|
|
23
|
+
},
|
|
24
|
+
setup(C) {
|
|
25
|
+
const w = $("mapRootId"), c = n(), r = n([]), T = n(null), F = n(null), v = n(!1), s = n("distance"), g = (l) => {
|
|
26
|
+
switch (v.value && l !== "measure_distance" && l !== "clear_all" && x(), c.value = l, l) {
|
|
27
|
+
case "point":
|
|
28
|
+
u.changeMode("draw_point");
|
|
29
|
+
break;
|
|
30
|
+
case "line":
|
|
31
|
+
u.changeMode("draw_line_string");
|
|
32
|
+
break;
|
|
33
|
+
case "polygon":
|
|
34
|
+
u.changeMode("draw_polygon");
|
|
35
|
+
break;
|
|
36
|
+
case "measure_distance":
|
|
37
|
+
u.changeMode("simple_select"), s.value = "distance", P();
|
|
38
|
+
break;
|
|
39
|
+
case "measure_area":
|
|
40
|
+
u.changeMode("simple_select"), s.value = "area", P();
|
|
41
|
+
break;
|
|
42
|
+
case "clear_all":
|
|
43
|
+
u.deleteAll(), x();
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}, e = $(G), u = new R({
|
|
47
|
+
userProperties: !0,
|
|
48
|
+
displayControlsDefault: !1,
|
|
49
|
+
modes: {
|
|
50
|
+
...R.modes,
|
|
51
|
+
draw_rectangle: H,
|
|
52
|
+
static: W
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
let L = null;
|
|
56
|
+
L = Q.on(({ mapRootId: l }) => {
|
|
57
|
+
w !== l || !e?.value || (console.log("hiper-map-tools-bar mounted", e), e.value.addControl(u, "top-left"), e.value.on("draw.create", I));
|
|
58
|
+
});
|
|
59
|
+
function I(l) {
|
|
60
|
+
const a = u.getAll();
|
|
61
|
+
if (!a.features.length) return;
|
|
62
|
+
a.features = [a.features[0]];
|
|
63
|
+
const o = {
|
|
64
|
+
point: {
|
|
65
|
+
layerType: "symbol",
|
|
66
|
+
config: {
|
|
67
|
+
textColor: "rgba(0,0,0,1)",
|
|
68
|
+
iconName: Y
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
line: {
|
|
72
|
+
layerType: "line",
|
|
73
|
+
config: {
|
|
74
|
+
lineWidth: 1,
|
|
75
|
+
lineColor: "rgba(255, 0, 0, 1)",
|
|
76
|
+
lineStyle: "solid"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
polygon: {
|
|
80
|
+
layerType: "shape",
|
|
81
|
+
config: {
|
|
82
|
+
fillColor: "rgba(241, 131, 127, 1)",
|
|
83
|
+
lineWidth: 1
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}[c.value];
|
|
87
|
+
o && X.emit({
|
|
88
|
+
mapRootId: w,
|
|
89
|
+
e: new MouseEvent("click"),
|
|
90
|
+
layer: {
|
|
91
|
+
layerType: o.layerType,
|
|
92
|
+
customLayerConfig: JSON.stringify(o.config),
|
|
93
|
+
geoJSON: JSON.stringify(a),
|
|
94
|
+
...c.value === "polygon" ? { pid: "" } : {}
|
|
95
|
+
}
|
|
96
|
+
}), u.deleteAll();
|
|
97
|
+
}
|
|
98
|
+
function P() {
|
|
99
|
+
e?.value && (v.value = !0, r.value = [], e.value.getCanvas().style.cursor = "crosshair", e.value.on("click", h), e.value.on("dblclick", b));
|
|
100
|
+
}
|
|
101
|
+
function b(l) {
|
|
102
|
+
if (v.value) {
|
|
103
|
+
if (l.preventDefault(), s.value === "distance")
|
|
104
|
+
r.value.length >= 2 && M();
|
|
105
|
+
else if (r.value.length >= 3) {
|
|
106
|
+
const a = r.value[0], t = r.value[r.value.length - 1];
|
|
107
|
+
(a[0] !== t[0] || a[1] !== t[1]) && r.value.push(a), M();
|
|
108
|
+
}
|
|
109
|
+
e?.value?.off("click", h), e?.value?.off("dblclick", b), e?.value && (e.value.getCanvas().style.cursor = ""), v.value = !1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function h(l) {
|
|
113
|
+
if (!v.value || !e?.value) return;
|
|
114
|
+
l.originalEvent.stopPropagation();
|
|
115
|
+
const a = [l.lngLat.lng, l.lngLat.lat];
|
|
116
|
+
r.value.push(a), r.value.length === 1 ? (s.value === "distance" ? m.value = 0 : p.value = 0, e.value.getSource("measure-point-source") ? e.value.getSource("measure-point-source").setData({
|
|
117
|
+
type: "Feature",
|
|
118
|
+
properties: {},
|
|
119
|
+
geometry: {
|
|
120
|
+
type: "Point",
|
|
121
|
+
coordinates: a
|
|
122
|
+
}
|
|
123
|
+
}) : (e.value.addSource("measure-point-source", {
|
|
124
|
+
type: "geojson",
|
|
125
|
+
data: {
|
|
126
|
+
type: "Feature",
|
|
127
|
+
properties: {},
|
|
128
|
+
geometry: {
|
|
129
|
+
type: "Point",
|
|
130
|
+
coordinates: a
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}), e.value.addLayer({
|
|
134
|
+
id: "measure-point-layer",
|
|
135
|
+
type: "circle",
|
|
136
|
+
source: "measure-point-source",
|
|
137
|
+
paint: {
|
|
138
|
+
"circle-radius": 5,
|
|
139
|
+
"circle-color": "#16aaff"
|
|
140
|
+
}
|
|
141
|
+
}))) : (e.value.getSource("measure-point-source") && e.value.getSource("measure-point-source").setData({
|
|
142
|
+
type: "FeatureCollection",
|
|
143
|
+
features: r.value.map((t) => ({
|
|
144
|
+
type: "Feature",
|
|
145
|
+
properties: {},
|
|
146
|
+
geometry: {
|
|
147
|
+
type: "Point",
|
|
148
|
+
coordinates: t
|
|
149
|
+
}
|
|
150
|
+
}))
|
|
151
|
+
}), M(), s.value === "area" && r.value.length >= 3 && (e.value.getCanvas().style.cursor = "pointer"));
|
|
152
|
+
}
|
|
153
|
+
function M() {
|
|
154
|
+
if (!e?.value || r.value.length < 2) return;
|
|
155
|
+
const l = d.lineString(r.value);
|
|
156
|
+
if (s.value === "distance") {
|
|
157
|
+
const a = d.length(l, { units: "kilometers" });
|
|
158
|
+
m.value = a, a < 1 ? `${(a * 1e3).toFixed(2)}` : `${a.toFixed(3)}`;
|
|
159
|
+
const t = Math.floor(r.value.length / 2) - 1;
|
|
160
|
+
t < 0 ? r.value[0] : r.value[t], D(l);
|
|
161
|
+
} else if (r.value.length >= 3) {
|
|
162
|
+
const a = [...r.value];
|
|
163
|
+
a[0] !== a[a.length - 1] && a.push(a[0]);
|
|
164
|
+
const t = d.polygon([a]), o = d.area(t) / 1e6;
|
|
165
|
+
p.value = o, o < 1 ? `${(o * 1e6).toFixed(2)}` : `${o.toFixed(3)}`;
|
|
166
|
+
const k = d.centroid(t);
|
|
167
|
+
D(
|
|
168
|
+
l,
|
|
169
|
+
k.geometry.coordinates
|
|
170
|
+
);
|
|
171
|
+
} else
|
|
172
|
+
D(
|
|
173
|
+
l,
|
|
174
|
+
l.geometry.coordinates[0]
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
function D(l, a, t) {
|
|
178
|
+
if (e?.value) {
|
|
179
|
+
if (e.value.getSource("measure-line-source") ? e.value.getSource("measure-line-source").setData(
|
|
180
|
+
l
|
|
181
|
+
) : (e.value.addSource("measure-line-source", {
|
|
182
|
+
type: "geojson",
|
|
183
|
+
data: l
|
|
184
|
+
}), e.value.addLayer({
|
|
185
|
+
id: "measure-line-layer",
|
|
186
|
+
type: "line",
|
|
187
|
+
source: "measure-line-source",
|
|
188
|
+
layout: {
|
|
189
|
+
"line-join": "round",
|
|
190
|
+
"line-cap": "round"
|
|
191
|
+
},
|
|
192
|
+
paint: {
|
|
193
|
+
"line-color": "#16aaff",
|
|
194
|
+
"line-width": 2,
|
|
195
|
+
"line-dasharray": [2, 1]
|
|
196
|
+
}
|
|
197
|
+
}), T.value = "measure-line-layer"), s.value === "area" && r.value.length >= 3) {
|
|
198
|
+
const o = [...r.value];
|
|
199
|
+
o[0] !== o[o.length - 1] && o.push(o[0]);
|
|
200
|
+
const k = d.polygon([o]);
|
|
201
|
+
e.value.getSource("measure-fill-source") ? e.value.getSource("measure-fill-source").setData(
|
|
202
|
+
k
|
|
203
|
+
) : (e.value.addSource("measure-fill-source", {
|
|
204
|
+
type: "geojson",
|
|
205
|
+
data: k
|
|
206
|
+
}), e.value.addLayer(
|
|
207
|
+
{
|
|
208
|
+
id: "measure-fill-layer",
|
|
209
|
+
type: "fill",
|
|
210
|
+
source: "measure-fill-source",
|
|
211
|
+
paint: {
|
|
212
|
+
"fill-color": "#16aaff",
|
|
213
|
+
"fill-opacity": 0.2,
|
|
214
|
+
"fill-outline-color": "#16aaff"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"measure-line-layer"
|
|
218
|
+
));
|
|
219
|
+
}
|
|
220
|
+
e.value.getSource("measure-label-source") && e.value.getLayer("measure-label-layer") && (e.value.removeLayer("measure-label-layer"), e.value.removeSource("measure-label-source"), F.value = null);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function x() {
|
|
224
|
+
e?.value && (e.value?.off("click", h), e.value?.off("dblclick", b), e.value.getCanvas().style.cursor = "", e.value.getLayer("measure-point-layer") && (e.value.removeLayer("measure-point-layer"), e.value.removeSource("measure-point-source")), e.value.getLayer("measure-line-layer") && (e.value.removeLayer("measure-line-layer"), e.value.removeSource("measure-line-source")), e.value.getLayer("measure-fill-layer") && (e.value.removeLayer("measure-fill-layer"), e.value.removeSource("measure-fill-source")), e.value.getLayer("measure-label-layer") && (e.value.removeLayer("measure-label-layer"), e.value.removeSource("measure-label-source")), r.value = [], T.value = null, F.value = null, v.value = !1, m.value = 0, p.value = 0, e.value.getLayer("measure-label-layer") && e.value.removeLayer("measure-label-layer"), e.value.getSource("measure-label-source") && e.value.removeSource("measure-label-source"));
|
|
225
|
+
}
|
|
226
|
+
z(() => {
|
|
227
|
+
x(), L && L(), e?.value && (e.value?.removeControl(u), e.value?.off("draw.create", I), e.value?.off("click", h), e.value?.off("dblclick", b));
|
|
228
|
+
});
|
|
229
|
+
const m = n(0), q = S(() => m.value < 1 ? `${(m.value * 1e3).toFixed(2)} 米` : `${m.value.toFixed(3)} 公里`), p = n(0), B = S(() => p.value < 1 ? `${(p.value * 1e6).toFixed(2)} 平方米` : `${p.value.toFixed(3)} 平方公里`), J = S(() => s.value === "distance" ? q.value : B.value), O = S(() => s.value === "distance" ? "总长度: " : "总面积: ");
|
|
230
|
+
return (l, a) => (y(), f(K, null, [
|
|
231
|
+
v.value || r.value.length > 0 && (c.value == "measure_distance" || c.value == "measure_area") ? (y(), f("div", ae, [
|
|
232
|
+
i("div", le, [
|
|
233
|
+
i("span", re, E(O.value), 1),
|
|
234
|
+
i("span", oe, E(J.value), 1),
|
|
235
|
+
N(j(ee), {
|
|
236
|
+
style: { display: "block", "margin-left": "10px", cursor: "pointer" },
|
|
237
|
+
onClick: a[0] || (a[0] = (t) => g("clear_all")),
|
|
238
|
+
size: "20px"
|
|
239
|
+
}, {
|
|
240
|
+
default: U(() => [
|
|
241
|
+
N(j(Z))
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
})
|
|
245
|
+
])
|
|
246
|
+
])) : _("", !0),
|
|
247
|
+
i("div", te, [
|
|
248
|
+
a[7] || (a[7] = i("div", { class: "tools-label" }, "测绘工具", -1)),
|
|
249
|
+
C.tools.includes("measure_distance") ? (y(), f("div", {
|
|
250
|
+
key: 0,
|
|
251
|
+
title: "测距",
|
|
252
|
+
class: A([
|
|
253
|
+
"hiper-map-tools-btn",
|
|
254
|
+
c.value == "measure_distance" ? "active" : null
|
|
255
|
+
]),
|
|
256
|
+
onClick: a[1] || (a[1] = () => g("measure_distance"))
|
|
257
|
+
}, [...a[4] || (a[4] = [
|
|
258
|
+
i("span", { class: "qyuan icon-ruler" }, null, -1)
|
|
259
|
+
])], 2)) : _("", !0),
|
|
260
|
+
C.tools.includes("measure_area") ? (y(), f("div", {
|
|
261
|
+
key: 1,
|
|
262
|
+
title: "测面",
|
|
263
|
+
class: A([
|
|
264
|
+
"hiper-map-tools-btn",
|
|
265
|
+
c.value == "measure_area" ? "active" : null
|
|
266
|
+
]),
|
|
267
|
+
onClick: a[2] || (a[2] = () => g("measure_area"))
|
|
268
|
+
}, [...a[5] || (a[5] = [
|
|
269
|
+
i("span", { class: "qyuan icon-multi-triangular" }, null, -1)
|
|
270
|
+
])], 2)) : _("", !0),
|
|
271
|
+
C.tools.includes("clear_all") ? (y(), f("div", {
|
|
272
|
+
key: 2,
|
|
273
|
+
title: "清除所有临时绘制图形",
|
|
274
|
+
class: "hiper-map-tools-btn",
|
|
275
|
+
style: { border: "none" },
|
|
276
|
+
onClick: a[3] || (a[3] = () => g("clear_all"))
|
|
277
|
+
}, [...a[6] || (a[6] = [
|
|
278
|
+
i("span", { class: "qyuan icon-clear" }, null, -1)
|
|
279
|
+
])])) : _("", !0)
|
|
280
|
+
])
|
|
281
|
+
], 64));
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
export {
|
|
285
|
+
pe as _
|
|
286
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),C=require("./mapbox-gl-draw-Dg_Inye3.js"),_=require("./ProvideKeys-jy8dfV9u.js"),x=require("./EventKeys-BLmCVdTJ.js"),F=require("./constant-Bc8XErtI.js"),P=require("@turf/turf"),I=require("@element-plus/icons-vue"),j=require("element-plus");function $(s){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const o in s)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(s,o);Object.defineProperty(d,o,t.get?t:{enumerable:!0,get:()=>s[o]})}}return d.default=s,Object.freeze(d)}const y=$(P),O={key:0,class:"measure-info-panel"},z={class:"measure-info-content"},A={class:"measure-label"},R={class:"measure-value"},K={class:"qy-flex-row hiper-map-tools-bar"},J=e.defineComponent({__name:"MapTools",props:{tools:{default:()=>["point","line","polygon","measure_distance","measure_area","clear_all"]}},setup(s){const d=e.inject("mapRootId"),o=e.ref(),t=e.ref([]),M=e.ref(null),N=e.ref(null),v=e.ref(!1),c=e.ref("distance"),m=r=>{switch(v.value&&r!=="measure_distance"&&r!=="clear_all"&&L(),o.value=r,r){case"point":i.changeMode("draw_point");break;case"line":i.changeMode("draw_line_string");break;case"polygon":i.changeMode("draw_polygon");break;case"measure_distance":i.changeMode("simple_select"),c.value="distance",E();break;case"measure_area":i.changeMode("simple_select"),c.value="area",E();break;case"clear_all":i.deleteAll(),L();break}},a=e.inject(_.mapInstanceKey),i=new C.MapboxDraw({userProperties:!0,displayControlsDefault:!1,modes:{...C.MapboxDraw.modes,draw_rectangle:C.DrawRectangle,static:C.StaticMode}});let S=null;S=x.mapLoadedBus.on(({mapRootId:r})=>{d!==r||!a?.value||(console.log("hiper-map-tools-bar mounted",a),a.value.addControl(i,"top-left"),a.value.on("draw.create",w))});function w(r){const l=i.getAll();if(!l.features.length)return;l.features=[l.features[0]];const n={point:{layerType:"symbol",config:{textColor:"rgba(0,0,0,1)",iconName:F.DefaultIcon}},line:{layerType:"line",config:{lineWidth:1,lineColor:"rgba(255, 0, 0, 1)",lineStyle:"solid"}},polygon:{layerType:"shape",config:{fillColor:"rgba(241, 131, 127, 1)",lineWidth:1}}}[o.value];n&&x.showLayerEditKeyBus.emit({mapRootId:d,e:new MouseEvent("click"),layer:{layerType:n.layerType,customLayerConfig:JSON.stringify(n.config),geoJSON:JSON.stringify(l),...o.value==="polygon"?{pid:""}:{}}}),i.deleteAll()}function E(){a?.value&&(v.value=!0,t.value=[],a.value.getCanvas().style.cursor="crosshair",a.value.on("click",b),a.value.on("dblclick",g))}function g(r){if(v.value){if(r.preventDefault(),c.value==="distance")t.value.length>=2&&h();else if(t.value.length>=3){const l=t.value[0],u=t.value[t.value.length-1];(l[0]!==u[0]||l[1]!==u[1])&&t.value.push(l),h()}a?.value?.off("click",b),a?.value?.off("dblclick",g),a?.value&&(a.value.getCanvas().style.cursor=""),v.value=!1}}function b(r){if(!v.value||!a?.value)return;r.originalEvent.stopPropagation();const l=[r.lngLat.lng,r.lngLat.lat];t.value.push(l),t.value.length===1?(c.value==="distance"?p.value=0:f.value=0,a.value.getSource("measure-point-source")?a.value.getSource("measure-point-source").setData({type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}):(a.value.addSource("measure-point-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}}),a.value.addLayer({id:"measure-point-layer",type:"circle",source:"measure-point-source",paint:{"circle-radius":5,"circle-color":"#16aaff"}}))):(a.value.getSource("measure-point-source")&&a.value.getSource("measure-point-source").setData({type:"FeatureCollection",features:t.value.map(u=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:u}}))}),h(),c.value==="area"&&t.value.length>=3&&(a.value.getCanvas().style.cursor="pointer"))}function h(){if(!a?.value||t.value.length<2)return;const r=y.lineString(t.value);if(c.value==="distance"){const l=y.length(r,{units:"kilometers"});p.value=l,l<1?`${(l*1e3).toFixed(2)}`:`${l.toFixed(3)}`;const u=Math.floor(t.value.length/2)-1;u<0?t.value[0]:t.value[u],D(r)}else if(t.value.length>=3){const l=[...t.value];l[0]!==l[l.length-1]&&l.push(l[0]);const u=y.polygon([l]),n=y.area(u)/1e6;f.value=n,n<1?`${(n*1e6).toFixed(2)}`:`${n.toFixed(3)}`;const k=y.centroid(u);D(r,k.geometry.coordinates)}else D(r,r.geometry.coordinates[0])}function D(r,l,u){if(a?.value){if(a.value.getSource("measure-line-source")?a.value.getSource("measure-line-source").setData(r):(a.value.addSource("measure-line-source",{type:"geojson",data:r}),a.value.addLayer({id:"measure-line-layer",type:"line",source:"measure-line-source",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#16aaff","line-width":2,"line-dasharray":[2,1]}}),M.value="measure-line-layer"),c.value==="area"&&t.value.length>=3){const n=[...t.value];n[0]!==n[n.length-1]&&n.push(n[0]);const k=y.polygon([n]);a.value.getSource("measure-fill-source")?a.value.getSource("measure-fill-source").setData(k):(a.value.addSource("measure-fill-source",{type:"geojson",data:k}),a.value.addLayer({id:"measure-fill-layer",type:"fill",source:"measure-fill-source",paint:{"fill-color":"#16aaff","fill-opacity":.2,"fill-outline-color":"#16aaff"}},"measure-line-layer"))}a.value.getSource("measure-label-source")&&a.value.getLayer("measure-label-layer")&&(a.value.removeLayer("measure-label-layer"),a.value.removeSource("measure-label-source"),N.value=null)}}function L(){a?.value&&(a.value?.off("click",b),a.value?.off("dblclick",g),a.value.getCanvas().style.cursor="",a.value.getLayer("measure-point-layer")&&(a.value.removeLayer("measure-point-layer"),a.value.removeSource("measure-point-source")),a.value.getLayer("measure-line-layer")&&(a.value.removeLayer("measure-line-layer"),a.value.removeSource("measure-line-source")),a.value.getLayer("measure-fill-layer")&&(a.value.removeLayer("measure-fill-layer"),a.value.removeSource("measure-fill-source")),a.value.getLayer("measure-label-layer")&&(a.value.removeLayer("measure-label-layer"),a.value.removeSource("measure-label-source")),t.value=[],M.value=null,N.value=null,v.value=!1,p.value=0,f.value=0,a.value.getLayer("measure-label-layer")&&a.value.removeLayer("measure-label-layer"),a.value.getSource("measure-label-source")&&a.value.removeSource("measure-label-source"))}e.onUnmounted(()=>{L(),S&&S(),a?.value&&(a.value?.removeControl(i),a.value?.off("draw.create",w),a.value?.off("click",b),a.value?.off("dblclick",g))});const p=e.ref(0),V=e.computed(()=>p.value<1?`${(p.value*1e3).toFixed(2)} 米`:`${p.value.toFixed(3)} 公里`),f=e.ref(0),B=e.computed(()=>f.value<1?`${(f.value*1e6).toFixed(2)} 平方米`:`${f.value.toFixed(3)} 平方公里`),q=e.computed(()=>c.value==="distance"?V.value:B.value),T=e.computed(()=>c.value==="distance"?"总长度: ":"总面积: ");return(r,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value||t.value.length>0&&(o.value=="measure_distance"||o.value=="measure_area")?(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",z,[e.createElementVNode("span",A,e.toDisplayString(T.value),1),e.createElementVNode("span",R,e.toDisplayString(q.value),1),e.createVNode(e.unref(j.ElIcon),{style:{display:"block","margin-left":"10px",cursor:"pointer"},onClick:l[0]||(l[0]=u=>m("clear_all")),size:"20px"},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Close))]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",K,[s.tools.includes("point")?(e.openBlock(),e.createElementBlock("div",{key:0,title:"兴趣点",class:e.normalizeClass(["hiper-map-tools-btn",o.value=="point"?"active":null]),onClick:l[1]||(l[1]=()=>m("point"))},[...l[7]||(l[7]=[e.createElementVNode("span",{class:"qyuan icon-local-two"},null,-1)])],2)):e.createCommentVNode("",!0),s.tools.includes("line")?(e.openBlock(),e.createElementBlock("div",{key:1,title:"折线",class:e.normalizeClass(["hiper-map-tools-btn",o.value=="line"?"active":null]),onClick:l[2]||(l[2]=()=>m("line"))},[...l[8]||(l[8]=[e.createElementVNode("span",{class:"qyuan icon-whole-site-accelerator"},null,-1)])],2)):e.createCommentVNode("",!0),s.tools.includes("polygon")?(e.openBlock(),e.createElementBlock("div",{key:2,title:"多边形",class:e.normalizeClass(["hiper-map-tools-btn",o.value=="polygon"?"active":null]),onClick:l[3]||(l[3]=()=>m("polygon"))},[...l[9]||(l[9]=[e.createElementVNode("span",{class:"qyuan icon-anchor"},null,-1)])],2)):e.createCommentVNode("",!0),s.tools.includes("measure_distance")?(e.openBlock(),e.createElementBlock("div",{key:3,title:"测距",class:e.normalizeClass(["hiper-map-tools-btn",o.value=="measure_distance"?"active":null]),onClick:l[4]||(l[4]=()=>m("measure_distance"))},[...l[10]||(l[10]=[e.createElementVNode("span",{class:"qyuan icon-ruler"},null,-1)])],2)):e.createCommentVNode("",!0),s.tools.includes("measure_area")?(e.openBlock(),e.createElementBlock("div",{key:4,title:"测面",class:e.normalizeClass(["hiper-map-tools-btn",o.value=="measure_area"?"active":null]),onClick:l[5]||(l[5]=()=>m("measure_area"))},[...l[11]||(l[11]=[e.createElementVNode("span",{class:"qyuan icon-multi-triangular"},null,-1)])],2)):e.createCommentVNode("",!0),s.tools.includes("clear_all")?(e.openBlock(),e.createElementBlock("div",{key:5,title:"清除所有临时绘制图形",class:"hiper-map-tools-btn",style:{border:"none"},onClick:l[6]||(l[6]=()=>m("clear_all"))},[...l[12]||(l[12]=[e.createElementVNode("span",{class:"qyuan icon-clear"},null,-1)])])):e.createCommentVNode("",!0)])],64))}});exports._sfc_main=J;
|