@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,3467 @@
|
|
|
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 = 520);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 0:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 10:
|
|
98
|
+
/***/ (function(module, exports) {
|
|
99
|
+
|
|
100
|
+
module.exports = require("vue");
|
|
101
|
+
|
|
102
|
+
/***/ }),
|
|
103
|
+
|
|
104
|
+
/***/ 13:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_lang/index.js");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 20:
|
|
112
|
+
/***/ (function(module, exports) {
|
|
113
|
+
|
|
114
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_types/event/Events.js");
|
|
115
|
+
|
|
116
|
+
/***/ }),
|
|
117
|
+
|
|
118
|
+
/***/ 248:
|
|
119
|
+
/***/ (function(module, exports) {
|
|
120
|
+
|
|
121
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/static/libs/geostats/geostats");
|
|
122
|
+
|
|
123
|
+
/***/ }),
|
|
124
|
+
|
|
125
|
+
/***/ 25:
|
|
126
|
+
/***/ (function(module, exports) {
|
|
127
|
+
|
|
128
|
+
module.exports = require("@turf/center");
|
|
129
|
+
|
|
130
|
+
/***/ }),
|
|
131
|
+
|
|
132
|
+
/***/ 251:
|
|
133
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
134
|
+
|
|
135
|
+
"use strict";
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
139
|
+
|
|
140
|
+
Object.defineProperty(exports, "__esModule", {
|
|
141
|
+
value: true
|
|
142
|
+
});
|
|
143
|
+
exports.default = void 0;
|
|
144
|
+
|
|
145
|
+
var _regenerator = _interopRequireDefault(__webpack_require__(43));
|
|
146
|
+
|
|
147
|
+
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));
|
|
148
|
+
|
|
149
|
+
var _Events2 = __webpack_require__(20);
|
|
150
|
+
|
|
151
|
+
var _util = __webpack_require__(9);
|
|
152
|
+
|
|
153
|
+
var _statistics = __webpack_require__(38);
|
|
154
|
+
|
|
155
|
+
var convert = _interopRequireWildcard(__webpack_require__(252));
|
|
156
|
+
|
|
157
|
+
var _lodash = _interopRequireDefault(__webpack_require__(59));
|
|
158
|
+
|
|
159
|
+
var _lodash2 = _interopRequireDefault(__webpack_require__(253));
|
|
160
|
+
|
|
161
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
162
|
+
|
|
163
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
164
|
+
|
|
165
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
166
|
+
function adopt(value) {
|
|
167
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
168
|
+
resolve(value);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
173
|
+
function fulfilled(value) {
|
|
174
|
+
try {
|
|
175
|
+
step(generator.next(value));
|
|
176
|
+
} catch (e) {
|
|
177
|
+
reject(e);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function rejected(value) {
|
|
182
|
+
try {
|
|
183
|
+
step(generator["throw"](value));
|
|
184
|
+
} catch (e) {
|
|
185
|
+
reject(e);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function step(result) {
|
|
190
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var DEFAULT_WELLKNOWNSCALESET = ['GoogleCRS84Quad', 'GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad'];
|
|
198
|
+
var MB_SCALEDENOMINATOR_3857 = [559082264.0287178, 279541132.0143589, 139770566.00717944, 69885283.00358972, 34942641.50179486, 17471320.75089743, 8735660.375448715, 4367830.1877243575, 2183915.0938621787, 1091957.5469310894, 545978.7734655447, 272989.38673277234, 136494.69336638617, 68247.34668319309, 34123.67334159654, 17061.83667079827, 8530.918335399136, 4265.459167699568, 2132.729583849784, 1066.364791924892, 533.182395962446, 266.591197981223, 133.2955989906115];
|
|
199
|
+
var MB_SCALEDENOMINATOR_4326 = [559082264.0287176, 279541132.0143588, 139770566.0071794, 69885283.0035897, 34942641.50179485, 17471320.750897426, 8735660.375448713, 4367830.187724357, 2183915.0938621783, 1091957.5469310891, 545978.7734655446, 272989.3867327723, 136494.69336638614, 68247.34668319307, 34123.673341596535, 17061.836670798268, 8530.918335399134, 4265.459167699567, 2132.7295838497835, 1066.3647919248917, 533.1823959624459, 266.59119798122293, 133.29559899061147];
|
|
200
|
+
|
|
201
|
+
var WebMapService = exports.default = /*#__PURE__*/function (_Events) {
|
|
202
|
+
(0, _inheritsLoose2.default)(WebMapService, _Events);
|
|
203
|
+
|
|
204
|
+
function WebMapService(mapId, options) {
|
|
205
|
+
var _this;
|
|
206
|
+
|
|
207
|
+
if (options === void 0) {
|
|
208
|
+
options = {};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
_this = _Events.call(this) || this;
|
|
212
|
+
_this.proxyOptions = {
|
|
213
|
+
data: 'apps/viewer/getUrlResource.json?url=',
|
|
214
|
+
image: 'apps/viewer/getUrlResource.png?url='
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
if (typeof mapId === 'string' || typeof mapId === 'number') {
|
|
218
|
+
_this.mapId = mapId;
|
|
219
|
+
} else if (mapId !== null && typeof mapId === 'object') {
|
|
220
|
+
_this.mapInfo = mapId;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
_this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
|
|
224
|
+
_this.accessToken = options.accessToken;
|
|
225
|
+
_this.accessKey = options.accessKey;
|
|
226
|
+
_this.tiandituKey = options.tiandituKey || '';
|
|
227
|
+
_this.withCredentials = options.withCredentials || false;
|
|
228
|
+
_this.excludePortalProxyUrl = options.excludePortalProxyUrl;
|
|
229
|
+
_this.iportalServiceProxyUrl = options.iportalServiceProxyUrlPrefix;
|
|
230
|
+
_this.proxy = options.proxy;
|
|
231
|
+
return _this;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
var _proto = WebMapService.prototype;
|
|
235
|
+
|
|
236
|
+
_proto.setMapId = function setMapId(mapId) {
|
|
237
|
+
if (typeof mapId === 'string' || typeof mapId === 'number') {
|
|
238
|
+
this.mapId = mapId;
|
|
239
|
+
this.mapInfo = null;
|
|
240
|
+
} else if (mapId !== null && typeof mapId === 'object') {
|
|
241
|
+
this.mapInfo = mapId;
|
|
242
|
+
this.mapId = '';
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
_proto.setServerUrl = function setServerUrl(serverUrl) {
|
|
247
|
+
this.serverUrl = serverUrl;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
_proto.setWithCredentials = function setWithCredentials(withCredentials) {
|
|
251
|
+
this.withCredentials = withCredentials;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
_proto.setProxy = function setProxy(proxy) {
|
|
255
|
+
this.proxy = proxy;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
_proto.handleServerUrl = function handleServerUrl(serverUrl) {
|
|
259
|
+
var urlArr = serverUrl.split('');
|
|
260
|
+
|
|
261
|
+
if (urlArr[urlArr.length - 1] !== '/') {
|
|
262
|
+
serverUrl += '/';
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
this.serverUrl = serverUrl;
|
|
266
|
+
return serverUrl;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
_proto.getMapInfo = function getMapInfo() {
|
|
270
|
+
var _this2 = this;
|
|
271
|
+
|
|
272
|
+
if (!this.mapId && this.mapInfo) {
|
|
273
|
+
return new Promise(function (resolve) {
|
|
274
|
+
resolve(_this2.mapInfo);
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
var mapUrl = this._handleMapUrl();
|
|
279
|
+
|
|
280
|
+
return new Promise(function (resolve, reject) {
|
|
281
|
+
return __awaiter(_this2, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
282
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
283
|
+
while (1) switch (_context.prev = _context.next) {
|
|
284
|
+
case 0:
|
|
285
|
+
_context.prev = 0;
|
|
286
|
+
_context.next = 3;
|
|
287
|
+
return this.getiPortalServiceProxy();
|
|
288
|
+
|
|
289
|
+
case 3:
|
|
290
|
+
SuperMap.FetchRequest.get(mapUrl, null, {
|
|
291
|
+
withCredentials: this.withCredentials
|
|
292
|
+
}).then(function (response) {
|
|
293
|
+
return response.json();
|
|
294
|
+
}).then(function (mapInfo) {
|
|
295
|
+
if (mapInfo && mapInfo.succeed === false) {
|
|
296
|
+
var error = {
|
|
297
|
+
message: mapInfo && mapInfo.error && mapInfo.error.errorMsg
|
|
298
|
+
};
|
|
299
|
+
reject(error);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
mapInfo.mapParams = {
|
|
304
|
+
title: mapInfo.title,
|
|
305
|
+
description: mapInfo.description
|
|
306
|
+
};
|
|
307
|
+
resolve(mapInfo);
|
|
308
|
+
}).catch(function (error) {
|
|
309
|
+
reject(error);
|
|
310
|
+
});
|
|
311
|
+
_context.next = 9;
|
|
312
|
+
break;
|
|
313
|
+
|
|
314
|
+
case 6:
|
|
315
|
+
_context.prev = 6;
|
|
316
|
+
_context.t0 = _context["catch"](0);
|
|
317
|
+
reject(_context.t0);
|
|
318
|
+
|
|
319
|
+
case 9:
|
|
320
|
+
case "end":
|
|
321
|
+
return _context.stop();
|
|
322
|
+
}
|
|
323
|
+
}, _callee, this, [[0, 6]]);
|
|
324
|
+
}));
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
_proto.getiPortalServiceProxy = function getiPortalServiceProxy() {
|
|
329
|
+
var _this3 = this;
|
|
330
|
+
|
|
331
|
+
return new Promise(function (resolve, reject) {
|
|
332
|
+
SuperMap.FetchRequest.get(_this3.serverUrl + "web/config/portal.json", {
|
|
333
|
+
scope: ['serviceProxy']
|
|
334
|
+
}).then(function (response) {
|
|
335
|
+
return response.json();
|
|
336
|
+
}).then(function (serviceProxyInfo) {
|
|
337
|
+
if (!serviceProxyInfo || !serviceProxyInfo.serviceProxy) {
|
|
338
|
+
reject('serviceProxyFailed');
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
var serviceProxy = serviceProxyInfo.serviceProxy;
|
|
343
|
+
|
|
344
|
+
if (serviceProxy.enable) {
|
|
345
|
+
if (serviceProxy.proxyServerRootUrl) {
|
|
346
|
+
_this3.iportalServiceProxyUrl = serviceProxy.proxyServerRootUrl;
|
|
347
|
+
} else if (serviceProxy.port && serviceProxy.rootUrlPostfix) {
|
|
348
|
+
_this3.iportalServiceProxyUrl = serviceProxy.port + "/" + serviceProxy.rootUrlPostfix;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (_this3.serverUrl.indexOf(_this3.iportalServiceProxyUrl) > -1) {
|
|
352
|
+
_this3.iportalServiceProxyUrl = '';
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
resolve(serviceProxy);
|
|
357
|
+
}).catch(function (error) {
|
|
358
|
+
reject(error);
|
|
359
|
+
});
|
|
360
|
+
});
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
_proto.getLayerFeatures = function getLayerFeatures(type, layer, baseProjection) {
|
|
364
|
+
var pro;
|
|
365
|
+
|
|
366
|
+
switch (type) {
|
|
367
|
+
case 'hosted':
|
|
368
|
+
pro = this._getFeaturesFromHosted(layer, baseProjection);
|
|
369
|
+
break;
|
|
370
|
+
|
|
371
|
+
case 'rest_data':
|
|
372
|
+
pro = this._getFeaturesFromRestData(layer, baseProjection);
|
|
373
|
+
break;
|
|
374
|
+
|
|
375
|
+
case 'rest_map':
|
|
376
|
+
pro = this._getFeaturesFromRestMap(layer);
|
|
377
|
+
break;
|
|
378
|
+
|
|
379
|
+
case 'dataflow':
|
|
380
|
+
pro = this._getFeaturesFromDataflow(layer);
|
|
381
|
+
break;
|
|
382
|
+
|
|
383
|
+
case 'user_data':
|
|
384
|
+
pro = this._getFeaturesFromUserData(layer);
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
return pro;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
_proto.getWmsInfo = function getWmsInfo(layerInfo) {
|
|
392
|
+
var _this4 = this;
|
|
393
|
+
|
|
394
|
+
return new Promise(function (resolve) {
|
|
395
|
+
var proxy = _this4.handleProxy();
|
|
396
|
+
|
|
397
|
+
var serviceUrl = SuperMap.Util.urlAppend(layerInfo.url, 'REQUEST=GetCapabilities&SERVICE=WMS');
|
|
398
|
+
SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
399
|
+
withCredentials: _this4.handleWithCredentials(proxy, layerInfo.url, false),
|
|
400
|
+
withoutFormatSuffix: true,
|
|
401
|
+
proxy: proxy
|
|
402
|
+
}).then(function (response) {
|
|
403
|
+
return response.text();
|
|
404
|
+
}).then(function (capabilitiesText) {
|
|
405
|
+
var converts = convert || window.convert;
|
|
406
|
+
var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
|
|
407
|
+
compact: true,
|
|
408
|
+
spaces: 4
|
|
409
|
+
}));
|
|
410
|
+
var wmsCapabilities = capabilities.WMT_MS_Capabilities || capabilities.WMS_Capabilities;
|
|
411
|
+
resolve({
|
|
412
|
+
version: wmsCapabilities['_attributes']['version']
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
_proto.getMapBoxStyle = function getMapBoxStyle(styleURL) {
|
|
419
|
+
return new Promise(function (resolve, reject) {
|
|
420
|
+
SuperMap.FetchRequest.get(styleURL).then(function (response) {
|
|
421
|
+
return response.json();
|
|
422
|
+
}).then(function (styleJSON) {
|
|
423
|
+
resolve(styleJSON);
|
|
424
|
+
}).catch(function (error) {
|
|
425
|
+
reject(error);
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
_proto.getWmtsInfo = function getWmtsInfo(layerInfo, mapCRS) {
|
|
431
|
+
var _this5 = this;
|
|
432
|
+
|
|
433
|
+
return new Promise(function (resolve, reject) {
|
|
434
|
+
var isMatched = false;
|
|
435
|
+
var matchMaxZoom = 22;
|
|
436
|
+
var matchMinZoom = 0;
|
|
437
|
+
var style = '';
|
|
438
|
+
var bounds;
|
|
439
|
+
var restResourceURL = '';
|
|
440
|
+
var kvpResourceUrl = '';
|
|
441
|
+
|
|
442
|
+
var proxy = _this5.handleProxy();
|
|
443
|
+
|
|
444
|
+
var serviceUrl = SuperMap.Util.urlAppend(layerInfo.url, 'REQUEST=GetCapabilities&SERVICE=WMTS&VERSION=1.0.0');
|
|
445
|
+
serviceUrl = _this5.handleParentRes(serviceUrl);
|
|
446
|
+
SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
447
|
+
withCredentials: _this5.handleWithCredentials(proxy, layerInfo.url, false),
|
|
448
|
+
withoutFormatSuffix: true,
|
|
449
|
+
proxy: proxy
|
|
450
|
+
}).then(function (response) {
|
|
451
|
+
return response.text();
|
|
452
|
+
}).then(function (capabilitiesText) {
|
|
453
|
+
var converts = convert || window.convert;
|
|
454
|
+
var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
|
|
455
|
+
compact: true,
|
|
456
|
+
spaces: 4,
|
|
457
|
+
alwaysArray: ['Layer', 'TileMatrixSet', 'ows:Operation', 'ows:Get', 'ResourceURL', 'Style']
|
|
458
|
+
})).Capabilities;
|
|
459
|
+
var content = capabilities.Contents;
|
|
460
|
+
var metaData = capabilities['ows:OperationsMetadata'];
|
|
461
|
+
|
|
462
|
+
if (metaData) {
|
|
463
|
+
var operations = metaData['ows:Operation'];
|
|
464
|
+
|
|
465
|
+
if (!Array.isArray(operations)) {
|
|
466
|
+
operations = [operations];
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
var operation = operations.find(function (item) {
|
|
470
|
+
return item._attributes.name === 'GetTile';
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
if (operation) {
|
|
474
|
+
var getConstraints = operation['ows:DCP']['ows:HTTP']['ows:Get'];
|
|
475
|
+
|
|
476
|
+
if (!Array.isArray(getConstraints)) {
|
|
477
|
+
getConstraints = [getConstraints];
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
var getConstraint = getConstraints.find(function (item) {
|
|
481
|
+
return item['ows:Constraint']['ows:AllowedValues']['ows:Value']['_text'] === 'KVP';
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
if (getConstraint) {
|
|
485
|
+
kvpResourceUrl = getConstraint['_attributes']['xlink:href'];
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
var tileMatrixSet = content.TileMatrixSet;
|
|
491
|
+
|
|
492
|
+
for (var i = 0; i < tileMatrixSet.length; i++) {
|
|
493
|
+
if (tileMatrixSet[i]['ows:Identifier'] && tileMatrixSet[i]['ows:Identifier']['_text'] === layerInfo.tileMatrixSet) {
|
|
494
|
+
if (tileMatrixSet[i]['WellKnownScaleSet'] && DEFAULT_WELLKNOWNSCALESET.includes(tileMatrixSet[i]['WellKnownScaleSet']['_text'])) {
|
|
495
|
+
isMatched = true;
|
|
496
|
+
} else {
|
|
497
|
+
var matchedScaleDenominator = {};
|
|
498
|
+
var defaultCRSScaleDenominators = mapCRS === 'EPSG:3857' ? MB_SCALEDENOMINATOR_3857 : MB_SCALEDENOMINATOR_4326;
|
|
499
|
+
var defaultCRSTopLeftCorner = mapCRS === 'EPSG:3857' ? [-2.0037508342789248e7, 2.0037508342789087e7] : [-180, 90];
|
|
500
|
+
|
|
501
|
+
for (var j = 0; j < tileMatrixSet[i].TileMatrix.length; j++) {
|
|
502
|
+
var tileMatrix = tileMatrixSet[i].TileMatrix[j];
|
|
503
|
+
var identifier = tileMatrix['ows:Identifier']['_text'];
|
|
504
|
+
var topLeftCorner = [].concat(tileMatrix['TopLeftCorner']['_text'].split(' '));
|
|
505
|
+
|
|
506
|
+
if ((!(0, _util.numberEqual)(topLeftCorner[0], defaultCRSTopLeftCorner[0]) || !(0, _util.numberEqual)(topLeftCorner[1], defaultCRSTopLeftCorner[1])) && (!(0, _util.numberEqual)(topLeftCorner[0], defaultCRSTopLeftCorner[1]) || !(0, _util.numberEqual)(topLeftCorner[1], defaultCRSTopLeftCorner[0]))) {
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
var defaultScaleDenominator = defaultCRSScaleDenominators[+identifier];
|
|
511
|
+
|
|
512
|
+
if (!defaultScaleDenominator) {
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
var scaleDenominator = parseFloat(tileMatrixSet[i].TileMatrix[j]['ScaleDenominator']['_text']);
|
|
517
|
+
|
|
518
|
+
if ((0, _util.numberEqual)(defaultScaleDenominator, scaleDenominator)) {
|
|
519
|
+
matchedScaleDenominator[+identifier] = scaleDenominator;
|
|
520
|
+
} else {
|
|
521
|
+
if (Object.keys(matchedScaleDenominator).length > 0) {
|
|
522
|
+
break;
|
|
523
|
+
} else {
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
var zooms = Object.keys(matchedScaleDenominator).map(function (element) {
|
|
530
|
+
return +element;
|
|
531
|
+
});
|
|
532
|
+
matchMaxZoom = (0, _lodash.default)(zooms);
|
|
533
|
+
matchMinZoom = (0, _lodash2.default)(zooms);
|
|
534
|
+
|
|
535
|
+
if (zooms.length !== 0) {
|
|
536
|
+
isMatched = true;
|
|
537
|
+
} else {
|
|
538
|
+
throw Error('TileMatrixSetNotSuppport');
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
break;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
var layer = content.Layer.find(function (item) {
|
|
547
|
+
return item['ows:Identifier']['_text'] === layerInfo.layer;
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
if (layer) {
|
|
551
|
+
var styles = layer.Style;
|
|
552
|
+
|
|
553
|
+
if (Array.isArray(layer.Style)) {
|
|
554
|
+
style = styles[0]['ows:Identifier'] ? styles[0]['ows:Identifier']['_text'] : '';
|
|
555
|
+
} else {
|
|
556
|
+
style = styles['ows:Identifier'] ? styles['ows:Identifier']['_text'] : '';
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
if (layer['ows:WGS84BoundingBox']) {
|
|
560
|
+
var lowerCorner = layer['ows:WGS84BoundingBox']['ows:LowerCorner']['_text'].split(' ');
|
|
561
|
+
var upperCorner = layer['ows:WGS84BoundingBox']['ows:UpperCorner']['_text'].split(' ');
|
|
562
|
+
bounds = [parseFloat(lowerCorner[0]), parseFloat(lowerCorner[1]), parseFloat(upperCorner[0]), parseFloat(upperCorner[1])];
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
var resourceUrls = layer.ResourceURL;
|
|
566
|
+
|
|
567
|
+
if (!Array.isArray(resourceUrls)) {
|
|
568
|
+
resourceUrls = [resourceUrls];
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
var resourceUrl = resourceUrls.find(function (item) {
|
|
572
|
+
return item._attributes.resourceType === 'tile';
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
if (resourceUrl) {
|
|
576
|
+
restResourceURL = resourceUrl._attributes.template;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
resolve({
|
|
581
|
+
isMatched: isMatched,
|
|
582
|
+
matchMaxZoom: matchMaxZoom,
|
|
583
|
+
matchMinZoom: matchMinZoom,
|
|
584
|
+
style: style,
|
|
585
|
+
bounds: bounds,
|
|
586
|
+
restResourceURL: restResourceURL,
|
|
587
|
+
kvpResourceUrl: kvpResourceUrl
|
|
588
|
+
});
|
|
589
|
+
}).catch(function (error) {
|
|
590
|
+
reject(error);
|
|
591
|
+
});
|
|
592
|
+
});
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
_proto._getFeaturesFromHosted = function _getFeaturesFromHosted(layer, baseProjection) {
|
|
596
|
+
var dataSource = layer.dataSource,
|
|
597
|
+
layerType = layer.layerType;
|
|
598
|
+
var serverId = dataSource ? dataSource.serverId : layer.serverId;
|
|
599
|
+
|
|
600
|
+
if (!serverId) {
|
|
601
|
+
return new Promise(function (resolve) {
|
|
602
|
+
resolve({
|
|
603
|
+
type: 'noServerId'
|
|
604
|
+
});
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
var getDataFromIportal = layerType === 'MARKER' || dataSource && (!dataSource.accessType || dataSource.accessType === 'DIRECT');
|
|
609
|
+
|
|
610
|
+
if (getDataFromIportal) {
|
|
611
|
+
return this._getDataFromIportal(serverId, layer);
|
|
612
|
+
} else {
|
|
613
|
+
return this._getDataFromHosted({
|
|
614
|
+
layer: layer,
|
|
615
|
+
serverId: serverId,
|
|
616
|
+
baseProjection: baseProjection
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
_proto._getFeaturesFromRestData = function _getFeaturesFromRestData(layer, baseProjection) {
|
|
622
|
+
var _this6 = this;
|
|
623
|
+
|
|
624
|
+
var features;
|
|
625
|
+
var dataSource = layer.dataSource;
|
|
626
|
+
return new Promise(function (resolve, reject) {
|
|
627
|
+
_this6._getFeatureBySQL(dataSource.url, [decodeURIComponent(dataSource.dataSourceName) || layer.name], function (result) {
|
|
628
|
+
features = _this6.parseGeoJsonData2Feature({
|
|
629
|
+
allDatas: {
|
|
630
|
+
features: result.result.features.features
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
resolve({
|
|
634
|
+
type: 'feature',
|
|
635
|
+
features: features
|
|
636
|
+
});
|
|
637
|
+
}, function (err) {
|
|
638
|
+
reject(err);
|
|
639
|
+
}, baseProjection);
|
|
640
|
+
});
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
_proto._getFeaturesFromRestMap = function _getFeaturesFromRestMap(layer) {
|
|
644
|
+
var _this7 = this;
|
|
645
|
+
|
|
646
|
+
return new Promise(function (resolve, reject) {
|
|
647
|
+
_this7._queryFeatureBySQL(layer.dataSource.url, layer.dataSource.layerName, function (result) {
|
|
648
|
+
var recordsets = result && result.result.recordsets;
|
|
649
|
+
var recordset = recordsets && recordsets[0];
|
|
650
|
+
var attributes = recordset.fields;
|
|
651
|
+
|
|
652
|
+
if (recordset && attributes) {
|
|
653
|
+
var fileterAttrs = [];
|
|
654
|
+
|
|
655
|
+
for (var i in attributes) {
|
|
656
|
+
var value = attributes[i];
|
|
657
|
+
|
|
658
|
+
if (value.indexOf('Sm') !== 0 || value === 'SmID') {
|
|
659
|
+
fileterAttrs.push(value);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
_this7._getFeatures(fileterAttrs, layer, function (features) {
|
|
664
|
+
resolve({
|
|
665
|
+
type: 'feature',
|
|
666
|
+
features: features
|
|
667
|
+
});
|
|
668
|
+
}, function (err) {
|
|
669
|
+
reject(err);
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
}, function (err) {
|
|
673
|
+
reject(err);
|
|
674
|
+
}, 'smid=1');
|
|
675
|
+
});
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
_proto._getFeaturesFromUserData = function _getFeaturesFromUserData(layer) {
|
|
679
|
+
var _this8 = this;
|
|
680
|
+
|
|
681
|
+
var dataSource = layer.dataSource;
|
|
682
|
+
return new Promise(function (resolve, reject) {
|
|
683
|
+
var proxy = _this8.handleProxy();
|
|
684
|
+
|
|
685
|
+
var serviceUrl = _this8.handleParentRes(dataSource.url);
|
|
686
|
+
|
|
687
|
+
SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
688
|
+
withCredentials: _this8.handleWithCredentials(proxy, serviceUrl, _this8.withCredentials),
|
|
689
|
+
proxy: proxy,
|
|
690
|
+
withoutFormatSuffix: true
|
|
691
|
+
}).then(function (response) {
|
|
692
|
+
return response.json();
|
|
693
|
+
}).then(function (data) {
|
|
694
|
+
var features;
|
|
695
|
+
|
|
696
|
+
if (data && data instanceof Object && data.type === 'FeatureCollection') {
|
|
697
|
+
features = data.features;
|
|
698
|
+
} else {
|
|
699
|
+
features = data;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
features = _this8.parseGeoJsonData2Feature({
|
|
703
|
+
allDatas: {
|
|
704
|
+
features: features
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
resolve({
|
|
708
|
+
type: 'feature',
|
|
709
|
+
features: features
|
|
710
|
+
});
|
|
711
|
+
}).catch(function (err) {
|
|
712
|
+
reject(err);
|
|
713
|
+
});
|
|
714
|
+
});
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
_proto._queryFeatureBySQL = function _queryFeatureBySQL(url, layerName, _processCompleted, processFaild, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
|
|
718
|
+
var queryBySQLParams = this._getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute);
|
|
719
|
+
|
|
720
|
+
var proxy = this.handleProxy();
|
|
721
|
+
var serviceUrl = this.handleParentRes(url);
|
|
722
|
+
var queryBySQLService = new SuperMap.QueryBySQLService(serviceUrl, {
|
|
723
|
+
proxy: proxy,
|
|
724
|
+
withCredentials: this.handleWithCredentials(proxy, url, false),
|
|
725
|
+
eventListeners: {
|
|
726
|
+
processCompleted: function processCompleted(data) {
|
|
727
|
+
_processCompleted && _processCompleted(data);
|
|
728
|
+
},
|
|
729
|
+
processFailed: function processFailed(data) {
|
|
730
|
+
processFaild && processFaild(data);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
queryBySQLService.processAsync(queryBySQLParams);
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
_proto._getFeatures = function _getFeatures(fields, layerInfo, resolve, reject) {
|
|
738
|
+
var _this9 = this;
|
|
739
|
+
|
|
740
|
+
var source = layerInfo.dataSource;
|
|
741
|
+
|
|
742
|
+
this._queryFeatureBySQL(source.url, source.layerName, function (result) {
|
|
743
|
+
var recordsets = result.result.recordsets[0];
|
|
744
|
+
var features = recordsets.features.features;
|
|
745
|
+
|
|
746
|
+
var featuresObj = _this9.parseGeoJsonData2Feature({
|
|
747
|
+
allDatas: {
|
|
748
|
+
features: features
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
resolve(featuresObj);
|
|
753
|
+
}, function (err) {
|
|
754
|
+
reject(err);
|
|
755
|
+
}, null, fields);
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
_proto._getQueryFeaturesParam = function _getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
|
|
759
|
+
var queryParam = new SuperMap.FilterParameter({
|
|
760
|
+
name: layerName,
|
|
761
|
+
attributeFilter: attributeFilter
|
|
762
|
+
});
|
|
763
|
+
|
|
764
|
+
if (fields) {
|
|
765
|
+
queryParam.fields = fields;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
var params = {
|
|
769
|
+
queryParams: [queryParam]
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
if (onlyAttribute) {
|
|
773
|
+
params.queryOption = SuperMap.QueryOption.ATTRIBUTE;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
startRecord && (params.startRecord = startRecord);
|
|
777
|
+
recordLength && (params.expectCount = recordLength);
|
|
778
|
+
|
|
779
|
+
if (epsgCode) {
|
|
780
|
+
params.prjCoordSys = {
|
|
781
|
+
epsgCode: epsgCode
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
var queryBySQLParams = new SuperMap.QueryBySQLParameters(params);
|
|
786
|
+
return queryBySQLParams;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
_proto._getFeaturesFromDataflow = function _getFeaturesFromDataflow(layer) {
|
|
790
|
+
var _this10 = this;
|
|
791
|
+
|
|
792
|
+
return new Promise(function (resolve, reject) {
|
|
793
|
+
_this10._getDataflowInfo(layer, function () {
|
|
794
|
+
resolve({
|
|
795
|
+
type: 'dataflow'
|
|
796
|
+
});
|
|
797
|
+
}, function (e) {
|
|
798
|
+
reject(e);
|
|
799
|
+
});
|
|
800
|
+
});
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
_proto._getDataflowInfo = function _getDataflowInfo(layerInfo, success, faild) {
|
|
804
|
+
var url = layerInfo.url;
|
|
805
|
+
var token;
|
|
806
|
+
var requestUrl = url + ".json";
|
|
807
|
+
|
|
808
|
+
if (layerInfo.credential && layerInfo.credential.token) {
|
|
809
|
+
token = layerInfo.credential.token;
|
|
810
|
+
requestUrl += "?token=" + token;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
var proxy = this.handleProxy();
|
|
814
|
+
requestUrl = this.handleParentRes(requestUrl);
|
|
815
|
+
SuperMap.FetchRequest.get(requestUrl, null, {
|
|
816
|
+
proxy: proxy,
|
|
817
|
+
withCredentials: this.handleWithCredentials(proxy, requestUrl, false)
|
|
818
|
+
}).then(function (response) {
|
|
819
|
+
return response.json();
|
|
820
|
+
}).then(function (result) {
|
|
821
|
+
if (!result) {
|
|
822
|
+
faild();
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
if (result.featureMetaData) {
|
|
827
|
+
layerInfo.featureType = result.featureMetaData.featureType.toUpperCase();
|
|
828
|
+
layerInfo.dataSource = {
|
|
829
|
+
dataTypes: {}
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
if (result.featureMetaData.fieldInfos && result.featureMetaData.fieldInfos.length > 0) {
|
|
833
|
+
result.featureMetaData.fieldInfos.forEach(function (data) {
|
|
834
|
+
var name = data.name.trim();
|
|
835
|
+
|
|
836
|
+
if (data.type === 'TEXT') {
|
|
837
|
+
layerInfo.dataSource.dataTypes[name] = 'STRING';
|
|
838
|
+
} else if (['DOUBLE', 'INT', 'FLOAT', 'LONG', 'SHORT'].includes(data.type)) {
|
|
839
|
+
layerInfo.dataSource.dataTypes[name] = 'NUMBER';
|
|
840
|
+
} else {
|
|
841
|
+
layerInfo.dataSource.dataTypes[name] = 'UNKNOWN';
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
layerInfo.wsUrl = result.urls[0].url;
|
|
848
|
+
layerInfo.name = result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];
|
|
849
|
+
success();
|
|
850
|
+
}).catch(function () {
|
|
851
|
+
faild();
|
|
852
|
+
});
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
_proto.getDatasourceType = function getDatasourceType(layer) {
|
|
856
|
+
var dataSource = layer.dataSource,
|
|
857
|
+
layerType = layer.layerType;
|
|
858
|
+
|
|
859
|
+
if (dataSource && dataSource.type === 'SAMPLE_DATA') {
|
|
860
|
+
return dataSource.type;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
var type;
|
|
864
|
+
var isHosted = dataSource && dataSource.serverId || layerType === 'MARKER' || layerType === 'HOSTED_TILE';
|
|
865
|
+
var isTile = layerType === 'SUPERMAP_REST' || layerType === 'TILE' || layerType === 'WMS' || layerType === 'WMTS' || layerType === 'MAPBOXSTYLE';
|
|
866
|
+
|
|
867
|
+
if (isHosted) {
|
|
868
|
+
type = 'hosted';
|
|
869
|
+
} else if (isTile) {
|
|
870
|
+
type = 'tile';
|
|
871
|
+
} else if (dataSource && dataSource.type === 'REST_DATA') {
|
|
872
|
+
type = 'rest_data';
|
|
873
|
+
} else if (dataSource && dataSource.type === 'REST_MAP' && dataSource.url) {
|
|
874
|
+
type = 'rest_map';
|
|
875
|
+
} else if (layerType === 'DATAFLOW_POINT_TRACK' || layerType === 'DATAFLOW_HEAT') {
|
|
876
|
+
type = 'dataflow';
|
|
877
|
+
} else if (dataSource && dataSource.type === 'USER_DATA') {
|
|
878
|
+
type = 'user_data';
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
return type;
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
_proto.getFeatureProperties = function getFeatureProperties(features) {
|
|
885
|
+
var properties = [];
|
|
886
|
+
|
|
887
|
+
if (features && features.length) {
|
|
888
|
+
features.forEach(function (feature) {
|
|
889
|
+
var property = feature.properties;
|
|
890
|
+
property && properties.push(property);
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
return properties;
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
_proto.parseGeoJsonData2Feature = function parseGeoJsonData2Feature(metaData) {
|
|
898
|
+
var allFeatures = metaData.allDatas.features;
|
|
899
|
+
var features = [];
|
|
900
|
+
|
|
901
|
+
for (var i = 0, len = allFeatures.length; i < len; i++) {
|
|
902
|
+
var feature = allFeatures[i];
|
|
903
|
+
var coordinate = feature.geometry.coordinates;
|
|
904
|
+
|
|
905
|
+
if (allFeatures[i].geometry.type === 'Point') {
|
|
906
|
+
if (allFeatures[i].properties) {
|
|
907
|
+
allFeatures[i].properties.lon = coordinate[0];
|
|
908
|
+
allFeatures[i].properties.lat = coordinate[1];
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
feature.properties['index'] = i + '';
|
|
913
|
+
features.push(feature);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
return features;
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
_proto._getDataFromIportal = function _getDataFromIportal(serverId, layerInfo) {
|
|
920
|
+
var _this11 = this;
|
|
921
|
+
|
|
922
|
+
var features;
|
|
923
|
+
var url = this.serverUrl + "web/datas/" + serverId + "/content.json?pageSize=9999999¤tPage=1";
|
|
924
|
+
|
|
925
|
+
if (this.accessToken) {
|
|
926
|
+
url = url + "&" + this.accessKey + "=" + this.accessToken;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
return new Promise(function (resolve, reject) {
|
|
930
|
+
url = _this11.handleParentRes(url);
|
|
931
|
+
|
|
932
|
+
var proxy = _this11.handleProxy();
|
|
933
|
+
|
|
934
|
+
SuperMap.FetchRequest.get(url, null, {
|
|
935
|
+
withCredentials: _this11.handleWithCredentials(proxy, url, _this11.withCredentials),
|
|
936
|
+
proxy: proxy
|
|
937
|
+
}).then(function (response) {
|
|
938
|
+
return response.json();
|
|
939
|
+
}).then(function (data) {
|
|
940
|
+
return __awaiter(_this11, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
941
|
+
var _layerInfo$dataSource, divisionType, divisionField, geojson;
|
|
942
|
+
|
|
943
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
944
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
945
|
+
case 0:
|
|
946
|
+
if (data.succeed === false) {
|
|
947
|
+
reject(data.error);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
if (!(data && data.type)) {
|
|
951
|
+
_context2.next = 22;
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
if (!(data.type === 'JSON' || data.type === 'GEOJSON')) {
|
|
956
|
+
_context2.next = 7;
|
|
957
|
+
break;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
data.content = JSON.parse(data.content.trim());
|
|
961
|
+
features = this._formatGeoJSON(data.content);
|
|
962
|
+
_context2.next = 21;
|
|
963
|
+
break;
|
|
964
|
+
|
|
965
|
+
case 7:
|
|
966
|
+
if (!(data.type === 'EXCEL' || data.type === 'CSV')) {
|
|
967
|
+
_context2.next = 20;
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
if (!(layerInfo.dataSource && layerInfo.dataSource.administrativeInfo)) {
|
|
972
|
+
_context2.next = 17;
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
data.content.rows.unshift(data.content.colTitles);
|
|
977
|
+
_layerInfo$dataSource = layerInfo.dataSource.administrativeInfo, divisionType = _layerInfo$dataSource.divisionType, divisionField = _layerInfo$dataSource.divisionField;
|
|
978
|
+
_context2.next = 13;
|
|
979
|
+
return this._excelData2FeatureByDivision(data.content, divisionType, divisionField);
|
|
980
|
+
|
|
981
|
+
case 13:
|
|
982
|
+
geojson = _context2.sent;
|
|
983
|
+
features = this._formatGeoJSON(geojson);
|
|
984
|
+
_context2.next = 18;
|
|
985
|
+
break;
|
|
986
|
+
|
|
987
|
+
case 17:
|
|
988
|
+
features = this._excelData2Feature(data.content, layerInfo && layerInfo.xyField || {});
|
|
989
|
+
|
|
990
|
+
case 18:
|
|
991
|
+
_context2.next = 21;
|
|
992
|
+
break;
|
|
993
|
+
|
|
994
|
+
case 20:
|
|
995
|
+
if (data.type === 'SHP') {
|
|
996
|
+
data.content = JSON.parse(data.content.trim());
|
|
997
|
+
features = this._formatGeoJSON(data.content.layers[0]);
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
case 21:
|
|
1001
|
+
resolve({
|
|
1002
|
+
type: 'feature',
|
|
1003
|
+
features: features
|
|
1004
|
+
});
|
|
1005
|
+
|
|
1006
|
+
case 22:
|
|
1007
|
+
case "end":
|
|
1008
|
+
return _context2.stop();
|
|
1009
|
+
}
|
|
1010
|
+
}, _callee2, this);
|
|
1011
|
+
}));
|
|
1012
|
+
}).catch(function (error) {
|
|
1013
|
+
reject(error);
|
|
1014
|
+
});
|
|
1015
|
+
});
|
|
1016
|
+
};
|
|
1017
|
+
|
|
1018
|
+
_proto._getDataFromHosted = function _getDataFromHosted(_ref) {
|
|
1019
|
+
var _this12 = this;
|
|
1020
|
+
|
|
1021
|
+
var layer = _ref.layer,
|
|
1022
|
+
serverId = _ref.serverId,
|
|
1023
|
+
baseProjection = _ref.baseProjection;
|
|
1024
|
+
var isMapService = layer.layerType === 'HOSTED_TILE';
|
|
1025
|
+
return new Promise(function (resolve, reject) {
|
|
1026
|
+
_this12._checkUploadToRelationship(serverId).then(function (result) {
|
|
1027
|
+
if (result && result.length > 0) {
|
|
1028
|
+
var datasetName = result[0].name;
|
|
1029
|
+
var featureType = result[0].type.toUpperCase();
|
|
1030
|
+
|
|
1031
|
+
_this12._getDataService(serverId, datasetName).then(function (data) {
|
|
1032
|
+
var dataItemServices = data.dataItemServices;
|
|
1033
|
+
|
|
1034
|
+
if (dataItemServices.length === 0) {
|
|
1035
|
+
reject('noDataServices');
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
var param = {
|
|
1039
|
+
layer: layer,
|
|
1040
|
+
dataItemServices: dataItemServices,
|
|
1041
|
+
datasetName: datasetName,
|
|
1042
|
+
featureType: featureType,
|
|
1043
|
+
resolve: resolve,
|
|
1044
|
+
reject: reject,
|
|
1045
|
+
baseProjection: baseProjection
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
if (isMapService) {
|
|
1049
|
+
var dataService = dataItemServices.filter(function (info) {
|
|
1050
|
+
return info && info.serviceType === 'RESTDATA';
|
|
1051
|
+
})[0];
|
|
1052
|
+
|
|
1053
|
+
_this12._isMvt(dataService.address, datasetName, baseProjection).then(function (info) {
|
|
1054
|
+
_this12._getServiceInfoFromLayer(param, info);
|
|
1055
|
+
}).catch(function () {
|
|
1056
|
+
_this12._getServiceInfoFromLayer(param);
|
|
1057
|
+
});
|
|
1058
|
+
} else {
|
|
1059
|
+
_this12._getServiceInfoFromLayer(param);
|
|
1060
|
+
}
|
|
1061
|
+
});
|
|
1062
|
+
} else {
|
|
1063
|
+
reject('resultIsEmpty');
|
|
1064
|
+
}
|
|
1065
|
+
}).catch(function (error) {
|
|
1066
|
+
reject(error);
|
|
1067
|
+
});
|
|
1068
|
+
});
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
_proto._isMvt = function _isMvt(serviceUrl, datasetName, baseProjection) {
|
|
1072
|
+
return this._getDatasetsInfo(serviceUrl, datasetName).then(function (info) {
|
|
1073
|
+
if (info.epsgCode == baseProjection.split('EPSG:')[1]) {
|
|
1074
|
+
return SuperMap.FetchRequest.get(info.url + "/tilefeature.mvt").then(function (response) {
|
|
1075
|
+
return response.json();
|
|
1076
|
+
}).then(function (result) {
|
|
1077
|
+
info.isMvt = result.error && result.error.code === 400;
|
|
1078
|
+
return info;
|
|
1079
|
+
}).catch(function () {
|
|
1080
|
+
return info;
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
return info;
|
|
1085
|
+
});
|
|
1086
|
+
};
|
|
1087
|
+
|
|
1088
|
+
_proto._getServiceInfoFromLayer = function _getServiceInfoFromLayer(_ref2, info) {
|
|
1089
|
+
var _this13 = this;
|
|
1090
|
+
|
|
1091
|
+
var layer = _ref2.layer,
|
|
1092
|
+
dataItemServices = _ref2.dataItemServices,
|
|
1093
|
+
datasetName = _ref2.datasetName,
|
|
1094
|
+
featureType = _ref2.featureType,
|
|
1095
|
+
resolve = _ref2.resolve,
|
|
1096
|
+
reject = _ref2.reject,
|
|
1097
|
+
baseProjection = _ref2.baseProjection;
|
|
1098
|
+
var isMapService = info ? !info.isMvt : layer.layerType === 'HOSTED_TILE';
|
|
1099
|
+
var isAdded = false;
|
|
1100
|
+
dataItemServices.forEach(function (service) {
|
|
1101
|
+
if (isAdded) {
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
if (service && isMapService && service.serviceType === 'RESTMAP') {
|
|
1106
|
+
isAdded = true;
|
|
1107
|
+
|
|
1108
|
+
_this13._getTileLayerInfo(service.address, baseProjection).then(function (restMaps) {
|
|
1109
|
+
resolve({
|
|
1110
|
+
type: 'restMap',
|
|
1111
|
+
restMaps: restMaps
|
|
1112
|
+
});
|
|
1113
|
+
});
|
|
1114
|
+
} else if (service && !isMapService && service.serviceType === 'RESTDATA') {
|
|
1115
|
+
if (info && info.isMvt) {
|
|
1116
|
+
resolve({
|
|
1117
|
+
type: 'mvt',
|
|
1118
|
+
info: info,
|
|
1119
|
+
featureType: featureType
|
|
1120
|
+
});
|
|
1121
|
+
} else {
|
|
1122
|
+
isAdded = true;
|
|
1123
|
+
|
|
1124
|
+
_this13._getDatasources(service.address).then(function (datasourceName) {
|
|
1125
|
+
layer.dataSource.dataSourceName = datasourceName + ':' + datasetName;
|
|
1126
|
+
layer.dataSource.url = service.address + "/data";
|
|
1127
|
+
|
|
1128
|
+
_this13._getFeatureBySQL(layer.dataSource.url, [layer.dataSource.dataSourceName || layer.name], function (result) {
|
|
1129
|
+
var features = _this13.parseGeoJsonData2Feature({
|
|
1130
|
+
allDatas: {
|
|
1131
|
+
features: result.result.features.features
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
|
|
1135
|
+
resolve({
|
|
1136
|
+
type: 'feature',
|
|
1137
|
+
features: features
|
|
1138
|
+
});
|
|
1139
|
+
}, function (err) {
|
|
1140
|
+
reject(err);
|
|
1141
|
+
});
|
|
1142
|
+
}, function (err) {
|
|
1143
|
+
reject(err);
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}, this);
|
|
1148
|
+
|
|
1149
|
+
if (!isAdded) {
|
|
1150
|
+
reject('noService');
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
_proto._getDatasetsInfo = function _getDatasetsInfo(serviceUrl, datasetName) {
|
|
1155
|
+
var _this14 = this;
|
|
1156
|
+
|
|
1157
|
+
return this._getDatasources(serviceUrl).then(function (datasourceName) {
|
|
1158
|
+
var url = serviceUrl + "/data/datasources/" + datasourceName + "/datasets/" + datasetName;
|
|
1159
|
+
|
|
1160
|
+
var proxy = _this14.handleProxy();
|
|
1161
|
+
|
|
1162
|
+
url = _this14.handleParentRes(url);
|
|
1163
|
+
return SuperMap.FetchRequest.get(url, null, {
|
|
1164
|
+
withCredentials: _this14.handleWithCredentials(proxy, url, false),
|
|
1165
|
+
proxy: proxy
|
|
1166
|
+
}).then(function (response) {
|
|
1167
|
+
return response.json();
|
|
1168
|
+
}).then(function (datasetsInfo) {
|
|
1169
|
+
return {
|
|
1170
|
+
epsgCode: datasetsInfo.datasetInfo.prjCoordSys.epsgCode,
|
|
1171
|
+
bounds: datasetsInfo.datasetInfo.bounds,
|
|
1172
|
+
datasourceName: datasourceName,
|
|
1173
|
+
datasetName: datasetName,
|
|
1174
|
+
url: url
|
|
1175
|
+
};
|
|
1176
|
+
});
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
_proto._getDatasources = function _getDatasources(url) {
|
|
1181
|
+
var proxy = this.handleProxy();
|
|
1182
|
+
var serviceUrl = url + "/data/datasources.json";
|
|
1183
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1184
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1185
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, false),
|
|
1186
|
+
proxy: proxy
|
|
1187
|
+
}).then(function (response) {
|
|
1188
|
+
return response.json();
|
|
1189
|
+
}).then(function (datasource) {
|
|
1190
|
+
if (datasource.code === 401) {
|
|
1191
|
+
throw Error(datasource.errorMsg);
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
var datasourceNames = datasource.datasourceNames;
|
|
1195
|
+
return datasourceNames[0];
|
|
1196
|
+
});
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
_proto._getDataService = function _getDataService(fileId, datasetName) {
|
|
1200
|
+
var proxy = this.handleProxy();
|
|
1201
|
+
var serviceUrl = this.serverUrl + "web/datas/" + fileId + ".json";
|
|
1202
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1203
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1204
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
|
|
1205
|
+
proxy: proxy
|
|
1206
|
+
}).then(function (response) {
|
|
1207
|
+
return response.json();
|
|
1208
|
+
}).then(function (result) {
|
|
1209
|
+
result.fileId = fileId;
|
|
1210
|
+
result.datasetName = datasetName;
|
|
1211
|
+
return result;
|
|
1212
|
+
});
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
_proto._checkUploadToRelationship = function _checkUploadToRelationship(fileId) {
|
|
1216
|
+
var proxy = this.handleProxy();
|
|
1217
|
+
var serviceUrl = this.serverUrl + "web/datas/" + fileId + "/datasets.json";
|
|
1218
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1219
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1220
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
|
|
1221
|
+
proxy: proxy
|
|
1222
|
+
}).then(function (response) {
|
|
1223
|
+
return response.json();
|
|
1224
|
+
}).then(function (result) {
|
|
1225
|
+
return result;
|
|
1226
|
+
});
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
_proto._handleMapUrl = function _handleMapUrl() {
|
|
1230
|
+
var mapUrl = this.serverUrl + 'web/maps/' + this.mapId + '/map';
|
|
1231
|
+
|
|
1232
|
+
if (this.accessToken || this.accessKey) {
|
|
1233
|
+
mapUrl += true ? 'token=' + this.accessToken : undefined;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
var filter = 'getUrlResource.json?url=';
|
|
1237
|
+
|
|
1238
|
+
if (this.excludePortalProxyUrl && this.serverUrl.indexOf(filter) > -1) {
|
|
1239
|
+
var urlArray = this.serverUrl.split(filter);
|
|
1240
|
+
|
|
1241
|
+
if (urlArray.length > 1) {
|
|
1242
|
+
mapUrl = urlArray[0] + filter + this.serverUrl + 'web/maps/' + this.mapId + '/map.json';
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
mapUrl = mapUrl.indexOf('.json') === -1 ? mapUrl + ".json" : mapUrl;
|
|
1247
|
+
return mapUrl;
|
|
1248
|
+
};
|
|
1249
|
+
|
|
1250
|
+
_proto.handleProxy = function handleProxy(type) {
|
|
1251
|
+
if (!this.proxy) {
|
|
1252
|
+
return null;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
var proxySuffix = this.proxyOptions[type || 'data'];
|
|
1256
|
+
var proxy = this.serverUrl + proxySuffix;
|
|
1257
|
+
|
|
1258
|
+
if (typeof this.proxy === 'string') {
|
|
1259
|
+
proxy = this.proxy;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
return proxy;
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
_proto.handleWithCredentials = function handleWithCredentials(proxyUrl, serviceUrl, defaultValue) {
|
|
1266
|
+
if (defaultValue === void 0) {
|
|
1267
|
+
defaultValue = this.withCredentials;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
if (serviceUrl === null || serviceUrl === void 0 ? void 0 : serviceUrl.includes('https://www.supermapol.com')) {
|
|
1271
|
+
return '';
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
if (proxyUrl && proxyUrl.startsWith(this.serverUrl) && (!serviceUrl || serviceUrl.startsWith(proxyUrl))) {
|
|
1275
|
+
return true;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
if (serviceUrl && this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0) {
|
|
1279
|
+
return true;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
return defaultValue;
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
_proto.isIportalResourceUrl = function isIportalResourceUrl(serviceUrl) {
|
|
1286
|
+
return serviceUrl.startsWith(this.serverUrl) || this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0;
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
_proto.handleParentRes = function handleParentRes(url, parentResId, parentResType) {
|
|
1290
|
+
if (parentResId === void 0) {
|
|
1291
|
+
parentResId = this.mapId;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
if (parentResType === void 0) {
|
|
1295
|
+
parentResType = 'MAP';
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
if (!this.isIportalResourceUrl(url)) {
|
|
1299
|
+
return url;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
return (0, _util.urlAppend)(url, "parentResType=" + parentResType + "&parentResId=" + parentResId);
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
_proto._formatGeoJSON = function _formatGeoJSON(data) {
|
|
1306
|
+
var features = data.features;
|
|
1307
|
+
features.forEach(function (row, index) {
|
|
1308
|
+
row.properties['index'] = index;
|
|
1309
|
+
});
|
|
1310
|
+
return features;
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
_proto._excelData2Feature = function _excelData2Feature(dataContent, xyField) {
|
|
1314
|
+
if (xyField === void 0) {
|
|
1315
|
+
xyField = {};
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
var fieldCaptions = dataContent.colTitles;
|
|
1319
|
+
var xfieldIndex = fieldCaptions.indexOf(xyField.xField);
|
|
1320
|
+
var yfieldIndex = fieldCaptions.indexOf(xyField.yField);
|
|
1321
|
+
|
|
1322
|
+
if (yfieldIndex < 0 || xfieldIndex < 0) {
|
|
1323
|
+
for (var i = 0, len = fieldCaptions.length; i < len; i++) {
|
|
1324
|
+
if ((0, _util.isXField)(fieldCaptions[i])) {
|
|
1325
|
+
xfieldIndex = i;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
if ((0, _util.isYField)(fieldCaptions[i])) {
|
|
1329
|
+
yfieldIndex = i;
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
var features = [];
|
|
1335
|
+
|
|
1336
|
+
for (var _i = 0, _len = dataContent.rows.length; _i < _len; _i++) {
|
|
1337
|
+
var row = dataContent.rows[_i];
|
|
1338
|
+
var x = Number(row[xfieldIndex]);
|
|
1339
|
+
var y = Number(row[yfieldIndex]);
|
|
1340
|
+
|
|
1341
|
+
if (isNaN(x) || isNaN(y)) {
|
|
1342
|
+
continue;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
var attributes = {};
|
|
1346
|
+
|
|
1347
|
+
for (var index = 0; index < dataContent.colTitles.length; index++) {
|
|
1348
|
+
var element = dataContent.colTitles[index].trim();
|
|
1349
|
+
attributes[element] = dataContent.rows[_i][index];
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
attributes['index'] = _i + '';
|
|
1353
|
+
var feature = {
|
|
1354
|
+
type: 'Feature',
|
|
1355
|
+
geometry: {
|
|
1356
|
+
type: 'Point',
|
|
1357
|
+
coordinates: [x, y]
|
|
1358
|
+
},
|
|
1359
|
+
properties: attributes
|
|
1360
|
+
};
|
|
1361
|
+
features.push(feature);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
return features;
|
|
1365
|
+
};
|
|
1366
|
+
|
|
1367
|
+
_proto._excelData2FeatureByDivision = function _excelData2FeatureByDivision(content, divisionType, divisionField) {
|
|
1368
|
+
var _this15 = this;
|
|
1369
|
+
|
|
1370
|
+
var dataName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData' : 'ProvinceData';
|
|
1371
|
+
|
|
1372
|
+
if (window[dataName] && window[dataName].features) {
|
|
1373
|
+
return new Promise(function (resolve) {
|
|
1374
|
+
resolve(_this15._combineFeature(content, window[dataName], divisionField));
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
var dataFileName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData.js' : 'ProvincialData.js';
|
|
1379
|
+
var proxy = this.handleProxy();
|
|
1380
|
+
var dataUrl = this.serverUrl + "apps/dataviz/libs/administrative_data/" + dataFileName;
|
|
1381
|
+
return SuperMap.FetchRequest.get(dataUrl, null, {
|
|
1382
|
+
withCredentials: false,
|
|
1383
|
+
proxy: proxy,
|
|
1384
|
+
withoutFormatSuffix: true
|
|
1385
|
+
}).then(function (response) {
|
|
1386
|
+
return response.text();
|
|
1387
|
+
}).then(function (result) {
|
|
1388
|
+
new Function(result)();
|
|
1389
|
+
return _this15._combineFeature(content, window[dataName], divisionField);
|
|
1390
|
+
});
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
_proto._combineFeature = function _combineFeature(properties, geoData, divisionField) {
|
|
1394
|
+
var _this16 = this;
|
|
1395
|
+
|
|
1396
|
+
var geojson = {
|
|
1397
|
+
type: 'FeatureCollection',
|
|
1398
|
+
features: []
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
if (properties.length < 2) {
|
|
1402
|
+
return geojson;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
var titles = properties.colTitles;
|
|
1406
|
+
var rows = properties.rows;
|
|
1407
|
+
var fieldIndex = titles.findIndex(function (title) {
|
|
1408
|
+
return title === divisionField;
|
|
1409
|
+
});
|
|
1410
|
+
rows.forEach(function (row) {
|
|
1411
|
+
var feature = geoData.features.find(function (item) {
|
|
1412
|
+
return _this16._isMatchAdministrativeName(item.properties.Name, row[fieldIndex]);
|
|
1413
|
+
});
|
|
1414
|
+
|
|
1415
|
+
if (feature) {
|
|
1416
|
+
var province = feature.properties.Province;
|
|
1417
|
+
var combineFeature = {
|
|
1418
|
+
properties: {},
|
|
1419
|
+
geometry: feature.geometry,
|
|
1420
|
+
type: 'Feature'
|
|
1421
|
+
};
|
|
1422
|
+
row.forEach(function (item, idx) {
|
|
1423
|
+
combineFeature.properties[titles[idx]] = item;
|
|
1424
|
+
});
|
|
1425
|
+
|
|
1426
|
+
if (province) {
|
|
1427
|
+
combineFeature.properties.Province = province;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
geojson.features.push(combineFeature);
|
|
1431
|
+
}
|
|
1432
|
+
});
|
|
1433
|
+
return geojson;
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
_proto._isMatchAdministrativeName = function _isMatchAdministrativeName(featureName, fieldName) {
|
|
1437
|
+
if (featureName && typeof fieldName === 'string' && fieldName.constructor === String) {
|
|
1438
|
+
var shortName = featureName.trim().substr(0, 2);
|
|
1439
|
+
|
|
1440
|
+
if (shortName === '张家') {
|
|
1441
|
+
shortName = featureName.trim().substr(0, 3);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
if (shortName === '阿拉') {
|
|
1445
|
+
shortName = featureName.trim().substr(0, 3);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
return !!fieldName.match(new RegExp(shortName));
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
return false;
|
|
1452
|
+
};
|
|
1453
|
+
|
|
1454
|
+
_proto._getTileLayerInfo = function _getTileLayerInfo(url, baseProjection) {
|
|
1455
|
+
var _this17 = this;
|
|
1456
|
+
|
|
1457
|
+
var proxy = this.handleProxy();
|
|
1458
|
+
var epsgCode = baseProjection.split('EPSG:')[1];
|
|
1459
|
+
var serviceUrl = url + "/maps.json";
|
|
1460
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1461
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1462
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
|
|
1463
|
+
proxy: proxy
|
|
1464
|
+
}).then(function (response) {
|
|
1465
|
+
return response.json();
|
|
1466
|
+
}).then(function (mapInfo) {
|
|
1467
|
+
var promises = [];
|
|
1468
|
+
|
|
1469
|
+
if (mapInfo) {
|
|
1470
|
+
mapInfo.forEach(function (info) {
|
|
1471
|
+
var promise = SuperMap.FetchRequest.get(info.path + ".json?prjCoordSys=" + JSON.stringify({
|
|
1472
|
+
epsgCode: epsgCode
|
|
1473
|
+
}), null, {
|
|
1474
|
+
withCredentials: _this17.withCredentials,
|
|
1475
|
+
proxy: proxy
|
|
1476
|
+
}).then(function (response) {
|
|
1477
|
+
return response.json();
|
|
1478
|
+
}).then(function (restMapInfo) {
|
|
1479
|
+
restMapInfo.url = info.path;
|
|
1480
|
+
return restMapInfo;
|
|
1481
|
+
});
|
|
1482
|
+
promises.push(promise);
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
return Promise.all(promises).then(function (allRestMaps) {
|
|
1487
|
+
return allRestMaps;
|
|
1488
|
+
});
|
|
1489
|
+
});
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
_proto._getFeatureBySQL = function _getFeatureBySQL(url, datasetNames, _processCompleted2, processFaild, baseProjection) {
|
|
1493
|
+
var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
|
|
1494
|
+
getFeatureParam = new SuperMap.FilterParameter({
|
|
1495
|
+
name: datasetNames.join().replace(':', '@'),
|
|
1496
|
+
attributeFilter: null
|
|
1497
|
+
});
|
|
1498
|
+
getFeatureBySQLParams = new SuperMap.GetFeaturesBySQLParameters({
|
|
1499
|
+
queryParameter: getFeatureParam,
|
|
1500
|
+
datasetNames: datasetNames,
|
|
1501
|
+
fromIndex: 0,
|
|
1502
|
+
toIndex: -1,
|
|
1503
|
+
maxFeatures: -1,
|
|
1504
|
+
returnContent: true
|
|
1505
|
+
});
|
|
1506
|
+
|
|
1507
|
+
if (baseProjection) {
|
|
1508
|
+
if (baseProjection === 'EPSG:3857' || baseProjection === 'EPSG:-1000') {
|
|
1509
|
+
getFeatureBySQLParams.targetEpsgCode = 4326;
|
|
1510
|
+
} else {
|
|
1511
|
+
getFeatureBySQLParams.targetEpsgCode = +baseProjection.split(':')[1];
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
var proxy = this.handleProxy();
|
|
1516
|
+
var options = {
|
|
1517
|
+
proxy: proxy,
|
|
1518
|
+
withCredentials: this.handleWithCredentials(proxy, url, false),
|
|
1519
|
+
eventListeners: {
|
|
1520
|
+
processCompleted: function processCompleted(getFeaturesEventArgs) {
|
|
1521
|
+
var result = getFeaturesEventArgs.result;
|
|
1522
|
+
|
|
1523
|
+
if (result && result.datasetInfos) {
|
|
1524
|
+
var fields = [];
|
|
1525
|
+
var fieldCaptions = [];
|
|
1526
|
+
var fieldTypes = [];
|
|
1527
|
+
var fieldInfos = result.datasetInfos[0].fieldInfos;
|
|
1528
|
+
fieldInfos.forEach(function (fieldInfo) {
|
|
1529
|
+
if (fieldInfo.name) {
|
|
1530
|
+
fields.push(fieldInfo.name.toUpperCase());
|
|
1531
|
+
fieldCaptions.push(fieldInfo.caption.toUpperCase());
|
|
1532
|
+
fieldTypes.push(fieldInfo.type);
|
|
1533
|
+
}
|
|
1534
|
+
});
|
|
1535
|
+
var data = (0, _statistics.statisticsFeatures)(result.features.features, fields, fieldCaptions, fieldTypes);
|
|
1536
|
+
getFeaturesEventArgs.result.features.features = data.features;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
_processCompleted2 && _processCompleted2(getFeaturesEventArgs);
|
|
1540
|
+
},
|
|
1541
|
+
processFailed: function processFailed(e) {
|
|
1542
|
+
processFaild && processFaild(e);
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1546
|
+
var serviceUrl = this.handleParentRes(url);
|
|
1547
|
+
getFeatureBySQLService = new SuperMap.GetFeaturesBySQLService(serviceUrl, options);
|
|
1548
|
+
getFeatureBySQLService.processAsync(getFeatureBySQLParams);
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1551
|
+
_proto.getEpsgCodeInfo = function getEpsgCodeInfo(epsgCode, iPortalUrl) {
|
|
1552
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
1553
|
+
var url, codeUrl, wkt;
|
|
1554
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
1555
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1556
|
+
case 0:
|
|
1557
|
+
url = iPortalUrl.slice(-1) === '/' ? iPortalUrl : iPortalUrl + "/";
|
|
1558
|
+
codeUrl = url + "epsgcodes/" + epsgCode + ".json";
|
|
1559
|
+
_context3.next = 4;
|
|
1560
|
+
return SuperMap.FetchRequest.get(codeUrl, null).then(function (response) {
|
|
1561
|
+
return response.json();
|
|
1562
|
+
}).then(function (epsgcodeInfo) {
|
|
1563
|
+
return epsgcodeInfo.wkt;
|
|
1564
|
+
}).catch(function (err) {
|
|
1565
|
+
console.error(err);
|
|
1566
|
+
return undefined;
|
|
1567
|
+
});
|
|
1568
|
+
|
|
1569
|
+
case 4:
|
|
1570
|
+
wkt = _context3.sent;
|
|
1571
|
+
return _context3.abrupt("return", wkt);
|
|
1572
|
+
|
|
1573
|
+
case 6:
|
|
1574
|
+
case "end":
|
|
1575
|
+
return _context3.stop();
|
|
1576
|
+
}
|
|
1577
|
+
}, _callee3);
|
|
1578
|
+
}));
|
|
1579
|
+
};
|
|
1580
|
+
|
|
1581
|
+
return WebMapService;
|
|
1582
|
+
}(_Events2.Events);
|
|
1583
|
+
|
|
1584
|
+
/***/ }),
|
|
1585
|
+
|
|
1586
|
+
/***/ 252:
|
|
1587
|
+
/***/ (function(module, exports) {
|
|
1588
|
+
|
|
1589
|
+
module.exports = require("xml-js");
|
|
1590
|
+
|
|
1591
|
+
/***/ }),
|
|
1592
|
+
|
|
1593
|
+
/***/ 253:
|
|
1594
|
+
/***/ (function(module, exports) {
|
|
1595
|
+
|
|
1596
|
+
module.exports = require("lodash.min");
|
|
1597
|
+
|
|
1598
|
+
/***/ }),
|
|
1599
|
+
|
|
1600
|
+
/***/ 254:
|
|
1601
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1602
|
+
|
|
1603
|
+
"use strict";
|
|
1604
|
+
|
|
1605
|
+
|
|
1606
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
1607
|
+
|
|
1608
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1609
|
+
value: true
|
|
1610
|
+
});
|
|
1611
|
+
exports.default = void 0;
|
|
1612
|
+
exports.getProjection = getProjection;
|
|
1613
|
+
exports.registerProjection = registerProjection;
|
|
1614
|
+
exports.toEpsgCode = toEpsgCode;
|
|
1615
|
+
|
|
1616
|
+
var _vue = _interopRequireDefault(__webpack_require__(10));
|
|
1617
|
+
|
|
1618
|
+
var _util = __webpack_require__(9);
|
|
1619
|
+
|
|
1620
|
+
var EpsgDefine = new _vue.default({
|
|
1621
|
+
epsgCodes: {
|
|
1622
|
+
'EPSG:3857': 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]',
|
|
1623
|
+
'EPSG:4326': 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],AXIS["Easting", "EAST"],AXIS["Northing", "NORTH"],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]',
|
|
1624
|
+
'EPSG:4490': 'GEOGCS["China Geodetic Coordinate System 2000", DATUM["China 2000", SPHEROID["CGCS2000", 6378137.0, 298.257222101, AUTHORITY["EPSG","1024"]], AUTHORITY["EPSG","1043"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4490"]]'
|
|
1625
|
+
},
|
|
1626
|
+
registerProjection: function registerProjection(epsgKey, epsgValue) {
|
|
1627
|
+
if ((0, _util.getDataType)(arguments[0]) === '[object Object]' && arguments.length === 1) {
|
|
1628
|
+
this.epsgCodes = Object.assign({}, this.epsgCodes, arguments[0]);
|
|
1629
|
+
} else if (epsgKey && epsgValue) {
|
|
1630
|
+
this.epsgCodes[epsgKey] = epsgValue;
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
getProjection: function getProjection(epsgKey) {
|
|
1634
|
+
return this.epsgCodes[epsgKey];
|
|
1635
|
+
},
|
|
1636
|
+
getAllProjections: function getAllProjections() {
|
|
1637
|
+
return this.epsgCodes;
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
|
|
1641
|
+
var _default = exports.default = EpsgDefine;
|
|
1642
|
+
|
|
1643
|
+
function registerProjection(epsgKey, epsgValue) {
|
|
1644
|
+
return EpsgDefine.$options.registerProjection(epsgKey, epsgValue);
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
function getProjection(epsgKey) {
|
|
1648
|
+
return EpsgDefine.$options.getProjection(epsgKey);
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
function toEpsgCode(wkt) {
|
|
1652
|
+
if (typeof wkt !== 'string') {
|
|
1653
|
+
return '';
|
|
1654
|
+
} else if (wkt.indexOf('EPSG') === 0) {
|
|
1655
|
+
return wkt;
|
|
1656
|
+
} else {
|
|
1657
|
+
var lastAuthority = wkt.lastIndexOf('AUTHORITY') + 10;
|
|
1658
|
+
var endString = wkt.indexOf(']', lastAuthority) - 1;
|
|
1659
|
+
|
|
1660
|
+
if (lastAuthority > 0 && endString > 0) {
|
|
1661
|
+
return "EPSG:" + wkt.substring(lastAuthority, endString).split(',')[1].substr(1);
|
|
1662
|
+
} else {
|
|
1663
|
+
return '';
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
/***/ }),
|
|
1669
|
+
|
|
1670
|
+
/***/ 26:
|
|
1671
|
+
/***/ (function(module, exports) {
|
|
1672
|
+
|
|
1673
|
+
module.exports = require("tinycolor2");
|
|
1674
|
+
|
|
1675
|
+
/***/ }),
|
|
1676
|
+
|
|
1677
|
+
/***/ 38:
|
|
1678
|
+
/***/ (function(module, exports) {
|
|
1679
|
+
|
|
1680
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_utils/statistics.js");
|
|
1681
|
+
|
|
1682
|
+
/***/ }),
|
|
1683
|
+
|
|
1684
|
+
/***/ 43:
|
|
1685
|
+
/***/ (function(module, exports) {
|
|
1686
|
+
|
|
1687
|
+
module.exports = require("@babel/runtime/regenerator");
|
|
1688
|
+
|
|
1689
|
+
/***/ }),
|
|
1690
|
+
|
|
1691
|
+
/***/ 44:
|
|
1692
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1693
|
+
|
|
1694
|
+
"use strict";
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
1698
|
+
|
|
1699
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1700
|
+
value: true
|
|
1701
|
+
});
|
|
1702
|
+
exports.clearNumberComma = clearNumberComma;
|
|
1703
|
+
exports.filterInvalidData = filterInvalidData;
|
|
1704
|
+
exports.formatFontSize = formatFontSize;
|
|
1705
|
+
exports.getColorWithOpacity = getColorWithOpacity;
|
|
1706
|
+
exports.getDarkenColor = getDarkenColor;
|
|
1707
|
+
exports.getDataType = getDataType;
|
|
1708
|
+
exports.getDateTime = getDateTime;
|
|
1709
|
+
exports.getDerivedColorsByTextColor = getDerivedColorsByTextColor;
|
|
1710
|
+
exports.getFeatureCenter = getFeatureCenter;
|
|
1711
|
+
exports.getValueCaseInsensitive = getValueCaseInsensitive;
|
|
1712
|
+
exports.handleDataParentRes = handleDataParentRes;
|
|
1713
|
+
exports.handleWithCredentials = handleWithCredentials;
|
|
1714
|
+
exports.hexToRgba = hexToRgba;
|
|
1715
|
+
exports.isDate = isDate;
|
|
1716
|
+
exports.isMatchUrl = isMatchUrl;
|
|
1717
|
+
exports.isNumber = isNumber;
|
|
1718
|
+
exports.isTransparent = isTransparent;
|
|
1719
|
+
exports.isXField = isXField;
|
|
1720
|
+
exports.isYField = isYField;
|
|
1721
|
+
exports.numberEqual = numberEqual;
|
|
1722
|
+
exports.objectWithoutProperties = objectWithoutProperties;
|
|
1723
|
+
exports.parseUrl = parseUrl;
|
|
1724
|
+
exports.reservedDecimal = reservedDecimal;
|
|
1725
|
+
exports.setPopupArrowStyle = setPopupArrowStyle;
|
|
1726
|
+
exports.statisticFunctions = void 0;
|
|
1727
|
+
exports.strip = strip;
|
|
1728
|
+
exports.urlAppend = urlAppend;
|
|
1729
|
+
|
|
1730
|
+
var _index = __webpack_require__(13);
|
|
1731
|
+
|
|
1732
|
+
var _colorcolor = _interopRequireDefault(__webpack_require__(45));
|
|
1733
|
+
|
|
1734
|
+
var _center = _interopRequireDefault(__webpack_require__(25));
|
|
1735
|
+
|
|
1736
|
+
var _omit = _interopRequireDefault(__webpack_require__(46));
|
|
1737
|
+
|
|
1738
|
+
var _tinycolor = _interopRequireDefault(__webpack_require__(26));
|
|
1739
|
+
|
|
1740
|
+
var _simpleStatistics = __webpack_require__(47);
|
|
1741
|
+
|
|
1742
|
+
// 获取当前时间返回置顶格式
|
|
1743
|
+
function getDateTime(timeType) {
|
|
1744
|
+
return (0, _index.geti18n)().d(new Date(), timeType.replace(/\+/g, '_'));
|
|
1745
|
+
} // hex -> rgba
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
function hexToRgba(hex, opacity) {
|
|
1749
|
+
return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ',' + parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
function formatFontSize(fontSize) {
|
|
1753
|
+
return typeof fontSize === 'number' ? fontSize + 'px' : fontSize;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
function isTransparent(color) {
|
|
1757
|
+
var rgba = (0, _colorcolor.default)(color, 'rgba');
|
|
1758
|
+
return +rgba.match(/(\d(\.\d+)?)+/g)[3] === 0;
|
|
1759
|
+
} // 保留指定位数的小数
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
function reservedDecimal(val, precise) {
|
|
1763
|
+
return Number(val).toFixed(precise);
|
|
1764
|
+
} // 清除数字(字符串型的)的逗号
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
function clearNumberComma(num) {
|
|
1768
|
+
if (num.replace) {
|
|
1769
|
+
num = num.replace(/,/g, '');
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
return num;
|
|
1773
|
+
}
|
|
1774
|
+
/**
|
|
1775
|
+
* 判断是否地理X坐标
|
|
1776
|
+
* @param data
|
|
1777
|
+
*/
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
function isXField(data) {
|
|
1781
|
+
var lowerdata = data.toLowerCase();
|
|
1782
|
+
return lowerdata === 'x' || lowerdata === 'smx' || lowerdata === 'jd' || lowerdata === '经度' || lowerdata === '东经' || lowerdata === 'longitude' || lowerdata === 'lot' || lowerdata === 'lon' || lowerdata === 'long' || lowerdata === 'lng' || lowerdata === 'x坐标';
|
|
1783
|
+
}
|
|
1784
|
+
/**
|
|
1785
|
+
* 判断是否地理Y坐标
|
|
1786
|
+
* @param data
|
|
1787
|
+
*/
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
function isYField(data) {
|
|
1791
|
+
var lowerdata = data.toLowerCase();
|
|
1792
|
+
return lowerdata === 'y' || lowerdata === 'smy' || lowerdata === 'wd' || lowerdata === '纬度' || lowerdata === '北纬' || lowerdata === 'latitude' || lowerdata === 'lat' || lowerdata === 'y坐标';
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
function getColorWithOpacity(color, opacity, isStack) {
|
|
1796
|
+
if (isStack === void 0) {
|
|
1797
|
+
isStack = true;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
if (!color) {
|
|
1801
|
+
return color;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
var originColor = (0, _tinycolor.default)(color);
|
|
1805
|
+
var originOpacity = originColor.getAlpha();
|
|
1806
|
+
|
|
1807
|
+
if (isStack) {
|
|
1808
|
+
originColor.setAlpha(originOpacity * opacity);
|
|
1809
|
+
} else {
|
|
1810
|
+
originColor.setAlpha(opacity);
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
var nextColor = originColor.toRgbString();
|
|
1814
|
+
return nextColor;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
function getDerivedColorsByTextColor(textColor, opacity) {
|
|
1818
|
+
if (!textColor) {
|
|
1819
|
+
return textColor;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
if (textColor.includes('var')) {
|
|
1823
|
+
return "var(--alpha" + opacity * 100 + ")";
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
var baseTextColorOpacity = 0.65;
|
|
1827
|
+
var originTextColor = (0, _tinycolor.default)(textColor);
|
|
1828
|
+
var originOpacity = originTextColor.getAlpha();
|
|
1829
|
+
originTextColor.setAlpha(originOpacity * opacity / baseTextColorOpacity);
|
|
1830
|
+
var derivedColor = originTextColor.toRgbString();
|
|
1831
|
+
return derivedColor;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
function parseUrl(url) {
|
|
1835
|
+
var urlRe = /^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;
|
|
1836
|
+
return url.match(urlRe);
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
function getDataType(data) {
|
|
1840
|
+
return Object.prototype.toString.call(data);
|
|
1841
|
+
} // 判断输入的地址是否符合地址格式
|
|
1842
|
+
|
|
1843
|
+
|
|
1844
|
+
function isMatchUrl(str) {
|
|
1845
|
+
var reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
|
|
1846
|
+
return reg.test(str);
|
|
1847
|
+
} // 判断是否为日期
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
function isDate(data) {
|
|
1851
|
+
var reg = /((^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(10|12|0?[13578])([-\/\._])(3[01]|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(11|0?[469])([-\/\._])(30|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(0?2)([-\/\._])(2[0-8]|1[0-9]|0?[1-9])$)|(^([2468][048]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([3579][26]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][13579][26])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][13579][26])([-\/\._])(0?2)([-\/\._])(29)$))/gi;
|
|
1852
|
+
return reg.test(data);
|
|
1853
|
+
} // 判断是否为数值
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
function isNumber(data) {
|
|
1857
|
+
var mdata = Number(data);
|
|
1858
|
+
|
|
1859
|
+
if (mdata === 0) {
|
|
1860
|
+
return true;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
return !isNaN(mdata);
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
function getFeatureCenter(feature) {
|
|
1867
|
+
var coordinates = ((feature || {}).geometry || {}).coordinates;
|
|
1868
|
+
var hasCoordinates = coordinates && !!coordinates.length;
|
|
1869
|
+
|
|
1870
|
+
if (!hasCoordinates) {
|
|
1871
|
+
return;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
var featureType = feature.geometry.type;
|
|
1875
|
+
var center;
|
|
1876
|
+
|
|
1877
|
+
if (featureType === 'LineString') {
|
|
1878
|
+
center = coordinates[parseInt(coordinates.length / 2)];
|
|
1879
|
+
} else if (featureType === 'MultiLineString') {
|
|
1880
|
+
var coord = coordinates[parseInt(coordinates.length / 2)];
|
|
1881
|
+
center = coord[parseInt(coord.length / 2)];
|
|
1882
|
+
} else {
|
|
1883
|
+
center = (0, _center.default)(feature).geometry.coordinates;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
return center;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
function getValueCaseInsensitive(properties, searchKey) {
|
|
1890
|
+
var isObj = getDataType(properties) === '[object Object]';
|
|
1891
|
+
|
|
1892
|
+
if (!searchKey || !isObj) {
|
|
1893
|
+
return '';
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
var lowerSearchKey = searchKey.toLocaleLowerCase();
|
|
1897
|
+
|
|
1898
|
+
for (var key in properties) {
|
|
1899
|
+
if (key.toLocaleLowerCase() === lowerSearchKey) {
|
|
1900
|
+
return properties[key];
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
return '';
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
function filterInvalidData(datasetOptions, features) {
|
|
1908
|
+
var xFields = datasetOptions.map(function (item) {
|
|
1909
|
+
return item.xField;
|
|
1910
|
+
});
|
|
1911
|
+
var yFields = datasetOptions.map(function (item) {
|
|
1912
|
+
return item.yField;
|
|
1913
|
+
});
|
|
1914
|
+
var nextFeatures = features.filter(function (feature) {
|
|
1915
|
+
var matchXField = xFields.find(function (item) {
|
|
1916
|
+
return Object.prototype.hasOwnProperty.call(feature.properties, item);
|
|
1917
|
+
});
|
|
1918
|
+
var matchYField = yFields.find(function (item) {
|
|
1919
|
+
return ![undefined, null, ''].includes(feature.properties[item]);
|
|
1920
|
+
});
|
|
1921
|
+
return !!(matchXField && matchYField);
|
|
1922
|
+
});
|
|
1923
|
+
return nextFeatures;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
function handleWithCredentials(url, iportalServiceProxyUrl, defaultValue) {
|
|
1927
|
+
if (defaultValue === void 0) {
|
|
1928
|
+
defaultValue = false;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
if (!iportalServiceProxyUrl) {
|
|
1932
|
+
return defaultValue;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
return url.indexOf(iportalServiceProxyUrl) >= 0 || defaultValue;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
function handleDataParentRes(url, parentResId, parentResType) {
|
|
1939
|
+
if (parentResType === void 0) {
|
|
1940
|
+
parentResType = 'DATA';
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
if (!parentResId) {
|
|
1944
|
+
return url;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
return urlAppend(url, "parentResType=" + parentResType + "&parentResId=" + parentResId);
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
function urlAppend(url, paramStr) {
|
|
1951
|
+
var newUrl = url;
|
|
1952
|
+
|
|
1953
|
+
if (paramStr) {
|
|
1954
|
+
if (paramStr.indexOf('?') === 0) {
|
|
1955
|
+
paramStr = paramStr.substring(1);
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
var parts = (url + ' ').split(/[?&]/);
|
|
1959
|
+
newUrl += parts.pop() === ' ' ? paramStr : parts.length ? '&' + paramStr : '?' + paramStr;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
return newUrl;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
function objectWithoutProperties(obj, omitKeys) {
|
|
1966
|
+
if (omitKeys === void 0) {
|
|
1967
|
+
omitKeys = [];
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
return (0, _omit.default)(obj, omitKeys);
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
function getDarkenColor(color, amount) {
|
|
1974
|
+
return (0, _tinycolor.default)(color).darken(amount).toString();
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
var ARROW_POSITION_MAP = {
|
|
1978
|
+
top: 'Bottom',
|
|
1979
|
+
bottom: 'Top',
|
|
1980
|
+
left: 'Right',
|
|
1981
|
+
right: 'Left'
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1984
|
+
function setPopupArrowStyle(color) {
|
|
1985
|
+
var popup = document.querySelectorAll('.sm-mapboxgl-tabel-popup');
|
|
1986
|
+
|
|
1987
|
+
if (popup) {
|
|
1988
|
+
popup.forEach(function (item) {
|
|
1989
|
+
var position = item.className.replace(/.+mapboxgl-popup-anchor-([a-z]+)/, '$1');
|
|
1990
|
+
|
|
1991
|
+
if (ARROW_POSITION_MAP[position]) {
|
|
1992
|
+
var popupArrow = item.querySelector('.mapboxgl-popup-tip');
|
|
1993
|
+
|
|
1994
|
+
if (popupArrow) {
|
|
1995
|
+
popupArrow.style["border" + ARROW_POSITION_MAP[position] + "Color"] = color;
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
function strip(num, precision) {
|
|
2003
|
+
if (precision === void 0) {
|
|
2004
|
+
precision = 12;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
if (typeof num === 'number') {
|
|
2008
|
+
return +parseFloat(num.toPrecision(precision));
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
function numberEqual(num1, num2, precision) {
|
|
2013
|
+
if (precision === void 0) {
|
|
2014
|
+
precision = 10E-6;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
return Math.abs(+num1 - +num2) <= precision;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
var statisticFunctions = exports.statisticFunctions = {
|
|
2021
|
+
min: _simpleStatistics.min,
|
|
2022
|
+
max: _simpleStatistics.max,
|
|
2023
|
+
mean: _simpleStatistics.mean,
|
|
2024
|
+
sum: _simpleStatistics.sum,
|
|
2025
|
+
mode: _simpleStatistics.mode,
|
|
2026
|
+
median: _simpleStatistics.median,
|
|
2027
|
+
variance: _simpleStatistics.variance,
|
|
2028
|
+
standardDeviation: _simpleStatistics.standardDeviation,
|
|
2029
|
+
count: function count(fieldValues) {
|
|
2030
|
+
return fieldValues.length;
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
2033
|
+
|
|
2034
|
+
/***/ }),
|
|
2035
|
+
|
|
2036
|
+
/***/ 45:
|
|
2037
|
+
/***/ (function(module, exports) {
|
|
2038
|
+
|
|
2039
|
+
module.exports = require("colorcolor");
|
|
2040
|
+
|
|
2041
|
+
/***/ }),
|
|
2042
|
+
|
|
2043
|
+
/***/ 46:
|
|
2044
|
+
/***/ (function(module, exports) {
|
|
2045
|
+
|
|
2046
|
+
module.exports = require("omit.js");
|
|
2047
|
+
|
|
2048
|
+
/***/ }),
|
|
2049
|
+
|
|
2050
|
+
/***/ 47:
|
|
2051
|
+
/***/ (function(module, exports) {
|
|
2052
|
+
|
|
2053
|
+
module.exports = require("simple-statistics");
|
|
2054
|
+
|
|
2055
|
+
/***/ }),
|
|
2056
|
+
|
|
2057
|
+
/***/ 520:
|
|
2058
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2059
|
+
|
|
2060
|
+
"use strict";
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
2064
|
+
|
|
2065
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2066
|
+
value: true
|
|
2067
|
+
});
|
|
2068
|
+
exports.default = void 0;
|
|
2069
|
+
|
|
2070
|
+
var _regenerator = _interopRequireDefault(__webpack_require__(43));
|
|
2071
|
+
|
|
2072
|
+
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));
|
|
2073
|
+
|
|
2074
|
+
var _Events2 = __webpack_require__(20);
|
|
2075
|
+
|
|
2076
|
+
var _MunicipalCenter = _interopRequireDefault(__webpack_require__(521));
|
|
2077
|
+
|
|
2078
|
+
var _ProvinceCenter = _interopRequireDefault(__webpack_require__(522));
|
|
2079
|
+
|
|
2080
|
+
__webpack_require__(248);
|
|
2081
|
+
|
|
2082
|
+
__webpack_require__(523);
|
|
2083
|
+
|
|
2084
|
+
var _lodash = _interopRequireDefault(__webpack_require__(524));
|
|
2085
|
+
|
|
2086
|
+
var _canvg = _interopRequireDefault(__webpack_require__(525));
|
|
2087
|
+
|
|
2088
|
+
var _WebMapService = _interopRequireDefault(__webpack_require__(251));
|
|
2089
|
+
|
|
2090
|
+
var _util = __webpack_require__(44);
|
|
2091
|
+
|
|
2092
|
+
var _epsgDefine = __webpack_require__(254);
|
|
2093
|
+
|
|
2094
|
+
var _meta = __webpack_require__(526);
|
|
2095
|
+
|
|
2096
|
+
var _lodash2 = _interopRequireDefault(__webpack_require__(527));
|
|
2097
|
+
|
|
2098
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
2099
|
+
function adopt(value) {
|
|
2100
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
2101
|
+
resolve(value);
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2106
|
+
function fulfilled(value) {
|
|
2107
|
+
try {
|
|
2108
|
+
step(generator.next(value));
|
|
2109
|
+
} catch (e) {
|
|
2110
|
+
reject(e);
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
function rejected(value) {
|
|
2115
|
+
try {
|
|
2116
|
+
step(generator["throw"](value));
|
|
2117
|
+
} catch (e) {
|
|
2118
|
+
reject(e);
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
function step(result) {
|
|
2123
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2127
|
+
});
|
|
2128
|
+
};
|
|
2129
|
+
|
|
2130
|
+
var MAX_MIGRATION_ANIMATION_COUNT = 1000;
|
|
2131
|
+
|
|
2132
|
+
var WebMapBase = exports.default = /*#__PURE__*/function (_Events) {
|
|
2133
|
+
(0, _inheritsLoose2.default)(WebMapBase, _Events);
|
|
2134
|
+
|
|
2135
|
+
function WebMapBase(id, options, mapOptions) {
|
|
2136
|
+
var _this;
|
|
2137
|
+
|
|
2138
|
+
_this = _Events.call(this) || this;
|
|
2139
|
+
_this.echartslayer = [];
|
|
2140
|
+
_this._layers = [];
|
|
2141
|
+
_this.canvgsV = [];
|
|
2142
|
+
_this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
|
|
2143
|
+
_this.accessToken = options.accessToken;
|
|
2144
|
+
_this.accessKey = options.accessKey;
|
|
2145
|
+
_this.tiandituKey = options.tiandituKey || '';
|
|
2146
|
+
_this.googleMapsAPIKey = options.googleMapsAPIKey || '';
|
|
2147
|
+
_this.bingMapsKey = options.bingMapsKey || '';
|
|
2148
|
+
_this.googleMapsLanguage = options.googleMapsLanguage || 'zh-CN';
|
|
2149
|
+
_this.withCredentials = options.withCredentials || false;
|
|
2150
|
+
_this.proxy = options.proxy;
|
|
2151
|
+
_this.target = options.target || 'map';
|
|
2152
|
+
_this.excludePortalProxyUrl = options.excludePortalProxyUrl;
|
|
2153
|
+
_this.isSuperMapOnline = options.isSuperMapOnline;
|
|
2154
|
+
_this.ignoreBaseProjection = options.ignoreBaseProjection;
|
|
2155
|
+
_this.echartslayer = [];
|
|
2156
|
+
_this.webMapService = new _WebMapService.default(id, options);
|
|
2157
|
+
_this.mapOptions = mapOptions;
|
|
2158
|
+
_this.eventTypes = ['getmapinfofailed', 'crsnotsupport', 'getlayerdatasourcefailed', 'addlayerssucceeded', 'notsupportmvt', 'notsupportbaidumap', 'projectionIsNotMatch', 'beforeremovemap', 'mapinitialized'];
|
|
2159
|
+
_this.mapId = id;
|
|
2160
|
+
return _this;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
var _proto = WebMapBase.prototype;
|
|
2164
|
+
|
|
2165
|
+
_proto.echartsLayerResize = function echartsLayerResize() {
|
|
2166
|
+
this.echartslayer.forEach(function (echartslayer) {
|
|
2167
|
+
echartslayer.chart.resize();
|
|
2168
|
+
});
|
|
2169
|
+
};
|
|
2170
|
+
|
|
2171
|
+
_proto.setMapId = function setMapId(mapId) {
|
|
2172
|
+
var _this2 = this;
|
|
2173
|
+
|
|
2174
|
+
if (typeof mapId === 'string' || typeof mapId === 'number') {
|
|
2175
|
+
this.mapId = mapId;
|
|
2176
|
+
this.webMapInfo = null;
|
|
2177
|
+
} else if (mapId !== null && typeof mapId === 'object') {
|
|
2178
|
+
this.webMapInfo = mapId;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
this.webMapService.setMapId(mapId);
|
|
2182
|
+
|
|
2183
|
+
if (!mapId) {
|
|
2184
|
+
return;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
setTimeout(function () {
|
|
2188
|
+
_this2._initWebMap();
|
|
2189
|
+
}, 0);
|
|
2190
|
+
};
|
|
2191
|
+
|
|
2192
|
+
_proto.setServerUrl = function setServerUrl(serverUrl) {
|
|
2193
|
+
this.serverUrl = serverUrl;
|
|
2194
|
+
this.webMapService.setServerUrl(serverUrl);
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
_proto.setWithCredentials = function setWithCredentials(withCredentials) {
|
|
2198
|
+
this.withCredentials = withCredentials;
|
|
2199
|
+
this.webMapService.setWithCredentials(withCredentials);
|
|
2200
|
+
};
|
|
2201
|
+
|
|
2202
|
+
_proto.setProxy = function setProxy(proxy) {
|
|
2203
|
+
this.proxy = proxy;
|
|
2204
|
+
this.webMapService.setProxy(proxy);
|
|
2205
|
+
};
|
|
2206
|
+
|
|
2207
|
+
_proto.setZoom = function setZoom(zoom) {
|
|
2208
|
+
if (this.map) {
|
|
2209
|
+
this.mapOptions.zoom = zoom;
|
|
2210
|
+
|
|
2211
|
+
if (zoom !== +this.map.getZoom().toFixed(2)) {
|
|
2212
|
+
(zoom || zoom === 0) && this.map.setZoom(zoom, {
|
|
2213
|
+
from: 'setZoom'
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
};
|
|
2218
|
+
|
|
2219
|
+
_proto.setMaxBounds = function setMaxBounds(maxBounds) {
|
|
2220
|
+
if (this.map) {
|
|
2221
|
+
this.mapOptions.maxBounds = maxBounds;
|
|
2222
|
+
maxBounds && this.map.setMaxBounds(maxBounds);
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
|
|
2226
|
+
_proto.setMinZoom = function setMinZoom(minZoom) {
|
|
2227
|
+
if (this.map) {
|
|
2228
|
+
this.mapOptions.minZoom = minZoom;
|
|
2229
|
+
(minZoom || minZoom === 0) && this.map.setMinZoom(minZoom);
|
|
2230
|
+
}
|
|
2231
|
+
};
|
|
2232
|
+
|
|
2233
|
+
_proto.setMaxZoom = function setMaxZoom(maxZoom) {
|
|
2234
|
+
if (this.map) {
|
|
2235
|
+
this.mapOptions.maxZoom = maxZoom;
|
|
2236
|
+
(maxZoom || maxZoom === 0) && this.map.setMaxZoom(maxZoom);
|
|
2237
|
+
}
|
|
2238
|
+
};
|
|
2239
|
+
|
|
2240
|
+
_proto.initWebMap = function initWebMap() {
|
|
2241
|
+
this.clean();
|
|
2242
|
+
this.serverUrl = this.serverUrl && this.webMapService.handleServerUrl(this.serverUrl);
|
|
2243
|
+
|
|
2244
|
+
if (this.webMapInfo) {
|
|
2245
|
+
var mapInfo = this.webMapInfo;
|
|
2246
|
+
mapInfo.mapParams = {
|
|
2247
|
+
title: this.webMapInfo.title,
|
|
2248
|
+
description: this.webMapInfo.description
|
|
2249
|
+
};
|
|
2250
|
+
this.mapParams = mapInfo.mapParams;
|
|
2251
|
+
|
|
2252
|
+
this._getMapInfo(mapInfo);
|
|
2253
|
+
|
|
2254
|
+
return;
|
|
2255
|
+
} else if (!this.mapId || !this.serverUrl) {
|
|
2256
|
+
this._createMap();
|
|
2257
|
+
|
|
2258
|
+
return;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
this._taskID = new Date();
|
|
2262
|
+
this.getMapInfo(this._taskID);
|
|
2263
|
+
};
|
|
2264
|
+
|
|
2265
|
+
_proto.getMapInfo = function getMapInfo(_taskID) {
|
|
2266
|
+
var _this3 = this;
|
|
2267
|
+
|
|
2268
|
+
this.serverUrl = this.serverUrl && this.webMapService.handleServerUrl(this.serverUrl);
|
|
2269
|
+
this.webMapService.getMapInfo().then(function (mapInfo) {
|
|
2270
|
+
if (_this3._taskID !== _taskID) {
|
|
2271
|
+
return;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
_this3.mapParams = mapInfo.mapParams;
|
|
2275
|
+
|
|
2276
|
+
_this3._getMapInfo(mapInfo, _taskID);
|
|
2277
|
+
}, function (error) {
|
|
2278
|
+
throw error;
|
|
2279
|
+
}).catch(function (error) {
|
|
2280
|
+
_this3.triggerEvent('getmapinfofailed', {
|
|
2281
|
+
error: error
|
|
2282
|
+
});
|
|
2283
|
+
|
|
2284
|
+
console.log(error);
|
|
2285
|
+
});
|
|
2286
|
+
};
|
|
2287
|
+
|
|
2288
|
+
_proto.getBaseLayerType = function getBaseLayerType(layerInfo) {
|
|
2289
|
+
var layerType = layerInfo.layerType;
|
|
2290
|
+
|
|
2291
|
+
if (layerType.indexOf('TIANDITU_VEC') > -1 || layerType.indexOf('TIANDITU_IMG') > -1 || layerType.indexOf('TIANDITU_TER') > -1) {
|
|
2292
|
+
layerType = 'TIANDITU';
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
switch (layerType) {
|
|
2296
|
+
case 'TILE':
|
|
2297
|
+
case 'SUPERMAP_REST':
|
|
2298
|
+
return 'TILE';
|
|
2299
|
+
|
|
2300
|
+
case 'CLOUD':
|
|
2301
|
+
case 'CLOUD_BLACK':
|
|
2302
|
+
return 'CLOUD';
|
|
2303
|
+
|
|
2304
|
+
case 'OSM':
|
|
2305
|
+
case 'JAPAN_ORT':
|
|
2306
|
+
case 'JAPAN_RELIEF':
|
|
2307
|
+
case 'JAPAN_PALE':
|
|
2308
|
+
case 'JAPAN_STD':
|
|
2309
|
+
case 'GOOGLE_CN':
|
|
2310
|
+
case 'GOOGLE':
|
|
2311
|
+
return 'XYZ';
|
|
2312
|
+
|
|
2313
|
+
default:
|
|
2314
|
+
return layerType;
|
|
2315
|
+
}
|
|
2316
|
+
};
|
|
2317
|
+
|
|
2318
|
+
_proto.getMapurls = function getMapurls(mapurl) {
|
|
2319
|
+
if (mapurl === void 0) {
|
|
2320
|
+
mapurl = {};
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
var mapUrls = {
|
|
2324
|
+
CLOUD: mapurl.CLOUD || 'http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}',
|
|
2325
|
+
CLOUD_BLACK: mapurl.CLOUD_BLACK || 'http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}',
|
|
2326
|
+
OSM: mapurl.OSM || 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
2327
|
+
GOOGLE: 'https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i{z}!2i{x}!3i{y}!4i256!2m3!1e0!2sm!3i540264686!3m12!2s{googleMapsLanguage}!3sUS!5e18!12m4!1e68!2m2!1sset!2sRoadmap!12m3!1e37!2m1!1ssmartmaps!4e0&key={googleMapsAPIKey}',
|
|
2328
|
+
GOOGLE_CN: 'https://mt{0-3}.google.com/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}',
|
|
2329
|
+
JAPAN_STD: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
|
|
2330
|
+
JAPAN_PALE: 'https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png',
|
|
2331
|
+
JAPAN_RELIEF: 'https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png',
|
|
2332
|
+
JAPAN_ORT: 'https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg'
|
|
2333
|
+
};
|
|
2334
|
+
return mapUrls;
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2337
|
+
_proto.getLayerFeatures = function getLayerFeatures(layer, _taskID, type) {
|
|
2338
|
+
var _this4 = this;
|
|
2339
|
+
|
|
2340
|
+
var getLayerFunc = this.webMapService.getLayerFeatures(type, layer, this.baseProjection);
|
|
2341
|
+
getLayerFunc && getLayerFunc.then(function (result) {
|
|
2342
|
+
return __awaiter(_this4, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
2343
|
+
var epsgWKT;
|
|
2344
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
2345
|
+
while (1) switch (_context.prev = _context.next) {
|
|
2346
|
+
case 0:
|
|
2347
|
+
if (!(this.mapId && this._taskID !== _taskID)) {
|
|
2348
|
+
_context.next = 2;
|
|
2349
|
+
break;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
return _context.abrupt("return");
|
|
2353
|
+
|
|
2354
|
+
case 2:
|
|
2355
|
+
if (!(result && layer.projection)) {
|
|
2356
|
+
_context.next = 8;
|
|
2357
|
+
break;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
if ((0, _epsgDefine.getProjection)(layer.projection)) {
|
|
2361
|
+
_context.next = 8;
|
|
2362
|
+
break;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
_context.next = 6;
|
|
2366
|
+
return this.webMapService.getEpsgCodeInfo(layer.projection.split(':')[1], this.serverUrl);
|
|
2367
|
+
|
|
2368
|
+
case 6:
|
|
2369
|
+
epsgWKT = _context.sent;
|
|
2370
|
+
|
|
2371
|
+
if (epsgWKT) {
|
|
2372
|
+
(0, _epsgDefine.registerProjection)(layer.projection, epsgWKT);
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
case 8:
|
|
2376
|
+
this._getLayerFeaturesSucceeded(result, layer);
|
|
2377
|
+
|
|
2378
|
+
case 9:
|
|
2379
|
+
case "end":
|
|
2380
|
+
return _context.stop();
|
|
2381
|
+
}
|
|
2382
|
+
}, _callee, this);
|
|
2383
|
+
}));
|
|
2384
|
+
}, function (error) {
|
|
2385
|
+
throw new Error(error);
|
|
2386
|
+
}).catch(function (error) {
|
|
2387
|
+
_this4._addLayerSucceeded();
|
|
2388
|
+
|
|
2389
|
+
_this4.triggerEvent('getlayerdatasourcefailed', {
|
|
2390
|
+
error: error,
|
|
2391
|
+
layer: layer,
|
|
2392
|
+
map: _this4.map
|
|
2393
|
+
});
|
|
2394
|
+
|
|
2395
|
+
console.log(error);
|
|
2396
|
+
});
|
|
2397
|
+
};
|
|
2398
|
+
|
|
2399
|
+
_proto.setFeatureInfo = function setFeatureInfo(feature) {
|
|
2400
|
+
var featureInfo;
|
|
2401
|
+
var info = feature.dv_v5_markerInfo;
|
|
2402
|
+
|
|
2403
|
+
if (info && info.dataViz_title) {
|
|
2404
|
+
featureInfo = info;
|
|
2405
|
+
} else {
|
|
2406
|
+
return info;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
var properties = feature.properties;
|
|
2410
|
+
|
|
2411
|
+
for (var key in featureInfo) {
|
|
2412
|
+
if (properties[key]) {
|
|
2413
|
+
featureInfo[key] = properties[key];
|
|
2414
|
+
delete properties[key];
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
return featureInfo;
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
_proto.getRankStyleGroup = function getRankStyleGroup(themeField, features, parameters) {
|
|
2422
|
+
var values = [];
|
|
2423
|
+
var segements = [];
|
|
2424
|
+
var style = parameters.style;
|
|
2425
|
+
var themeSetting = parameters.themeSetting;
|
|
2426
|
+
var segmentMethod = themeSetting.segmentMethod;
|
|
2427
|
+
var segmentCount = themeSetting.segmentCount;
|
|
2428
|
+
var customSettings = themeSetting.customSettings;
|
|
2429
|
+
var minR = parameters.themeSetting.minRadius;
|
|
2430
|
+
var maxR = parameters.themeSetting.maxRadius;
|
|
2431
|
+
var colors = themeSetting.colors;
|
|
2432
|
+
var fillColor = style.fillColor;
|
|
2433
|
+
features.forEach(function (feature) {
|
|
2434
|
+
var properties = feature.properties;
|
|
2435
|
+
var value = properties[themeField];
|
|
2436
|
+
|
|
2437
|
+
if (value == null || value === '' || !(0, _lodash.default)(+value)) {
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
values.push(Number(value));
|
|
2442
|
+
});
|
|
2443
|
+
|
|
2444
|
+
try {
|
|
2445
|
+
segements = SuperMap.ArrayStatistic.getArraySegments(values, segmentMethod, segmentCount);
|
|
2446
|
+
} catch (error) {
|
|
2447
|
+
console.log(error);
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
for (var i = 0; i < segmentCount; i++) {
|
|
2451
|
+
if (i in customSettings) {
|
|
2452
|
+
var startValue = customSettings[i].segment.start;
|
|
2453
|
+
var endValue = customSettings[i].segment.end;
|
|
2454
|
+
startValue != null && (segements[i] = startValue);
|
|
2455
|
+
endValue != null && (segements[i + 1] = endValue);
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
var styleGroup = [];
|
|
2460
|
+
|
|
2461
|
+
if (segements && segements.length) {
|
|
2462
|
+
var len = segements.length;
|
|
2463
|
+
var incrementR = (maxR - minR) / (len - 1);
|
|
2464
|
+
var start;
|
|
2465
|
+
var end;
|
|
2466
|
+
var radius = Number(((maxR + minR) / 2).toFixed(2));
|
|
2467
|
+
var color = '';
|
|
2468
|
+
var rangeColors = colors ? SuperMap.ColorsPickerUtil.getGradientColors(colors, len, 'RANGE') : [];
|
|
2469
|
+
|
|
2470
|
+
for (var _i = 0; _i < len - 1; _i++) {
|
|
2471
|
+
start = Number(segements[_i].toFixed(2));
|
|
2472
|
+
end = Number(segements[_i + 1].toFixed(2));
|
|
2473
|
+
radius = start === end ? radius : minR + Math.round(incrementR * _i);
|
|
2474
|
+
end = _i === len - 2 ? end + 0.01 : end;
|
|
2475
|
+
radius = customSettings[_i] && customSettings[_i].radius ? customSettings[_i].radius : radius;
|
|
2476
|
+
style.radius = radius;
|
|
2477
|
+
|
|
2478
|
+
if (colors && colors.length > 0) {
|
|
2479
|
+
color = customSettings[_i] && customSettings[_i].color ? customSettings[_i].color : rangeColors[_i] || fillColor;
|
|
2480
|
+
style.fillColor = color;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
styleGroup.push({
|
|
2484
|
+
radius: radius,
|
|
2485
|
+
color: color,
|
|
2486
|
+
start: start,
|
|
2487
|
+
end: end,
|
|
2488
|
+
style: style
|
|
2489
|
+
});
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
return styleGroup;
|
|
2493
|
+
} else {
|
|
2494
|
+
return false;
|
|
2495
|
+
}
|
|
2496
|
+
};
|
|
2497
|
+
|
|
2498
|
+
_proto.createRankStyleSource = function createRankStyleSource(parameters, features) {
|
|
2499
|
+
var themeSetting = parameters.themeSetting;
|
|
2500
|
+
var themeField = themeSetting.themeField;
|
|
2501
|
+
var styleGroups = this.getRankStyleGroup(themeField, features, parameters);
|
|
2502
|
+
return styleGroups ? {
|
|
2503
|
+
parameters: parameters,
|
|
2504
|
+
styleGroups: styleGroups
|
|
2505
|
+
} : false;
|
|
2506
|
+
};
|
|
2507
|
+
|
|
2508
|
+
_proto.isMatchAdministrativeName = function isMatchAdministrativeName(featureName, fieldName) {
|
|
2509
|
+
var isString = typeof fieldName === 'string' && fieldName.constructor === String;
|
|
2510
|
+
|
|
2511
|
+
if (isString) {
|
|
2512
|
+
var shortName = featureName.substr(0, 2);
|
|
2513
|
+
|
|
2514
|
+
if (shortName === '张家') {
|
|
2515
|
+
shortName = featureName.substr(0, 3);
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
return !!fieldName.match(new RegExp(shortName));
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
return false;
|
|
2522
|
+
};
|
|
2523
|
+
|
|
2524
|
+
_proto.getRestMapLayerInfo = function getRestMapLayerInfo(restMapInfo, layer) {
|
|
2525
|
+
var bounds = restMapInfo.bounds,
|
|
2526
|
+
coordUnit = restMapInfo.coordUnit,
|
|
2527
|
+
visibleScales = restMapInfo.visibleScales,
|
|
2528
|
+
url = restMapInfo.url;
|
|
2529
|
+
layer.layerType = 'TILE';
|
|
2530
|
+
layer.orginEpsgCode = this.baseProjection;
|
|
2531
|
+
layer.units = coordUnit && coordUnit.toLowerCase();
|
|
2532
|
+
layer.extent = [bounds.left, bounds.bottom, bounds.right, bounds.top];
|
|
2533
|
+
layer.visibleScales = visibleScales;
|
|
2534
|
+
layer.url = url;
|
|
2535
|
+
layer.sourceType = 'TILE';
|
|
2536
|
+
return layer;
|
|
2537
|
+
};
|
|
2538
|
+
|
|
2539
|
+
_proto.handleLayerFeatures = function handleLayerFeatures(features, layerInfo) {
|
|
2540
|
+
var layerType = layerInfo.layerType,
|
|
2541
|
+
style = layerInfo.style,
|
|
2542
|
+
themeSetting = layerInfo.themeSetting,
|
|
2543
|
+
filterCondition = layerInfo.filterCondition;
|
|
2544
|
+
|
|
2545
|
+
if ((style || themeSetting) && filterCondition) {
|
|
2546
|
+
if (layerType !== 'RANGE' && layerType !== 'UNIQUE' && layerType !== 'RANK_SYMBOL') {
|
|
2547
|
+
features = this.getFilterFeatures(filterCondition, features);
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
return features;
|
|
2552
|
+
};
|
|
2553
|
+
|
|
2554
|
+
_proto.mergeFeatures = function mergeFeatures(layerId, features, mergeByField) {
|
|
2555
|
+
if (!(features instanceof Array)) {
|
|
2556
|
+
return features;
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
features = features.map(function (feature, index) {
|
|
2560
|
+
if (!Object.prototype.hasOwnProperty.call(feature.properties, 'index')) {
|
|
2561
|
+
feature.properties.index = index;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
return feature;
|
|
2565
|
+
});
|
|
2566
|
+
|
|
2567
|
+
if (!features.length || !mergeByField && features[0].geometry) {
|
|
2568
|
+
return features;
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
var source = this.map.getSource(layerId);
|
|
2572
|
+
|
|
2573
|
+
if ((!source || !source._data.features) && features[0].geometry) {
|
|
2574
|
+
return features;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
var prevFeatures = source && source._data && source._data.features;
|
|
2578
|
+
var nextFeatures = [];
|
|
2579
|
+
|
|
2580
|
+
if (!mergeByField && prevFeatures) {
|
|
2581
|
+
return prevFeatures;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
features.forEach(function (feature) {
|
|
2585
|
+
var prevFeature = prevFeatures.find(function (item) {
|
|
2586
|
+
if (isNaN(+item.properties[mergeByField]) && isNaN(+feature.properties[mergeByField])) {
|
|
2587
|
+
return JSON.stringify(item.properties[mergeByField] || '') === JSON.stringify(feature.properties[mergeByField] || '');
|
|
2588
|
+
} else {
|
|
2589
|
+
return +item.properties[mergeByField] === +feature.properties[mergeByField];
|
|
2590
|
+
}
|
|
2591
|
+
});
|
|
2592
|
+
|
|
2593
|
+
if (prevFeature) {
|
|
2594
|
+
nextFeatures.push(Object.assign(Object.assign({}, prevFeature), feature));
|
|
2595
|
+
} else if (feature.geometry) {
|
|
2596
|
+
nextFeatures.push(feature);
|
|
2597
|
+
}
|
|
2598
|
+
});
|
|
2599
|
+
return nextFeatures;
|
|
2600
|
+
};
|
|
2601
|
+
|
|
2602
|
+
_proto.getFilterFeatures = function getFilterFeatures(filterCondition, allFeatures) {
|
|
2603
|
+
if (!filterCondition) {
|
|
2604
|
+
return allFeatures;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
var condition = this.replaceFilterCharacter(filterCondition);
|
|
2608
|
+
var filterFeatures = [];
|
|
2609
|
+
|
|
2610
|
+
for (var i = 0; i < allFeatures.length; i++) {
|
|
2611
|
+
var feature = allFeatures[i];
|
|
2612
|
+
var filterResult = void 0;
|
|
2613
|
+
var properties = feature.properties;
|
|
2614
|
+
|
|
2615
|
+
try {
|
|
2616
|
+
condition = this.parseCondition(condition, Object.keys(properties));
|
|
2617
|
+
var filterFeature = this.parseConditionFeature(properties);
|
|
2618
|
+
var sql = 'select * from json where (' + condition + ')';
|
|
2619
|
+
filterResult = window.jsonsql.query(sql, {
|
|
2620
|
+
attributes: filterFeature
|
|
2621
|
+
});
|
|
2622
|
+
} catch (err) {
|
|
2623
|
+
continue;
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
if (filterResult && filterResult.length > 0) {
|
|
2627
|
+
filterFeatures.push(feature);
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
return filterFeatures;
|
|
2632
|
+
};
|
|
2633
|
+
|
|
2634
|
+
_proto.replaceFilterCharacter = function replaceFilterCharacter(filterString) {
|
|
2635
|
+
filterString = filterString.replace(/=/g, '==').replace(/AND|and/g, '&&').replace(/or|OR/g, '||').replace(/<==/g, '<=').replace(/>==/g, '>=');
|
|
2636
|
+
return filterString;
|
|
2637
|
+
};
|
|
2638
|
+
|
|
2639
|
+
_proto.getParseSpecialCharacter = function getParseSpecialCharacter() {
|
|
2640
|
+
var directory = ['(', ')', '(', ')', ',', ','];
|
|
2641
|
+
var res = {};
|
|
2642
|
+
directory.forEach(function (item, index) {
|
|
2643
|
+
res[item] = "$" + index;
|
|
2644
|
+
});
|
|
2645
|
+
return res;
|
|
2646
|
+
};
|
|
2647
|
+
|
|
2648
|
+
_proto.parseSpecialCharacter = function parseSpecialCharacter(str) {
|
|
2649
|
+
var directory = this.getParseSpecialCharacter();
|
|
2650
|
+
|
|
2651
|
+
for (var key in directory) {
|
|
2652
|
+
var replaceValue = directory[key];
|
|
2653
|
+
var pattern = new RegExp("\\" + key, 'g');
|
|
2654
|
+
|
|
2655
|
+
while (pattern.test(str)) {
|
|
2656
|
+
str = str.replace(pattern, replaceValue);
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
return str;
|
|
2661
|
+
};
|
|
2662
|
+
|
|
2663
|
+
_proto.parseCondition = function parseCondition(filterCondition, keys) {
|
|
2664
|
+
var _this5 = this;
|
|
2665
|
+
|
|
2666
|
+
var str = filterCondition.replace(/&|\||>|<|=|!/g, ' ');
|
|
2667
|
+
var arr = str.split(' ').filter(function (item) {
|
|
2668
|
+
return item;
|
|
2669
|
+
});
|
|
2670
|
+
var result = filterCondition;
|
|
2671
|
+
arr.forEach(function (item) {
|
|
2672
|
+
var key = keys.find(function (val) {
|
|
2673
|
+
return val === item;
|
|
2674
|
+
});
|
|
2675
|
+
|
|
2676
|
+
if (_this5.startsWithNumber(item) && key) {
|
|
2677
|
+
result = result.replace(key, '$' + key);
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
if (key) {
|
|
2681
|
+
var res = _this5.parseSpecialCharacter(key);
|
|
2682
|
+
|
|
2683
|
+
result = result.replace(key, res);
|
|
2684
|
+
}
|
|
2685
|
+
});
|
|
2686
|
+
return result;
|
|
2687
|
+
};
|
|
2688
|
+
|
|
2689
|
+
_proto.parseConditionFeature = function parseConditionFeature(feature) {
|
|
2690
|
+
var copyValue = {};
|
|
2691
|
+
|
|
2692
|
+
for (var key in feature) {
|
|
2693
|
+
var copyKey = key;
|
|
2694
|
+
|
|
2695
|
+
if (this.startsWithNumber(key)) {
|
|
2696
|
+
copyKey = '$' + key;
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
copyKey = this.parseSpecialCharacter(copyKey);
|
|
2700
|
+
copyValue[copyKey] = feature[key];
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
return copyValue;
|
|
2704
|
+
};
|
|
2705
|
+
|
|
2706
|
+
_proto.startsWithNumber = function startsWithNumber(str) {
|
|
2707
|
+
return /^\d/.test(str);
|
|
2708
|
+
};
|
|
2709
|
+
|
|
2710
|
+
_proto.getEchartsLayerOptions = function getEchartsLayerOptions(layerInfo, features, coordinateSystem) {
|
|
2711
|
+
var properties = this.webMapService.getFeatureProperties(features);
|
|
2712
|
+
|
|
2713
|
+
var lineData = this._createLinesData(layerInfo, properties);
|
|
2714
|
+
|
|
2715
|
+
var pointData = this._createPointsData(lineData, layerInfo, properties);
|
|
2716
|
+
|
|
2717
|
+
var options = this._createOptions(layerInfo, lineData, pointData, coordinateSystem);
|
|
2718
|
+
|
|
2719
|
+
return options;
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2722
|
+
_proto.getDashStyle = function getDashStyle(str, strokeWidth, type) {
|
|
2723
|
+
if (strokeWidth === void 0) {
|
|
2724
|
+
strokeWidth = 1;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
if (type === void 0) {
|
|
2728
|
+
type = 'array';
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
if (!str) {
|
|
2732
|
+
return type === 'array' ? [] : '';
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
var w = strokeWidth;
|
|
2736
|
+
var dashArr;
|
|
2737
|
+
|
|
2738
|
+
switch (str) {
|
|
2739
|
+
case 'solid':
|
|
2740
|
+
dashArr = [];
|
|
2741
|
+
break;
|
|
2742
|
+
|
|
2743
|
+
case 'dot':
|
|
2744
|
+
dashArr = [1, 4 * w];
|
|
2745
|
+
break;
|
|
2746
|
+
|
|
2747
|
+
case 'dash':
|
|
2748
|
+
dashArr = [4 * w, 4 * w];
|
|
2749
|
+
break;
|
|
2750
|
+
|
|
2751
|
+
case 'dashrailway':
|
|
2752
|
+
dashArr = [8 * w, 12 * w];
|
|
2753
|
+
break;
|
|
2754
|
+
|
|
2755
|
+
case 'dashdot':
|
|
2756
|
+
dashArr = [4 * w, 4 * w, 1 * w, 4 * w];
|
|
2757
|
+
break;
|
|
2758
|
+
|
|
2759
|
+
case 'longdash':
|
|
2760
|
+
dashArr = [8 * w, 4 * w];
|
|
2761
|
+
break;
|
|
2762
|
+
|
|
2763
|
+
case 'longdashdot':
|
|
2764
|
+
dashArr = [8 * w, 4 * w, 1, 4 * w];
|
|
2765
|
+
break;
|
|
2766
|
+
|
|
2767
|
+
default:
|
|
2768
|
+
if (SuperMap.Util.isArray(str)) {
|
|
2769
|
+
dashArr = str;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
str = SuperMap.String.trim(str).replace(/\s+/g, ',');
|
|
2773
|
+
dashArr = str.replace(/\[|\]/gi, '').split(',');
|
|
2774
|
+
break;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
dashArr = type === 'array' ? dashArr : dashArr.join(',');
|
|
2778
|
+
return dashArr;
|
|
2779
|
+
};
|
|
2780
|
+
|
|
2781
|
+
_proto.getCanvasFromSVG = function getCanvasFromSVG(svgUrl, divDom, callBack) {
|
|
2782
|
+
var _this6 = this;
|
|
2783
|
+
|
|
2784
|
+
var _a;
|
|
2785
|
+
|
|
2786
|
+
var canvas = document.createElement('canvas');
|
|
2787
|
+
canvas.id = "dataviz-canvas-" + new Date().getTime();
|
|
2788
|
+
canvas.style.display = 'none';
|
|
2789
|
+
divDom.appendChild(canvas);
|
|
2790
|
+
|
|
2791
|
+
if (svgUrl) {
|
|
2792
|
+
var canvgs = ((_a = window.canvg) === null || _a === void 0 ? void 0 : _a.default) ? window.canvg.default : _canvg.default;
|
|
2793
|
+
var ctx = canvas.getContext('2d');
|
|
2794
|
+
canvgs.from(ctx, svgUrl, {
|
|
2795
|
+
ignoreMouse: true,
|
|
2796
|
+
ignoreAnimation: true,
|
|
2797
|
+
forceRedraw: function forceRedraw() {
|
|
2798
|
+
return false;
|
|
2799
|
+
}
|
|
2800
|
+
}).then(function (v) {
|
|
2801
|
+
v.start();
|
|
2802
|
+
|
|
2803
|
+
_this6.canvgsV.push(v);
|
|
2804
|
+
|
|
2805
|
+
if (canvas.width > 300 || canvas.height > 300) {
|
|
2806
|
+
return;
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
callBack(canvas);
|
|
2810
|
+
});
|
|
2811
|
+
} else {
|
|
2812
|
+
callBack(canvas);
|
|
2813
|
+
}
|
|
2814
|
+
};
|
|
2815
|
+
|
|
2816
|
+
_proto.stopCanvg = function stopCanvg() {
|
|
2817
|
+
this.canvgsV.forEach(function (v) {
|
|
2818
|
+
return v.stop();
|
|
2819
|
+
});
|
|
2820
|
+
this.canvgsV = [];
|
|
2821
|
+
};
|
|
2822
|
+
|
|
2823
|
+
_proto.getRangeStyleGroup = function getRangeStyleGroup(layerInfo, features) {
|
|
2824
|
+
var featureType = layerInfo.featureType,
|
|
2825
|
+
style = layerInfo.style,
|
|
2826
|
+
themeSetting = layerInfo.themeSetting;
|
|
2827
|
+
var customSettings = themeSetting.customSettings,
|
|
2828
|
+
themeField = themeSetting.themeField,
|
|
2829
|
+
segmentCount = themeSetting.segmentCount,
|
|
2830
|
+
segmentMethod = themeSetting.segmentMethod,
|
|
2831
|
+
colors = themeSetting.colors;
|
|
2832
|
+
var values = [];
|
|
2833
|
+
var attributes;
|
|
2834
|
+
features.forEach(function (feature) {
|
|
2835
|
+
attributes = feature.properties;
|
|
2836
|
+
|
|
2837
|
+
if (attributes) {
|
|
2838
|
+
var val = attributes[themeField];
|
|
2839
|
+
(val || val === 0) && (0, _lodash.default)(+val) && values.push(parseFloat(val));
|
|
2840
|
+
}
|
|
2841
|
+
}, this);
|
|
2842
|
+
var segements = values && values.length && SuperMap.ArrayStatistic.getArraySegments(values, segmentMethod, segmentCount);
|
|
2843
|
+
|
|
2844
|
+
if (segements) {
|
|
2845
|
+
var itemNum = segmentCount;
|
|
2846
|
+
|
|
2847
|
+
if (attributes && segements[0] === segements[attributes.length - 1]) {
|
|
2848
|
+
itemNum = 1;
|
|
2849
|
+
segements.length = 2;
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
for (var i = 0; i < segements.length; i++) {
|
|
2853
|
+
var value = segements[i];
|
|
2854
|
+
value = i === 0 ? Math.floor(value * 100) / 100 : Math.ceil(value * 100) / 100 + 0.1;
|
|
2855
|
+
segements[i] = Number(value.toFixed(2));
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
var curentColors = colors;
|
|
2859
|
+
curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, itemNum, 'RANGE');
|
|
2860
|
+
|
|
2861
|
+
for (var index = 0; index < itemNum; index++) {
|
|
2862
|
+
if (index in customSettings) {
|
|
2863
|
+
if (customSettings[index].segment.start) {
|
|
2864
|
+
segements[index] = customSettings[index].segment.start;
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2867
|
+
if (customSettings[index].segment.end) {
|
|
2868
|
+
segements[index + 1] = customSettings[index].segment.end;
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
var styleGroups = [];
|
|
2874
|
+
|
|
2875
|
+
for (var _i2 = 0; _i2 < itemNum; _i2++) {
|
|
2876
|
+
var color = curentColors[_i2];
|
|
2877
|
+
|
|
2878
|
+
if (_i2 in customSettings) {
|
|
2879
|
+
if (customSettings[_i2].color) {
|
|
2880
|
+
color = customSettings[_i2].color;
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
if (featureType === 'LINE') {
|
|
2885
|
+
style.strokeColor = color;
|
|
2886
|
+
} else {
|
|
2887
|
+
style.fillColor = color;
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
|
+
var start = segements[_i2];
|
|
2891
|
+
var end = segements[_i2 + 1];
|
|
2892
|
+
var styleObj = JSON.parse(JSON.stringify(style));
|
|
2893
|
+
styleGroups.push({
|
|
2894
|
+
style: styleObj,
|
|
2895
|
+
color: color,
|
|
2896
|
+
start: start,
|
|
2897
|
+
end: end
|
|
2898
|
+
});
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
return styleGroups;
|
|
2902
|
+
}
|
|
2903
|
+
};
|
|
2904
|
+
|
|
2905
|
+
_proto.getCustomSettingColors = function getCustomSettingColors(customSettings, featureType) {
|
|
2906
|
+
var keys = Object.keys(customSettings);
|
|
2907
|
+
var colors = [];
|
|
2908
|
+
keys.forEach(function (key) {
|
|
2909
|
+
if (featureType === 'LINE') {
|
|
2910
|
+
colors.push(customSettings[key].strokeColor);
|
|
2911
|
+
} else {
|
|
2912
|
+
colors.push(customSettings[key].fillColor);
|
|
2913
|
+
}
|
|
2914
|
+
});
|
|
2915
|
+
return colors;
|
|
2916
|
+
};
|
|
2917
|
+
|
|
2918
|
+
_proto.getUniqueStyleGroup = function getUniqueStyleGroup(parameters, features) {
|
|
2919
|
+
var featureType = parameters.featureType,
|
|
2920
|
+
style = parameters.style,
|
|
2921
|
+
themeSetting = parameters.themeSetting;
|
|
2922
|
+
var colors = themeSetting.colors,
|
|
2923
|
+
customSettings = themeSetting.customSettings;
|
|
2924
|
+
var themeField = themeSetting.themeField;
|
|
2925
|
+
var featurePropertie = features && features[0] && features[0].properties || {};
|
|
2926
|
+
Object.keys(featurePropertie).forEach(function (key) {
|
|
2927
|
+
key.toLocaleUpperCase() === themeField.toLocaleUpperCase() && (themeField = key);
|
|
2928
|
+
});
|
|
2929
|
+
var names = [];
|
|
2930
|
+
|
|
2931
|
+
for (var i in features) {
|
|
2932
|
+
var properties = features[i].properties;
|
|
2933
|
+
var name = properties[themeField];
|
|
2934
|
+
var isSaved = false;
|
|
2935
|
+
|
|
2936
|
+
for (var j in names) {
|
|
2937
|
+
if (names[j] === name) {
|
|
2938
|
+
isSaved = true;
|
|
2939
|
+
break;
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
if (!isSaved) {
|
|
2944
|
+
names.push(name);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
var curentColors = colors;
|
|
2949
|
+
curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, names.length);
|
|
2950
|
+
var usedColors = this.getCustomSettingColors(customSettings, featureType).map(function (item) {
|
|
2951
|
+
return item && item.toLowerCase();
|
|
2952
|
+
});
|
|
2953
|
+
var allColors = SuperMap.ColorsPickerUtil.getGradientColors(colors, names.length + Object.keys(customSettings).length).map(function (item) {
|
|
2954
|
+
return item.toLowerCase();
|
|
2955
|
+
});
|
|
2956
|
+
var newColors = (0, _lodash2.default)(allColors, usedColors);
|
|
2957
|
+
var styleGroup = [];
|
|
2958
|
+
names.forEach(function (name, index) {
|
|
2959
|
+
var color = curentColors[index];
|
|
2960
|
+
var itemStyle = Object.assign({}, style);
|
|
2961
|
+
var customStyle = customSettings[name];
|
|
2962
|
+
|
|
2963
|
+
if (typeof customStyle === 'object') {
|
|
2964
|
+
itemStyle = Object.assign(itemStyle, customStyle);
|
|
2965
|
+
color = itemStyle.fillColor || itemStyle.strokeColor;
|
|
2966
|
+
} else {
|
|
2967
|
+
if (typeof customStyle === 'string') {
|
|
2968
|
+
color = customSettings[name];
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2971
|
+
if (!customStyle) {
|
|
2972
|
+
color = newColors.shift();
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
if (featureType === 'LINE') {
|
|
2976
|
+
itemStyle.strokeColor = color;
|
|
2977
|
+
} else {
|
|
2978
|
+
itemStyle.fillColor = color;
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2982
|
+
styleGroup.push({
|
|
2983
|
+
color: color,
|
|
2984
|
+
style: itemStyle,
|
|
2985
|
+
value: name,
|
|
2986
|
+
themeField: themeField
|
|
2987
|
+
});
|
|
2988
|
+
}, this);
|
|
2989
|
+
return styleGroup;
|
|
2990
|
+
};
|
|
2991
|
+
|
|
2992
|
+
_proto.transformFeatures = function transformFeatures(features) {
|
|
2993
|
+
var _this7 = this;
|
|
2994
|
+
|
|
2995
|
+
features && features.forEach(function (feature, index) {
|
|
2996
|
+
var coordinates = feature.geometry && feature.geometry.coordinates;
|
|
2997
|
+
|
|
2998
|
+
if (!coordinates || coordinates.length === 0) {
|
|
2999
|
+
return;
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
(0, _meta.coordEach)(feature, function (coordinates) {
|
|
3003
|
+
var transCoordinates = _this7._unproject(coordinates);
|
|
3004
|
+
|
|
3005
|
+
coordinates[0] = transCoordinates[0];
|
|
3006
|
+
coordinates[1] = transCoordinates[1];
|
|
3007
|
+
});
|
|
3008
|
+
features[index] = feature;
|
|
3009
|
+
});
|
|
3010
|
+
return features;
|
|
3011
|
+
};
|
|
3012
|
+
|
|
3013
|
+
_proto._drawTextRectAndGetSize = function _drawTextRectAndGetSize(_ref) {
|
|
3014
|
+
var context = _ref.context,
|
|
3015
|
+
style = _ref.style,
|
|
3016
|
+
textArray = _ref.textArray,
|
|
3017
|
+
lineHeight = _ref.lineHeight,
|
|
3018
|
+
doublePadding = _ref.doublePadding,
|
|
3019
|
+
canvas = _ref.canvas;
|
|
3020
|
+
var backgroundFill = style.backgroundFill;
|
|
3021
|
+
var maxWidth = style.maxWidth - doublePadding;
|
|
3022
|
+
var width = 0;
|
|
3023
|
+
var height = 0;
|
|
3024
|
+
var lineCount = 0;
|
|
3025
|
+
var lineWidths = [];
|
|
3026
|
+
textArray.forEach(function (arrText) {
|
|
3027
|
+
var line = '';
|
|
3028
|
+
var isOverMax = false;
|
|
3029
|
+
lineCount++;
|
|
3030
|
+
|
|
3031
|
+
for (var n = 0; n < arrText.length; n++) {
|
|
3032
|
+
var textLine = line + arrText[n];
|
|
3033
|
+
var metrics = context.measureText(textLine);
|
|
3034
|
+
var textWidth = metrics.width;
|
|
3035
|
+
|
|
3036
|
+
if (textWidth > maxWidth && n > 0 || arrText[n] === '\n') {
|
|
3037
|
+
line = arrText[n];
|
|
3038
|
+
lineCount++;
|
|
3039
|
+
isOverMax = true;
|
|
3040
|
+
} else {
|
|
3041
|
+
line = textLine;
|
|
3042
|
+
width = textWidth;
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
if (isOverMax) {
|
|
3047
|
+
lineWidths.push(maxWidth);
|
|
3048
|
+
} else {
|
|
3049
|
+
lineWidths.push(width);
|
|
3050
|
+
}
|
|
3051
|
+
}, this);
|
|
3052
|
+
|
|
3053
|
+
for (var i = 0; i < lineWidths.length; i++) {
|
|
3054
|
+
var lineW = lineWidths[i];
|
|
3055
|
+
|
|
3056
|
+
if (lineW >= maxWidth) {
|
|
3057
|
+
width = maxWidth;
|
|
3058
|
+
break;
|
|
3059
|
+
} else if (lineW > width) {
|
|
3060
|
+
width = lineW;
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
width += doublePadding;
|
|
3065
|
+
height = lineCount * lineHeight + doublePadding - 6;
|
|
3066
|
+
canvas.width = width;
|
|
3067
|
+
canvas.height = height;
|
|
3068
|
+
context.fillStyle = backgroundFill;
|
|
3069
|
+
context.fillRect(0, 0, width, height);
|
|
3070
|
+
context.lineWidth = style.borderWidth;
|
|
3071
|
+
context.strokeStyle = style.borderColor;
|
|
3072
|
+
context.strokeRect(0, 0, width, height);
|
|
3073
|
+
return {
|
|
3074
|
+
width: width,
|
|
3075
|
+
height: height
|
|
3076
|
+
};
|
|
3077
|
+
};
|
|
3078
|
+
|
|
3079
|
+
_proto._drawTextWithCanvas = function _drawTextWithCanvas(_ref2) {
|
|
3080
|
+
var context = _ref2.context,
|
|
3081
|
+
canvas = _ref2.canvas,
|
|
3082
|
+
style = _ref2.style;
|
|
3083
|
+
var padding = 8;
|
|
3084
|
+
var doublePadding = padding * 2;
|
|
3085
|
+
var lineHeight = Number(style.font.replace(/[^0-9]/ig, '')) + 3;
|
|
3086
|
+
var textArray = style.text.split('\r\n');
|
|
3087
|
+
context.font = style.font;
|
|
3088
|
+
|
|
3089
|
+
var size = this._drawTextRectAndGetSize({
|
|
3090
|
+
context: context,
|
|
3091
|
+
style: style,
|
|
3092
|
+
textArray: textArray,
|
|
3093
|
+
lineHeight: lineHeight,
|
|
3094
|
+
doublePadding: doublePadding,
|
|
3095
|
+
canvas: canvas
|
|
3096
|
+
});
|
|
3097
|
+
|
|
3098
|
+
var positionY = padding;
|
|
3099
|
+
textArray.forEach(function (text, i) {
|
|
3100
|
+
if (i !== 0) {
|
|
3101
|
+
positionY = positionY + lineHeight;
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
context.font = style.font;
|
|
3105
|
+
var textAlign = style.textAlign;
|
|
3106
|
+
var x;
|
|
3107
|
+
var width = size.width - doublePadding;
|
|
3108
|
+
|
|
3109
|
+
switch (textAlign) {
|
|
3110
|
+
case 'center':
|
|
3111
|
+
x = width / 2;
|
|
3112
|
+
break;
|
|
3113
|
+
|
|
3114
|
+
case 'right':
|
|
3115
|
+
x = width;
|
|
3116
|
+
break;
|
|
3117
|
+
|
|
3118
|
+
default:
|
|
3119
|
+
x = 8;
|
|
3120
|
+
break;
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
var arrText = text.split('');
|
|
3124
|
+
var line = '';
|
|
3125
|
+
var fillColor = style.fillColor;
|
|
3126
|
+
var maxWidth = style.maxWidth - doublePadding;
|
|
3127
|
+
|
|
3128
|
+
for (var n = 0; n < arrText.length; n++) {
|
|
3129
|
+
var testLine = line + arrText[n];
|
|
3130
|
+
var metrics = context.measureText(testLine);
|
|
3131
|
+
var testWidth = metrics.width;
|
|
3132
|
+
|
|
3133
|
+
if (testWidth > maxWidth && n > 0 || arrText[n] === '\n') {
|
|
3134
|
+
context.fillStyle = fillColor;
|
|
3135
|
+
context.textAlign = textAlign;
|
|
3136
|
+
context.textBaseline = 'top';
|
|
3137
|
+
context.fillText(line, x, positionY);
|
|
3138
|
+
line = arrText[n];
|
|
3139
|
+
positionY += lineHeight;
|
|
3140
|
+
} else {
|
|
3141
|
+
line = testLine;
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
|
|
3145
|
+
context.fillStyle = fillColor;
|
|
3146
|
+
context.textAlign = textAlign;
|
|
3147
|
+
context.textBaseline = 'top';
|
|
3148
|
+
context.fillText(line, x, positionY);
|
|
3149
|
+
}, this);
|
|
3150
|
+
};
|
|
3151
|
+
|
|
3152
|
+
_proto.handleSvgColor = function handleSvgColor(style, canvas) {
|
|
3153
|
+
var fillColor = style.fillColor,
|
|
3154
|
+
fillOpacity = style.fillOpacity,
|
|
3155
|
+
strokeColor = style.strokeColor,
|
|
3156
|
+
strokeOpacity = style.strokeOpacity,
|
|
3157
|
+
strokeWidth = style.strokeWidth;
|
|
3158
|
+
var context = canvas.getContext('2d');
|
|
3159
|
+
|
|
3160
|
+
if (style.text) {
|
|
3161
|
+
this._drawTextWithCanvas({
|
|
3162
|
+
context: context,
|
|
3163
|
+
canvas: canvas,
|
|
3164
|
+
style: style
|
|
3165
|
+
});
|
|
3166
|
+
|
|
3167
|
+
return;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
if (fillColor) {
|
|
3171
|
+
context.fillStyle = (0, _util.getColorWithOpacity)(fillColor, fillOpacity);
|
|
3172
|
+
context.fill();
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
if (strokeColor || strokeWidth) {
|
|
3176
|
+
context.strokeStyle = (0, _util.getColorWithOpacity)(strokeColor, strokeOpacity);
|
|
3177
|
+
context.lineWidth = strokeWidth;
|
|
3178
|
+
context.stroke();
|
|
3179
|
+
}
|
|
3180
|
+
};
|
|
3181
|
+
|
|
3182
|
+
_proto._createLinesData = function _createLinesData(layerInfo, properties) {
|
|
3183
|
+
var _this8 = this;
|
|
3184
|
+
|
|
3185
|
+
var data = [];
|
|
3186
|
+
|
|
3187
|
+
if (properties && properties.length) {
|
|
3188
|
+
var from = layerInfo.from;
|
|
3189
|
+
var to = layerInfo.to;
|
|
3190
|
+
var fromCoord;
|
|
3191
|
+
var toCoord;
|
|
3192
|
+
|
|
3193
|
+
if (from.type === 'XY_FIELD' && from.xField && from.yField && to.xField && to.yField) {
|
|
3194
|
+
properties.forEach(function (property) {
|
|
3195
|
+
var fromX = property[from.xField];
|
|
3196
|
+
var fromY = property[from.yField];
|
|
3197
|
+
var toX = property[to.xField];
|
|
3198
|
+
var toY = property[to.yField];
|
|
3199
|
+
|
|
3200
|
+
if (!fromX || !fromY || !toX || !toY) {
|
|
3201
|
+
return;
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
fromCoord = [property[from.xField], property[from.yField]];
|
|
3205
|
+
toCoord = [property[to.xField], property[to.yField]];
|
|
3206
|
+
data.push({
|
|
3207
|
+
coords: [fromCoord, toCoord]
|
|
3208
|
+
});
|
|
3209
|
+
});
|
|
3210
|
+
} else if (from.type === 'PLACE_FIELD' && from.field && to.field) {
|
|
3211
|
+
var centerDatas = _ProvinceCenter.default.concat(_MunicipalCenter.default);
|
|
3212
|
+
|
|
3213
|
+
properties.forEach(function (property) {
|
|
3214
|
+
var fromField = property[from.field];
|
|
3215
|
+
var toField = property[to.field];
|
|
3216
|
+
fromCoord = centerDatas.find(function (item) {
|
|
3217
|
+
return _this8.isMatchAdministrativeName(item.name, fromField);
|
|
3218
|
+
});
|
|
3219
|
+
toCoord = centerDatas.find(function (item) {
|
|
3220
|
+
return _this8.isMatchAdministrativeName(item.name, toField);
|
|
3221
|
+
});
|
|
3222
|
+
|
|
3223
|
+
if (!fromCoord || !toCoord) {
|
|
3224
|
+
return;
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
data.push({
|
|
3228
|
+
coords: [fromCoord.coord, toCoord.coord]
|
|
3229
|
+
});
|
|
3230
|
+
});
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3234
|
+
return data;
|
|
3235
|
+
};
|
|
3236
|
+
|
|
3237
|
+
_proto._createPointsData = function _createPointsData(lineData, layerInfo, properties) {
|
|
3238
|
+
var data = [];
|
|
3239
|
+
var labelSetting = layerInfo.labelSetting;
|
|
3240
|
+
|
|
3241
|
+
if (!labelSetting.show || !lineData.length) {
|
|
3242
|
+
return data;
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
var fromData = [];
|
|
3246
|
+
var toData = [];
|
|
3247
|
+
lineData.forEach(function (item, idx) {
|
|
3248
|
+
var coords = item.coords;
|
|
3249
|
+
var fromCoord = coords[0];
|
|
3250
|
+
var toCoord = coords[1];
|
|
3251
|
+
var fromProperty = properties[idx][labelSetting.from];
|
|
3252
|
+
var toProperty = properties[idx][labelSetting.to];
|
|
3253
|
+
var f = fromData.find(function (d) {
|
|
3254
|
+
return d.value[0] === fromCoord[0] && d.value[1] === fromCoord[1];
|
|
3255
|
+
});
|
|
3256
|
+
!f && fromData.push({
|
|
3257
|
+
name: fromProperty,
|
|
3258
|
+
value: fromCoord
|
|
3259
|
+
});
|
|
3260
|
+
var t = toData.find(function (d) {
|
|
3261
|
+
return d.value[0] === toCoord[0] && d.value[1] === toCoord[1];
|
|
3262
|
+
});
|
|
3263
|
+
!t && toData.push({
|
|
3264
|
+
name: toProperty,
|
|
3265
|
+
value: toCoord
|
|
3266
|
+
});
|
|
3267
|
+
});
|
|
3268
|
+
data = fromData.concat(toData);
|
|
3269
|
+
return data;
|
|
3270
|
+
};
|
|
3271
|
+
|
|
3272
|
+
_proto._createOptions = function _createOptions(layerInfo, lineData, pointData, coordinateSystem) {
|
|
3273
|
+
var series;
|
|
3274
|
+
|
|
3275
|
+
var lineSeries = this._createLineSeries(layerInfo, lineData, coordinateSystem);
|
|
3276
|
+
|
|
3277
|
+
if (pointData && pointData.length) {
|
|
3278
|
+
var pointSeries = this._createPointSeries(layerInfo, pointData, coordinateSystem);
|
|
3279
|
+
|
|
3280
|
+
series = lineSeries.concat(pointSeries);
|
|
3281
|
+
} else {
|
|
3282
|
+
series = lineSeries.slice();
|
|
3283
|
+
}
|
|
3284
|
+
|
|
3285
|
+
return {
|
|
3286
|
+
series: series
|
|
3287
|
+
};
|
|
3288
|
+
};
|
|
3289
|
+
|
|
3290
|
+
_proto._createPointSeries = function _createPointSeries(layerInfo, pointData, coordinateSystem) {
|
|
3291
|
+
var lineSetting = layerInfo.lineSetting;
|
|
3292
|
+
var animationSetting = layerInfo.animationSetting;
|
|
3293
|
+
var labelSetting = layerInfo.labelSetting;
|
|
3294
|
+
var pointSeries = [{
|
|
3295
|
+
name: 'point-series',
|
|
3296
|
+
coordinateSystem: coordinateSystem,
|
|
3297
|
+
zlevel: 2,
|
|
3298
|
+
label: {
|
|
3299
|
+
normal: {
|
|
3300
|
+
show: labelSetting.show,
|
|
3301
|
+
position: 'right',
|
|
3302
|
+
formatter: '{b}',
|
|
3303
|
+
color: labelSetting.color,
|
|
3304
|
+
fontFamily: labelSetting.fontFamily
|
|
3305
|
+
}
|
|
3306
|
+
},
|
|
3307
|
+
itemStyle: {
|
|
3308
|
+
normal: {
|
|
3309
|
+
color: lineSetting.color || labelSetting.color
|
|
3310
|
+
}
|
|
3311
|
+
},
|
|
3312
|
+
data: pointData
|
|
3313
|
+
}];
|
|
3314
|
+
|
|
3315
|
+
if (animationSetting.show) {
|
|
3316
|
+
pointSeries[0].type = 'effectScatter';
|
|
3317
|
+
pointSeries[0].rippleEffect = {
|
|
3318
|
+
brushType: 'stroke'
|
|
3319
|
+
};
|
|
3320
|
+
} else {
|
|
3321
|
+
pointSeries[0].type = 'scatter';
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
return pointSeries;
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3327
|
+
_proto._createLineSeries = function _createLineSeries(layerInfo, lineData, coordinateSystem) {
|
|
3328
|
+
var lineSetting = layerInfo.lineSetting;
|
|
3329
|
+
var animationSetting = layerInfo.animationSetting;
|
|
3330
|
+
var linesSeries = [{
|
|
3331
|
+
name: 'line-series',
|
|
3332
|
+
coordinateSystem: coordinateSystem,
|
|
3333
|
+
type: 'lines',
|
|
3334
|
+
zlevel: 1,
|
|
3335
|
+
effect: {
|
|
3336
|
+
show: animationSetting.show,
|
|
3337
|
+
constantSpeed: animationSetting.constantSpeed,
|
|
3338
|
+
trailLength: 0,
|
|
3339
|
+
symbol: animationSetting.symbol,
|
|
3340
|
+
symbolSize: animationSetting.symbolSize
|
|
3341
|
+
},
|
|
3342
|
+
lineStyle: {
|
|
3343
|
+
normal: {
|
|
3344
|
+
color: lineSetting.color,
|
|
3345
|
+
type: lineSetting.type,
|
|
3346
|
+
width: lineSetting.width,
|
|
3347
|
+
opacity: lineSetting.opacity,
|
|
3348
|
+
curveness: lineSetting.curveness
|
|
3349
|
+
}
|
|
3350
|
+
},
|
|
3351
|
+
data: lineData
|
|
3352
|
+
}];
|
|
3353
|
+
|
|
3354
|
+
if (lineData.length >= MAX_MIGRATION_ANIMATION_COUNT) {
|
|
3355
|
+
linesSeries[0].large = true;
|
|
3356
|
+
linesSeries[0].largeThreshold = 100;
|
|
3357
|
+
linesSeries[0].blendMode = 'lighter';
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
return linesSeries;
|
|
3361
|
+
};
|
|
3362
|
+
|
|
3363
|
+
_proto._getLayerFeaturesSucceeded = function _getLayerFeaturesSucceeded(result, layer) {
|
|
3364
|
+
switch (result.type) {
|
|
3365
|
+
case 'feature':
|
|
3366
|
+
this._initOverlayLayer(layer, result.features);
|
|
3367
|
+
|
|
3368
|
+
break;
|
|
3369
|
+
|
|
3370
|
+
case 'restMap':
|
|
3371
|
+
layer.layerType = 'restMap';
|
|
3372
|
+
|
|
3373
|
+
this._initOverlayLayer(layer, result.restMaps);
|
|
3374
|
+
|
|
3375
|
+
break;
|
|
3376
|
+
|
|
3377
|
+
case 'mvt':
|
|
3378
|
+
layer.layerType = 'mvt';
|
|
3379
|
+
|
|
3380
|
+
this._initOverlayLayer(layer, result);
|
|
3381
|
+
|
|
3382
|
+
break;
|
|
3383
|
+
|
|
3384
|
+
case 'dataflow':
|
|
3385
|
+
case 'noServerId':
|
|
3386
|
+
this._initOverlayLayer(layer);
|
|
3387
|
+
|
|
3388
|
+
break;
|
|
3389
|
+
}
|
|
3390
|
+
};
|
|
3391
|
+
|
|
3392
|
+
return WebMapBase;
|
|
3393
|
+
}(_Events2.Events);
|
|
3394
|
+
|
|
3395
|
+
/***/ }),
|
|
3396
|
+
|
|
3397
|
+
/***/ 521:
|
|
3398
|
+
/***/ (function(module) {
|
|
3399
|
+
|
|
3400
|
+
module.exports = JSON.parse("[{\"name\":\"克拉玛依市\",\"coord\":[85.01486759299489,45.406422237230046]},{\"name\":\"昌吉回族自治州\",\"coord\":[88.7154624754753,44.26991024636568]},{\"name\":\"石河子市\",\"coord\":[86.0208600035924,44.239045558096805]},{\"name\":\"霍林郭勒市\",\"coord\":[114.73479243733115,44.16058374713977]},{\"name\":\"本溪市\",\"coord\":[124.64357865201586,41.177197783134275]},{\"name\":\"嘉峪关市\",\"coord\":[98.16891560537093,39.76279786284264]},{\"name\":\"莱芜市\",\"coord\":[117.65723565456207,36.27916499211527]},{\"name\":\"神农架林区\",\"coord\":[110.48296222218153,31.581260143666697]},{\"name\":\"天门市\",\"coord\":[113.00615321481195,30.64105781887143]},{\"name\":\"鄂州市\",\"coord\":[114.94764081970385,30.325634953844585]},{\"name\":\"潜江市\",\"coord\":[112.70703817700621,30.349210666019893]},{\"name\":\"仙桃市\",\"coord\":[113.34688900729822,30.315951161935402]},{\"name\":\"萍乡市\",\"coord\":[113.88072263074415,27.47193090553213]},{\"name\":\"台湾省\",\"coord\":[120.14338943402045,23.596002465926095]},{\"name\":\"东莞市\",\"coord\":[113.89443658529342,22.897826158636448]},{\"name\":\"中山市\",\"coord\":[113.37118387764659,22.501478858616522]},{\"name\":\"珠海市\",\"coord\":[113.21799258934986,22.23782602992192]},{\"name\":\"北海市\",\"coord\":[109.18248083043899,21.695773689750148]},{\"name\":\"香港\",\"coord\":[114.20689279508653,22.36016760139811]},{\"name\":\"舟山市\",\"coord\":[122.22514712841459,30.338633120695956]},{\"name\":\"克孜勒苏柯尔克孜\",\"coord\":[74.62910472637343,39.59886016069875]},{\"name\":\"喀什地区\",\"coord\":[77.19899922143753,37.85462871211595]},{\"name\":\"阿克苏地区\",\"coord\":[81.43930290016381,41.067304799230456]},{\"name\":\"和田地区\",\"coord\":[80.69780509160952,36.95287032287055]},{\"name\":\"阿里地区\",\"coord\":[82.536487505389,32.69566569631762]},{\"name\":\"日喀则地区\",\"coord\":[86.5996831353606,29.54861754814263]},{\"name\":\"那曲地区\",\"coord\":[88.32523292667608,33.20600450932715]},{\"name\":\"玉树藏族自治州\",\"coord\":[95.2107128446203,33.90320387919257]},{\"name\":\"迪庆藏族自治州\",\"coord\":[99.42465312188943,28.052797714348895]},{\"name\":\"怒江傈傈族自治州\",\"coord\":[98.85737910439825,26.98345757528851]},{\"name\":\"大理白族自治州\",\"coord\":[99.93934374816013,25.684737357453045]},{\"name\":\"德宏傣族景颇族自\",\"coord\":[98.13830877778075,24.593421919561205]},{\"name\":\"保山市\",\"coord\":[99.19031013453166,24.979380341662]},{\"name\":\"临沧市\",\"coord\":[99.62483778975081,24.058807858948214]},{\"name\":\"普洱市\",\"coord\":[100.94440267992684,23.44121660743221]},{\"name\":\"西双版纳傣族自治\",\"coord\":[100.86105801845994,21.882475641324206]},{\"name\":\"拉萨市\",\"coord\":[91.3684790613129,30.14176592960237]},{\"name\":\"山南地区\",\"coord\":[92.11665242621062,28.33000201578789]},{\"name\":\"林芝地区\",\"coord\":[94.9307847458166,29.125110156601963]},{\"name\":\"昌都地区\",\"coord\":[97.33912235873476,30.48520825551814]},{\"name\":\"丽江市\",\"coord\":[100.65713436205135,26.96190318191959]},{\"name\":\"攀枝花市\",\"coord\":[101.73355913301131,26.714486678752795]},{\"name\":\"凉山彝族自治州\",\"coord\":[102.08678551422615,27.683020519860396]},{\"name\":\"楚雄彝族自治州\",\"coord\":[101.68264761198458,25.369603845264024]},{\"name\":\"红河哈尼族彝族自\",\"coord\":[102.95101719613119,23.624860095239875]},{\"name\":\"文山壮族苗族自治\",\"coord\":[104.8708359910614,23.579587266862504]},{\"name\":\"百色市\",\"coord\":[106.69546907589859,23.98220841166522]},{\"name\":\"崇左市\",\"coord\":[107.3277087317123,22.49769755349952]},{\"name\":\"防城港市\",\"coord\":[107.88939931155171,21.94550204069006]},{\"name\":\"南宁市\",\"coord\":[108.67078983716917,23.12207641861882]},{\"name\":\"钦州市\",\"coord\":[108.8532307305186,22.157690108421384]},{\"name\":\"玉林市\",\"coord\":[110.26918466489103,22.391823643610415]},{\"name\":\"湛江市\",\"coord\":[109.93033457863683,21.086751055633457]},{\"name\":\"茂名市\",\"coord\":[110.80336192333934,22.069184739040775]},{\"name\":\"阳江市\",\"coord\":[111.70471342186183,22.108751366417575]},{\"name\":\"江门市\",\"coord\":[112.53715618649149,22.297368082806777]},{\"name\":\"广州市\",\"coord\":[113.4949302208309,23.28359314707863]},{\"name\":\"清远市\",\"coord\":[113.10957368131268,24.334444053233856]},{\"name\":\"肇庆市\",\"coord\":[112.11117530204233,23.60241158796112]},{\"name\":\"梧州市\",\"coord\":[111.01709510772797,23.518132876753846]},{\"name\":\"贺州市\",\"coord\":[111.50423061842756,24.4095096817199]},{\"name\":\"桂林市\",\"coord\":[110.44046163393094,25.353966673735407]},{\"name\":\"柳州市\",\"coord\":[109.34854449214147,24.972408051485047]},{\"name\":\"河池市\",\"coord\":[107.81191841865586,24.649291651298164]},{\"name\":\"黔东南苗族侗族自\",\"coord\":[108.39952601614591,26.429286420465576]},{\"name\":\"贵阳市\",\"coord\":[106.59784062851153,26.797907456479816]},{\"name\":\"安顺市\",\"coord\":[105.76161265300635,25.988644902171018]},{\"name\":\"黔西南布依族苗族\",\"coord\":[105.5954078788574,25.404850939549405]},{\"name\":\"曲靖市\",\"coord\":[103.9164335632742,25.697243690315265]},{\"name\":\"六盘水市\",\"coord\":[104.77723228072432,26.15402255629164]},{\"name\":\"毕节地区\",\"coord\":[105.03867422931839,27.077913968069666]},{\"name\":\"昭通市\",\"coord\":[104.29730513046874,27.62418247971078]},{\"name\":\"宜宾市\",\"coord\":[104.76748901448207,28.553501804266475]},{\"name\":\"乐山市\",\"coord\":[103.56027669102787,29.160754519210577]},{\"name\":\"自贡市\",\"coord\":[104.63272827056402,29.273152614922402]},{\"name\":\"内江市\",\"coord\":[104.82644562304716,29.61272653799929]},{\"name\":\"遵义市\",\"coord\":[106.82413636302059,28.191847588570702]},{\"name\":\"达州市\",\"coord\":[107.59704170009518,31.32138258839703]},{\"name\":\"遂宁市\",\"coord\":[105.48979445433736,30.677687821242678]},{\"name\":\"广安市\",\"coord\":[106.56708164098042,30.43500706741521]},{\"name\":\"泸州市\",\"coord\":[105.42591761727707,28.50277238478137]},{\"name\":\"资阳市\",\"coord\":[104.97995126874034,30.154251886139654]},{\"name\":\"雅安市\",\"coord\":[102.69931299964517,29.892630706195035]},{\"name\":\"眉山市\",\"coord\":[104.07052881858888,29.894202166560405]},{\"name\":\"甘孜藏族自治州\",\"coord\":[100.50721042614238,30.975216556269658]},{\"name\":\"果洛藏族自治州\",\"coord\":[99.30775565051923,34.03539865224808]},{\"name\":\"海南藏族自治州\",\"coord\":[100.39969108016373,35.90048272566899]},{\"name\":\"黄南藏族自治州\",\"coord\":[101.5360706381689,35.10286360841902]},{\"name\":\"赣南藏族自治州\",\"coord\":[102.97083885806067,34.326752803339026]},{\"name\":\"陇南市\",\"coord\":[105.24780098912132,33.57031117443431]},{\"name\":\"天水市\",\"coord\":[105.53503634660417,34.62320421368087]},{\"name\":\"定西市\",\"coord\":[104.58787768541339,35.08900966621695]},{\"name\":\"临夏回族自治州\",\"coord\":[103.2612870434902,35.591577124455235]},{\"name\":\"西宁市\",\"coord\":[101.57680657999033,36.84800271717157]},{\"name\":\"海东地区\",\"coord\":[102.30909850729282,36.287400615025646]},{\"name\":\"海北藏族自治州\",\"coord\":[100.27122484450717,37.892557516083826]},{\"name\":\"金昌市\",\"coord\":[102.02244049169511,38.497330414886164]},{\"name\":\"酒泉市\",\"coord\":[95.94486678270127,40.56891536586272]},{\"name\":\"海西蒙古族藏族自\",\"coord\":[94.67143298050689,36.022725148503724]},{\"name\":\"巴音郭楞蒙古自治\",\"coord\":[88.18116214759745,39.556478810319916]},{\"name\":\"哈密地区\",\"coord\":[93.84302392518026,42.95015211178875]},{\"name\":\"叶鲁番地区\",\"coord\":[89.82035217277885,42.399368632283505]},{\"name\":\"乌鲁木齐市\",\"coord\":[88.00048109561487,43.549986370786]},{\"name\":\"阿勒泰地区\",\"coord\":[88.11213933257655,47.05593413019629]},{\"name\":\"博尔塔拉蒙古自治\",\"coord\":[82.26402238163408,44.671135542630864]},{\"name\":\"伊犁哈萨克自治州\",\"coord\":[82.80778717477179,43.53783381365267]},{\"name\":\"阿拉善盟\",\"coord\":[103.29923966842289,40.10955801781495]},{\"name\":\"武威市\",\"coord\":[102.73362058791429,37.94211141321436]},{\"name\":\"兰州市\",\"coord\":[103.73793563506032,36.27379827886003]},{\"name\":\"中卫市\",\"coord\":[105.6943786030716,37.20654236148948]},{\"name\":\"银川市\",\"coord\":[106.20022174140034,38.52103167597483]},{\"name\":\"石嘴山市\",\"coord\":[106.41544011793628,38.84054137571417]},{\"name\":\"乌海市\",\"coord\":[106.8984175998405,39.54616572239788]},{\"name\":\"鄂尔多斯市\",\"coord\":[108.43285571424619,39.24036799350715]},{\"name\":\"巴彦淖尔市\",\"coord\":[107.45840392808307,41.30159860424196]},{\"name\":\"包头市\",\"coord\":[110.46472193224272,41.48017783644221]},{\"name\":\"呼和浩特市\",\"coord\":[111.48365173603975,40.498363056149884]},{\"name\":\"乌兰察布市\",\"coord\":[112.61568977597707,41.75789561273154]},{\"name\":\"大同市\",\"coord\":[113.7107192749083,39.898956799744184]},{\"name\":\"朔州市\",\"coord\":[112.65428748167508,39.681772914701924]},{\"name\":\"忻州市\",\"coord\":[112.36127575589583,38.88990233614568]},{\"name\":\"榆林市\",\"coord\":[109.68473112169593,38.19921027134876]},{\"name\":\"延安市\",\"coord\":[109.52425222161318,36.406522726136814]},{\"name\":\"庆阳市\",\"coord\":[107.73052193155061,36.183821532624464]},{\"name\":\"固原市\",\"coord\":[106.20191575442442,36.11634909496382]},{\"name\":\"白银市\",\"coord\":[104.68634478137065,36.51582865625868]},{\"name\":\"宝鸡市\",\"coord\":[107.33534779230747,34.3387216485855]},{\"name\":\"汉中市\",\"coord\":[107.03534754266246,33.00142998064871]},{\"name\":\"广元市\",\"coord\":[105.92928137563939,32.21872447205537]},{\"name\":\"巴中市\",\"coord\":[107.03422410306194,31.99874720836291]},{\"name\":\"南充市\",\"coord\":[106.32964805032347,31.156657700184095]},{\"name\":\"绵阳市\",\"coord\":[104.58949560201106,31.88628780630976]},{\"name\":\"德阳市\",\"coord\":[104.41542984932845,31.110558133718676]},{\"name\":\"成都市\",\"coord\":[103.8852290010473,30.777258040348634]},{\"name\":\"阿坝藏族羌族自治\",\"coord\":[102.26209319552814,32.45725845387284]},{\"name\":\"安康市\",\"coord\":[109.14236501848015,32.77467694678074]},{\"name\":\"十堰市\",\"coord\":[110.39934083416314,32.376209039347906]},{\"name\":\"襄阳市\",\"coord\":[111.97539147094662,31.93399822417465]},{\"name\":\"宜昌市\",\"coord\":[111.22204852395754,30.772457669035354]},{\"name\":\"恩施市\",\"coord\":[109.42158366502872,30.260366574390105]},{\"name\":\"张家界市\",\"coord\":[110.59760006538717,29.330107409240718]},{\"name\":\"吉首市\",\"coord\":[109.72176899848378,28.681903937242495]},{\"name\":\"铜仁地区\",\"coord\":[108.54247523485463,28.11736237519646]},{\"name\":\"重庆市\",\"coord\":[107.86007108564992,30.186253395053196]},{\"name\":\"怀化市\",\"coord\":[109.94325166787243,27.43919084801186]},{\"name\":\"益阳市\",\"coord\":[112.43060358108062,28.75127294553697]},{\"name\":\"娄底市\",\"coord\":[111.41891416951897,27.696312460064604]},{\"name\":\"常德市\",\"coord\":[111.72571610131646,29.27189463838195]},{\"name\":\"荆州市\",\"coord\":[112.65896596965268,30.05161542755362]},{\"name\":\"荆门市\",\"coord\":[112.6586855902184,31.01267124474617]},{\"name\":\"岳阳市\",\"coord\":[113.2595036144316,29.106247116930163]},{\"name\":\"长沙市\",\"coord\":[113.15415586456598,28.222934680488425]},{\"name\":\"湘潭市\",\"coord\":[112.51092596317824,27.69881544105668]},{\"name\":\"株州市\",\"coord\":[113.49665538546823,27.03993794610501]},{\"name\":\"衡阳市\",\"coord\":[112.48849636578527,26.783613569970782]},{\"name\":\"邵阳市\",\"coord\":[110.6723832117475,26.81652287086792]},{\"name\":\"永州市\",\"coord\":[111.8565364154186,25.768488267811968]},{\"name\":\"韶关市\",\"coord\":[113.53420325850979,24.69848878771937]},{\"name\":\"惠州市\",\"coord\":[114.32029589634925,23.25504544231892]},{\"name\":\"佛山市\",\"coord\":[112.95925897403649,23.10116677189257]},{\"name\":\"云浮市\",\"coord\":[111.78042514904234,22.840400494105687]},{\"name\":\"深圳市\",\"coord\":[114.13138648919008,22.649563063468342]},{\"name\":\"汕尾市\",\"coord\":[115.57412892884373,23.06989642104901]},{\"name\":\"河源市\",\"coord\":[114.89746229844398,23.97971937124767]},{\"name\":\"揭阳市\",\"coord\":[116.04290004239446,23.304802704715357]},{\"name\":\"汕头市\",\"coord\":[116.7008461897183,23.35898625947344]},{\"name\":\"潮州市\",\"coord\":[116.75405548481658,23.854381508863064]},{\"name\":\"梅州市\",\"coord\":[116.13719397345734,24.15633544812716]},{\"name\":\"漳州市\",\"coord\":[117.38279760543345,24.41111215459575]},{\"name\":\"厦门市\",\"coord\":[118.04275971554665,24.675908246507944]},{\"name\":\"龙岩市\",\"coord\":[116.69341144552507,25.20284542644492]},{\"name\":\"泉州市\",\"coord\":[118.12035864630246,25.22984144365049]},{\"name\":\"莆田市\",\"coord\":[118.82439690138142,25.439653480972687]},{\"name\":\"福州市\",\"coord\":[119.1608285845262,25.99117532466728]},{\"name\":\"三明市\",\"coord\":[117.51188176216434,26.318292906961602]},{\"name\":\"南平市\",\"coord\":[118.16153136678187,27.306303151805437]},{\"name\":\"抚州市\",\"coord\":[116.3455359885574,27.487043655935366]},{\"name\":\"鹰潭市\",\"coord\":[117.01082360702333,28.241253742969946]},{\"name\":\"吉安市\",\"coord\":[114.91377151807418,26.957486660664525]},{\"name\":\"赣州市\",\"coord\":[115.046455717572,25.81565075681663]},{\"name\":\"郴州市\",\"coord\":[113.1544526703492,25.871927095452524]},{\"name\":\"新余市\",\"coord\":[114.94161795877827,27.79044654578371]},{\"name\":\"宜春市\",\"coord\":[115.04574494880995,28.306428044943356]},{\"name\":\"南昌市\",\"coord\":[115.9963824234495,28.664803351584705]},{\"name\":\"九江市\",\"coord\":[115.53225905704193,29.362905920276297]},{\"name\":\"上饶市\",\"coord\":[117.8595355766598,28.765755150094634]},{\"name\":\"景德镇市\",\"coord\":[117.25387030721845,29.33426823662448]},{\"name\":\"黄山市\",\"coord\":[117.85476357809696,29.969632034273722]},{\"name\":\"池州市\",\"coord\":[117.34517113140791,30.208089337922335]},{\"name\":\"铜陵市\",\"coord\":[117.93160431300694,30.926442655001676]},{\"name\":\"安庆市\",\"coord\":[116.54307680610799,30.524265461641296]},{\"name\":\"黄石市\",\"coord\":[115.02354597728443,29.924060229331015]},{\"name\":\"咸宁市\",\"coord\":[114.26967602231792,29.652174021136048]},{\"name\":\"黄冈市\",\"coord\":[115.2859016705373,30.65856897065683]},{\"name\":\"武汉市\",\"coord\":[114.34552076948799,30.68836237966767]},{\"name\":\"随州市\",\"coord\":[113.3850627838818,31.87891659924412]},{\"name\":\"信阳市\",\"coord\":[114.81374730587638,32.0309685135914]},{\"name\":\"驻马店市\",\"coord\":[114.07756451509235,32.896720987266114]},{\"name\":\"商洛市\",\"coord\":[109.82044421310393,33.77403373563189]},{\"name\":\"西安市\",\"coord\":[109.11839808451401,34.225257215515896]},{\"name\":\"渭南市\",\"coord\":[109.75732444226935,35.025913644359306]},{\"name\":\"铜川市\",\"coord\":[108.98695328111377,35.19235092947735]},{\"name\":\"咸阳市\",\"coord\":[108.36398776446165,34.84311348287181]},{\"name\":\"三门峡市\",\"coord\":[110.80049688104964,34.31818709571671]},{\"name\":\"运城市\",\"coord\":[111.1736679525165,35.19010372283576]},{\"name\":\"洛阳市\",\"coord\":[111.87577573098216,34.33379926109848]},{\"name\":\"平顶山市\",\"coord\":[112.80931281928427,33.759895800153096]},{\"name\":\"漯河市\",\"coord\":[113.83505724178012,33.70034266174508]},{\"name\":\"许昌市\",\"coord\":[113.78762484088509,34.051835688452435]},{\"name\":\"郑州市\",\"coord\":[113.49619951867594,34.61181797865449]},{\"name\":\"焦作市\",\"coord\":[113.13404280173008,35.134167097471625]},{\"name\":\"晋城市\",\"coord\":[112.7495732073233,35.63186423091449]},{\"name\":\"长治市\",\"coord\":[112.85900842873183,36.45872910742828]},{\"name\":\"临汾市\",\"coord\":[111.49379787924448,36.22810800777857]},{\"name\":\"太原市\",\"coord\":[112.15628804033796,37.91704444063036]},{\"name\":\"吕梁市\",\"coord\":[111.31901105774872,37.712740463356496]},{\"name\":\"晋中市\",\"coord\":[113.08199599739676,37.36532613794343]},{\"name\":\"邯郸市\",\"coord\":[114.41824047234618,36.530119932543315]},{\"name\":\"安阳市\",\"coord\":[113.88883283163116,35.7797611183252]},{\"name\":\"鹤壁市\",\"coord\":[114.3654094911545,35.75770487428472]},{\"name\":\"新乡市\",\"coord\":[113.9184107718167,35.348471214026716]},{\"name\":\"开封市\",\"coord\":[114.52801677500626,34.61371216679872]},{\"name\":\"周口市\",\"coord\":[114.88509782391864,33.69999759722657]},{\"name\":\"阜阳市\",\"coord\":[115.44595951398213,32.98060371610532]},{\"name\":\"淮南市\",\"coord\":[116.68941991880993,32.79972275772595]},{\"name\":\"蚌埠市\",\"coord\":[117.38594715783302,33.106729536033896]},{\"name\":\"淮北市\",\"coord\":[116.69651711889378,33.69527529383458]},{\"name\":\"宿州市\",\"coord\":[117.30175405886838,33.943330421260015]},{\"name\":\"亳州市\",\"coord\":[116.12410804185097,33.46769392946132]},{\"name\":\"商丘市\",\"coord\":[115.59575176872548,34.28339840831147]},{\"name\":\"菏泽市\",\"coord\":[115.53631974831816,35.197319393220624]},{\"name\":\"濮阳市\",\"coord\":[115.3070485514902,35.775883510964334]},{\"name\":\"聊城市\",\"coord\":[115.8870069012884,36.40529594548765]},{\"name\":\"邢台市\",\"coord\":[114.74259008644859,37.251396750084155]},{\"name\":\"石家庄市\",\"coord\":[114.56923838363613,38.13141710980106]},{\"name\":\"阳泉市\",\"coord\":[113.39216149668508,38.09075470547468]},{\"name\":\"保定市\",\"coord\":[115.261524468934,39.09118520781398]},{\"name\":\"衡水市\",\"coord\":[115.8182936677897,37.715661598187154]},{\"name\":\"德州市\",\"coord\":[116.4582273790399,37.19372347888644]},{\"name\":\"沧州市\",\"coord\":[116.76192710911863,38.20240042039232]},{\"name\":\"廊坊市\",\"coord\":[116.50410772133856,39.27896741763884]},{\"name\":\"天津市\",\"coord\":[117.31988934444873,39.37154482470619]},{\"name\":\"北京市\",\"coord\":[116.59734730757869,40.237112944270976]},{\"name\":\"张家口市\",\"coord\":[115.1823606483226,40.83732566607167]},{\"name\":\"唐山市\",\"coord\":[117.8693184261954,39.71862889477249]},{\"name\":\"秦皇岛市\",\"coord\":[119.30467355367742,39.990574652162564]},{\"name\":\"承德市\",\"coord\":[117.16275671911026,41.36623845548547]},{\"name\":\"葫芦岛市\",\"coord\":[119.9342336210531,40.5628822626519]},{\"name\":\"朝阳市\",\"coord\":[120.11853493535794,41.471852354885755]},{\"name\":\"赤峰市\",\"coord\":[118.50943546234379,43.25452976059767]},{\"name\":\"锦州市\",\"coord\":[121.5167549323861,41.45933087433065]},{\"name\":\"营口市\",\"coord\":[122.58571915054674,40.42093503997384]},{\"name\":\"丹东市\",\"coord\":[124.33549382902183,40.46369290272115]},{\"name\":\"辽阳市\",\"coord\":[123.34064798039414,41.152331397771356]},{\"name\":\"盘锦市\",\"coord\":[122.06718005354679,41.05573599862555]},{\"name\":\"阜新市\",\"coord\":[121.93889757908204,42.27641773244204]},{\"name\":\"鞍山市\",\"coord\":[122.78904432242356,40.77781183142038]},{\"name\":\"沈阳市\",\"coord\":[122.99508899709724,42.1162195010079]},{\"name\":\"铁岭市\",\"coord\":[124.23100515588399,42.72666083611828]},{\"name\":\"扶顺市\",\"coord\":[124.46027188217573,41.82955407638859]},{\"name\":\"通辽市\",\"coord\":[122.0729370657937,43.90889130864869]},{\"name\":\"兴安盟\",\"coord\":[120.79456431092532,45.92003249442161]},{\"name\":\"白城市\",\"coord\":[123.10619907715235,45.25475749267784]},{\"name\":\"齐齐哈尔市\",\"coord\":[124.5462214659102,47.55395009317394]},{\"name\":\"大兴安岭地区\",\"coord\":[124.50992855161529,52.18438447846694]},{\"name\":\"黑河市\",\"coord\":[127.14721400335922,49.25080134026901]},{\"name\":\"大庆市\",\"coord\":[124.40329830095243,46.401048760966745]},{\"name\":\"绥化市\",\"coord\":[126.5214484055605,46.76992452194825]},{\"name\":\"松原市\",\"coord\":[124.21244334807682,44.75779381338502]},{\"name\":\"四平市\",\"coord\":[124.27839350328821,43.52139065090318]},{\"name\":\"通化市\",\"coord\":[125.67392830706305,41.91771808663852]},{\"name\":\"辽源市\",\"coord\":[125.33529527643432,42.758340204944986]},{\"name\":\"吉林市\",\"coord\":[126.83350281902375,43.60730120049175]},{\"name\":\"长春市\",\"coord\":[125.53597875970374,44.24624314701737]},{\"name\":\"白山市\",\"coord\":[127.16780160322108,42.093893880305075]},{\"name\":\"哈尔滨市\",\"coord\":[127.39125008786029,45.36200668820575]},{\"name\":\"鹤岗市\",\"coord\":[130.4703811258197,47.66520688940109]},{\"name\":\"伊春市\",\"coord\":[128.91240831703635,47.93833794565277]},{\"name\":\"七台河市\",\"coord\":[131.2677920224311,45.945099776108584]},{\"name\":\"鸡西市\",\"coord\":[132.38059153660274,45.722934218318535]},{\"name\":\"双鸭山市\",\"coord\":[132.3184817002743,46.65813679030265]},{\"name\":\"佳木斯市\",\"coord\":[132.26174446608726,47.17569713691394]},{\"name\":\"呼伦贝尔市\",\"coord\":[122.3210739998419,50.18176996070858]},{\"name\":\"孝感市\",\"coord\":[113.83749892135485,31.11757234692128]},{\"name\":\"贵港市\",\"coord\":[110.07354588052804,23.380735604767374]},{\"name\":\"黔南布依族苗族自\",\"coord\":[107.30931767543106,26.2976919432269]},{\"name\":\"宁德市\",\"coord\":[119.52482556634342,27.013151692716413]},{\"name\":\"温州市\",\"coord\":[120.30037042732202,27.8699145504001]},{\"name\":\"台州市\",\"coord\":[120.88886782713843,28.670799172772313]},{\"name\":\"丽水市\",\"coord\":[119.56796851966463,28.170268394477755]},{\"name\":\"衢州市\",\"coord\":[118.79479802644406,28.865874397158763]},{\"name\":\"金华市\",\"coord\":[119.99381920686633,29.093455548185744]},{\"name\":\"绍兴市\",\"coord\":[120.46546691682343,29.69382513836818]},{\"name\":\"宁波市\",\"coord\":[121.42142987830871,29.70001162878972]},{\"name\":\"杭州市\",\"coord\":[119.4405685790891,29.87218307296989]},{\"name\":\"宣城市\",\"coord\":[118.68748382914703,30.628143499626418]},{\"name\":\"湖州市\",\"coord\":[119.98261306633574,30.7945175862809]},{\"name\":\"嘉兴市\",\"coord\":[120.83889215988998,30.67538495499343]},{\"name\":\"上海市\",\"coord\":[121.37534147322967,31.25628247908459]},{\"name\":\"苏州市\",\"coord\":[120.6906182622391,31.381280695137775]},{\"name\":\"无锡市\",\"coord\":[120.32182300914366,31.54113306724517]},{\"name\":\"常州市\",\"coord\":[119.61953292830165,31.611878565375576]},{\"name\":\"南京市\",\"coord\":[118.71890548838064,31.910863187910323]},{\"name\":\"镇江市\",\"coord\":[119.42349332902813,31.97942313430778]},{\"name\":\"合肥市\",\"coord\":[117.30651975617157,31.79407863049138]},{\"name\":\"六安市\",\"coord\":[116.24668220575353,31.820846193819513]},{\"name\":\"滁州市\",\"coord\":[117.88422385307969,32.51792621904418]},{\"name\":\"泰州市\",\"coord\":[120.03124303305091,32.56503102346783]},{\"name\":\"南通市\",\"coord\":[120.85599446760912,32.18496706099728]},{\"name\":\"盐城市\",\"coord\":[120.01812490612667,33.54219948734023]},{\"name\":\"淮安市\",\"coord\":[119.0749424205415,33.39203631772854]},{\"name\":\"宿迁市\",\"coord\":[118.45404943216346,33.666258719120265]},{\"name\":\"徐州市\",\"coord\":[117.77482249295966,34.30847766157078]},{\"name\":\"济宁市\",\"coord\":[116.74147276546373,35.27488504351119]},{\"name\":\"枣庄市\",\"coord\":[117.43359942491492,34.884162021736]},{\"name\":\"连云港市\",\"coord\":[119.01553213785074,34.54316517587849]},{\"name\":\"临沂市\",\"coord\":[118.31478835349617,35.28173079028279]},{\"name\":\"日照市\",\"coord\":[119.14265350444272,35.54479073199592]},{\"name\":\"青岛市\",\"coord\":[120.27779044405756,36.3464117375903]},{\"name\":\"威海市\",\"coord\":[122.12963327195605,37.13879077904251]},{\"name\":\"烟台市\",\"coord\":[120.7689567423966,37.19772002195597]},{\"name\":\"潍坊市\",\"coord\":[119.02178548592039,36.49292234053931]},{\"name\":\"淄博市\",\"coord\":[117.92936024367185,36.60871347163638]},{\"name\":\"泰安市\",\"coord\":[116.93810893944303,36.0423330118612]},{\"name\":\"济南市\",\"coord\":[117.34560282551296,36.769574973846304]},{\"name\":\"东营市\",\"coord\":[118.4915054457184,37.52194690335787]},{\"name\":\"滨州市\",\"coord\":[117.67610299757533,37.4439597758601]},{\"name\":\"昆明市\",\"coord\":[102.93100245594789,25.481300763922075]},{\"name\":\"玉溪市\",\"coord\":[102.23080854291823,24.156168324611663]},{\"name\":\"塔城地区\",\"coord\":[83.60908162840168,45.3721852373893]},{\"name\":\"张掖市\",\"coord\":[100.47710030600572,38.704239320458385]},{\"name\":\"南阳市\",\"coord\":[112.1400670951149,33.03033276715801]},{\"name\":\"扬州市\",\"coord\":[119.48949608990988,32.80956776339646]},{\"name\":\"延边朝鲜族自治州\",\"coord\":[129.3577692895626,43.24968794080283]},{\"name\":\"牡丹江市\",\"coord\":[129.87240796405672,44.7073040108322]},{\"name\":\"澳门\",\"coord\":[113.56289691515346,22.14602596262204]},{\"name\":\"吴忠市\",\"coord\":[106.76894508116403,37.72566765880316]},{\"name\":\"来宾市\",\"coord\":[109.25592217010114,23.86346274681084]},{\"name\":\"平凉市\",\"coord\":[107.0708132782897,35.30329631658711]},{\"name\":\"马鞍山市\",\"coord\":[118.27245878467022,31.657727937739004]},{\"name\":\"芜湖市\",\"coord\":[118.32992684415504,31.081688223101658]},{\"name\":\"澄迈县\",\"coord\":[110.04198076060266,19.694955078668105]},{\"name\":\"保亭黎族苗族自治\",\"coord\":[109.6055304964257,18.6101488675304]},{\"name\":\"乐东黎族自治县\",\"coord\":[109.04051999525574,18.643137437909203]},{\"name\":\"儋州市\",\"coord\":[109.3431358337404,19.550974957403195]},{\"name\":\"定安县\",\"coord\":[110.38744429685676,19.47557074114284]},{\"name\":\"屯昌县\",\"coord\":[110.00574767630334,19.367175093044388]},{\"name\":\"白沙黎族自治县\",\"coord\":[109.36860737761768,19.214416393082217]},{\"name\":\"琼中黎族苗族自治\",\"coord\":[109.86691465937548,19.073671135862682]},{\"name\":\"东方市\",\"coord\":[108.86903802405428,19.017352815445214]},{\"name\":\"昌江黎族自治县\",\"coord\":[108.9686431884767,19.182594167127824]},{\"name\":\"海口市\",\"coord\":[110.420654296875,19.806565564640795]},{\"name\":\"济源市\",\"coord\":[112.38051465474433,35.07958362422394]},{\"name\":\"五指山市\",\"coord\":[109.53595187364496,18.832908264613966]},{\"name\":\"大连市\",\"coord\":[121.96662235866603,39.444150542439914]},{\"name\":\"文昌市三沙市\",\"coord\":[110.81828537536748,19.756501444162936]},{\"name\":\"三亚市\",\"coord\":[109.38424600793707,18.39186315877128]},{\"name\":\"万宁市\",\"coord\":[110.28485046979574,18.860240588635115]},{\"name\":\"陵水黎族自治县\",\"coord\":[109.95577603229562,18.594712684620465]},{\"name\":\"临高县\",\"coord\":[109.71915395436967,19.79420403032508]},{\"name\":\"琼海市\",\"coord\":[110.41650700703043,19.22315873149372]}]");
|
|
3401
|
+
|
|
3402
|
+
/***/ }),
|
|
3403
|
+
|
|
3404
|
+
/***/ 522:
|
|
3405
|
+
/***/ (function(module) {
|
|
3406
|
+
|
|
3407
|
+
module.exports = JSON.parse("[{\"name\":\"黑龙江省\",\"coord\":[127.64559817675396,48.48668098449708]},{\"name\":\"内蒙古自治区\",\"coord\":[118.34519572208615,45.370218276977525]},{\"name\":\"新疆维吾尔自治区\",\"coord\":[87.13479065593184,41.75497055053711]},{\"name\":\"吉林省\",\"coord\":[126.12985278813787,43.57983207702637]},{\"name\":\"辽宁省\",\"coord\":[124.02494773936439,41.105743408203125]},{\"name\":\"甘肃省\",\"coord\":[102.87785725633012,37.69582366943361]},{\"name\":\"河北省\",\"coord\":[115.66327227481898,39.33383178710938]},{\"name\":\"北京市\",\"coord\":[116.62199343603638,40.25053787231445]},{\"name\":\"山西省\",\"coord\":[112.45180235808988,37.666561126708984]},{\"name\":\"天津市\",\"coord\":[117.35711842642581,39.406789779663086]},{\"name\":\"陕西省\",\"coord\":[109.56294003056632,35.64754199981689]},{\"name\":\"宁夏回族自治区\",\"coord\":[105.96110877640074,37.3081169128418]},{\"name\":\"青海省\",\"coord\":[96.07301048277901,35.44417190551758]},{\"name\":\"山东省\",\"coord\":[118.03833752951093,36.29800605773925]},{\"name\":\"西藏自治区\",\"coord\":[87.47361520439412,31.6703872680664]},{\"name\":\"河南省\",\"coord\":[113.07832397097275,33.87751102447509]},{\"name\":\"江苏省\",\"coord\":[119.93926538201052,32.945452690124505]},{\"name\":\"安徽省\",\"coord\":[117.15146765881019,32.024482727050774]},{\"name\":\"四川省\",\"coord\":[102.28998890142759,30.182161331176758]},{\"name\":\"湖北省\",\"coord\":[112.87798261431585,31.157071113586426]},{\"name\":\"重庆市\",\"coord\":[107.870126637831,30.188085556030266]},{\"name\":\"上海市\",\"coord\":[121.42561166015514,31.276043891906745]},{\"name\":\"浙江省\",\"coord\":[119.75337092707514,29.175934791564945]},{\"name\":\"湖南省\",\"coord\":[111.52770282777405,27.38110256195069]},{\"name\":\"江西省\",\"coord\":[115.51091280655628,27.283511161804206]},{\"name\":\"云南省\",\"coord\":[101.27053825991308,25.19783210754396]},{\"name\":\"贵州省\",\"coord\":[106.49672346773299,26.92267990112305]},{\"name\":\"福建省\",\"coord\":[117.9976766946587,25.939599990844727]},{\"name\":\"广西壮族自治区\",\"coord\":[108.98706831086302,23.891559600830078]},{\"name\":\"台湾省\",\"coord\":[120.82468432537434,23.602651596069336]},{\"name\":\"香港特别行政区\",\"coord\":[114.21036850371561,22.374858856201172]},{\"name\":\"海南省\",\"coord\":[109.62792940960824,19.163116455078125]},{\"name\":\"广东省\",\"coord\":[113.32127888266032,22.873867034912106]},{\"name\":\"澳门特别行政区\",\"coord\":[113.56819996291901,22.160347992976]}]");
|
|
3408
|
+
|
|
3409
|
+
/***/ }),
|
|
3410
|
+
|
|
3411
|
+
/***/ 523:
|
|
3412
|
+
/***/ (function(module, exports) {
|
|
3413
|
+
|
|
3414
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/static/libs/json-sql/jsonsql");
|
|
3415
|
+
|
|
3416
|
+
/***/ }),
|
|
3417
|
+
|
|
3418
|
+
/***/ 524:
|
|
3419
|
+
/***/ (function(module, exports) {
|
|
3420
|
+
|
|
3421
|
+
module.exports = require("lodash.isnumber");
|
|
3422
|
+
|
|
3423
|
+
/***/ }),
|
|
3424
|
+
|
|
3425
|
+
/***/ 525:
|
|
3426
|
+
/***/ (function(module, exports) {
|
|
3427
|
+
|
|
3428
|
+
module.exports = require("canvg");
|
|
3429
|
+
|
|
3430
|
+
/***/ }),
|
|
3431
|
+
|
|
3432
|
+
/***/ 526:
|
|
3433
|
+
/***/ (function(module, exports) {
|
|
3434
|
+
|
|
3435
|
+
module.exports = require("@turf/meta");
|
|
3436
|
+
|
|
3437
|
+
/***/ }),
|
|
3438
|
+
|
|
3439
|
+
/***/ 527:
|
|
3440
|
+
/***/ (function(module, exports) {
|
|
3441
|
+
|
|
3442
|
+
module.exports = require("lodash.difference");
|
|
3443
|
+
|
|
3444
|
+
/***/ }),
|
|
3445
|
+
|
|
3446
|
+
/***/ 59:
|
|
3447
|
+
/***/ (function(module, exports) {
|
|
3448
|
+
|
|
3449
|
+
module.exports = require("lodash.max");
|
|
3450
|
+
|
|
3451
|
+
/***/ }),
|
|
3452
|
+
|
|
3453
|
+
/***/ 6:
|
|
3454
|
+
/***/ (function(module, exports) {
|
|
3455
|
+
|
|
3456
|
+
module.exports = require("@babel/runtime/helpers/inheritsLoose");
|
|
3457
|
+
|
|
3458
|
+
/***/ }),
|
|
3459
|
+
|
|
3460
|
+
/***/ 9:
|
|
3461
|
+
/***/ (function(module, exports) {
|
|
3462
|
+
|
|
3463
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_utils/util.js");
|
|
3464
|
+
|
|
3465
|
+
/***/ })
|
|
3466
|
+
|
|
3467
|
+
/******/ });
|