@supermapgis/vue-iclient-leaflet 11.2.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/LICENSE +201 -0
- package/README.md +31 -0
- package/dist/iclient-leaflet-vue.css +24471 -0
- package/dist/iclient-leaflet-vue.js +190317 -0
- package/dist/iclient-leaflet-vue.min.css +9 -0
- package/dist/iclient-leaflet-vue.min.js +517 -0
- package/dist/index.js +15 -0
- package/lib/_assets/iconfont/icon-sm-components.css +245 -0
- package/lib/_assets/iconfont/icon-sm-components.eot +0 -0
- package/lib/_assets/iconfont/icon-sm-components.svg +197 -0
- package/lib/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/lib/_lang/en.js +446 -0
- package/lib/_lang/index.js +385 -0
- package/lib/_lang/zh.js +445 -0
- package/lib/_mixin/AntdRender.js +686 -0
- package/lib/_mixin/Card.js +197 -0
- package/lib/_mixin/GridLayer.js +153 -0
- package/lib/_mixin/Layer.js +140 -0
- package/lib/_mixin/Options.js +114 -0
- package/lib/_mixin/Popper.js +134 -0
- package/lib/_mixin/Theme.js +441 -0
- package/lib/_mixin/ThirdService.js +243 -0
- package/lib/_mixin/TileLayer.js +138 -0
- package/lib/_mixin/Timer.js +230 -0
- package/lib/_mixin/VmUpdater.js +204 -0
- package/lib/_mixin/WebMapBase.js +3467 -0
- package/lib/_mixin/map-events.js +200 -0
- package/lib/_mixin/map-getter.js +341 -0
- package/lib/_types/AddressMatchParameter.js +118 -0
- package/lib/_types/GeoJSONParamter.js +113 -0
- package/lib/_types/RestDataParameter.js +141 -0
- package/lib/_types/RestMapParameter.js +141 -0
- package/lib/_types/RestParameter.js +121 -0
- package/lib/_types/event/BaseTypes.js +124 -0
- package/lib/_types/event/Event.js +442 -0
- package/lib/_types/event/Events.js +484 -0
- package/lib/_types/event/Pixel.js +295 -0
- package/lib/_types/event/Util.js +305 -0
- package/lib/_types/iPortalDataParameter.js +121 -0
- package/lib/_types/iServerBaseParameter.js +111 -0
- package/lib/_types/iServerDataParameter.js +154 -0
- package/lib/_types/iServerMapParameter.js +154 -0
- package/lib/_types/index.js +231 -0
- package/lib/_types/map-event.js +163 -0
- package/lib/_utils/EchartsDataService.js +843 -0
- package/lib/_utils/RestService.js +7096 -0
- package/lib/_utils/WebMapService.js +1607 -0
- package/lib/_utils/epsg-define.js +181 -0
- package/lib/_utils/get-features.js +232 -0
- package/lib/_utils/global-event.js +134 -0
- package/lib/_utils/iPortalDataService.js +7459 -0
- package/lib/_utils/iServerRestService.js +7603 -0
- package/lib/_utils/props-binder.js +129 -0
- package/lib/_utils/statistics.js +147 -0
- package/lib/_utils/style/color/colorPalette.js +192 -0
- package/lib/_utils/style/color/serialColors.js +352 -0
- package/lib/_utils/style/common/common.css +1 -0
- package/lib/_utils/style/mixins/config.css +0 -0
- package/lib/_utils/style/mixins/mixins.css +0 -0
- package/lib/_utils/style/theme/antd.css +25242 -0
- package/lib/_utils/style/theme/antdVar.css +0 -0
- package/lib/_utils/style/theme/chart.js +7477 -0
- package/lib/_utils/style/theme/set-theme.js +200 -0
- package/lib/_utils/style/theme/theme.css +0 -0
- package/lib/_utils/style/theme/theme.json +356 -0
- package/lib/_utils/util.js +484 -0
- package/lib/_utils/vue-types/index.js +396 -0
- package/lib/_utils/vue-types/utils.js +318 -0
- package/lib/avatar/index.js +656 -0
- package/lib/avatar/style/avatar.css +1 -0
- package/lib/avatar/style/css.js +9 -0
- package/lib/avatar/style/index.css +2135 -0
- package/lib/avatar/style/index.js +9 -0
- package/lib/border/index.js +642 -0
- package/lib/border/style/border.css +1 -0
- package/lib/border/style/css.js +7 -0
- package/lib/border/style/index.js +7 -0
- package/lib/breadcrumb/index.js +813 -0
- package/lib/breadcrumb/style/breadcrumb.css +1 -0
- package/lib/breadcrumb/style/css.js +9 -0
- package/lib/breadcrumb/style/index.css +2102 -0
- package/lib/breadcrumb/style/index.js +9 -0
- package/lib/button/index.js +758 -0
- package/lib/button/style/button.css +1 -0
- package/lib/button/style/css.js +9 -0
- package/lib/button/style/index.css +3571 -0
- package/lib/button/style/index.js +9 -0
- package/lib/card/index.js +824 -0
- package/lib/card/style/card.css +1 -0
- package/lib/card/style/css.js +9 -0
- package/lib/card/style/index.css +2379 -0
- package/lib/card/style/index.js +9 -0
- package/lib/chart/index.js +9471 -0
- package/lib/chart/style/chart.css +1 -0
- package/lib/chart/style/css.js +11 -0
- package/lib/chart/style/index.js +11 -0
- package/lib/checkbox/index.js +756 -0
- package/lib/checkbox/style/checkbox.css +1 -0
- package/lib/checkbox/style/css.js +9 -0
- package/lib/checkbox/style/index.css +2286 -0
- package/lib/checkbox/style/index.js +9 -0
- package/lib/collapse/index.js +446 -0
- package/lib/collapse/style/collapse.css +1 -0
- package/lib/collapse/style/css.js +9 -0
- package/lib/collapse/style/index.css +2187 -0
- package/lib/collapse/style/index.js +9 -0
- package/lib/collapse-card/index.js +588 -0
- package/lib/collapse-card/style/collapse-card.css +1 -0
- package/lib/collapse-card/style/css.js +7 -0
- package/lib/collapse-card/style/index.js +7 -0
- package/lib/color-picker/index.js +521 -0
- package/lib/color-picker/style/color-picker.css +1 -0
- package/lib/color-picker/style/css.js +7 -0
- package/lib/color-picker/style/index.js +7 -0
- package/lib/date-picker/index.js +680 -0
- package/lib/date-picker/style/css.js +9 -0
- package/lib/date-picker/style/date-picker.css +1 -0
- package/lib/date-picker/style/index.css +4236 -0
- package/lib/date-picker/style/index.js +9 -0
- package/lib/dropdown/index.js +347 -0
- package/lib/dropdown/style/css.js +9 -0
- package/lib/dropdown/style/dropdown.css +1 -0
- package/lib/dropdown/style/index.css +2344 -0
- package/lib/dropdown/style/index.js +9 -0
- package/lib/empty/index.js +643 -0
- package/lib/empty/style/css.js +9 -0
- package/lib/empty/style/empty.css +1 -0
- package/lib/empty/style/index.css +2095 -0
- package/lib/empty/style/index.js +9 -0
- package/lib/icon/index.js +681 -0
- package/lib/icon/style/css.js +9 -0
- package/lib/icon/style/icon.css +1 -0
- package/lib/icon/style/index.css +2058 -0
- package/lib/icon/style/index.js +9 -0
- package/lib/identify/index.js +1081 -0
- package/lib/identify/style/css.js +9 -0
- package/lib/identify/style/identify.css +1 -0
- package/lib/identify/style/index.js +9 -0
- package/lib/iframe/index.js +344 -0
- package/lib/iframe/style/css.js +7 -0
- package/lib/iframe/style/iframe.css +1 -0
- package/lib/iframe/style/index.js +7 -0
- package/lib/image/index.js +446 -0
- package/lib/image/style/css.js +7 -0
- package/lib/image/style/image.css +1 -0
- package/lib/image/style/index.js +7 -0
- package/lib/index.js +1040 -0
- package/lib/indicator/index.js +996 -0
- package/lib/indicator/style/countTo.css +1 -0
- package/lib/indicator/style/css.js +7 -0
- package/lib/indicator/style/index.js +7 -0
- package/lib/indicator/style/indicator.css +1 -0
- package/lib/init.js +207 -0
- package/lib/input/index.js +1151 -0
- package/lib/input/style/css.js +9 -0
- package/lib/input/style/index.css +2549 -0
- package/lib/input/style/index.js +9 -0
- package/lib/input/style/input.css +1 -0
- package/lib/input-number/index.js +739 -0
- package/lib/input-number/style/css.js +9 -0
- package/lib/input-number/style/index.css +2360 -0
- package/lib/input-number/style/index.js +9 -0
- package/lib/input-number/style/input-number.css +1 -0
- package/lib/layout/index.js +700 -0
- package/lib/layout/style/css.js +9 -0
- package/lib/layout/style/index.css +2185 -0
- package/lib/layout/style/index.js +9 -0
- package/lib/layout/style/layout.css +0 -0
- package/lib/liquid-fill/index.js +983 -0
- package/lib/liquid-fill/style/css.js +7 -0
- package/lib/liquid-fill/style/index.js +7 -0
- package/lib/liquid-fill/style/liquid-fill.css +1 -0
- package/lib/marker/index.js +649 -0
- package/lib/marker/style/css.js +0 -0
- package/lib/marker/style/index.js +0 -0
- package/lib/menu/index.js +858 -0
- package/lib/menu/style/css.js +9 -0
- package/lib/menu/style/index.css +2777 -0
- package/lib/menu/style/index.js +9 -0
- package/lib/menu/style/menu.css +0 -0
- package/lib/message/index.js +174 -0
- package/lib/message/style/css.js +9 -0
- package/lib/message/style/index.css +2143 -0
- package/lib/message/style/index.js +9 -0
- package/lib/message/style/message.css +1 -0
- package/lib/modal/index.js +742 -0
- package/lib/modal/style/css.js +9 -0
- package/lib/modal/style/index.css +2289 -0
- package/lib/modal/style/index.js +9 -0
- package/lib/modal/style/modal.css +1 -0
- package/lib/nav/style/css.js +9 -0
- package/lib/nav/style/index.js +9 -0
- package/lib/nav/style/nav.css +1 -0
- package/lib/notification/index.js +151 -0
- package/lib/notification/style/css.js +9 -0
- package/lib/notification/style/index.css +2285 -0
- package/lib/notification/style/index.js +9 -0
- package/lib/notification/style/notification.css +1 -0
- package/lib/pagination/index.js +352 -0
- package/lib/pagination/style/css.js +9 -0
- package/lib/pagination/style/index.css +2529 -0
- package/lib/pagination/style/index.js +9 -0
- package/lib/pagination/style/pagination.css +1 -0
- package/lib/popup/index.js +800 -0
- package/lib/popup/style/css.js +0 -0
- package/lib/popup/style/index.js +0 -0
- package/lib/progress/index.js +1146 -0
- package/lib/progress/style/css.js +9 -0
- package/lib/progress/style/index.css +2226 -0
- package/lib/progress/style/index.js +9 -0
- package/lib/progress/style/progress.css +1 -0
- package/lib/radio/index.js +852 -0
- package/lib/radio/style/css.js +9 -0
- package/lib/radio/style/index.css +2381 -0
- package/lib/radio/style/index.js +9 -0
- package/lib/radio/style/radio.css +1 -0
- package/lib/select/index.js +836 -0
- package/lib/select/style/css.js +9 -0
- package/lib/select/style/index.css +2655 -0
- package/lib/select/style/index.js +9 -0
- package/lib/select/style/select.css +1 -0
- package/lib/slider/index.js +347 -0
- package/lib/slider/style/css.js +9 -0
- package/lib/slider/style/index.css +2233 -0
- package/lib/slider/style/index.js +9 -0
- package/lib/slider/style/slider.css +1 -0
- package/lib/slideshow/index.js +913 -0
- package/lib/slideshow/style/css.js +9 -0
- package/lib/slideshow/style/index.js +9 -0
- package/lib/slideshow/style/slideshow.css +1 -0
- package/lib/spin/index.js +357 -0
- package/lib/spin/style/css.js +9 -0
- package/lib/spin/style/index.css +2268 -0
- package/lib/spin/style/index.js +9 -0
- package/lib/spin/style/spin.css +1 -0
- package/lib/steps/index.js +748 -0
- package/lib/steps/style/css.js +9 -0
- package/lib/steps/style/index.css +2724 -0
- package/lib/steps/style/index.js +9 -0
- package/lib/steps/style/steps.css +1 -0
- package/lib/style.js +7 -0
- package/lib/switch/index.js +654 -0
- package/lib/switch/style/css.js +9 -0
- package/lib/switch/style/index.css +2241 -0
- package/lib/switch/style/index.js +9 -0
- package/lib/switch/style/switch.css +1 -0
- package/lib/table/index.js +810 -0
- package/lib/table/style/css.js +9 -0
- package/lib/table/style/index.css +2909 -0
- package/lib/table/style/index.js +9 -0
- package/lib/table/style/table.css +1 -0
- package/lib/table-popup/index.js +438 -0
- package/lib/table-popup/style/css.js +9 -0
- package/lib/table-popup/style/index.js +9 -0
- package/lib/table-popup/style/table-popup.css +1 -0
- package/lib/tabs/index.js +743 -0
- package/lib/tabs/style/css.js +9 -0
- package/lib/tabs/style/index.css +2692 -0
- package/lib/tabs/style/index.js +9 -0
- package/lib/tabs/style/tabs.css +1 -0
- package/lib/text/index.js +434 -0
- package/lib/text/style/css.js +7 -0
- package/lib/text/style/index.js +7 -0
- package/lib/text/style/text.css +1 -0
- package/lib/tile-layer/index.js +535 -0
- package/lib/tile-layer/style/css.js +0 -0
- package/lib/tile-layer/style/index.js +0 -0
- package/lib/time-line/index.js +654 -0
- package/lib/time-line/style/css.js +7 -0
- package/lib/time-line/style/index.js +7 -0
- package/lib/time-line/style/time-line.css +1 -0
- package/lib/time-picker/index.js +669 -0
- package/lib/time-picker/style/css.js +9 -0
- package/lib/time-picker/style/index.css +2418 -0
- package/lib/time-picker/style/index.js +9 -0
- package/lib/time-picker/style/time-picker.css +1 -0
- package/lib/time-range/index.js +526 -0
- package/lib/time-range/style/css.js +7 -0
- package/lib/time-range/style/index.js +7 -0
- package/lib/time-range/style/time-range.css +1 -0
- package/lib/time-slider/index.js +1169 -0
- package/lib/time-slider/style/css.js +7 -0
- package/lib/time-slider/style/index.js +7 -0
- package/lib/time-slider/style/time-slider.css +1 -0
- package/lib/time-text/index.js +393 -0
- package/lib/time-text/style/css.js +7 -0
- package/lib/time-text/style/index.js +7 -0
- package/lib/time-text/style/time-text.css +1 -0
- package/lib/tooltip/index.js +635 -0
- package/lib/tooltip/style/css.js +9 -0
- package/lib/tooltip/style/index.css +2231 -0
- package/lib/tooltip/style/index.js +9 -0
- package/lib/tooltip/style/tooltip.css +0 -0
- package/lib/transfer/index.js +636 -0
- package/lib/transfer/style/css.js +9 -0
- package/lib/transfer/style/index.css +2302 -0
- package/lib/transfer/style/index.js +9 -0
- package/lib/transfer/style/transfer.css +1 -0
- package/lib/tree/index.js +857 -0
- package/lib/tree/style/css.js +9 -0
- package/lib/tree/style/index.css +2644 -0
- package/lib/tree/style/index.js +9 -0
- package/lib/tree/style/tree.css +1 -0
- package/lib/tree-select/index.js +765 -0
- package/lib/tree-select/style/css.js +9 -0
- package/lib/tree-select/style/index.css +2508 -0
- package/lib/tree-select/style/index.js +9 -0
- package/lib/tree-select/style/tree-select.css +1 -0
- package/lib/video-player/index.js +1472 -0
- package/lib/video-player/style/css.js +11 -0
- package/lib/video-player/style/index.js +11 -0
- package/lib/video-player/style/video-player.css +1 -0
- package/lib/web-map/index.js +2241 -0
- package/lib/web-map/style/css.js +15 -0
- package/lib/web-map/style/index.js +15 -0
- package/lib/web-map/style/web-map.css +1 -0
- package/package.json +97 -0
- package/src/common/_assets/iconfont/icon-sm-components.css +245 -0
- package/src/common/_assets/iconfont/icon-sm-components.eot +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.svg +197 -0
- package/src/common/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/src/common/_lang/en.js +355 -0
- package/src/common/_lang/index.js +177 -0
- package/src/common/_lang/zh.js +342 -0
- package/src/common/_mixin/AntdRender.ts +114 -0
- package/src/common/_mixin/Card.ts +22 -0
- package/src/common/_mixin/Theme.ts +222 -0
- package/src/common/_mixin/ThirdService.ts +58 -0
- package/src/common/_mixin/Timer.ts +58 -0
- package/src/common/_mixin/VmUpdater.ts +46 -0
- package/src/common/_types/AddressMatchParameter.js +9 -0
- package/src/common/_types/GeoJSONParamter.ts +17 -0
- package/src/common/_types/RestDataParameter.js +8 -0
- package/src/common/_types/RestMapParameter.js +8 -0
- package/src/common/_types/RestParameter.js +12 -0
- package/src/common/_types/event/BaseTypes.js +24 -0
- package/src/common/_types/event/Event.js +315 -0
- package/src/common/_types/event/Events.js +353 -0
- package/src/common/_types/event/Pixel.js +177 -0
- package/src/common/_types/event/Util.js +173 -0
- package/src/common/_types/iPortalDataParameter.js +12 -0
- package/src/common/_types/iServerBaseParameter.ts +28 -0
- package/src/common/_types/iServerDataParameter.ts +13 -0
- package/src/common/_types/iServerMapParameter.ts +13 -0
- package/src/common/_utils/EchartsDataService.js +527 -0
- package/src/common/_utils/RestService.js +130 -0
- package/src/common/_utils/WebMapService.ts +1292 -0
- package/src/common/_utils/epsg-define.js +55 -0
- package/src/common/_utils/get-features.js +92 -0
- package/src/common/_utils/global-event.js +6 -0
- package/src/common/_utils/iPortalDataService.js +444 -0
- package/src/common/_utils/iServerRestService.js +487 -0
- package/src/common/_utils/statistics.js +36 -0
- package/src/common/_utils/style/color/colorPalette.ts +63 -0
- package/src/common/_utils/style/color/serialColors.ts +207 -0
- package/src/common/_utils/style/common/common.scss +39 -0
- package/src/common/_utils/style/mixins/config.scss +4 -0
- package/src/common/_utils/style/mixins/mixins.scss +48 -0
- package/src/common/_utils/style/theme/antd.less +2 -0
- package/src/common/_utils/style/theme/antdVar.less +371 -0
- package/src/common/_utils/style/theme/chart.js +548 -0
- package/src/common/_utils/style/theme/set-theme.ts +43 -0
- package/src/common/_utils/style/theme/theme.json +356 -0
- package/src/common/_utils/style/theme/theme.scss +495 -0
- package/src/common/_utils/util.js +251 -0
- package/src/common/_utils/vue-types/index.js +267 -0
- package/src/common/_utils/vue-types/utils.js +194 -0
- package/src/common/avatar/Avatar.vue +41 -0
- package/src/common/avatar/index.js +9 -0
- package/src/common/avatar/style/avatar.scss +8 -0
- package/src/common/avatar/style/index.js +4 -0
- package/src/common/avatar/style/index.less +3 -0
- package/src/common/border/Border.vue +121 -0
- package/src/common/border/assets/border.config.json +67 -0
- package/src/common/border/assets/image/border1.png +0 -0
- package/src/common/border/assets/image/border10.png +0 -0
- package/src/common/border/assets/image/border11.png +0 -0
- package/src/common/border/assets/image/border12.png +0 -0
- package/src/common/border/assets/image/border13.png +0 -0
- package/src/common/border/assets/image/border2.png +0 -0
- package/src/common/border/assets/image/border3.png +0 -0
- package/src/common/border/assets/image/border4.png +0 -0
- package/src/common/border/assets/image/border5.png +0 -0
- package/src/common/border/assets/image/border6.png +0 -0
- package/src/common/border/assets/image/border7.png +0 -0
- package/src/common/border/assets/image/border8.png +0 -0
- package/src/common/border/assets/image/border9.png +0 -0
- package/src/common/border/index.js +9 -0
- package/src/common/border/style/border.scss +19 -0
- package/src/common/border/style/index.js +4 -0
- package/src/common/breadcrumb/Breadcrumb.vue +21 -0
- package/src/common/breadcrumb/BreadcrumbItem.vue +21 -0
- package/src/common/breadcrumb/BreadcrumbSeparator.vue +19 -0
- package/src/common/breadcrumb/index.js +13 -0
- package/src/common/breadcrumb/style/breadcrumb.scss +21 -0
- package/src/common/breadcrumb/style/index.js +4 -0
- package/src/common/breadcrumb/style/index.less +3 -0
- package/src/common/button/Button.vue +34 -0
- package/src/common/button/Group.vue +31 -0
- package/src/common/button/index.js +11 -0
- package/src/common/button/style/button.scss +91 -0
- package/src/common/button/style/index.js +4 -0
- package/src/common/button/style/index.less +3 -0
- package/src/common/button/style/mixin.scss +56 -0
- package/src/common/card/Card.vue +32 -0
- package/src/common/card/Grid.vue +20 -0
- package/src/common/card/Meta.vue +20 -0
- package/src/common/card/index.js +13 -0
- package/src/common/card/style/card.scss +43 -0
- package/src/common/card/style/index.js +4 -0
- package/src/common/card/style/index.less +3 -0
- package/src/common/chart/ChartMixin.vue +1572 -0
- package/src/common/chart/index.js +9 -0
- package/src/common/chart/style/chart.scss +10 -0
- package/src/common/chart/style/index.js +5 -0
- package/src/common/checkbox/Checkbox.vue +37 -0
- package/src/common/checkbox/Group.vue +36 -0
- package/src/common/checkbox/index.js +11 -0
- package/src/common/checkbox/style/checkbox.scss +40 -0
- package/src/common/checkbox/style/index.js +4 -0
- package/src/common/checkbox/style/index.less +3 -0
- package/src/common/collapse/Collapse.vue +32 -0
- package/src/common/collapse/Panel.vue +26 -0
- package/src/common/collapse/index.js +11 -0
- package/src/common/collapse/style/collapse.scss +10 -0
- package/src/common/collapse/style/index.js +4 -0
- package/src/common/collapse/style/index.less +3 -0
- package/src/common/collapse-card/CollapseCard.vue +150 -0
- package/src/common/collapse-card/index.js +9 -0
- package/src/common/collapse-card/style/collapse-card.scss +176 -0
- package/src/common/collapse-card/style/index.js +4 -0
- package/src/common/color-picker/ColorPicker.vue +106 -0
- package/src/common/color-picker/index.js +9 -0
- package/src/common/color-picker/style/color-picker.scss +37 -0
- package/src/common/color-picker/style/index.js +4 -0
- package/src/common/config-provider/ConfigProvider.vue +31 -0
- package/src/common/config-provider/index.js +9 -0
- package/src/common/date-picker/BaseMixin.vue +23 -0
- package/src/common/date-picker/DatePicker.vue +20 -0
- package/src/common/date-picker/MonthPicker.vue +20 -0
- package/src/common/date-picker/RangePicker.vue +20 -0
- package/src/common/date-picker/WeekPicker.vue +20 -0
- package/src/common/date-picker/index.js +15 -0
- package/src/common/date-picker/style/date-picker.scss +290 -0
- package/src/common/date-picker/style/index.js +4 -0
- package/src/common/date-picker/style/index.less +3 -0
- package/src/common/date-picker/style/mixin.scss +75 -0
- package/src/common/dropdown/Dropdown.vue +31 -0
- package/src/common/dropdown/index.js +9 -0
- package/src/common/dropdown/style/dropdown.scss +22 -0
- package/src/common/dropdown/style/index.js +4 -0
- package/src/common/dropdown/style/index.less +3 -0
- package/src/common/empty/Empty.vue +26 -0
- package/src/common/empty/RenderEmpty.ts +50 -0
- package/src/common/empty/assets/image/empty.png +0 -0
- package/src/common/empty/index.js +9 -0
- package/src/common/empty/style/empty.scss +31 -0
- package/src/common/empty/style/index.js +4 -0
- package/src/common/empty/style/index.less +3 -0
- package/src/common/icon/Icon.vue +66 -0
- package/src/common/icon/index.js +9 -0
- package/src/common/icon/style/icon.scss +12 -0
- package/src/common/icon/style/index.js +4 -0
- package/src/common/icon/style/index.less +3 -0
- package/src/common/iframe/Iframe.vue +17 -0
- package/src/common/iframe/index.js +9 -0
- package/src/common/iframe/style/iframe.scss +7 -0
- package/src/common/iframe/style/index.js +4 -0
- package/src/common/image/Image.vue +83 -0
- package/src/common/image/index.js +9 -0
- package/src/common/image/style/image.scss +33 -0
- package/src/common/image/style/index.js +4 -0
- package/src/common/indicator/CountTo.vue +92 -0
- package/src/common/indicator/Indicator.vue +308 -0
- package/src/common/indicator/index.js +11 -0
- package/src/common/indicator/style/countTo.scss +7 -0
- package/src/common/indicator/style/index.js +4 -0
- package/src/common/indicator/style/indicator.scss +47 -0
- package/src/common/input/BaseMixin.vue +24 -0
- package/src/common/input/Group.vue +31 -0
- package/src/common/input/Input.vue +41 -0
- package/src/common/input/Password.vue +41 -0
- package/src/common/input/Search.vue +40 -0
- package/src/common/input/TextArea.vue +25 -0
- package/src/common/input/index.js +17 -0
- package/src/common/input/style/index.js +4 -0
- package/src/common/input/style/index.less +3 -0
- package/src/common/input/style/input.scss +72 -0
- package/src/common/input/style/mixin.scss +42 -0
- package/src/common/input-number/InputNumber.vue +44 -0
- package/src/common/input-number/index.js +9 -0
- package/src/common/input-number/style/index.js +4 -0
- package/src/common/input-number/style/index.less +3 -0
- package/src/common/input-number/style/input-number.scss +43 -0
- package/src/common/layout/Content.vue +25 -0
- package/src/common/layout/Footer.vue +25 -0
- package/src/common/layout/Header.vue +25 -0
- package/src/common/layout/Layout.vue +25 -0
- package/src/common/layout/Sider.vue +33 -0
- package/src/common/layout/index.js +17 -0
- package/src/common/layout/style/index.js +4 -0
- package/src/common/layout/style/index.less +3 -0
- package/src/common/layout/style/layout.scss +5 -0
- package/src/common/liquid-fill/LiquidFill.vue +209 -0
- package/src/common/liquid-fill/index.js +9 -0
- package/src/common/liquid-fill/style/index.js +4 -0
- package/src/common/liquid-fill/style/liquid-fill.scss +6 -0
- package/src/common/menu/Menu.vue +31 -0
- package/src/common/menu/MenuItem.vue +37 -0
- package/src/common/menu/SubMenu.vue +51 -0
- package/src/common/menu/index.js +13 -0
- package/src/common/menu/style/index.js +4 -0
- package/src/common/menu/style/index.less +3 -0
- package/src/common/menu/style/menu.scss +0 -0
- package/src/common/message/Message.js +12 -0
- package/src/common/message/index.js +3 -0
- package/src/common/message/style/index.js +4 -0
- package/src/common/message/style/index.less +3 -0
- package/src/common/message/style/message.scss +16 -0
- package/src/common/modal/Modal.vue +64 -0
- package/src/common/modal/index.js +9 -0
- package/src/common/modal/main.ts +49 -0
- package/src/common/modal/style/index.js +4 -0
- package/src/common/modal/style/index.less +3 -0
- package/src/common/modal/style/modal.scss +23 -0
- package/src/common/nav/Nav.vue +158 -0
- package/src/common/nav/assets/image/background_image.png +0 -0
- package/src/common/nav/assets/image/item_active.png +0 -0
- package/src/common/nav/index.js +9 -0
- package/src/common/nav/style/index.js +5 -0
- package/src/common/nav/style/nav.scss +55 -0
- package/src/common/notification/Notification.js +10 -0
- package/src/common/notification/index.js +3 -0
- package/src/common/notification/style/index.js +4 -0
- package/src/common/notification/style/index.less +3 -0
- package/src/common/notification/style/notification.scss +30 -0
- package/src/common/pagination/Pagination.vue +32 -0
- package/src/common/pagination/index.js +9 -0
- package/src/common/pagination/style/index.js +4 -0
- package/src/common/pagination/style/index.less +3 -0
- package/src/common/pagination/style/pagination.scss +131 -0
- package/src/common/progress/Progress.vue +98 -0
- package/src/common/progress/index.js +9 -0
- package/src/common/progress/style/index.js +4 -0
- package/src/common/progress/style/index.less +3 -0
- package/src/common/progress/style/progress.scss +43 -0
- package/src/common/radio/Button.vue +18 -0
- package/src/common/radio/Group.vue +48 -0
- package/src/common/radio/Radio.vue +36 -0
- package/src/common/radio/index.js +13 -0
- package/src/common/radio/style/index.js +4 -0
- package/src/common/radio/style/index.less +3 -0
- package/src/common/radio/style/radio.scss +127 -0
- package/src/common/select/OptGroup.vue +20 -0
- package/src/common/select/Option.vue +22 -0
- package/src/common/select/Select.vue +49 -0
- package/src/common/select/index.js +13 -0
- package/src/common/select/style/index.js +4 -0
- package/src/common/select/style/index.less +3 -0
- package/src/common/select/style/select.scss +140 -0
- package/src/common/slider/Slider.vue +31 -0
- package/src/common/slider/index.js +9 -0
- package/src/common/slider/style/index.js +4 -0
- package/src/common/slider/style/index.less +3 -0
- package/src/common/slider/style/slider.scss +8 -0
- package/src/common/slideshow/Slideshow.vue +354 -0
- package/src/common/slideshow/SlideshowItem.vue +17 -0
- package/src/common/slideshow/Swiper.js +29 -0
- package/src/common/slideshow/index.js +11 -0
- package/src/common/slideshow/style/index.js +5 -0
- package/src/common/slideshow/style/slideshow.scss +48 -0
- package/src/common/spin/Spin.vue +17 -0
- package/src/common/spin/index.js +9 -0
- package/src/common/spin/main.ts +13 -0
- package/src/common/spin/style/index.js +4 -0
- package/src/common/spin/style/index.less +3 -0
- package/src/common/spin/style/spin.scss +14 -0
- package/src/common/steps/Step.vue +33 -0
- package/src/common/steps/Steps.vue +39 -0
- package/src/common/steps/index.js +11 -0
- package/src/common/steps/style/index.js +4 -0
- package/src/common/steps/style/index.less +3 -0
- package/src/common/steps/style/mixin.scss +67 -0
- package/src/common/steps/style/steps.scss +98 -0
- package/src/common/switch/Switch.vue +41 -0
- package/src/common/switch/index.js +9 -0
- package/src/common/switch/style/index.js +4 -0
- package/src/common/switch/style/index.less +3 -0
- package/src/common/switch/style/switch.scss +20 -0
- package/src/common/table/Column.vue +18 -0
- package/src/common/table/ColumnGroup.vue +19 -0
- package/src/common/table/Table.vue +18 -0
- package/src/common/table/index.js +13 -0
- package/src/common/table/style/index.js +4 -0
- package/src/common/table/style/index.less +3 -0
- package/src/common/table/style/table.scss +138 -0
- package/src/common/table-popup/TablePopup.vue +73 -0
- package/src/common/table-popup/index.js +9 -0
- package/src/common/table-popup/style/index.js +5 -0
- package/src/common/table-popup/style/table-popup.scss +52 -0
- package/src/common/tabs/TabPane.vue +26 -0
- package/src/common/tabs/Tabs.vue +41 -0
- package/src/common/tabs/index.js +11 -0
- package/src/common/tabs/style/index.js +4 -0
- package/src/common/tabs/style/index.less +3 -0
- package/src/common/tabs/style/tabs.scss +95 -0
- package/src/common/text/Text.vue +69 -0
- package/src/common/text/index.js +9 -0
- package/src/common/text/style/index.js +4 -0
- package/src/common/text/style/text.scss +23 -0
- package/src/common/time-line/TimeLine.vue +260 -0
- package/src/common/time-line/index.js +9 -0
- package/src/common/time-line/style/index.js +4 -0
- package/src/common/time-line/style/time-line.scss +10 -0
- package/src/common/time-picker/TimePicker.vue +47 -0
- package/src/common/time-picker/index.js +9 -0
- package/src/common/time-picker/style/index.js +4 -0
- package/src/common/time-picker/style/index.less +3 -0
- package/src/common/time-picker/style/time-picker.scss +69 -0
- package/src/common/time-range/TimeRange.vue +122 -0
- package/src/common/time-range/index.js +9 -0
- package/src/common/time-range/style/index.js +4 -0
- package/src/common/time-range/style/time-range.scss +10 -0
- package/src/common/time-slider/TimeSlider.vue +591 -0
- package/src/common/time-slider/index.js +9 -0
- package/src/common/time-slider/style/index.js +4 -0
- package/src/common/time-slider/style/mixin.scss +36 -0
- package/src/common/time-slider/style/time-slider.scss +147 -0
- package/src/common/time-text/TimeText.vue +51 -0
- package/src/common/time-text/index.js +9 -0
- package/src/common/time-text/style/index.js +4 -0
- package/src/common/time-text/style/time-text.scss +14 -0
- package/src/common/tooltip/Tooltip.vue +21 -0
- package/src/common/tooltip/index.js +9 -0
- package/src/common/tooltip/style/index.js +4 -0
- package/src/common/tooltip/style/index.less +3 -0
- package/src/common/tooltip/style/tooltip.scss +5 -0
- package/src/common/transfer/Transfer.vue +19 -0
- package/src/common/transfer/index.js +9 -0
- package/src/common/transfer/style/index.js +4 -0
- package/src/common/transfer/style/index.less +3 -0
- package/src/common/transfer/style/transfer.scss +52 -0
- package/src/common/tree/DirectoryTree.vue +32 -0
- package/src/common/tree/Tree.vue +32 -0
- package/src/common/tree/TreeNode.vue +49 -0
- package/src/common/tree/index.js +13 -0
- package/src/common/tree/style/index.js +4 -0
- package/src/common/tree/style/index.less +3 -0
- package/src/common/tree/style/tree.scss +16 -0
- package/src/common/tree-select/TreeSelect.vue +43 -0
- package/src/common/tree-select/TreeSelectNode.vue +49 -0
- package/src/common/tree-select/index.js +11 -0
- package/src/common/tree-select/style/index.js +4 -0
- package/src/common/tree-select/style/index.less +3 -0
- package/src/common/tree-select/style/tree-select.scss +38 -0
- package/src/common/video-player/VideoPlayer.vue +423 -0
- package/src/common/video-player/index.js +9 -0
- package/src/common/video-player/style/index.js +5 -0
- package/src/common/video-player/style/video-player.scss +266 -0
- package/src/common/web-map/WebMapBase.ts +1178 -0
- package/src/common/web-map/config/MunicipalCenter.json +1 -0
- package/src/common/web-map/config/ProvinceCenter.json +1 -0
- package/src/image.d.ts +7 -0
- package/src/init.js +38 -0
- package/src/leaflet/README.md +31 -0
- package/src/leaflet/_mixin/GridLayer.js +33 -0
- package/src/leaflet/_mixin/Layer.js +26 -0
- package/src/leaflet/_mixin/Options.js +10 -0
- package/src/leaflet/_mixin/Popper.js +25 -0
- package/src/leaflet/_mixin/TileLayer.js +18 -0
- package/src/leaflet/_mixin/map-getter.ts +122 -0
- package/src/leaflet/_types/index.js +17 -0
- package/src/leaflet/_types/map-event.js +34 -0
- package/src/leaflet/_utils/props-binder.js +23 -0
- package/src/leaflet/chart/Chart.vue +25 -0
- package/src/leaflet/chart/ChartViewModel.js +44 -0
- package/src/leaflet/chart/index.js +9 -0
- package/src/leaflet/components.ts +206 -0
- package/src/leaflet/css.js +3 -0
- package/src/leaflet/entrys.json +106 -0
- package/src/leaflet/identify/Identify.vue +233 -0
- package/src/leaflet/identify/IdentifyViewModel.js +114 -0
- package/src/leaflet/identify/index.js +9 -0
- package/src/leaflet/identify/style/identify.scss +30 -0
- package/src/leaflet/identify/style/index.js +4 -0
- package/src/leaflet/index.ts +5 -0
- package/src/leaflet/leaflet-wrapper.js +125 -0
- package/src/leaflet/marker/Marker.vue +46 -0
- package/src/leaflet/marker/MarkerViewModel.js +31 -0
- package/src/leaflet/marker/index.js +9 -0
- package/src/leaflet/package.json +97 -0
- package/src/leaflet/popup/Popup.vue +93 -0
- package/src/leaflet/popup/PopupViewModel.js +75 -0
- package/src/leaflet/popup/index.js +9 -0
- package/src/leaflet/style.js +3 -0
- package/src/leaflet/style.scss +52 -0
- package/src/leaflet/web-map/WebMap.vue +213 -0
- package/src/leaflet/web-map/WebMapViewModel.ts +1102 -0
- package/src/leaflet/web-map/_mixin/map-events.ts +65 -0
- package/src/leaflet/web-map/index.js +9 -0
- package/src/leaflet/web-map/layer/tile/TileLayer.vue +88 -0
- package/src/leaflet/web-map/layer/tile/TileLayerViewModel.js +66 -0
- package/src/leaflet/web-map/layer/tile/index.js +9 -0
- package/src/leaflet/web-map/style/index.js +7 -0
- package/src/leaflet/web-map/style/web-map.scss +32 -0
- package/src/sfc.d.ts +50 -0
- package/src/vue-i18n.d.ts +26 -0
- package/src/vue-options.d.ts +18 -0
- package/static/libs/echarts-layer/EchartsLayer.js +390 -0
- package/static/libs/geostats/geostats.js +1227 -0
- package/static/libs/iclient-common/iclient-common.js +2 -0
- package/static/libs/iclient-leaflet/iclient-leaflet.min.css +8 -0
- package/static/libs/iclient-leaflet/iclient-leaflet.min.js +1741 -0
- package/static/libs/json-sql/jsonsql.js +125 -0
- package/tsconfig.json +43 -0
|
@@ -0,0 +1,2241 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "lib/leaflet/";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 501);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 0:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 1:
|
|
98
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
+
|
|
100
|
+
"use strict";
|
|
101
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
102
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
103
|
+
|
|
104
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
105
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
106
|
+
// be included in the final webpack user bundle.
|
|
107
|
+
|
|
108
|
+
function normalizeComponent(
|
|
109
|
+
scriptExports,
|
|
110
|
+
render,
|
|
111
|
+
staticRenderFns,
|
|
112
|
+
functionalTemplate,
|
|
113
|
+
injectStyles,
|
|
114
|
+
scopeId,
|
|
115
|
+
moduleIdentifier /* server only */,
|
|
116
|
+
shadowMode /* vue-cli only */
|
|
117
|
+
) {
|
|
118
|
+
// Vue.extend constructor export interop
|
|
119
|
+
var options =
|
|
120
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
121
|
+
|
|
122
|
+
// render functions
|
|
123
|
+
if (render) {
|
|
124
|
+
options.render = render
|
|
125
|
+
options.staticRenderFns = staticRenderFns
|
|
126
|
+
options._compiled = true
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// functional template
|
|
130
|
+
if (functionalTemplate) {
|
|
131
|
+
options.functional = true
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// scopedId
|
|
135
|
+
if (scopeId) {
|
|
136
|
+
options._scopeId = 'data-v-' + scopeId
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
var hook
|
|
140
|
+
if (moduleIdentifier) {
|
|
141
|
+
// server build
|
|
142
|
+
hook = function (context) {
|
|
143
|
+
// 2.3 injection
|
|
144
|
+
context =
|
|
145
|
+
context || // cached call
|
|
146
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
147
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
148
|
+
// 2.2 with runInNewContext: true
|
|
149
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
150
|
+
context = __VUE_SSR_CONTEXT__
|
|
151
|
+
}
|
|
152
|
+
// inject component styles
|
|
153
|
+
if (injectStyles) {
|
|
154
|
+
injectStyles.call(this, context)
|
|
155
|
+
}
|
|
156
|
+
// register component module identifier for async chunk inferrence
|
|
157
|
+
if (context && context._registeredComponents) {
|
|
158
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// used by ssr in case component is cached and beforeCreate
|
|
162
|
+
// never gets called
|
|
163
|
+
options._ssrRegister = hook
|
|
164
|
+
} else if (injectStyles) {
|
|
165
|
+
hook = shadowMode
|
|
166
|
+
? function () {
|
|
167
|
+
injectStyles.call(
|
|
168
|
+
this,
|
|
169
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
: injectStyles
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (hook) {
|
|
176
|
+
if (options.functional) {
|
|
177
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
178
|
+
// go through the normalizer
|
|
179
|
+
options._injectStyles = hook
|
|
180
|
+
// register for functional component in vue file
|
|
181
|
+
var originalRender = options.render
|
|
182
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
183
|
+
hook.call(context)
|
|
184
|
+
return originalRender(h, context)
|
|
185
|
+
}
|
|
186
|
+
} else {
|
|
187
|
+
// inject component registration as beforeCreate hook
|
|
188
|
+
var existing = options.beforeCreate
|
|
189
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return {
|
|
194
|
+
exports: scriptExports,
|
|
195
|
+
options: options
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
/***/ }),
|
|
201
|
+
|
|
202
|
+
/***/ 11:
|
|
203
|
+
/***/ (function(module, exports) {
|
|
204
|
+
|
|
205
|
+
module.exports = require("vue-property-decorator");
|
|
206
|
+
|
|
207
|
+
/***/ }),
|
|
208
|
+
|
|
209
|
+
/***/ 12:
|
|
210
|
+
/***/ (function(module, exports) {
|
|
211
|
+
|
|
212
|
+
module.exports = require("@babel/runtime/helpers/extends");
|
|
213
|
+
|
|
214
|
+
/***/ }),
|
|
215
|
+
|
|
216
|
+
/***/ 14:
|
|
217
|
+
/***/ (function(module, exports) {
|
|
218
|
+
|
|
219
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
220
|
+
|
|
221
|
+
/***/ }),
|
|
222
|
+
|
|
223
|
+
/***/ 15:
|
|
224
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
225
|
+
|
|
226
|
+
"use strict";
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
230
|
+
|
|
231
|
+
Object.defineProperty(exports, "__esModule", {
|
|
232
|
+
value: true
|
|
233
|
+
});
|
|
234
|
+
exports.default = void 0;
|
|
235
|
+
|
|
236
|
+
var _Message = _interopRequireDefault(__webpack_require__(16));
|
|
237
|
+
|
|
238
|
+
var _default = exports.default = _Message.default;
|
|
239
|
+
|
|
240
|
+
/***/ }),
|
|
241
|
+
|
|
242
|
+
/***/ 16:
|
|
243
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
244
|
+
|
|
245
|
+
"use strict";
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
249
|
+
|
|
250
|
+
Object.defineProperty(exports, "__esModule", {
|
|
251
|
+
value: true
|
|
252
|
+
});
|
|
253
|
+
exports.default = void 0;
|
|
254
|
+
|
|
255
|
+
var _extends2 = _interopRequireDefault(__webpack_require__(12));
|
|
256
|
+
|
|
257
|
+
var _message = _interopRequireDefault(__webpack_require__(17));
|
|
258
|
+
|
|
259
|
+
var defaultPrefixCls = 'sm-component-message';
|
|
260
|
+
var configCallback = _message.default.config;
|
|
261
|
+
configCallback({
|
|
262
|
+
prefixCls: defaultPrefixCls
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
_message.default.config = function (options) {
|
|
266
|
+
if (options.prefixCls && options.prefixCls !== defaultPrefixCls) {
|
|
267
|
+
_message.default.destroy();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
configCallback((0, _extends2.default)({}, options, {
|
|
271
|
+
prefixCls: options.prefixCls || defaultPrefixCls
|
|
272
|
+
}));
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
var _default = exports.default = _message.default;
|
|
276
|
+
|
|
277
|
+
/***/ }),
|
|
278
|
+
|
|
279
|
+
/***/ 17:
|
|
280
|
+
/***/ (function(module, exports) {
|
|
281
|
+
|
|
282
|
+
module.exports = require("ant-design-vue/es/message");
|
|
283
|
+
|
|
284
|
+
/***/ }),
|
|
285
|
+
|
|
286
|
+
/***/ 19:
|
|
287
|
+
/***/ (function(module, exports) {
|
|
288
|
+
|
|
289
|
+
module.exports = require("leaflet");
|
|
290
|
+
|
|
291
|
+
/***/ }),
|
|
292
|
+
|
|
293
|
+
/***/ 22:
|
|
294
|
+
/***/ (function(module, exports) {
|
|
295
|
+
|
|
296
|
+
module.exports = require("resize-detector");
|
|
297
|
+
|
|
298
|
+
/***/ }),
|
|
299
|
+
|
|
300
|
+
/***/ 23:
|
|
301
|
+
/***/ (function(module, exports) {
|
|
302
|
+
|
|
303
|
+
module.exports = require("lodash.debounce");
|
|
304
|
+
|
|
305
|
+
/***/ }),
|
|
306
|
+
|
|
307
|
+
/***/ 233:
|
|
308
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
309
|
+
|
|
310
|
+
"use strict";
|
|
311
|
+
__webpack_require__.r(__webpack_exports__);
|
|
312
|
+
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234);
|
|
313
|
+
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
|
|
314
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
315
|
+
/* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
316
|
+
|
|
317
|
+
/***/ }),
|
|
318
|
+
|
|
319
|
+
/***/ 234:
|
|
320
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
321
|
+
|
|
322
|
+
"use strict";
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
326
|
+
|
|
327
|
+
Object.defineProperty(exports, "__esModule", {
|
|
328
|
+
value: true
|
|
329
|
+
});
|
|
330
|
+
exports.default = void 0;
|
|
331
|
+
|
|
332
|
+
var _createClass2 = _interopRequireDefault(__webpack_require__(14));
|
|
333
|
+
|
|
334
|
+
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));
|
|
335
|
+
|
|
336
|
+
var _WebMapViewModel = _interopRequireDefault(__webpack_require__(503));
|
|
337
|
+
|
|
338
|
+
var _VmUpdater = _interopRequireDefault(__webpack_require__(247));
|
|
339
|
+
|
|
340
|
+
var _mapEvent = _interopRequireDefault(__webpack_require__(249));
|
|
341
|
+
|
|
342
|
+
var _vuePropertyDecorator = __webpack_require__(11);
|
|
343
|
+
|
|
344
|
+
var _resizeDetector = __webpack_require__(22);
|
|
345
|
+
|
|
346
|
+
var _lodash = _interopRequireDefault(__webpack_require__(23));
|
|
347
|
+
|
|
348
|
+
var _mapEvents = _interopRequireDefault(__webpack_require__(505));
|
|
349
|
+
|
|
350
|
+
var _Spin = _interopRequireDefault(__webpack_require__(506));
|
|
351
|
+
|
|
352
|
+
var _index = _interopRequireDefault(__webpack_require__(15));
|
|
353
|
+
|
|
354
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
355
|
+
var c = arguments.length,
|
|
356
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
357
|
+
d;
|
|
358
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
359
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
var SmWebMap = /*#__PURE__*/function (_Mixins) {
|
|
363
|
+
(0, _inheritsLoose2.default)(SmWebMap, _Mixins);
|
|
364
|
+
|
|
365
|
+
function SmWebMap() {
|
|
366
|
+
var _this;
|
|
367
|
+
|
|
368
|
+
_this = _Mixins.apply(this, arguments) || this;
|
|
369
|
+
_this.spinning = true;
|
|
370
|
+
_this.ready = false;
|
|
371
|
+
return _this;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
var _proto = SmWebMap.prototype;
|
|
375
|
+
|
|
376
|
+
_proto.mapIdChanged = function mapIdChanged() {
|
|
377
|
+
this.spinning = true;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
_proto.mounted = function mounted() {
|
|
381
|
+
this.initializeWebMap();
|
|
382
|
+
this.registerEvents();
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
_proto.beforeDestroy = function beforeDestroy() {
|
|
386
|
+
this.destory();
|
|
387
|
+
|
|
388
|
+
_mapEvent.default.$options.deleteMap(this.target);
|
|
389
|
+
|
|
390
|
+
_mapEvent.default.$options.deleteWebMap(this.target);
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
_proto.load = function load(value) {
|
|
394
|
+
return value;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
_proto.getMapFailed = function getMapFailed(value) {
|
|
398
|
+
return value;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
_proto.getLayerDatasourceFailed = function getLayerDatasourceFailed(value) {
|
|
402
|
+
return value;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
_proto.initializeWebMap = function initializeWebMap() {
|
|
406
|
+
var _this2 = this;
|
|
407
|
+
|
|
408
|
+
var _this$$props = this.$props,
|
|
409
|
+
target = _this$$props.target,
|
|
410
|
+
serverUrl = _this$$props.serverUrl,
|
|
411
|
+
accessToken = _this$$props.accessToken,
|
|
412
|
+
accessKey = _this$$props.accessKey,
|
|
413
|
+
tiandituKey = _this$$props.tiandituKey,
|
|
414
|
+
withCredentials = _this$$props.withCredentials,
|
|
415
|
+
excludePortalProxyUrl = _this$$props.excludePortalProxyUrl,
|
|
416
|
+
isSuperMapOnline = _this$$props.isSuperMapOnline,
|
|
417
|
+
mapOptions = _this$$props.mapOptions;
|
|
418
|
+
this.viewModel = new _WebMapViewModel.default(this.mapId, {
|
|
419
|
+
target: target,
|
|
420
|
+
serverUrl: serverUrl,
|
|
421
|
+
accessToken: accessToken,
|
|
422
|
+
accessKey: accessKey,
|
|
423
|
+
tiandituKey: tiandituKey,
|
|
424
|
+
withCredentials: withCredentials,
|
|
425
|
+
excludePortalProxyUrl: excludePortalProxyUrl,
|
|
426
|
+
isSuperMapOnline: isSuperMapOnline
|
|
427
|
+
}, mapOptions);
|
|
428
|
+
|
|
429
|
+
if (this.autoresize) {
|
|
430
|
+
this.__resizeHandler = (0, _lodash.default)(function () {
|
|
431
|
+
_this2.resize();
|
|
432
|
+
}, 100, {
|
|
433
|
+
leading: true
|
|
434
|
+
});
|
|
435
|
+
(0, _resizeDetector.addListener)(this.$el, this.__resizeHandler);
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
_proto.resize = function resize() {
|
|
440
|
+
var _this3 = this;
|
|
441
|
+
|
|
442
|
+
if (this.viewModel && this.viewModel.resize) {
|
|
443
|
+
this.$nextTick(function () {
|
|
444
|
+
_this3.viewModel.resize();
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
_proto.registerEvents = function registerEvents() {
|
|
450
|
+
var _this4 = this;
|
|
451
|
+
|
|
452
|
+
this.viewModel.on({
|
|
453
|
+
addlayerssucceeded: function addlayerssucceeded(e) {
|
|
454
|
+
_this4.spinning = false;
|
|
455
|
+
|
|
456
|
+
_mapEvent.default.$options.setMap(_this4.target, e.map);
|
|
457
|
+
|
|
458
|
+
_this4.viewModel && _mapEvent.default.$options.setWebMap(_this4.target, _this4.viewModel);
|
|
459
|
+
|
|
460
|
+
_mapEvent.default.$emit('load-map', e.map, _this4.target);
|
|
461
|
+
|
|
462
|
+
_this4.map = e.map;
|
|
463
|
+
_this4.mapObject = e.map;
|
|
464
|
+
_this4.ready = true;
|
|
465
|
+
|
|
466
|
+
_this4.$nextTick(function () {
|
|
467
|
+
_this4.viewModel.resize();
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
_this4.bindMapEvents();
|
|
471
|
+
|
|
472
|
+
_this4.load({
|
|
473
|
+
map: e.map
|
|
474
|
+
});
|
|
475
|
+
},
|
|
476
|
+
getmapinfofailed: function getmapinfofailed(e) {
|
|
477
|
+
_this4.getMapFailed({
|
|
478
|
+
error: e.error
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
_index.default.error(e.error.message);
|
|
482
|
+
|
|
483
|
+
_this4.spinning = false;
|
|
484
|
+
},
|
|
485
|
+
getlayerdatasourcefailed: function getlayerdatasourcefailed(e) {
|
|
486
|
+
_this4.getLayerDatasourceFailed({
|
|
487
|
+
error: e.error,
|
|
488
|
+
layer: e.layer,
|
|
489
|
+
map: e.map
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
if (e.error === 'SAMPLE DATA is not supported') {
|
|
493
|
+
_index.default.error(_this4.$t('webmap.sampleDataNotSupport'));
|
|
494
|
+
} else {
|
|
495
|
+
_index.default.error(_this4.$t('webmap.getLayerInfoFailed'));
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
notsupportmvt: function notsupportmvt() {
|
|
499
|
+
_index.default.error('暂不支持加载矢量瓦片图层!');
|
|
500
|
+
|
|
501
|
+
_this4.spinning = false;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
_proto.destory = function destory() {
|
|
507
|
+
if (this.autoresize) {
|
|
508
|
+
(0, _resizeDetector.removeListener)(this.$el, this.__resizeHandler);
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
(0, _createClass2.default)(SmWebMap, [{
|
|
513
|
+
key: "getMapTarget",
|
|
514
|
+
get: function get() {
|
|
515
|
+
return this.target;
|
|
516
|
+
}
|
|
517
|
+
}]);
|
|
518
|
+
return SmWebMap;
|
|
519
|
+
}((0, _vuePropertyDecorator.Mixins)(_VmUpdater.default, _mapEvents.default));
|
|
520
|
+
|
|
521
|
+
__decorate([(0, _vuePropertyDecorator.Provide)()], SmWebMap.prototype, "__resizeHandler", void 0);
|
|
522
|
+
|
|
523
|
+
__decorate([(0, _vuePropertyDecorator.Provide)()], SmWebMap.prototype, "ready", void 0);
|
|
524
|
+
|
|
525
|
+
__decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "mapId", void 0);
|
|
526
|
+
|
|
527
|
+
__decorate([(0, _vuePropertyDecorator.Prop)({
|
|
528
|
+
default: 'map'
|
|
529
|
+
})], SmWebMap.prototype, "target", void 0);
|
|
530
|
+
|
|
531
|
+
__decorate([(0, _vuePropertyDecorator.Prop)({
|
|
532
|
+
default: 'https://www.supermapol.com'
|
|
533
|
+
})], SmWebMap.prototype, "serverUrl", void 0);
|
|
534
|
+
|
|
535
|
+
__decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "accessToken", void 0);
|
|
536
|
+
|
|
537
|
+
__decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "accessKey", void 0);
|
|
538
|
+
|
|
539
|
+
__decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "tiandituKey", void 0);
|
|
540
|
+
|
|
541
|
+
__decorate([(0, _vuePropertyDecorator.Prop)({
|
|
542
|
+
default: false
|
|
543
|
+
})], SmWebMap.prototype, "withCredentials", void 0);
|
|
544
|
+
|
|
545
|
+
__decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "excludePortalProxyUrl", void 0);
|
|
546
|
+
|
|
547
|
+
__decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "isSuperMapOnline", void 0);
|
|
548
|
+
|
|
549
|
+
__decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "mapOptions", void 0);
|
|
550
|
+
|
|
551
|
+
__decorate([(0, _vuePropertyDecorator.Prop)({
|
|
552
|
+
default: true
|
|
553
|
+
})], SmWebMap.prototype, "autoresize", void 0);
|
|
554
|
+
|
|
555
|
+
__decorate([(0, _vuePropertyDecorator.Watch)('mapId')], SmWebMap.prototype, "mapIdChanged", null);
|
|
556
|
+
|
|
557
|
+
__decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "load", null);
|
|
558
|
+
|
|
559
|
+
__decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "getMapFailed", null);
|
|
560
|
+
|
|
561
|
+
__decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "getLayerDatasourceFailed", null);
|
|
562
|
+
|
|
563
|
+
SmWebMap = __decorate([(0, _vuePropertyDecorator.Component)({
|
|
564
|
+
name: 'SmWebMap',
|
|
565
|
+
components: {
|
|
566
|
+
SmSpin: _Spin.default
|
|
567
|
+
},
|
|
568
|
+
viewModelProps: ['mapId', 'serverUrl', 'mapOptions.center', 'mapOptions.zoom', 'mapOptions.minZoom', 'mapOptions.maxZoom', 'mapOptions.maxBounds', 'withCredentials']
|
|
569
|
+
})], SmWebMap);
|
|
570
|
+
|
|
571
|
+
var _default = exports.default = SmWebMap;
|
|
572
|
+
|
|
573
|
+
/***/ }),
|
|
574
|
+
|
|
575
|
+
/***/ 247:
|
|
576
|
+
/***/ (function(module, exports) {
|
|
577
|
+
|
|
578
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/VmUpdater.js");
|
|
579
|
+
|
|
580
|
+
/***/ }),
|
|
581
|
+
|
|
582
|
+
/***/ 248:
|
|
583
|
+
/***/ (function(module, exports) {
|
|
584
|
+
|
|
585
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/static/libs/geostats/geostats");
|
|
586
|
+
|
|
587
|
+
/***/ }),
|
|
588
|
+
|
|
589
|
+
/***/ 249:
|
|
590
|
+
/***/ (function(module, exports) {
|
|
591
|
+
|
|
592
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_types/map-event.js");
|
|
593
|
+
|
|
594
|
+
/***/ }),
|
|
595
|
+
|
|
596
|
+
/***/ 25:
|
|
597
|
+
/***/ (function(module, exports) {
|
|
598
|
+
|
|
599
|
+
module.exports = require("@turf/center");
|
|
600
|
+
|
|
601
|
+
/***/ }),
|
|
602
|
+
|
|
603
|
+
/***/ 277:
|
|
604
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
605
|
+
|
|
606
|
+
"use strict";
|
|
607
|
+
|
|
608
|
+
// EXPORTS
|
|
609
|
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ render; });
|
|
610
|
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ staticRenderFns; });
|
|
611
|
+
|
|
612
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/web-map/WebMap.vue?vue&type=template&id=3484f35d&
|
|
613
|
+
var render = function () {
|
|
614
|
+
var _vm = this
|
|
615
|
+
var _h = _vm.$createElement
|
|
616
|
+
var _c = _vm._self._c || _h
|
|
617
|
+
return _c(
|
|
618
|
+
"div",
|
|
619
|
+
{ staticClass: "sm-component-web-map", attrs: { id: _vm.target } },
|
|
620
|
+
[
|
|
621
|
+
_vm.ready ? _vm._t("default") : _vm._e(),
|
|
622
|
+
_vm.spinning
|
|
623
|
+
? _c("sm-spin", {
|
|
624
|
+
attrs: {
|
|
625
|
+
size: "large",
|
|
626
|
+
tip: _vm.$t("webmap.loadingTip"),
|
|
627
|
+
spinning: _vm.spinning,
|
|
628
|
+
},
|
|
629
|
+
})
|
|
630
|
+
: _vm._e(),
|
|
631
|
+
],
|
|
632
|
+
2
|
|
633
|
+
)
|
|
634
|
+
}
|
|
635
|
+
var staticRenderFns = []
|
|
636
|
+
render._withStripped = true
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
// CONCATENATED MODULE: ./src/leaflet/web-map/WebMap.vue?vue&type=template&id=3484f35d&
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
/***/ }),
|
|
643
|
+
|
|
644
|
+
/***/ 3:
|
|
645
|
+
/***/ (function(module, exports) {
|
|
646
|
+
|
|
647
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/init.js");
|
|
648
|
+
|
|
649
|
+
/***/ }),
|
|
650
|
+
|
|
651
|
+
/***/ 33:
|
|
652
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
653
|
+
|
|
654
|
+
"use strict";
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
658
|
+
|
|
659
|
+
Object.defineProperty(exports, "__esModule", {
|
|
660
|
+
value: true
|
|
661
|
+
});
|
|
662
|
+
exports.default = void 0;
|
|
663
|
+
|
|
664
|
+
var _leaflet = _interopRequireDefault(__webpack_require__(19));
|
|
665
|
+
|
|
666
|
+
// @property lastId: Number
|
|
667
|
+
// Last unique ID used by [`stamp()`](#util-stamp)
|
|
668
|
+
var lastId = 0; // @function stamp(obj: Object): Number
|
|
669
|
+
// Returns the unique ID of an object, assigning it one if it doesn't have it.
|
|
670
|
+
|
|
671
|
+
function stamp(obj) {
|
|
672
|
+
/*eslint-disable */
|
|
673
|
+
obj._leaflet_id = obj._leaflet_id || ++lastId;
|
|
674
|
+
return obj._leaflet_id;
|
|
675
|
+
/* eslint-enable */
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
_leaflet.default.Map.prototype.addLayer = function (layer, name) {
|
|
679
|
+
if (!layer._layerAdd) {
|
|
680
|
+
throw new Error('The provided object is not a Layer.');
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
var id = stamp(layer); // 如果layer已存在,返回this
|
|
684
|
+
|
|
685
|
+
if (this._layers[id] || this._layers[name]) {
|
|
686
|
+
return this;
|
|
687
|
+
} // 如果用户没有传入name,就生成一个name
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
if (!name) {
|
|
691
|
+
name = 'sm-custom' + id;
|
|
692
|
+
} // 如果该name已存在,就生成新的name
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
if (this._layers[name]) {
|
|
696
|
+
this.fire('addLayerFailed', 'layer name重复,请输入唯一的name');
|
|
697
|
+
return this;
|
|
698
|
+
} // 将layer和name添加到layersOnMap
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
layer.name = name; // 不要将featureLayer加入layersOnMap
|
|
702
|
+
// let _layersId = {};
|
|
703
|
+
// for (let key in this._layers) {
|
|
704
|
+
// if (this._layers[key]._layers) {
|
|
705
|
+
// _layersId[key] = [];
|
|
706
|
+
// for (let key2 in this._layers[key]._layers) {
|
|
707
|
+
// _layersId[key].push(key2);
|
|
708
|
+
// }
|
|
709
|
+
// }
|
|
710
|
+
// }
|
|
711
|
+
// let layersOnMapFlag = true;
|
|
712
|
+
// for (let key in _layersId) {
|
|
713
|
+
// if (_layersId[key].indexOf(id + '') > -1) {
|
|
714
|
+
// layersOnMapFlag = false;
|
|
715
|
+
// }
|
|
716
|
+
// }
|
|
717
|
+
|
|
718
|
+
if (!this.layersOnMap) {
|
|
719
|
+
this.layersOnMap = [];
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
this.layersOnMap.push({
|
|
723
|
+
name: name,
|
|
724
|
+
layer: layer
|
|
725
|
+
}); // if (layersOnMapFlag) {
|
|
726
|
+
// this.layersOnMap.push({ name, layer });
|
|
727
|
+
// }
|
|
728
|
+
|
|
729
|
+
this._layers[id] = layer;
|
|
730
|
+
layer._mapToAdd = this;
|
|
731
|
+
|
|
732
|
+
if (layer.beforeAdd) {
|
|
733
|
+
layer.beforeAdd(this);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
this.whenReady(layer._layerAdd, layer);
|
|
737
|
+
return this;
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
_leaflet.default.Map.prototype.removeLayer = function (layer, name) {
|
|
741
|
+
// 重新构造layersOnMap
|
|
742
|
+
this.layersOnMap = this.layersOnMap.filter(function (l) {
|
|
743
|
+
return l.name !== (layer.name || name);
|
|
744
|
+
}); // 如果是传入图层,就用图层id; 如果传入name,通过name去获取图层id
|
|
745
|
+
|
|
746
|
+
var id = stamp(layer) || this._layers[name].id;
|
|
747
|
+
|
|
748
|
+
if (!this._layers[id]) {
|
|
749
|
+
return this;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if (this._loaded) {
|
|
753
|
+
layer.onRemove(this);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
if (layer.getAttribution && this.attributionControl) {
|
|
757
|
+
this.attributionControl.removeAttribution(layer.getAttribution());
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
delete this._layers[id];
|
|
761
|
+
|
|
762
|
+
if (this._loaded) {
|
|
763
|
+
this.fire('layerremove', {
|
|
764
|
+
layer: layer,
|
|
765
|
+
name: name
|
|
766
|
+
});
|
|
767
|
+
layer.fire('remove');
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
layer._map = layer._mapToAdd = null;
|
|
771
|
+
return this;
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
_leaflet.default.Map.include({
|
|
775
|
+
getLayersOnMap: function getLayersOnMap() {
|
|
776
|
+
return this.layersOnMap;
|
|
777
|
+
},
|
|
778
|
+
getLayerById: function getLayerById(id) {
|
|
779
|
+
return this._layers[id];
|
|
780
|
+
},
|
|
781
|
+
getLayerByName: function getLayerByName(name) {
|
|
782
|
+
for (var key in this._layers) {
|
|
783
|
+
if (name === this._layers[key].name) {
|
|
784
|
+
return this._layers[key];
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
getAllLayers: function getAllLayers() {
|
|
789
|
+
return this._layers;
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
delete _leaflet.default.Icon.Default.prototype._getIconUrl;
|
|
794
|
+
|
|
795
|
+
_leaflet.default.Icon.Default.mergeOptions({
|
|
796
|
+
iconRetinaUrl: __webpack_require__(34),
|
|
797
|
+
iconUrl: __webpack_require__(35),
|
|
798
|
+
shadowUrl: __webpack_require__(36)
|
|
799
|
+
});
|
|
800
|
+
|
|
801
|
+
window.L = _leaflet.default;
|
|
802
|
+
|
|
803
|
+
var _default = exports.default = _leaflet.default;
|
|
804
|
+
|
|
805
|
+
/***/ }),
|
|
806
|
+
|
|
807
|
+
/***/ 34:
|
|
808
|
+
/***/ (function(module, exports) {
|
|
809
|
+
|
|
810
|
+
module.exports = require("leaflet/dist/images/marker-icon-2x.png");
|
|
811
|
+
|
|
812
|
+
/***/ }),
|
|
813
|
+
|
|
814
|
+
/***/ 35:
|
|
815
|
+
/***/ (function(module, exports) {
|
|
816
|
+
|
|
817
|
+
module.exports = require("leaflet/dist/images/marker-icon.png");
|
|
818
|
+
|
|
819
|
+
/***/ }),
|
|
820
|
+
|
|
821
|
+
/***/ 36:
|
|
822
|
+
/***/ (function(module, exports) {
|
|
823
|
+
|
|
824
|
+
module.exports = require("leaflet/dist/images/marker-shadow.png");
|
|
825
|
+
|
|
826
|
+
/***/ }),
|
|
827
|
+
|
|
828
|
+
/***/ 37:
|
|
829
|
+
/***/ (function(module, exports) {
|
|
830
|
+
|
|
831
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/static/libs/iclient-leaflet/iclient-leaflet.min.js");
|
|
832
|
+
|
|
833
|
+
/***/ }),
|
|
834
|
+
|
|
835
|
+
/***/ 43:
|
|
836
|
+
/***/ (function(module, exports) {
|
|
837
|
+
|
|
838
|
+
module.exports = require("@babel/runtime/regenerator");
|
|
839
|
+
|
|
840
|
+
/***/ }),
|
|
841
|
+
|
|
842
|
+
/***/ 501:
|
|
843
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
844
|
+
|
|
845
|
+
"use strict";
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
849
|
+
|
|
850
|
+
Object.defineProperty(exports, "__esModule", {
|
|
851
|
+
value: true
|
|
852
|
+
});
|
|
853
|
+
exports.default = void 0;
|
|
854
|
+
|
|
855
|
+
var _WebMap = _interopRequireDefault(__webpack_require__(502));
|
|
856
|
+
|
|
857
|
+
var _init = _interopRequireDefault(__webpack_require__(3));
|
|
858
|
+
|
|
859
|
+
_WebMap.default.install = function (Vue, opts) {
|
|
860
|
+
(0, _init.default)(Vue, opts);
|
|
861
|
+
Vue.component(_WebMap.default.options ? _WebMap.default.options.name : _WebMap.default.name, _WebMap.default);
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
var _default = exports.default = _WebMap.default;
|
|
865
|
+
|
|
866
|
+
/***/ }),
|
|
867
|
+
|
|
868
|
+
/***/ 502:
|
|
869
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
870
|
+
|
|
871
|
+
"use strict";
|
|
872
|
+
__webpack_require__.r(__webpack_exports__);
|
|
873
|
+
/* harmony import */ var _WebMap_vue_vue_type_template_id_3484f35d___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(277);
|
|
874
|
+
/* harmony import */ var _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(233);
|
|
875
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
876
|
+
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
/* normalize component */
|
|
883
|
+
|
|
884
|
+
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
|
|
885
|
+
_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
886
|
+
_WebMap_vue_vue_type_template_id_3484f35d___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
|
|
887
|
+
_WebMap_vue_vue_type_template_id_3484f35d___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
|
|
888
|
+
false,
|
|
889
|
+
null,
|
|
890
|
+
null,
|
|
891
|
+
null
|
|
892
|
+
|
|
893
|
+
)
|
|
894
|
+
|
|
895
|
+
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
|
896
|
+
|
|
897
|
+
/***/ }),
|
|
898
|
+
|
|
899
|
+
/***/ 503:
|
|
900
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
901
|
+
|
|
902
|
+
"use strict";
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
906
|
+
|
|
907
|
+
Object.defineProperty(exports, "__esModule", {
|
|
908
|
+
value: true
|
|
909
|
+
});
|
|
910
|
+
exports.default = void 0;
|
|
911
|
+
|
|
912
|
+
var _regenerator = _interopRequireDefault(__webpack_require__(43));
|
|
913
|
+
|
|
914
|
+
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));
|
|
915
|
+
|
|
916
|
+
var _leafletWrapper = _interopRequireDefault(__webpack_require__(33));
|
|
917
|
+
|
|
918
|
+
__webpack_require__(37);
|
|
919
|
+
|
|
920
|
+
__webpack_require__(248);
|
|
921
|
+
|
|
922
|
+
var _center = _interopRequireDefault(__webpack_require__(25));
|
|
923
|
+
|
|
924
|
+
var _WebMapBase2 = _interopRequireDefault(__webpack_require__(504));
|
|
925
|
+
|
|
926
|
+
var _epsgDefine = __webpack_require__(51);
|
|
927
|
+
|
|
928
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
929
|
+
function adopt(value) {
|
|
930
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
931
|
+
resolve(value);
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
936
|
+
function fulfilled(value) {
|
|
937
|
+
try {
|
|
938
|
+
step(generator.next(value));
|
|
939
|
+
} catch (e) {
|
|
940
|
+
reject(e);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
function rejected(value) {
|
|
945
|
+
try {
|
|
946
|
+
step(generator["throw"](value));
|
|
947
|
+
} catch (e) {
|
|
948
|
+
reject(e);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
function step(result) {
|
|
953
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
957
|
+
});
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
var WebMapViewModel = exports.default = /*#__PURE__*/function (_WebMapBase) {
|
|
961
|
+
(0, _inheritsLoose2.default)(WebMapViewModel, _WebMapBase);
|
|
962
|
+
|
|
963
|
+
function WebMapViewModel(id, options, mapOptions) {
|
|
964
|
+
var _this;
|
|
965
|
+
|
|
966
|
+
if (options === void 0) {
|
|
967
|
+
options = {};
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
if (mapOptions === void 0) {
|
|
971
|
+
mapOptions = {};
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
_this = _WebMapBase.call(this, id, options, mapOptions) || this;
|
|
975
|
+
_this.layers = {};
|
|
976
|
+
_this._dataflowPathIdCache = {};
|
|
977
|
+
_this._dataflowLabelIdCache = {};
|
|
978
|
+
_this._dataflowLineFeatureCache = {};
|
|
979
|
+
_this.center = mapOptions.center;
|
|
980
|
+
_this.zoom = mapOptions.zoom;
|
|
981
|
+
|
|
982
|
+
_this._initWebMap();
|
|
983
|
+
|
|
984
|
+
return _this;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
var _proto = WebMapViewModel.prototype;
|
|
988
|
+
|
|
989
|
+
_proto.resize = function resize() {
|
|
990
|
+
this.map && this.map.invalidateSize();
|
|
991
|
+
this.echartsLayerResize();
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
_proto.setCenter = function setCenter(center) {
|
|
995
|
+
if (this.map) {
|
|
996
|
+
this.mapOptions.center = center;
|
|
997
|
+
center && center.length > 0 && this.map.setView(center, this.zoom);
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
_proto._initWebMap = function _initWebMap() {
|
|
1002
|
+
this.initWebMap();
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
_proto._getMapInfo = function _getMapInfo(mapInfo, _taskID) {
|
|
1006
|
+
var layers = mapInfo.layers;
|
|
1007
|
+
this._layers = [];
|
|
1008
|
+
|
|
1009
|
+
this._createMap(mapInfo);
|
|
1010
|
+
|
|
1011
|
+
this._initBaseLayer(mapInfo, false);
|
|
1012
|
+
|
|
1013
|
+
if (!layers || layers.length === 0) {
|
|
1014
|
+
this._sendMapToUser(0, 0);
|
|
1015
|
+
} else {
|
|
1016
|
+
this._initOverlayLayers(layers, _taskID);
|
|
1017
|
+
}
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
_proto._createMap = function _createMap(mapInfo) {
|
|
1021
|
+
var _this2 = this;
|
|
1022
|
+
|
|
1023
|
+
if (!mapInfo) {
|
|
1024
|
+
this.map = _leafletWrapper.default.map(this.target, {
|
|
1025
|
+
center: this.center && this.center.length ? _leafletWrapper.default.latLng(this.center[0], this.center[1]) : [0, 0],
|
|
1026
|
+
zoom: this.zoom || 0,
|
|
1027
|
+
crs: this.mapOptions.crs || _leafletWrapper.default.CRS.EPSG3857,
|
|
1028
|
+
maxZoom: this.mapOptions.maxZoom || 30,
|
|
1029
|
+
minZoom: this.mapOptions.minZoom || 0,
|
|
1030
|
+
preferCanvas: this.mapOptions.preferCanvas || true
|
|
1031
|
+
});
|
|
1032
|
+
setTimeout(function () {
|
|
1033
|
+
_this2.triggerEvent('addlayerssucceeded', {
|
|
1034
|
+
map: _this2.map,
|
|
1035
|
+
mapparams: {},
|
|
1036
|
+
layers: []
|
|
1037
|
+
});
|
|
1038
|
+
}, 0);
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
var level = mapInfo.level,
|
|
1043
|
+
maxZoom = mapInfo.maxZoom,
|
|
1044
|
+
minZoom = mapInfo.minZoom;
|
|
1045
|
+
var zoom = level || 0;
|
|
1046
|
+
zoom = zoom === 0 ? 0 : zoom;
|
|
1047
|
+
|
|
1048
|
+
var crs = this._handleMapCrs(mapInfo);
|
|
1049
|
+
|
|
1050
|
+
var center = this._getMapCenter(mapInfo);
|
|
1051
|
+
|
|
1052
|
+
this.map = _leafletWrapper.default.map(this.target, {
|
|
1053
|
+
center: this.center || center,
|
|
1054
|
+
zoom: this.zoom || zoom,
|
|
1055
|
+
crs: crs,
|
|
1056
|
+
maxZoom: maxZoom || 30,
|
|
1057
|
+
minZoom: minZoom || 0,
|
|
1058
|
+
preferCanvas: true
|
|
1059
|
+
});
|
|
1060
|
+
this.triggerEvent('mapinitialized', {
|
|
1061
|
+
map: this.map
|
|
1062
|
+
});
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
_proto._initBaseLayer = function _initBaseLayer(mapInfo, sendToMap) {
|
|
1066
|
+
if (sendToMap === void 0) {
|
|
1067
|
+
sendToMap = true;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
var layerInfo = mapInfo.baseLayer || mapInfo;
|
|
1071
|
+
var layerType = this.getBaseLayerType(layerInfo);
|
|
1072
|
+
var mapUrls = this.getMapurls({
|
|
1073
|
+
CLOUD: 'http://t2.dituhui.com/FileService/image',
|
|
1074
|
+
CLOUD_BLACK: 'http://t3.dituhui.com/MapService/getGdp',
|
|
1075
|
+
OSM: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
|
1076
|
+
});
|
|
1077
|
+
var url;
|
|
1078
|
+
var layer;
|
|
1079
|
+
|
|
1080
|
+
switch (layerType) {
|
|
1081
|
+
case 'TIANDITU':
|
|
1082
|
+
layer = this._createTiandituLayer(layerInfo);
|
|
1083
|
+
break;
|
|
1084
|
+
|
|
1085
|
+
case 'BING':
|
|
1086
|
+
layer = this._createBingLayer();
|
|
1087
|
+
break;
|
|
1088
|
+
|
|
1089
|
+
case 'WMS':
|
|
1090
|
+
layer = this._createWMSLayer(layerInfo);
|
|
1091
|
+
break;
|
|
1092
|
+
|
|
1093
|
+
case 'WMTS':
|
|
1094
|
+
layer = this._createWMTSLayer(layerInfo);
|
|
1095
|
+
break;
|
|
1096
|
+
|
|
1097
|
+
case 'TILE':
|
|
1098
|
+
layer = this._createDynamicTiledLayer(layerInfo);
|
|
1099
|
+
break;
|
|
1100
|
+
|
|
1101
|
+
case 'CLOUD':
|
|
1102
|
+
url = mapUrls[layerInfo.layerType];
|
|
1103
|
+
layer = this._createCLOUDLayer(layerType, url);
|
|
1104
|
+
break;
|
|
1105
|
+
|
|
1106
|
+
case 'XYZ':
|
|
1107
|
+
url = mapUrls[layerInfo.layerType];
|
|
1108
|
+
layer = this._createXYZLayer(url);
|
|
1109
|
+
break;
|
|
1110
|
+
|
|
1111
|
+
case 'BAIDU':
|
|
1112
|
+
layer = this._createBaiduTileLayer();
|
|
1113
|
+
break;
|
|
1114
|
+
|
|
1115
|
+
case 'MAPBOXSTYLE':
|
|
1116
|
+
this.triggerEvent('notsupportmvt', {});
|
|
1117
|
+
break;
|
|
1118
|
+
|
|
1119
|
+
default:
|
|
1120
|
+
break;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
layer && this._addLayerToMap({
|
|
1124
|
+
layer: layer,
|
|
1125
|
+
type: 'baseLayers',
|
|
1126
|
+
layerInfo: layerInfo,
|
|
1127
|
+
sendToMap: sendToMap
|
|
1128
|
+
});
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
_proto._initOverlayLayers = function _initOverlayLayers(layers, _taskID) {
|
|
1132
|
+
var _this3 = this;
|
|
1133
|
+
|
|
1134
|
+
this._layers = layers;
|
|
1135
|
+
this.layerAdded = 0;
|
|
1136
|
+
this.expectLayerLen = layers.length;
|
|
1137
|
+
|
|
1138
|
+
if (this.expectLayerLen > 0) {
|
|
1139
|
+
layers.forEach(function (layer, index) {
|
|
1140
|
+
var type = _this3.webMapService.getDatasourceType(layer);
|
|
1141
|
+
|
|
1142
|
+
if (type === 'SAMPLE_DATA') {
|
|
1143
|
+
_this3._addLayerSucceeded();
|
|
1144
|
+
|
|
1145
|
+
_this3.triggerEvent('getlayerdatasourcefailed', {
|
|
1146
|
+
error: 'SAMPLE DATA is not supported',
|
|
1147
|
+
layer: layer,
|
|
1148
|
+
map: _this3.map
|
|
1149
|
+
});
|
|
1150
|
+
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
layer.layerID = layer.name + '-' + index;
|
|
1155
|
+
layer.index = index;
|
|
1156
|
+
|
|
1157
|
+
if (type === 'tile') {
|
|
1158
|
+
_this3._initBaseLayer(layer);
|
|
1159
|
+
} else {
|
|
1160
|
+
_this3.getLayerFeatures(layer, _taskID, type);
|
|
1161
|
+
}
|
|
1162
|
+
}, this);
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
|
|
1166
|
+
_proto._createMvtLayer = function _createMvtLayer() {
|
|
1167
|
+
this._addLayerSucceeded();
|
|
1168
|
+
};
|
|
1169
|
+
|
|
1170
|
+
_proto._createRestMapLayer = function _createRestMapLayer(restMaps, layer) {
|
|
1171
|
+
var _this4 = this;
|
|
1172
|
+
|
|
1173
|
+
restMaps.forEach(function (restMapInfo, index) {
|
|
1174
|
+
layer = _this4.getRestMapLayerInfo(restMapInfo, layer);
|
|
1175
|
+
|
|
1176
|
+
_this4._initBaseLayer(layer, index === restMaps.length - 1);
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
_proto._initOverlayLayer = function _initOverlayLayer(layerInfo, features) {
|
|
1181
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
1182
|
+
var layerType, style, filterCondition, featureType, labelStyle, projection, epsgCode, layer, labelLayerInfo, labelLayer;
|
|
1183
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
1184
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1185
|
+
case 0:
|
|
1186
|
+
_context.prev = 0;
|
|
1187
|
+
layerType = layerInfo.layerType, style = layerInfo.style, filterCondition = layerInfo.filterCondition, featureType = layerInfo.featureType, labelStyle = layerInfo.labelStyle, projection = layerInfo.projection;
|
|
1188
|
+
|
|
1189
|
+
if (!(layerType === 'restMap')) {
|
|
1190
|
+
_context.next = 5;
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
this._createRestMapLayer(features, layerInfo);
|
|
1195
|
+
|
|
1196
|
+
return _context.abrupt("return");
|
|
1197
|
+
|
|
1198
|
+
case 5:
|
|
1199
|
+
if (!(layerType === 'mvt')) {
|
|
1200
|
+
_context.next = 8;
|
|
1201
|
+
break;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
this._createMvtLayer();
|
|
1205
|
+
|
|
1206
|
+
return _context.abrupt("return");
|
|
1207
|
+
|
|
1208
|
+
case 8:
|
|
1209
|
+
if (!(features && projection && projection !== 'EPSG:4326')) {
|
|
1210
|
+
_context.next = 14;
|
|
1211
|
+
break;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
epsgCode = projection.split(':')[1];
|
|
1215
|
+
|
|
1216
|
+
if (epsgCode) {
|
|
1217
|
+
_context.next = 12;
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
return _context.abrupt("return");
|
|
1222
|
+
|
|
1223
|
+
case 12:
|
|
1224
|
+
this._unprojectCrs = this.getTransformCoodinatesCRS(projection.split(':')[1]);
|
|
1225
|
+
features = this.transformFeatures(features);
|
|
1226
|
+
|
|
1227
|
+
case 14:
|
|
1228
|
+
features = this.handleLayerFeatures(features, layerInfo);
|
|
1229
|
+
_context.t0 = layerType;
|
|
1230
|
+
_context.next = _context.t0 === 'VECTOR' ? 18 : _context.t0 === 'UNIQUE' ? 34 : _context.t0 === 'RANGE' ? 38 : _context.t0 === 'HEAT' ? 42 : _context.t0 === 'MARKER' ? 46 : _context.t0 === 'RANK_SYMBOL' ? 50 : _context.t0 === 'MIGRATION' ? 54 : _context.t0 === 'DATAFLOW_POINT_TRACK' ? 58 : _context.t0 === 'DATAFLOW_HEAT' ? 58 : 62;
|
|
1231
|
+
break;
|
|
1232
|
+
|
|
1233
|
+
case 18:
|
|
1234
|
+
if (!(featureType === 'POINT')) {
|
|
1235
|
+
_context.next = 30;
|
|
1236
|
+
break;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
if (!(style.type === 'SYMBOL_POINT')) {
|
|
1240
|
+
_context.next = 25;
|
|
1241
|
+
break;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
_context.next = 22;
|
|
1245
|
+
return this._createSymbolLayer(layerInfo, features);
|
|
1246
|
+
|
|
1247
|
+
case 22:
|
|
1248
|
+
layer = _context.sent;
|
|
1249
|
+
_context.next = 28;
|
|
1250
|
+
break;
|
|
1251
|
+
|
|
1252
|
+
case 25:
|
|
1253
|
+
_context.next = 27;
|
|
1254
|
+
return this._createGraphicLayer(layerInfo, features);
|
|
1255
|
+
|
|
1256
|
+
case 27:
|
|
1257
|
+
layer = _context.sent;
|
|
1258
|
+
|
|
1259
|
+
case 28:
|
|
1260
|
+
_context.next = 33;
|
|
1261
|
+
break;
|
|
1262
|
+
|
|
1263
|
+
case 30:
|
|
1264
|
+
_context.next = 32;
|
|
1265
|
+
return this._createVectorLayer(layerInfo, features);
|
|
1266
|
+
|
|
1267
|
+
case 32:
|
|
1268
|
+
layer = _context.sent;
|
|
1269
|
+
|
|
1270
|
+
case 33:
|
|
1271
|
+
return _context.abrupt("break", 62);
|
|
1272
|
+
|
|
1273
|
+
case 34:
|
|
1274
|
+
_context.next = 36;
|
|
1275
|
+
return this._createUniqueLayer(layerInfo, features);
|
|
1276
|
+
|
|
1277
|
+
case 36:
|
|
1278
|
+
layer = _context.sent;
|
|
1279
|
+
return _context.abrupt("break", 62);
|
|
1280
|
+
|
|
1281
|
+
case 38:
|
|
1282
|
+
_context.next = 40;
|
|
1283
|
+
return this._createRangeLayer(layerInfo, features);
|
|
1284
|
+
|
|
1285
|
+
case 40:
|
|
1286
|
+
layer = _context.sent;
|
|
1287
|
+
return _context.abrupt("break", 62);
|
|
1288
|
+
|
|
1289
|
+
case 42:
|
|
1290
|
+
_context.next = 44;
|
|
1291
|
+
return this._createHeatLayer(layerInfo, features);
|
|
1292
|
+
|
|
1293
|
+
case 44:
|
|
1294
|
+
layer = _context.sent;
|
|
1295
|
+
return _context.abrupt("break", 62);
|
|
1296
|
+
|
|
1297
|
+
case 46:
|
|
1298
|
+
_context.next = 48;
|
|
1299
|
+
return this._createMarkerLayer(features);
|
|
1300
|
+
|
|
1301
|
+
case 48:
|
|
1302
|
+
layer = _context.sent;
|
|
1303
|
+
return _context.abrupt("break", 62);
|
|
1304
|
+
|
|
1305
|
+
case 50:
|
|
1306
|
+
_context.next = 52;
|
|
1307
|
+
return this._createRankSymbolLayer(layerInfo, features);
|
|
1308
|
+
|
|
1309
|
+
case 52:
|
|
1310
|
+
layer = _context.sent;
|
|
1311
|
+
return _context.abrupt("break", 62);
|
|
1312
|
+
|
|
1313
|
+
case 54:
|
|
1314
|
+
_context.next = 56;
|
|
1315
|
+
return this._createMigrationLayer(layerInfo, features);
|
|
1316
|
+
|
|
1317
|
+
case 56:
|
|
1318
|
+
layer = _context.sent;
|
|
1319
|
+
return _context.abrupt("break", 62);
|
|
1320
|
+
|
|
1321
|
+
case 58:
|
|
1322
|
+
_context.next = 60;
|
|
1323
|
+
return this._createDataflowLayer(layerInfo);
|
|
1324
|
+
|
|
1325
|
+
case 60:
|
|
1326
|
+
layer = _context.sent;
|
|
1327
|
+
return _context.abrupt("break", 62);
|
|
1328
|
+
|
|
1329
|
+
case 62:
|
|
1330
|
+
if (labelStyle && labelStyle.labelField && layerType !== 'DATAFLOW_POINT_TRACK') {
|
|
1331
|
+
features = this.getFilterFeatures(filterCondition, features);
|
|
1332
|
+
labelLayerInfo = JSON.parse(JSON.stringify(layerInfo));
|
|
1333
|
+
labelLayer = this._addLabelLayer(labelLayerInfo, features);
|
|
1334
|
+
|
|
1335
|
+
this._addLayerToMap({
|
|
1336
|
+
layer: _leafletWrapper.default.layerGroup([layer, labelLayer]),
|
|
1337
|
+
layerInfo: layerInfo
|
|
1338
|
+
});
|
|
1339
|
+
} else {
|
|
1340
|
+
layer && this._addLayerToMap({
|
|
1341
|
+
layer: layer,
|
|
1342
|
+
layerInfo: layerInfo
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
_context.next = 70;
|
|
1347
|
+
break;
|
|
1348
|
+
|
|
1349
|
+
case 65:
|
|
1350
|
+
_context.prev = 65;
|
|
1351
|
+
_context.t1 = _context["catch"](0);
|
|
1352
|
+
console.error(_context.t1);
|
|
1353
|
+
|
|
1354
|
+
this._addLayerSucceeded();
|
|
1355
|
+
|
|
1356
|
+
this.triggerEvent('getlayerdatasourcefailed', {
|
|
1357
|
+
error: _context.t1,
|
|
1358
|
+
layer: layerInfo,
|
|
1359
|
+
map: this.map
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
case 70:
|
|
1363
|
+
case "end":
|
|
1364
|
+
return _context.stop();
|
|
1365
|
+
}
|
|
1366
|
+
}, _callee, this, [[0, 65]]);
|
|
1367
|
+
}));
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
_proto._createBingLayer = function _createBingLayer() {
|
|
1371
|
+
var url = 'https://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadKey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z';
|
|
1372
|
+
_leafletWrapper.default.TileLayer.BingLayer = _leafletWrapper.default.TileLayer.extend({
|
|
1373
|
+
getTileUrl: function getTileUrl(coordinates) {
|
|
1374
|
+
var z = coordinates.z,
|
|
1375
|
+
x = coordinates.x,
|
|
1376
|
+
y = coordinates.y;
|
|
1377
|
+
var index = '';
|
|
1378
|
+
|
|
1379
|
+
for (var i = z; i > 0; i--) {
|
|
1380
|
+
var b = 0;
|
|
1381
|
+
var mask = 1 << i - 1;
|
|
1382
|
+
|
|
1383
|
+
if ((x & mask) !== 0) {
|
|
1384
|
+
b++;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
if ((y & mask) !== 0) {
|
|
1388
|
+
b += 2;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
index += b.toString();
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
return url.replace('{quadKey}', index);
|
|
1395
|
+
}
|
|
1396
|
+
});
|
|
1397
|
+
|
|
1398
|
+
_leafletWrapper.default.tileLayer.bingLayer = function (url, options) {
|
|
1399
|
+
return new _leafletWrapper.default.TileLayer.BingLayer(url, options);
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
return _leafletWrapper.default.tileLayer.bingLayer(url, {
|
|
1403
|
+
noWrap: true
|
|
1404
|
+
});
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
_proto._createDynamicTiledLayer = function _createDynamicTiledLayer(layerInfo) {
|
|
1408
|
+
var url = layerInfo.url;
|
|
1409
|
+
|
|
1410
|
+
var layer = _leafletWrapper.default.supermap.tiledMapLayer(url, {
|
|
1411
|
+
noWrap: true,
|
|
1412
|
+
prjCoordSys: {
|
|
1413
|
+
epsgCode: this.baseProjection.split(':')[1]
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1416
|
+
|
|
1417
|
+
return layer;
|
|
1418
|
+
};
|
|
1419
|
+
|
|
1420
|
+
_proto._createWMSLayer = function _createWMSLayer(layerInfo) {
|
|
1421
|
+
var url = layerInfo.url,
|
|
1422
|
+
layers = layerInfo.layers;
|
|
1423
|
+
|
|
1424
|
+
if (!layers || layers === 'undefined' || layers === 'null') {
|
|
1425
|
+
layers = '0';
|
|
1426
|
+
} else if (layers.length > 0) {
|
|
1427
|
+
layers = layers[0];
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
return _leafletWrapper.default.tileLayer.wms(url, {
|
|
1431
|
+
layers: layers,
|
|
1432
|
+
format: 'image/png',
|
|
1433
|
+
transparent: true,
|
|
1434
|
+
noWrap: true
|
|
1435
|
+
});
|
|
1436
|
+
};
|
|
1437
|
+
|
|
1438
|
+
_proto._createWMTSLayer = function _createWMTSLayer(layerInfo) {
|
|
1439
|
+
var url = layerInfo.url,
|
|
1440
|
+
tileMatrixSet = layerInfo.tileMatrixSet,
|
|
1441
|
+
name = layerInfo.name;
|
|
1442
|
+
return _leafletWrapper.default.supermap.wmtsLayer(url, {
|
|
1443
|
+
layer: name,
|
|
1444
|
+
style: 'default',
|
|
1445
|
+
tilematrixSet: tileMatrixSet,
|
|
1446
|
+
format: 'image/png',
|
|
1447
|
+
noWrap: true
|
|
1448
|
+
});
|
|
1449
|
+
};
|
|
1450
|
+
|
|
1451
|
+
_proto._createTiandituLayer = function _createTiandituLayer(layerInfo) {
|
|
1452
|
+
this.map.getZoom() < 1 && this.map.setZoom(1);
|
|
1453
|
+
this.map.setMinZoom(1);
|
|
1454
|
+
var layerType = layerInfo.layerType.split('_')[1].toLowerCase();
|
|
1455
|
+
var isLabel = Boolean(layerInfo.labelLayerVisible);
|
|
1456
|
+
|
|
1457
|
+
var tiandituLayer = _leafletWrapper.default.supermap.tiandituTileLayer({
|
|
1458
|
+
layerType: layerType,
|
|
1459
|
+
key: this.tiandituKey
|
|
1460
|
+
});
|
|
1461
|
+
|
|
1462
|
+
var tiandituLabelLayer = _leafletWrapper.default.supermap.tiandituTileLayer({
|
|
1463
|
+
layerType: layerType,
|
|
1464
|
+
isLabel: true,
|
|
1465
|
+
key: this.tiandituKey
|
|
1466
|
+
});
|
|
1467
|
+
|
|
1468
|
+
var layers = [tiandituLayer];
|
|
1469
|
+
isLabel && layers.push(tiandituLabelLayer);
|
|
1470
|
+
return _leafletWrapper.default.layerGroup(layers);
|
|
1471
|
+
};
|
|
1472
|
+
|
|
1473
|
+
_proto._createCLOUDLayer = function _createCLOUDLayer(layerType, url) {
|
|
1474
|
+
if (layerType === 'CLOUD') {
|
|
1475
|
+
this.map.getZoom() < 3 && this.map.setZoom(3);
|
|
1476
|
+
this.map.setMinZoom(3);
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
return _leafletWrapper.default.supermap.cloudTileLayer(url, {
|
|
1480
|
+
noWrap: true
|
|
1481
|
+
});
|
|
1482
|
+
};
|
|
1483
|
+
|
|
1484
|
+
_proto._createXYZLayer = function _createXYZLayer(url) {
|
|
1485
|
+
return _leafletWrapper.default.tileLayer(url, {
|
|
1486
|
+
noWrap: true
|
|
1487
|
+
});
|
|
1488
|
+
};
|
|
1489
|
+
|
|
1490
|
+
_proto._createBaiduTileLayer = function _createBaiduTileLayer() {
|
|
1491
|
+
this.map.getZoom() < 3 && this.map.setZoom(3);
|
|
1492
|
+
this.map.setMinZoom(3);
|
|
1493
|
+
return _leafletWrapper.default.supermap.baiduTileLayer('', {
|
|
1494
|
+
noWrap: true
|
|
1495
|
+
});
|
|
1496
|
+
};
|
|
1497
|
+
|
|
1498
|
+
_proto._createUniqueLayer = function _createUniqueLayer(layerInfo, features) {
|
|
1499
|
+
return this._createThemeLayer('unique', layerInfo, features);
|
|
1500
|
+
};
|
|
1501
|
+
|
|
1502
|
+
_proto._createRangeLayer = function _createRangeLayer(layerInfo, features) {
|
|
1503
|
+
return this._createThemeLayer('range', layerInfo, features);
|
|
1504
|
+
};
|
|
1505
|
+
|
|
1506
|
+
_proto._createMarkerLayer = function _createMarkerLayer(features) {
|
|
1507
|
+
var _this5 = this;
|
|
1508
|
+
|
|
1509
|
+
return new Promise(function (resolve) {
|
|
1510
|
+
var layerGroupPromises = features && features.map(function (feature) {
|
|
1511
|
+
return new Promise(function (resolve) {
|
|
1512
|
+
var geomType = feature.geometry.type.toUpperCase();
|
|
1513
|
+
var defaultStyle = feature.dv_v5_markerStyle;
|
|
1514
|
+
|
|
1515
|
+
if (geomType === 'POINT' && defaultStyle.text) {
|
|
1516
|
+
geomType = 'TEXT';
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
var featureInfo = _this5.setFeatureInfo(feature);
|
|
1520
|
+
|
|
1521
|
+
feature.properties['useStyle'] = defaultStyle;
|
|
1522
|
+
feature.properties['featureInfo'] = featureInfo;
|
|
1523
|
+
|
|
1524
|
+
if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('http://') === -1 && defaultStyle.src.indexOf('https://') === -1) {
|
|
1525
|
+
defaultStyle.src = _this5.serverUrl + defaultStyle.src;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
var imgWidth = (defaultStyle.imgWidth || 48) * defaultStyle.scale;
|
|
1529
|
+
var imgHeight = (defaultStyle.imgHeight || 43) * defaultStyle.scale;
|
|
1530
|
+
|
|
1531
|
+
if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('svg') <= -1) {
|
|
1532
|
+
resolve(_leafletWrapper.default.marker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], {
|
|
1533
|
+
icon: _leafletWrapper.default.icon({
|
|
1534
|
+
iconUrl: defaultStyle.src,
|
|
1535
|
+
iconSize: [imgWidth, imgHeight],
|
|
1536
|
+
iconAnchor: [imgWidth * defaultStyle.anchor[0], imgHeight * defaultStyle.anchor[1]]
|
|
1537
|
+
})
|
|
1538
|
+
}));
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('svg') > -1) {
|
|
1542
|
+
if (!_this5._svgDiv) {
|
|
1543
|
+
_this5._svgDiv = document.createElement('div');
|
|
1544
|
+
document.body.appendChild(_this5._svgDiv);
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
_this5.getCanvasFromSVG(defaultStyle.src, _this5._svgDiv, function (canvas) {
|
|
1548
|
+
resolve(_this5._getSvgLayer(canvas, defaultStyle, [feature]));
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
if (!defaultStyle.src) {
|
|
1553
|
+
if (geomType === 'LINESTRING' && defaultStyle.lineCap || geomType === 'POLYGON') {
|
|
1554
|
+
resolve(_this5._createGeojsonLayer([feature], _this5._getVectorLayerStyle(defaultStyle)));
|
|
1555
|
+
} else if (geomType === 'TEXT') {
|
|
1556
|
+
var text = new _leafletWrapper.default.supermap.labelThemeLayer(defaultStyle.text + '-text');
|
|
1557
|
+
text.style = {
|
|
1558
|
+
fontSize: defaultStyle.font.split(' ')[0],
|
|
1559
|
+
labelRect: true,
|
|
1560
|
+
fontColor: defaultStyle.fillColor,
|
|
1561
|
+
fill: true,
|
|
1562
|
+
fillColor: defaultStyle.backgroundFill,
|
|
1563
|
+
stroke: false
|
|
1564
|
+
};
|
|
1565
|
+
text.themeField = 'text';
|
|
1566
|
+
feature.properties.text = defaultStyle.text;
|
|
1567
|
+
var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([feature.geometry.coordinates[1], feature.geometry.coordinates[0], defaultStyle.text], feature.properties);
|
|
1568
|
+
text.addFeatures([geoTextFeature]);
|
|
1569
|
+
resolve(text);
|
|
1570
|
+
} else {
|
|
1571
|
+
resolve(_leafletWrapper.default.circleMarker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], Object.assign({}, _this5._getVectorLayerStyle(defaultStyle))));
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
});
|
|
1576
|
+
layerGroupPromises && Promise.all(layerGroupPromises).then(function (layerGroup) {
|
|
1577
|
+
layerGroup && resolve(_leafletWrapper.default.layerGroup(layerGroup));
|
|
1578
|
+
}).catch(function (error) {
|
|
1579
|
+
console.error(error);
|
|
1580
|
+
});
|
|
1581
|
+
});
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1584
|
+
_proto._createRankSymbolLayer = function _createRankSymbolLayer(layerInfo, features) {
|
|
1585
|
+
var _this6 = this;
|
|
1586
|
+
|
|
1587
|
+
var fieldName = layerInfo.themeSetting.themeField;
|
|
1588
|
+
var style = layerInfo.style;
|
|
1589
|
+
var styleSource = this.createRankStyleSource(layerInfo, features);
|
|
1590
|
+
var styleGroups = styleSource.styleGroups;
|
|
1591
|
+
features = this.getFilterFeatures(layerInfo.filterCondition, features);
|
|
1592
|
+
var radiusList = [];
|
|
1593
|
+
features.forEach(function (row) {
|
|
1594
|
+
var target = parseFloat(row.properties[fieldName]);
|
|
1595
|
+
|
|
1596
|
+
if (styleGroups) {
|
|
1597
|
+
for (var i = 0; i < styleGroups.length; i++) {
|
|
1598
|
+
if (styleGroups[i].start <= target && target < styleGroups[i].end) {
|
|
1599
|
+
var radius = style.type === 'SYMBOL_POINT' || style.type === 'IMAGE_POINT' ? style.type === 'SYMBOL_POINT' ? styleGroups[i].radius * 2 : styleGroups[i].radius : styleGroups[i].radius;
|
|
1600
|
+
radiusList.push(radius);
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
}, this);
|
|
1605
|
+
|
|
1606
|
+
if (style.type === 'SYMBOL_POINT') {
|
|
1607
|
+
return this._createSymbolLayer(layerInfo, features, radiusList);
|
|
1608
|
+
} else if (style.type === 'IMAGE_POINT' || style.type === 'SVG_POINT') {
|
|
1609
|
+
return this._createGraphicLayer(layerInfo, features, radiusList);
|
|
1610
|
+
} else {
|
|
1611
|
+
var layerGroup = [];
|
|
1612
|
+
features.forEach(function (feature, index) {
|
|
1613
|
+
var newStyle = Object.assign({}, style, {
|
|
1614
|
+
radius: radiusList[index]
|
|
1615
|
+
});
|
|
1616
|
+
layerGroup.push(_leafletWrapper.default.circleMarker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], _this6._getVectorLayerStyle(newStyle)));
|
|
1617
|
+
});
|
|
1618
|
+
return _leafletWrapper.default.layerGroup(layerGroup);
|
|
1619
|
+
}
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1622
|
+
_proto._addLabelLayer = function _addLabelLayer(layerInfo, features) {
|
|
1623
|
+
var labelStyle = layerInfo.labelStyle,
|
|
1624
|
+
layerID = layerInfo.layerID,
|
|
1625
|
+
featureType = layerInfo.featureType;
|
|
1626
|
+
var label = new _leafletWrapper.default.supermap.labelThemeLayer(layerID + '-label');
|
|
1627
|
+
labelStyle.fontSize = 14;
|
|
1628
|
+
labelStyle.labelRect = true;
|
|
1629
|
+
labelStyle.fontColor = labelStyle.fill;
|
|
1630
|
+
labelStyle.fill = true;
|
|
1631
|
+
labelStyle.fillColor = '#FFFFFF';
|
|
1632
|
+
labelStyle.stroke = false;
|
|
1633
|
+
labelStyle.strokeColor = '#8B7B8B';
|
|
1634
|
+
label.style = labelStyle;
|
|
1635
|
+
label.themeField = labelStyle.labelField;
|
|
1636
|
+
|
|
1637
|
+
var labelFeatures = this._convertLabelFeatures(label, features, layerInfo, featureType);
|
|
1638
|
+
|
|
1639
|
+
label.addFeatures(labelFeatures);
|
|
1640
|
+
return label;
|
|
1641
|
+
};
|
|
1642
|
+
|
|
1643
|
+
_proto._createHeatLayer = function _createHeatLayer(layerInfo, features) {
|
|
1644
|
+
var themeSetting = layerInfo.themeSetting,
|
|
1645
|
+
layerID = layerInfo.layerID;
|
|
1646
|
+
var colors = themeSetting.colors,
|
|
1647
|
+
radius = themeSetting.radius,
|
|
1648
|
+
customSettings = themeSetting.customSettings,
|
|
1649
|
+
weight = themeSetting.weight;
|
|
1650
|
+
var heatColors = colors.slice();
|
|
1651
|
+
|
|
1652
|
+
for (var i in customSettings) {
|
|
1653
|
+
heatColors[i] = customSettings[i];
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
var heatMapLayer = _leafletWrapper.default.supermap.heatMapLayer(layerID, {
|
|
1657
|
+
colors: heatColors,
|
|
1658
|
+
map: this.map,
|
|
1659
|
+
radius: radius * 2,
|
|
1660
|
+
featureWeight: weight,
|
|
1661
|
+
blur: radius * 1.5
|
|
1662
|
+
});
|
|
1663
|
+
|
|
1664
|
+
heatMapLayer.addFeatures({
|
|
1665
|
+
type: 'FeatureCollection',
|
|
1666
|
+
features: features
|
|
1667
|
+
});
|
|
1668
|
+
return heatMapLayer;
|
|
1669
|
+
};
|
|
1670
|
+
|
|
1671
|
+
_proto._createSymbolLayer = function _createSymbolLayer(layerInfo, features, textSize) {
|
|
1672
|
+
var style = layerInfo.style;
|
|
1673
|
+
var unicode = style.unicode;
|
|
1674
|
+
var pointToLayer;
|
|
1675
|
+
|
|
1676
|
+
if (unicode) {
|
|
1677
|
+
pointToLayer = this._getSymbolPointLayer(style, textSize);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
return pointToLayer && this._createGeojsonLayer(features, null, pointToLayer);
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1683
|
+
_proto._createGraphicLayer = function _createGraphicLayer(layerInfo, features, textSize) {
|
|
1684
|
+
var _this7 = this;
|
|
1685
|
+
|
|
1686
|
+
return new Promise(function (resolve) {
|
|
1687
|
+
var style = layerInfo.style;
|
|
1688
|
+
var type = style.type,
|
|
1689
|
+
imageInfo = style.imageInfo,
|
|
1690
|
+
radius = style.radius,
|
|
1691
|
+
url = style.url;
|
|
1692
|
+
var pointToLayer;
|
|
1693
|
+
|
|
1694
|
+
if (type === 'IMAGE_POINT' && imageInfo.url) {
|
|
1695
|
+
var resolution = imageInfo.size.w / imageInfo.size.h;
|
|
1696
|
+
|
|
1697
|
+
pointToLayer = function pointToLayer(geojson, latlng) {
|
|
1698
|
+
var iconSize = textSize && textSize[geojson.id - 1 || geojson.properties.index] * 2;
|
|
1699
|
+
return _leafletWrapper.default.marker(latlng, {
|
|
1700
|
+
icon: _leafletWrapper.default.icon({
|
|
1701
|
+
iconUrl: imageInfo.url,
|
|
1702
|
+
iconSize: textSize ? [iconSize, iconSize / resolution] : [radius * 2, radius * 2 / resolution]
|
|
1703
|
+
})
|
|
1704
|
+
});
|
|
1705
|
+
};
|
|
1706
|
+
} else if (type === 'SVG_POINT') {
|
|
1707
|
+
if (!_this7._svgDiv) {
|
|
1708
|
+
_this7._svgDiv = document.createElement('div');
|
|
1709
|
+
document.body.appendChild(_this7._svgDiv);
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
_this7.getCanvasFromSVG(url, _this7._svgDiv, function (canvas) {
|
|
1713
|
+
resolve(_this7._getSvgLayer(canvas, style, features, textSize));
|
|
1714
|
+
});
|
|
1715
|
+
} else {
|
|
1716
|
+
pointToLayer = function pointToLayer(geojson, latlng) {
|
|
1717
|
+
return _leafletWrapper.default.circleMarker(latlng, _this7._getVectorLayerStyle(style));
|
|
1718
|
+
};
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
pointToLayer && resolve(_this7._createGeojsonLayer(features, null, pointToLayer));
|
|
1722
|
+
});
|
|
1723
|
+
};
|
|
1724
|
+
|
|
1725
|
+
_proto._createVectorLayer = function _createVectorLayer(layerInfo, features) {
|
|
1726
|
+
var style = layerInfo.style;
|
|
1727
|
+
return this._createGeojsonLayer(features, this._getVectorLayerStyle(style));
|
|
1728
|
+
};
|
|
1729
|
+
|
|
1730
|
+
_proto._createMigrationLayer = function _createMigrationLayer(layerInfo, features) {
|
|
1731
|
+
var options = this.getEchartsLayerOptions(layerInfo, features, 'leaflet');
|
|
1732
|
+
|
|
1733
|
+
var layer = _leafletWrapper.default.supermap.echartsLayer(options);
|
|
1734
|
+
|
|
1735
|
+
this.echartslayer.push(layer);
|
|
1736
|
+
return layer;
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
_proto._createDataflowLayer = function _createDataflowLayer(layerInfo) {
|
|
1740
|
+
var _this8 = this;
|
|
1741
|
+
|
|
1742
|
+
this._dataflowFeatureCache = {};
|
|
1743
|
+
return new Promise(function (resolve) {
|
|
1744
|
+
_this8._getDataflowPointLayer(layerInfo).then(function (pointToLayer) {
|
|
1745
|
+
var dataFlowLayer = _leafletWrapper.default.supermap.dataFlowLayer(layerInfo.wsUrl, {
|
|
1746
|
+
pointToLayer: pointToLayer
|
|
1747
|
+
});
|
|
1748
|
+
|
|
1749
|
+
_this8._updateDataFlowFeaturesCallback = _this8._updateDataFlowFeature.bind(_this8, layerInfo);
|
|
1750
|
+
dataFlowLayer.on('dataupdated', _this8._updateDataFlowFeaturesCallback);
|
|
1751
|
+
_this8._dataFlowLayer = dataFlowLayer;
|
|
1752
|
+
resolve(dataFlowLayer);
|
|
1753
|
+
});
|
|
1754
|
+
});
|
|
1755
|
+
};
|
|
1756
|
+
|
|
1757
|
+
_proto._createGeojsonLayer = function _createGeojsonLayer(features, style, pointToLayer) {
|
|
1758
|
+
return _leafletWrapper.default.geoJSON({
|
|
1759
|
+
type: 'FeatureCollection',
|
|
1760
|
+
features: features
|
|
1761
|
+
}, {
|
|
1762
|
+
pointToLayer: pointToLayer,
|
|
1763
|
+
style: style
|
|
1764
|
+
});
|
|
1765
|
+
};
|
|
1766
|
+
|
|
1767
|
+
_proto._getVectorLayerStyle = function _getVectorLayerStyle(style) {
|
|
1768
|
+
var fillColor = style.fillColor,
|
|
1769
|
+
fillOpacity = style.fillOpacity,
|
|
1770
|
+
strokeColor = style.strokeColor,
|
|
1771
|
+
strokeOpacity = style.strokeOpacity,
|
|
1772
|
+
strokeWidth = style.strokeWidth,
|
|
1773
|
+
radius = style.radius,
|
|
1774
|
+
lineDash = style.lineDash;
|
|
1775
|
+
var commonStyle = {
|
|
1776
|
+
color: strokeColor,
|
|
1777
|
+
weight: strokeWidth,
|
|
1778
|
+
opacity: strokeOpacity,
|
|
1779
|
+
fillColor: fillColor,
|
|
1780
|
+
fillOpacity: fillOpacity
|
|
1781
|
+
};
|
|
1782
|
+
var dashArray;
|
|
1783
|
+
|
|
1784
|
+
if (lineDash) {
|
|
1785
|
+
dashArray = this.getDashStyle(lineDash, strokeWidth, 'string');
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
radius && (commonStyle['radius'] = radius);
|
|
1789
|
+
lineDash && (commonStyle['dashArray'] = dashArray);
|
|
1790
|
+
return commonStyle;
|
|
1791
|
+
};
|
|
1792
|
+
|
|
1793
|
+
_proto._getMapCenter = function _getMapCenter(mapInfo) {
|
|
1794
|
+
var center;
|
|
1795
|
+
center = mapInfo.center && [mapInfo.center.x, mapInfo.center.y];
|
|
1796
|
+
|
|
1797
|
+
if (!center) {
|
|
1798
|
+
center = [0, 0];
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
center = this.baseProjection === 'EPSG:3857' ? this.crs.unproject(_leafletWrapper.default.point(center[0], center[1])) : _leafletWrapper.default.latLng(center[1], center[0]);
|
|
1802
|
+
return center;
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1805
|
+
_proto._sendMapToUser = function _sendMapToUser(count, layersLen) {
|
|
1806
|
+
if (count === layersLen) {
|
|
1807
|
+
this.triggerEvent('addlayerssucceeded', {
|
|
1808
|
+
map: this.map,
|
|
1809
|
+
mapparams: this.mapParams,
|
|
1810
|
+
layers: this._layers
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
|
|
1815
|
+
_proto._addLayerToMap = function _addLayerToMap(_ref) {
|
|
1816
|
+
var layer = _ref.layer,
|
|
1817
|
+
_ref$type = _ref.type,
|
|
1818
|
+
type = _ref$type === void 0 ? 'overlays' : _ref$type,
|
|
1819
|
+
layerInfo = _ref.layerInfo,
|
|
1820
|
+
_ref$sendToMap = _ref.sendToMap,
|
|
1821
|
+
sendToMap = _ref$sendToMap === void 0 ? true : _ref$sendToMap;
|
|
1822
|
+
var visible = layerInfo.visible,
|
|
1823
|
+
layerID = layerInfo.layerID,
|
|
1824
|
+
name = layerInfo.name,
|
|
1825
|
+
index = layerInfo.index;
|
|
1826
|
+
sendToMap && (type = 'overlays');
|
|
1827
|
+
type === 'overlays' && layer.setZIndex && layer.setZIndex(index + 1);
|
|
1828
|
+
|
|
1829
|
+
if (visible === undefined || visible) {
|
|
1830
|
+
this.map.addLayer(layer, layerInfo.name);
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
!this.layers[type] && (this.layers[type] = {});
|
|
1834
|
+
this.layers[type][layerID || name] = layer;
|
|
1835
|
+
|
|
1836
|
+
this._addLayerSucceeded(sendToMap);
|
|
1837
|
+
};
|
|
1838
|
+
|
|
1839
|
+
_proto._convertLabelFeatures = function _convertLabelFeatures(layer, features, layerInfo, featureType) {
|
|
1840
|
+
var _this9 = this;
|
|
1841
|
+
|
|
1842
|
+
if (!features) {
|
|
1843
|
+
return [];
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
var themeField = layer.themeField,
|
|
1847
|
+
style = layer.style;
|
|
1848
|
+
var labelFeatures = [];
|
|
1849
|
+
var layerStyle = layerInfo.style || {};
|
|
1850
|
+
features.forEach(function (feature) {
|
|
1851
|
+
var coordinate = _this9._getLabelLngLat(featureType, feature);
|
|
1852
|
+
|
|
1853
|
+
_this9._setLabelOffset(featureType, layerStyle, style);
|
|
1854
|
+
|
|
1855
|
+
var properties = feature.properties;
|
|
1856
|
+
var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([coordinate[1], coordinate[0], properties[themeField]], properties);
|
|
1857
|
+
labelFeatures.push(geoTextFeature);
|
|
1858
|
+
});
|
|
1859
|
+
return labelFeatures;
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1862
|
+
_proto._getLabelLngLat = function _getLabelLngLat(featureType, feature) {
|
|
1863
|
+
var coordinate;
|
|
1864
|
+
var coordinates = feature.geometry.coordinates;
|
|
1865
|
+
|
|
1866
|
+
if (featureType === 'POINT') {
|
|
1867
|
+
coordinate = coordinates;
|
|
1868
|
+
} else if (featureType === 'LINE') {
|
|
1869
|
+
var length = coordinates.length;
|
|
1870
|
+
coordinate = coordinates[Math.round(length / 2)];
|
|
1871
|
+
} else {
|
|
1872
|
+
coordinate = (0, _center.default)(feature).geometry.coordinates;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
return coordinate;
|
|
1876
|
+
};
|
|
1877
|
+
|
|
1878
|
+
_proto._setLabelOffset = function _setLabelOffset(featureType, layerStyle, style) {
|
|
1879
|
+
if (featureType === 'POINT') {
|
|
1880
|
+
var pointRadius = layerStyle.pointRadius || 0;
|
|
1881
|
+
var strokeWidth = layerStyle.strokeWidth || 0;
|
|
1882
|
+
var fontSize = parseInt(layerStyle.fontSize) || 0;
|
|
1883
|
+
style.labelXOffset = 0;
|
|
1884
|
+
style.labelYOffset = layerStyle.unicode ? 20 + fontSize : 25 + (pointRadius + strokeWidth);
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1887
|
+
|
|
1888
|
+
_proto._addLayerSucceeded = function _addLayerSucceeded(sendMap) {
|
|
1889
|
+
if (sendMap === void 0) {
|
|
1890
|
+
sendMap = true;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
if (sendMap) {
|
|
1894
|
+
this.layerAdded++;
|
|
1895
|
+
|
|
1896
|
+
this._sendMapToUser(this.layerAdded, this.expectLayerLen);
|
|
1897
|
+
}
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
_proto._unproject = function _unproject(coordinate) {
|
|
1901
|
+
var crs = this._unprojectCrs || _leafletWrapper.default.CRS.EPSG3857;
|
|
1902
|
+
return this._latlngToCoordinate(crs.unproject(_leafletWrapper.default.point(coordinate[0], coordinate[1])));
|
|
1903
|
+
};
|
|
1904
|
+
|
|
1905
|
+
_proto._latlngToCoordinate = function _latlngToCoordinate(latlng) {
|
|
1906
|
+
if (!latlng) {
|
|
1907
|
+
return null;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
return [latlng.lng, latlng.lat];
|
|
1911
|
+
};
|
|
1912
|
+
|
|
1913
|
+
_proto._getSvgLayer = function _getSvgLayer(canvas, style, features, textSize) {
|
|
1914
|
+
var svgPointToLayer = this._getSvgPointLayer(canvas, style, textSize);
|
|
1915
|
+
|
|
1916
|
+
return this._createGeojsonLayer(features, null, svgPointToLayer);
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
_proto._createThemeLayer = function _createThemeLayer(type, layerInfo, features) {
|
|
1920
|
+
var filterCondition = layerInfo.filterCondition,
|
|
1921
|
+
style = layerInfo.style,
|
|
1922
|
+
themeSetting = layerInfo.themeSetting,
|
|
1923
|
+
featureType = layerInfo.featureType,
|
|
1924
|
+
layerID = layerInfo.layerID;
|
|
1925
|
+
var layerStyle = JSON.parse(JSON.stringify(style));
|
|
1926
|
+
featureType === 'POINT' && (layerStyle.pointRadius = style.radius);
|
|
1927
|
+
delete layerStyle.radius;
|
|
1928
|
+
|
|
1929
|
+
if (featureType === 'LINE') {
|
|
1930
|
+
layerStyle.fill = false;
|
|
1931
|
+
layerStyle.strokeDashstyle = style.lineDash;
|
|
1932
|
+
delete layerStyle.lineDash;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
var styleGroup;
|
|
1936
|
+
|
|
1937
|
+
if (type === 'unique') {
|
|
1938
|
+
styleGroup = this.getUniqueStyleGroup(layerInfo, features);
|
|
1939
|
+
} else if (type === 'range') {
|
|
1940
|
+
styleGroup = this.getRangeStyleGroup(layerInfo, features);
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
filterCondition && (features = this.getFilterFeatures(filterCondition, features));
|
|
1944
|
+
var themeField = themeSetting.themeField;
|
|
1945
|
+
Object.keys(features[0].properties).forEach(function (key) {
|
|
1946
|
+
key.toLocaleUpperCase() === themeField.toLocaleUpperCase() && (themeField = key);
|
|
1947
|
+
});
|
|
1948
|
+
|
|
1949
|
+
var layer = _leafletWrapper.default.supermap[type + "ThemeLayer"](layerID);
|
|
1950
|
+
|
|
1951
|
+
layerStyle.stroke = true;
|
|
1952
|
+
layer.style = layerStyle;
|
|
1953
|
+
layer.themeField = themeField;
|
|
1954
|
+
layer.styleGroups = styleGroup;
|
|
1955
|
+
layer.addFeatures({
|
|
1956
|
+
type: 'FeatureCollection',
|
|
1957
|
+
features: features
|
|
1958
|
+
});
|
|
1959
|
+
return layer;
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1962
|
+
_proto._handleMapCrs = function _handleMapCrs(mapInfo) {
|
|
1963
|
+
var projection = mapInfo.projection,
|
|
1964
|
+
baseLayer = mapInfo.baseLayer,
|
|
1965
|
+
extent = mapInfo.extent;
|
|
1966
|
+
this.baseProjection = projection;
|
|
1967
|
+
|
|
1968
|
+
if (projection === 'EPSG:910111' || projection === 'EPSG:910112') {
|
|
1969
|
+
this.baseProjection = 'EPSG:3857';
|
|
1970
|
+
} else if (projection === 'EPSG:910101' || projection === 'EPSG:910102') {
|
|
1971
|
+
this.baseProjection = 'EPSG:4326';
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
if (baseLayer.layerType === 'BAIDU') {
|
|
1975
|
+
this.crs = _leafletWrapper.default.CRS.Baidu;
|
|
1976
|
+
return this.crs;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
if (baseLayer.layerType.indexOf('TIANDITU') > -1) {
|
|
1980
|
+
this.crs = this.baseProjection === 'EPSG:3857' ? _leafletWrapper.default.CRS.TianDiTu_Mercator : _leafletWrapper.default.CRS.TianDiTu_WGS84;
|
|
1981
|
+
return this.crs;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
var epsgCode = this.baseProjection.split(':')[1];
|
|
1985
|
+
|
|
1986
|
+
var bounds = _leafletWrapper.default.bounds([extent.leftBottom.x, extent.leftBottom.y], [extent.rightTop.x, extent.rightTop.y]);
|
|
1987
|
+
|
|
1988
|
+
if (['4326', '3857', '3395'].includes(epsgCode)) {
|
|
1989
|
+
this.crs = _leafletWrapper.default.Proj.CRS("EPSG:" + epsgCode, {
|
|
1990
|
+
bounds: bounds
|
|
1991
|
+
});
|
|
1992
|
+
} else if (parseFloat(epsgCode) < 0) {
|
|
1993
|
+
this.crs = new _leafletWrapper.default.CRS.NonEarthCRS({
|
|
1994
|
+
bounds: bounds
|
|
1995
|
+
});
|
|
1996
|
+
} else if (!epsgCode) {
|
|
1997
|
+
this.baseProjection = (0, _epsgDefine.toEpsgCode)(this.baseProjection);
|
|
1998
|
+
|
|
1999
|
+
if (this.baseProjection) {
|
|
2000
|
+
this.crs = _leafletWrapper.default.Proj.CRS(this.baseProjection, {
|
|
2001
|
+
bounds: bounds,
|
|
2002
|
+
def: mapInfo.projection
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
return this.crs;
|
|
2008
|
+
};
|
|
2009
|
+
|
|
2010
|
+
_proto._updateDataFlowFeature = function _updateDataFlowFeature(layerInfo, e) {
|
|
2011
|
+
if (layerInfo.visible) {
|
|
2012
|
+
var feature = e.data;
|
|
2013
|
+
var lineStyle = layerInfo.lineStyle,
|
|
2014
|
+
labelStyle = layerInfo.labelStyle;
|
|
2015
|
+
lineStyle && this._updateDataflowPathLayer(feature, layerInfo);
|
|
2016
|
+
labelStyle && labelStyle.labelField !== '未设置' && this._updateDataflowLabelLayer(feature, layerInfo);
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
|
|
2020
|
+
_proto._getSymbolPointLayer = function _getSymbolPointLayer(style, textSize) {
|
|
2021
|
+
var symbolStyle = JSON.parse(JSON.stringify(style));
|
|
2022
|
+
symbolStyle.fontColor = style.fillColor;
|
|
2023
|
+
symbolStyle.label = style.unicode;
|
|
2024
|
+
symbolStyle.fontFamily = 'supermapol-icons';
|
|
2025
|
+
|
|
2026
|
+
var pointToLayer = function pointToLayer(geojson, latlng) {
|
|
2027
|
+
textSize && (symbolStyle.fontSize = textSize[geojson.id - 1 || geojson.properties.index] + 'px');
|
|
2028
|
+
return new _leafletWrapper.default.supermap.unicodeMarker(latlng, symbolStyle);
|
|
2029
|
+
};
|
|
2030
|
+
|
|
2031
|
+
return pointToLayer;
|
|
2032
|
+
};
|
|
2033
|
+
|
|
2034
|
+
_proto._getSvgPointLayer = function _getSvgPointLayer(canvas, style, textSize) {
|
|
2035
|
+
var radius = style.radius;
|
|
2036
|
+
this.handleSvgColor(style, canvas);
|
|
2037
|
+
var imgUrl = canvas.toDataURL('img/png');
|
|
2038
|
+
var resolution = canvas.width / canvas.height;
|
|
2039
|
+
|
|
2040
|
+
var svgPointToLayer = function svgPointToLayer(geojson, latlng) {
|
|
2041
|
+
var iconSize = textSize && textSize[geojson.id - 1 || geojson.properties.index];
|
|
2042
|
+
return _leafletWrapper.default.marker(latlng, {
|
|
2043
|
+
icon: _leafletWrapper.default.icon({
|
|
2044
|
+
iconUrl: imgUrl,
|
|
2045
|
+
iconSize: textSize ? [iconSize, iconSize / resolution] : [radius, radius / resolution]
|
|
2046
|
+
})
|
|
2047
|
+
});
|
|
2048
|
+
};
|
|
2049
|
+
|
|
2050
|
+
return svgPointToLayer;
|
|
2051
|
+
};
|
|
2052
|
+
|
|
2053
|
+
_proto._getDataflowPointLayer = function _getDataflowPointLayer(layerInfo) {
|
|
2054
|
+
var _this10 = this;
|
|
2055
|
+
|
|
2056
|
+
var layerType = layerInfo.layerType,
|
|
2057
|
+
pointStyle = layerInfo.pointStyle,
|
|
2058
|
+
layerID = layerInfo.layerID,
|
|
2059
|
+
themeSetting = layerInfo.themeSetting;
|
|
2060
|
+
return new Promise(function (resolve) {
|
|
2061
|
+
if (layerType === 'DATAFLOW_HEAT') {
|
|
2062
|
+
var colors = themeSetting.colors,
|
|
2063
|
+
radius = themeSetting.radius,
|
|
2064
|
+
customSettings = themeSetting.customSettings,
|
|
2065
|
+
weight = themeSetting.weight;
|
|
2066
|
+
var heatLayerInfo = {
|
|
2067
|
+
layerID: layerID,
|
|
2068
|
+
themeSetting: {
|
|
2069
|
+
colors: colors,
|
|
2070
|
+
radius: radius,
|
|
2071
|
+
customSettings: customSettings,
|
|
2072
|
+
weight: weight
|
|
2073
|
+
}
|
|
2074
|
+
};
|
|
2075
|
+
|
|
2076
|
+
var pointToLayer = function pointToLayer(geojson) {
|
|
2077
|
+
return _this10._createHeatLayer(heatLayerInfo, [geojson]);
|
|
2078
|
+
};
|
|
2079
|
+
|
|
2080
|
+
resolve(pointToLayer);
|
|
2081
|
+
} else if (pointStyle.type === 'SYMBOL_POINT') {
|
|
2082
|
+
resolve(_this10._getSymbolPointLayer(pointStyle, null));
|
|
2083
|
+
} else if (pointStyle.type === 'SVG_POINT') {
|
|
2084
|
+
if (!_this10._svgDiv) {
|
|
2085
|
+
_this10._svgDiv = document.createElement('div');
|
|
2086
|
+
document.body.appendChild(_this10._svgDiv);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
_this10.getCanvasFromSVG(pointStyle.url, _this10._svgDiv, function (canvas) {
|
|
2090
|
+
resolve(_this10._getSvgPointLayer(canvas, pointStyle, null));
|
|
2091
|
+
});
|
|
2092
|
+
} else {
|
|
2093
|
+
var _pointToLayer = function _pointToLayer(geojson, latlng) {
|
|
2094
|
+
return _leafletWrapper.default.circleMarker(latlng, _this10._getVectorLayerStyle(pointStyle));
|
|
2095
|
+
};
|
|
2096
|
+
|
|
2097
|
+
resolve(_pointToLayer);
|
|
2098
|
+
}
|
|
2099
|
+
});
|
|
2100
|
+
};
|
|
2101
|
+
|
|
2102
|
+
_proto._handleDataflowFeature = function _handleDataflowFeature(feature, layerInfo) {
|
|
2103
|
+
var identifyField = layerInfo.identifyField,
|
|
2104
|
+
maxPointCount = layerInfo.maxPointCount,
|
|
2105
|
+
lineStyle = layerInfo.lineStyle;
|
|
2106
|
+
var geoID = feature.properties[identifyField];
|
|
2107
|
+
|
|
2108
|
+
if (lineStyle) {
|
|
2109
|
+
if (this._dataflowLineFeatureCache[geoID]) {
|
|
2110
|
+
var coordinates = this._dataflowLineFeatureCache[geoID].geometry.coordinates;
|
|
2111
|
+
coordinates.push(feature.geometry.coordinates);
|
|
2112
|
+
|
|
2113
|
+
if (maxPointCount && coordinates.length > maxPointCount) {
|
|
2114
|
+
coordinates.splice(0, coordinates.length - maxPointCount);
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
this._dataflowLineFeatureCache[geoID].geometry.coordinates = coordinates;
|
|
2118
|
+
} else {
|
|
2119
|
+
this._dataflowLineFeatureCache[geoID] = {
|
|
2120
|
+
type: 'Feature',
|
|
2121
|
+
properties: feature.properties,
|
|
2122
|
+
geometry: {
|
|
2123
|
+
type: 'LineString',
|
|
2124
|
+
coordinates: [feature.geometry.coordinates]
|
|
2125
|
+
}
|
|
2126
|
+
};
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
this._dataflowFeatureCache[geoID] = feature;
|
|
2131
|
+
};
|
|
2132
|
+
|
|
2133
|
+
_proto._updateDataflowLabelLayer = function _updateDataflowLabelLayer(feature, layerInfo) {
|
|
2134
|
+
this._handleDataflowFeature(feature, layerInfo);
|
|
2135
|
+
|
|
2136
|
+
var geoID = feature.properties[layerInfo.identifyField];
|
|
2137
|
+
var layer;
|
|
2138
|
+
|
|
2139
|
+
if (this._dataflowLabelIdCache[geoID]) {
|
|
2140
|
+
layer = this._dataFlowLayer.getLayer(this._dataflowLabelIdCache[geoID]);
|
|
2141
|
+
var _feature = this._dataflowFeatureCache[geoID];
|
|
2142
|
+
var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([_feature.geometry.coordinates[1], _feature.geometry.coordinates[0], geoID], _feature.properties);
|
|
2143
|
+
layer.removeAllFeatures();
|
|
2144
|
+
layer.addFeatures([geoTextFeature]);
|
|
2145
|
+
} else {
|
|
2146
|
+
var _feature2 = this._dataflowFeatureCache[geoID];
|
|
2147
|
+
layer = this._addLabelLayer(layerInfo, [_feature2]);
|
|
2148
|
+
|
|
2149
|
+
this._dataFlowLayer.addLayer(layer);
|
|
2150
|
+
|
|
2151
|
+
this._dataflowLabelIdCache[geoID] = this._dataFlowLayer.getLayerId(layer);
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
|
|
2155
|
+
_proto._updateDataflowPathLayer = function _updateDataflowPathLayer(feature, layerInfo) {
|
|
2156
|
+
this._handleDataflowFeature(feature, layerInfo);
|
|
2157
|
+
|
|
2158
|
+
var geoID = feature.properties[layerInfo.identifyField];
|
|
2159
|
+
var layer;
|
|
2160
|
+
var coordinates = this._dataflowLineFeatureCache[geoID].geometry.coordinates;
|
|
2161
|
+
|
|
2162
|
+
var latlngs = _leafletWrapper.default.GeoJSON.coordsToLatLngs(coordinates, 0);
|
|
2163
|
+
|
|
2164
|
+
if (this._dataflowPathIdCache[geoID]) {
|
|
2165
|
+
layer = this._dataFlowLayer.getLayer(this._dataflowPathIdCache[geoID]);
|
|
2166
|
+
layer.setLatLngs(latlngs);
|
|
2167
|
+
} else {
|
|
2168
|
+
layer = _leafletWrapper.default.polyline(latlngs, Object.assign({}, this._getVectorLayerStyle(layerInfo.lineStyle)));
|
|
2169
|
+
|
|
2170
|
+
this._dataFlowLayer.addLayer(layer);
|
|
2171
|
+
|
|
2172
|
+
this._dataflowPathIdCache[geoID] = this._dataFlowLayer.getLayerId(layer);
|
|
2173
|
+
}
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
_proto.getTransformCoodinatesCRS = function getTransformCoodinatesCRS(epsgCode) {
|
|
2177
|
+
var defName = "EPSG:" + epsgCode;
|
|
2178
|
+
var defValue = (0, _epsgDefine.getProjection)(defName);
|
|
2179
|
+
return _leafletWrapper.default.Proj.CRS((0, _epsgDefine.toEpsgCode)(defValue), {
|
|
2180
|
+
def: defValue
|
|
2181
|
+
});
|
|
2182
|
+
};
|
|
2183
|
+
|
|
2184
|
+
_proto.clean = function clean() {
|
|
2185
|
+
if (this.map) {
|
|
2186
|
+
this.map.remove();
|
|
2187
|
+
this.stopCanvg();
|
|
2188
|
+
this.center = null;
|
|
2189
|
+
this.zoom = null;
|
|
2190
|
+
|
|
2191
|
+
this._dataFlowLayer.off('dataupdated', this._updateDataFlowFeaturesCallback);
|
|
2192
|
+
|
|
2193
|
+
this._unprojectCrs = null;
|
|
2194
|
+
}
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
_proto.cleanWebMap = function cleanWebMap() {
|
|
2198
|
+
this.clean();
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
return WebMapViewModel;
|
|
2202
|
+
}(_WebMapBase2.default);
|
|
2203
|
+
|
|
2204
|
+
/***/ }),
|
|
2205
|
+
|
|
2206
|
+
/***/ 504:
|
|
2207
|
+
/***/ (function(module, exports) {
|
|
2208
|
+
|
|
2209
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/WebMapBase.js");
|
|
2210
|
+
|
|
2211
|
+
/***/ }),
|
|
2212
|
+
|
|
2213
|
+
/***/ 505:
|
|
2214
|
+
/***/ (function(module, exports) {
|
|
2215
|
+
|
|
2216
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_mixin/map-events.js");
|
|
2217
|
+
|
|
2218
|
+
/***/ }),
|
|
2219
|
+
|
|
2220
|
+
/***/ 506:
|
|
2221
|
+
/***/ (function(module, exports) {
|
|
2222
|
+
|
|
2223
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/spin");
|
|
2224
|
+
|
|
2225
|
+
/***/ }),
|
|
2226
|
+
|
|
2227
|
+
/***/ 51:
|
|
2228
|
+
/***/ (function(module, exports) {
|
|
2229
|
+
|
|
2230
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_utils/epsg-define.js");
|
|
2231
|
+
|
|
2232
|
+
/***/ }),
|
|
2233
|
+
|
|
2234
|
+
/***/ 6:
|
|
2235
|
+
/***/ (function(module, exports) {
|
|
2236
|
+
|
|
2237
|
+
module.exports = require("@babel/runtime/helpers/inheritsLoose");
|
|
2238
|
+
|
|
2239
|
+
/***/ })
|
|
2240
|
+
|
|
2241
|
+
/******/ });
|