@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,1607 @@
|
|
|
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 = 251);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 0:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 20:
|
|
98
|
+
/***/ (function(module, exports) {
|
|
99
|
+
|
|
100
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_types/event/Events.js");
|
|
101
|
+
|
|
102
|
+
/***/ }),
|
|
103
|
+
|
|
104
|
+
/***/ 251:
|
|
105
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
106
|
+
|
|
107
|
+
"use strict";
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
var _interopRequireDefault = __webpack_require__(0);
|
|
111
|
+
|
|
112
|
+
Object.defineProperty(exports, "__esModule", {
|
|
113
|
+
value: true
|
|
114
|
+
});
|
|
115
|
+
exports.default = void 0;
|
|
116
|
+
|
|
117
|
+
var _regenerator = _interopRequireDefault(__webpack_require__(43));
|
|
118
|
+
|
|
119
|
+
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6));
|
|
120
|
+
|
|
121
|
+
var _Events2 = __webpack_require__(20);
|
|
122
|
+
|
|
123
|
+
var _util = __webpack_require__(9);
|
|
124
|
+
|
|
125
|
+
var _statistics = __webpack_require__(38);
|
|
126
|
+
|
|
127
|
+
var convert = _interopRequireWildcard(__webpack_require__(252));
|
|
128
|
+
|
|
129
|
+
var _lodash = _interopRequireDefault(__webpack_require__(59));
|
|
130
|
+
|
|
131
|
+
var _lodash2 = _interopRequireDefault(__webpack_require__(253));
|
|
132
|
+
|
|
133
|
+
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); }
|
|
134
|
+
|
|
135
|
+
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; }
|
|
136
|
+
|
|
137
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
138
|
+
function adopt(value) {
|
|
139
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
140
|
+
resolve(value);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
145
|
+
function fulfilled(value) {
|
|
146
|
+
try {
|
|
147
|
+
step(generator.next(value));
|
|
148
|
+
} catch (e) {
|
|
149
|
+
reject(e);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function rejected(value) {
|
|
154
|
+
try {
|
|
155
|
+
step(generator["throw"](value));
|
|
156
|
+
} catch (e) {
|
|
157
|
+
reject(e);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function step(result) {
|
|
162
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
var DEFAULT_WELLKNOWNSCALESET = ['GoogleCRS84Quad', 'GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad'];
|
|
170
|
+
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];
|
|
171
|
+
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];
|
|
172
|
+
|
|
173
|
+
var WebMapService = exports.default = /*#__PURE__*/function (_Events) {
|
|
174
|
+
(0, _inheritsLoose2.default)(WebMapService, _Events);
|
|
175
|
+
|
|
176
|
+
function WebMapService(mapId, options) {
|
|
177
|
+
var _this;
|
|
178
|
+
|
|
179
|
+
if (options === void 0) {
|
|
180
|
+
options = {};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
_this = _Events.call(this) || this;
|
|
184
|
+
_this.proxyOptions = {
|
|
185
|
+
data: 'apps/viewer/getUrlResource.json?url=',
|
|
186
|
+
image: 'apps/viewer/getUrlResource.png?url='
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
if (typeof mapId === 'string' || typeof mapId === 'number') {
|
|
190
|
+
_this.mapId = mapId;
|
|
191
|
+
} else if (mapId !== null && typeof mapId === 'object') {
|
|
192
|
+
_this.mapInfo = mapId;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
_this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
|
|
196
|
+
_this.accessToken = options.accessToken;
|
|
197
|
+
_this.accessKey = options.accessKey;
|
|
198
|
+
_this.tiandituKey = options.tiandituKey || '';
|
|
199
|
+
_this.withCredentials = options.withCredentials || false;
|
|
200
|
+
_this.excludePortalProxyUrl = options.excludePortalProxyUrl;
|
|
201
|
+
_this.iportalServiceProxyUrl = options.iportalServiceProxyUrlPrefix;
|
|
202
|
+
_this.proxy = options.proxy;
|
|
203
|
+
return _this;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
var _proto = WebMapService.prototype;
|
|
207
|
+
|
|
208
|
+
_proto.setMapId = function setMapId(mapId) {
|
|
209
|
+
if (typeof mapId === 'string' || typeof mapId === 'number') {
|
|
210
|
+
this.mapId = mapId;
|
|
211
|
+
this.mapInfo = null;
|
|
212
|
+
} else if (mapId !== null && typeof mapId === 'object') {
|
|
213
|
+
this.mapInfo = mapId;
|
|
214
|
+
this.mapId = '';
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
_proto.setServerUrl = function setServerUrl(serverUrl) {
|
|
219
|
+
this.serverUrl = serverUrl;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
_proto.setWithCredentials = function setWithCredentials(withCredentials) {
|
|
223
|
+
this.withCredentials = withCredentials;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
_proto.setProxy = function setProxy(proxy) {
|
|
227
|
+
this.proxy = proxy;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
_proto.handleServerUrl = function handleServerUrl(serverUrl) {
|
|
231
|
+
var urlArr = serverUrl.split('');
|
|
232
|
+
|
|
233
|
+
if (urlArr[urlArr.length - 1] !== '/') {
|
|
234
|
+
serverUrl += '/';
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
this.serverUrl = serverUrl;
|
|
238
|
+
return serverUrl;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
_proto.getMapInfo = function getMapInfo() {
|
|
242
|
+
var _this2 = this;
|
|
243
|
+
|
|
244
|
+
if (!this.mapId && this.mapInfo) {
|
|
245
|
+
return new Promise(function (resolve) {
|
|
246
|
+
resolve(_this2.mapInfo);
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
var mapUrl = this._handleMapUrl();
|
|
251
|
+
|
|
252
|
+
return new Promise(function (resolve, reject) {
|
|
253
|
+
return __awaiter(_this2, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
254
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
255
|
+
while (1) switch (_context.prev = _context.next) {
|
|
256
|
+
case 0:
|
|
257
|
+
_context.prev = 0;
|
|
258
|
+
_context.next = 3;
|
|
259
|
+
return this.getiPortalServiceProxy();
|
|
260
|
+
|
|
261
|
+
case 3:
|
|
262
|
+
SuperMap.FetchRequest.get(mapUrl, null, {
|
|
263
|
+
withCredentials: this.withCredentials
|
|
264
|
+
}).then(function (response) {
|
|
265
|
+
return response.json();
|
|
266
|
+
}).then(function (mapInfo) {
|
|
267
|
+
if (mapInfo && mapInfo.succeed === false) {
|
|
268
|
+
var error = {
|
|
269
|
+
message: mapInfo && mapInfo.error && mapInfo.error.errorMsg
|
|
270
|
+
};
|
|
271
|
+
reject(error);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
mapInfo.mapParams = {
|
|
276
|
+
title: mapInfo.title,
|
|
277
|
+
description: mapInfo.description
|
|
278
|
+
};
|
|
279
|
+
resolve(mapInfo);
|
|
280
|
+
}).catch(function (error) {
|
|
281
|
+
reject(error);
|
|
282
|
+
});
|
|
283
|
+
_context.next = 9;
|
|
284
|
+
break;
|
|
285
|
+
|
|
286
|
+
case 6:
|
|
287
|
+
_context.prev = 6;
|
|
288
|
+
_context.t0 = _context["catch"](0);
|
|
289
|
+
reject(_context.t0);
|
|
290
|
+
|
|
291
|
+
case 9:
|
|
292
|
+
case "end":
|
|
293
|
+
return _context.stop();
|
|
294
|
+
}
|
|
295
|
+
}, _callee, this, [[0, 6]]);
|
|
296
|
+
}));
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
_proto.getiPortalServiceProxy = function getiPortalServiceProxy() {
|
|
301
|
+
var _this3 = this;
|
|
302
|
+
|
|
303
|
+
return new Promise(function (resolve, reject) {
|
|
304
|
+
SuperMap.FetchRequest.get(_this3.serverUrl + "web/config/portal.json", {
|
|
305
|
+
scope: ['serviceProxy']
|
|
306
|
+
}).then(function (response) {
|
|
307
|
+
return response.json();
|
|
308
|
+
}).then(function (serviceProxyInfo) {
|
|
309
|
+
if (!serviceProxyInfo || !serviceProxyInfo.serviceProxy) {
|
|
310
|
+
reject('serviceProxyFailed');
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
var serviceProxy = serviceProxyInfo.serviceProxy;
|
|
315
|
+
|
|
316
|
+
if (serviceProxy.enable) {
|
|
317
|
+
if (serviceProxy.proxyServerRootUrl) {
|
|
318
|
+
_this3.iportalServiceProxyUrl = serviceProxy.proxyServerRootUrl;
|
|
319
|
+
} else if (serviceProxy.port && serviceProxy.rootUrlPostfix) {
|
|
320
|
+
_this3.iportalServiceProxyUrl = serviceProxy.port + "/" + serviceProxy.rootUrlPostfix;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (_this3.serverUrl.indexOf(_this3.iportalServiceProxyUrl) > -1) {
|
|
324
|
+
_this3.iportalServiceProxyUrl = '';
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
resolve(serviceProxy);
|
|
329
|
+
}).catch(function (error) {
|
|
330
|
+
reject(error);
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
_proto.getLayerFeatures = function getLayerFeatures(type, layer, baseProjection) {
|
|
336
|
+
var pro;
|
|
337
|
+
|
|
338
|
+
switch (type) {
|
|
339
|
+
case 'hosted':
|
|
340
|
+
pro = this._getFeaturesFromHosted(layer, baseProjection);
|
|
341
|
+
break;
|
|
342
|
+
|
|
343
|
+
case 'rest_data':
|
|
344
|
+
pro = this._getFeaturesFromRestData(layer, baseProjection);
|
|
345
|
+
break;
|
|
346
|
+
|
|
347
|
+
case 'rest_map':
|
|
348
|
+
pro = this._getFeaturesFromRestMap(layer);
|
|
349
|
+
break;
|
|
350
|
+
|
|
351
|
+
case 'dataflow':
|
|
352
|
+
pro = this._getFeaturesFromDataflow(layer);
|
|
353
|
+
break;
|
|
354
|
+
|
|
355
|
+
case 'user_data':
|
|
356
|
+
pro = this._getFeaturesFromUserData(layer);
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return pro;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
_proto.getWmsInfo = function getWmsInfo(layerInfo) {
|
|
364
|
+
var _this4 = this;
|
|
365
|
+
|
|
366
|
+
return new Promise(function (resolve) {
|
|
367
|
+
var proxy = _this4.handleProxy();
|
|
368
|
+
|
|
369
|
+
var serviceUrl = SuperMap.Util.urlAppend(layerInfo.url, 'REQUEST=GetCapabilities&SERVICE=WMS');
|
|
370
|
+
SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
371
|
+
withCredentials: _this4.handleWithCredentials(proxy, layerInfo.url, false),
|
|
372
|
+
withoutFormatSuffix: true,
|
|
373
|
+
proxy: proxy
|
|
374
|
+
}).then(function (response) {
|
|
375
|
+
return response.text();
|
|
376
|
+
}).then(function (capabilitiesText) {
|
|
377
|
+
var converts = convert || window.convert;
|
|
378
|
+
var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
|
|
379
|
+
compact: true,
|
|
380
|
+
spaces: 4
|
|
381
|
+
}));
|
|
382
|
+
var wmsCapabilities = capabilities.WMT_MS_Capabilities || capabilities.WMS_Capabilities;
|
|
383
|
+
resolve({
|
|
384
|
+
version: wmsCapabilities['_attributes']['version']
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
_proto.getMapBoxStyle = function getMapBoxStyle(styleURL) {
|
|
391
|
+
return new Promise(function (resolve, reject) {
|
|
392
|
+
SuperMap.FetchRequest.get(styleURL).then(function (response) {
|
|
393
|
+
return response.json();
|
|
394
|
+
}).then(function (styleJSON) {
|
|
395
|
+
resolve(styleJSON);
|
|
396
|
+
}).catch(function (error) {
|
|
397
|
+
reject(error);
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
_proto.getWmtsInfo = function getWmtsInfo(layerInfo, mapCRS) {
|
|
403
|
+
var _this5 = this;
|
|
404
|
+
|
|
405
|
+
return new Promise(function (resolve, reject) {
|
|
406
|
+
var isMatched = false;
|
|
407
|
+
var matchMaxZoom = 22;
|
|
408
|
+
var matchMinZoom = 0;
|
|
409
|
+
var style = '';
|
|
410
|
+
var bounds;
|
|
411
|
+
var restResourceURL = '';
|
|
412
|
+
var kvpResourceUrl = '';
|
|
413
|
+
|
|
414
|
+
var proxy = _this5.handleProxy();
|
|
415
|
+
|
|
416
|
+
var serviceUrl = SuperMap.Util.urlAppend(layerInfo.url, 'REQUEST=GetCapabilities&SERVICE=WMTS&VERSION=1.0.0');
|
|
417
|
+
serviceUrl = _this5.handleParentRes(serviceUrl);
|
|
418
|
+
SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
419
|
+
withCredentials: _this5.handleWithCredentials(proxy, layerInfo.url, false),
|
|
420
|
+
withoutFormatSuffix: true,
|
|
421
|
+
proxy: proxy
|
|
422
|
+
}).then(function (response) {
|
|
423
|
+
return response.text();
|
|
424
|
+
}).then(function (capabilitiesText) {
|
|
425
|
+
var converts = convert || window.convert;
|
|
426
|
+
var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
|
|
427
|
+
compact: true,
|
|
428
|
+
spaces: 4,
|
|
429
|
+
alwaysArray: ['Layer', 'TileMatrixSet', 'ows:Operation', 'ows:Get', 'ResourceURL', 'Style']
|
|
430
|
+
})).Capabilities;
|
|
431
|
+
var content = capabilities.Contents;
|
|
432
|
+
var metaData = capabilities['ows:OperationsMetadata'];
|
|
433
|
+
|
|
434
|
+
if (metaData) {
|
|
435
|
+
var operations = metaData['ows:Operation'];
|
|
436
|
+
|
|
437
|
+
if (!Array.isArray(operations)) {
|
|
438
|
+
operations = [operations];
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
var operation = operations.find(function (item) {
|
|
442
|
+
return item._attributes.name === 'GetTile';
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
if (operation) {
|
|
446
|
+
var getConstraints = operation['ows:DCP']['ows:HTTP']['ows:Get'];
|
|
447
|
+
|
|
448
|
+
if (!Array.isArray(getConstraints)) {
|
|
449
|
+
getConstraints = [getConstraints];
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
var getConstraint = getConstraints.find(function (item) {
|
|
453
|
+
return item['ows:Constraint']['ows:AllowedValues']['ows:Value']['_text'] === 'KVP';
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
if (getConstraint) {
|
|
457
|
+
kvpResourceUrl = getConstraint['_attributes']['xlink:href'];
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
var tileMatrixSet = content.TileMatrixSet;
|
|
463
|
+
|
|
464
|
+
for (var i = 0; i < tileMatrixSet.length; i++) {
|
|
465
|
+
if (tileMatrixSet[i]['ows:Identifier'] && tileMatrixSet[i]['ows:Identifier']['_text'] === layerInfo.tileMatrixSet) {
|
|
466
|
+
if (tileMatrixSet[i]['WellKnownScaleSet'] && DEFAULT_WELLKNOWNSCALESET.includes(tileMatrixSet[i]['WellKnownScaleSet']['_text'])) {
|
|
467
|
+
isMatched = true;
|
|
468
|
+
} else {
|
|
469
|
+
var matchedScaleDenominator = {};
|
|
470
|
+
var defaultCRSScaleDenominators = mapCRS === 'EPSG:3857' ? MB_SCALEDENOMINATOR_3857 : MB_SCALEDENOMINATOR_4326;
|
|
471
|
+
var defaultCRSTopLeftCorner = mapCRS === 'EPSG:3857' ? [-2.0037508342789248e7, 2.0037508342789087e7] : [-180, 90];
|
|
472
|
+
|
|
473
|
+
for (var j = 0; j < tileMatrixSet[i].TileMatrix.length; j++) {
|
|
474
|
+
var tileMatrix = tileMatrixSet[i].TileMatrix[j];
|
|
475
|
+
var identifier = tileMatrix['ows:Identifier']['_text'];
|
|
476
|
+
var topLeftCorner = [].concat(tileMatrix['TopLeftCorner']['_text'].split(' '));
|
|
477
|
+
|
|
478
|
+
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]))) {
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
var defaultScaleDenominator = defaultCRSScaleDenominators[+identifier];
|
|
483
|
+
|
|
484
|
+
if (!defaultScaleDenominator) {
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
var scaleDenominator = parseFloat(tileMatrixSet[i].TileMatrix[j]['ScaleDenominator']['_text']);
|
|
489
|
+
|
|
490
|
+
if ((0, _util.numberEqual)(defaultScaleDenominator, scaleDenominator)) {
|
|
491
|
+
matchedScaleDenominator[+identifier] = scaleDenominator;
|
|
492
|
+
} else {
|
|
493
|
+
if (Object.keys(matchedScaleDenominator).length > 0) {
|
|
494
|
+
break;
|
|
495
|
+
} else {
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var zooms = Object.keys(matchedScaleDenominator).map(function (element) {
|
|
502
|
+
return +element;
|
|
503
|
+
});
|
|
504
|
+
matchMaxZoom = (0, _lodash.default)(zooms);
|
|
505
|
+
matchMinZoom = (0, _lodash2.default)(zooms);
|
|
506
|
+
|
|
507
|
+
if (zooms.length !== 0) {
|
|
508
|
+
isMatched = true;
|
|
509
|
+
} else {
|
|
510
|
+
throw Error('TileMatrixSetNotSuppport');
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
var layer = content.Layer.find(function (item) {
|
|
519
|
+
return item['ows:Identifier']['_text'] === layerInfo.layer;
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
if (layer) {
|
|
523
|
+
var styles = layer.Style;
|
|
524
|
+
|
|
525
|
+
if (Array.isArray(layer.Style)) {
|
|
526
|
+
style = styles[0]['ows:Identifier'] ? styles[0]['ows:Identifier']['_text'] : '';
|
|
527
|
+
} else {
|
|
528
|
+
style = styles['ows:Identifier'] ? styles['ows:Identifier']['_text'] : '';
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (layer['ows:WGS84BoundingBox']) {
|
|
532
|
+
var lowerCorner = layer['ows:WGS84BoundingBox']['ows:LowerCorner']['_text'].split(' ');
|
|
533
|
+
var upperCorner = layer['ows:WGS84BoundingBox']['ows:UpperCorner']['_text'].split(' ');
|
|
534
|
+
bounds = [parseFloat(lowerCorner[0]), parseFloat(lowerCorner[1]), parseFloat(upperCorner[0]), parseFloat(upperCorner[1])];
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
var resourceUrls = layer.ResourceURL;
|
|
538
|
+
|
|
539
|
+
if (!Array.isArray(resourceUrls)) {
|
|
540
|
+
resourceUrls = [resourceUrls];
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
var resourceUrl = resourceUrls.find(function (item) {
|
|
544
|
+
return item._attributes.resourceType === 'tile';
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
if (resourceUrl) {
|
|
548
|
+
restResourceURL = resourceUrl._attributes.template;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
resolve({
|
|
553
|
+
isMatched: isMatched,
|
|
554
|
+
matchMaxZoom: matchMaxZoom,
|
|
555
|
+
matchMinZoom: matchMinZoom,
|
|
556
|
+
style: style,
|
|
557
|
+
bounds: bounds,
|
|
558
|
+
restResourceURL: restResourceURL,
|
|
559
|
+
kvpResourceUrl: kvpResourceUrl
|
|
560
|
+
});
|
|
561
|
+
}).catch(function (error) {
|
|
562
|
+
reject(error);
|
|
563
|
+
});
|
|
564
|
+
});
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
_proto._getFeaturesFromHosted = function _getFeaturesFromHosted(layer, baseProjection) {
|
|
568
|
+
var dataSource = layer.dataSource,
|
|
569
|
+
layerType = layer.layerType;
|
|
570
|
+
var serverId = dataSource ? dataSource.serverId : layer.serverId;
|
|
571
|
+
|
|
572
|
+
if (!serverId) {
|
|
573
|
+
return new Promise(function (resolve) {
|
|
574
|
+
resolve({
|
|
575
|
+
type: 'noServerId'
|
|
576
|
+
});
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
var getDataFromIportal = layerType === 'MARKER' || dataSource && (!dataSource.accessType || dataSource.accessType === 'DIRECT');
|
|
581
|
+
|
|
582
|
+
if (getDataFromIportal) {
|
|
583
|
+
return this._getDataFromIportal(serverId, layer);
|
|
584
|
+
} else {
|
|
585
|
+
return this._getDataFromHosted({
|
|
586
|
+
layer: layer,
|
|
587
|
+
serverId: serverId,
|
|
588
|
+
baseProjection: baseProjection
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
_proto._getFeaturesFromRestData = function _getFeaturesFromRestData(layer, baseProjection) {
|
|
594
|
+
var _this6 = this;
|
|
595
|
+
|
|
596
|
+
var features;
|
|
597
|
+
var dataSource = layer.dataSource;
|
|
598
|
+
return new Promise(function (resolve, reject) {
|
|
599
|
+
_this6._getFeatureBySQL(dataSource.url, [decodeURIComponent(dataSource.dataSourceName) || layer.name], function (result) {
|
|
600
|
+
features = _this6.parseGeoJsonData2Feature({
|
|
601
|
+
allDatas: {
|
|
602
|
+
features: result.result.features.features
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
resolve({
|
|
606
|
+
type: 'feature',
|
|
607
|
+
features: features
|
|
608
|
+
});
|
|
609
|
+
}, function (err) {
|
|
610
|
+
reject(err);
|
|
611
|
+
}, baseProjection);
|
|
612
|
+
});
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
_proto._getFeaturesFromRestMap = function _getFeaturesFromRestMap(layer) {
|
|
616
|
+
var _this7 = this;
|
|
617
|
+
|
|
618
|
+
return new Promise(function (resolve, reject) {
|
|
619
|
+
_this7._queryFeatureBySQL(layer.dataSource.url, layer.dataSource.layerName, function (result) {
|
|
620
|
+
var recordsets = result && result.result.recordsets;
|
|
621
|
+
var recordset = recordsets && recordsets[0];
|
|
622
|
+
var attributes = recordset.fields;
|
|
623
|
+
|
|
624
|
+
if (recordset && attributes) {
|
|
625
|
+
var fileterAttrs = [];
|
|
626
|
+
|
|
627
|
+
for (var i in attributes) {
|
|
628
|
+
var value = attributes[i];
|
|
629
|
+
|
|
630
|
+
if (value.indexOf('Sm') !== 0 || value === 'SmID') {
|
|
631
|
+
fileterAttrs.push(value);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
_this7._getFeatures(fileterAttrs, layer, function (features) {
|
|
636
|
+
resolve({
|
|
637
|
+
type: 'feature',
|
|
638
|
+
features: features
|
|
639
|
+
});
|
|
640
|
+
}, function (err) {
|
|
641
|
+
reject(err);
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
}, function (err) {
|
|
645
|
+
reject(err);
|
|
646
|
+
}, 'smid=1');
|
|
647
|
+
});
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
_proto._getFeaturesFromUserData = function _getFeaturesFromUserData(layer) {
|
|
651
|
+
var _this8 = this;
|
|
652
|
+
|
|
653
|
+
var dataSource = layer.dataSource;
|
|
654
|
+
return new Promise(function (resolve, reject) {
|
|
655
|
+
var proxy = _this8.handleProxy();
|
|
656
|
+
|
|
657
|
+
var serviceUrl = _this8.handleParentRes(dataSource.url);
|
|
658
|
+
|
|
659
|
+
SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
660
|
+
withCredentials: _this8.handleWithCredentials(proxy, serviceUrl, _this8.withCredentials),
|
|
661
|
+
proxy: proxy,
|
|
662
|
+
withoutFormatSuffix: true
|
|
663
|
+
}).then(function (response) {
|
|
664
|
+
return response.json();
|
|
665
|
+
}).then(function (data) {
|
|
666
|
+
var features;
|
|
667
|
+
|
|
668
|
+
if (data && data instanceof Object && data.type === 'FeatureCollection') {
|
|
669
|
+
features = data.features;
|
|
670
|
+
} else {
|
|
671
|
+
features = data;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
features = _this8.parseGeoJsonData2Feature({
|
|
675
|
+
allDatas: {
|
|
676
|
+
features: features
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
resolve({
|
|
680
|
+
type: 'feature',
|
|
681
|
+
features: features
|
|
682
|
+
});
|
|
683
|
+
}).catch(function (err) {
|
|
684
|
+
reject(err);
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
_proto._queryFeatureBySQL = function _queryFeatureBySQL(url, layerName, _processCompleted, processFaild, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
|
|
690
|
+
var queryBySQLParams = this._getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute);
|
|
691
|
+
|
|
692
|
+
var proxy = this.handleProxy();
|
|
693
|
+
var serviceUrl = this.handleParentRes(url);
|
|
694
|
+
var queryBySQLService = new SuperMap.QueryBySQLService(serviceUrl, {
|
|
695
|
+
proxy: proxy,
|
|
696
|
+
withCredentials: this.handleWithCredentials(proxy, url, false),
|
|
697
|
+
eventListeners: {
|
|
698
|
+
processCompleted: function processCompleted(data) {
|
|
699
|
+
_processCompleted && _processCompleted(data);
|
|
700
|
+
},
|
|
701
|
+
processFailed: function processFailed(data) {
|
|
702
|
+
processFaild && processFaild(data);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
queryBySQLService.processAsync(queryBySQLParams);
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
_proto._getFeatures = function _getFeatures(fields, layerInfo, resolve, reject) {
|
|
710
|
+
var _this9 = this;
|
|
711
|
+
|
|
712
|
+
var source = layerInfo.dataSource;
|
|
713
|
+
|
|
714
|
+
this._queryFeatureBySQL(source.url, source.layerName, function (result) {
|
|
715
|
+
var recordsets = result.result.recordsets[0];
|
|
716
|
+
var features = recordsets.features.features;
|
|
717
|
+
|
|
718
|
+
var featuresObj = _this9.parseGeoJsonData2Feature({
|
|
719
|
+
allDatas: {
|
|
720
|
+
features: features
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
|
|
724
|
+
resolve(featuresObj);
|
|
725
|
+
}, function (err) {
|
|
726
|
+
reject(err);
|
|
727
|
+
}, null, fields);
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
_proto._getQueryFeaturesParam = function _getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
|
|
731
|
+
var queryParam = new SuperMap.FilterParameter({
|
|
732
|
+
name: layerName,
|
|
733
|
+
attributeFilter: attributeFilter
|
|
734
|
+
});
|
|
735
|
+
|
|
736
|
+
if (fields) {
|
|
737
|
+
queryParam.fields = fields;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
var params = {
|
|
741
|
+
queryParams: [queryParam]
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
if (onlyAttribute) {
|
|
745
|
+
params.queryOption = SuperMap.QueryOption.ATTRIBUTE;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
startRecord && (params.startRecord = startRecord);
|
|
749
|
+
recordLength && (params.expectCount = recordLength);
|
|
750
|
+
|
|
751
|
+
if (epsgCode) {
|
|
752
|
+
params.prjCoordSys = {
|
|
753
|
+
epsgCode: epsgCode
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
var queryBySQLParams = new SuperMap.QueryBySQLParameters(params);
|
|
758
|
+
return queryBySQLParams;
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
_proto._getFeaturesFromDataflow = function _getFeaturesFromDataflow(layer) {
|
|
762
|
+
var _this10 = this;
|
|
763
|
+
|
|
764
|
+
return new Promise(function (resolve, reject) {
|
|
765
|
+
_this10._getDataflowInfo(layer, function () {
|
|
766
|
+
resolve({
|
|
767
|
+
type: 'dataflow'
|
|
768
|
+
});
|
|
769
|
+
}, function (e) {
|
|
770
|
+
reject(e);
|
|
771
|
+
});
|
|
772
|
+
});
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
_proto._getDataflowInfo = function _getDataflowInfo(layerInfo, success, faild) {
|
|
776
|
+
var url = layerInfo.url;
|
|
777
|
+
var token;
|
|
778
|
+
var requestUrl = url + ".json";
|
|
779
|
+
|
|
780
|
+
if (layerInfo.credential && layerInfo.credential.token) {
|
|
781
|
+
token = layerInfo.credential.token;
|
|
782
|
+
requestUrl += "?token=" + token;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
var proxy = this.handleProxy();
|
|
786
|
+
requestUrl = this.handleParentRes(requestUrl);
|
|
787
|
+
SuperMap.FetchRequest.get(requestUrl, null, {
|
|
788
|
+
proxy: proxy,
|
|
789
|
+
withCredentials: this.handleWithCredentials(proxy, requestUrl, false)
|
|
790
|
+
}).then(function (response) {
|
|
791
|
+
return response.json();
|
|
792
|
+
}).then(function (result) {
|
|
793
|
+
if (!result) {
|
|
794
|
+
faild();
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
if (result.featureMetaData) {
|
|
799
|
+
layerInfo.featureType = result.featureMetaData.featureType.toUpperCase();
|
|
800
|
+
layerInfo.dataSource = {
|
|
801
|
+
dataTypes: {}
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
if (result.featureMetaData.fieldInfos && result.featureMetaData.fieldInfos.length > 0) {
|
|
805
|
+
result.featureMetaData.fieldInfos.forEach(function (data) {
|
|
806
|
+
var name = data.name.trim();
|
|
807
|
+
|
|
808
|
+
if (data.type === 'TEXT') {
|
|
809
|
+
layerInfo.dataSource.dataTypes[name] = 'STRING';
|
|
810
|
+
} else if (['DOUBLE', 'INT', 'FLOAT', 'LONG', 'SHORT'].includes(data.type)) {
|
|
811
|
+
layerInfo.dataSource.dataTypes[name] = 'NUMBER';
|
|
812
|
+
} else {
|
|
813
|
+
layerInfo.dataSource.dataTypes[name] = 'UNKNOWN';
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
layerInfo.wsUrl = result.urls[0].url;
|
|
820
|
+
layerInfo.name = result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];
|
|
821
|
+
success();
|
|
822
|
+
}).catch(function () {
|
|
823
|
+
faild();
|
|
824
|
+
});
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
_proto.getDatasourceType = function getDatasourceType(layer) {
|
|
828
|
+
var dataSource = layer.dataSource,
|
|
829
|
+
layerType = layer.layerType;
|
|
830
|
+
|
|
831
|
+
if (dataSource && dataSource.type === 'SAMPLE_DATA') {
|
|
832
|
+
return dataSource.type;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
var type;
|
|
836
|
+
var isHosted = dataSource && dataSource.serverId || layerType === 'MARKER' || layerType === 'HOSTED_TILE';
|
|
837
|
+
var isTile = layerType === 'SUPERMAP_REST' || layerType === 'TILE' || layerType === 'WMS' || layerType === 'WMTS' || layerType === 'MAPBOXSTYLE';
|
|
838
|
+
|
|
839
|
+
if (isHosted) {
|
|
840
|
+
type = 'hosted';
|
|
841
|
+
} else if (isTile) {
|
|
842
|
+
type = 'tile';
|
|
843
|
+
} else if (dataSource && dataSource.type === 'REST_DATA') {
|
|
844
|
+
type = 'rest_data';
|
|
845
|
+
} else if (dataSource && dataSource.type === 'REST_MAP' && dataSource.url) {
|
|
846
|
+
type = 'rest_map';
|
|
847
|
+
} else if (layerType === 'DATAFLOW_POINT_TRACK' || layerType === 'DATAFLOW_HEAT') {
|
|
848
|
+
type = 'dataflow';
|
|
849
|
+
} else if (dataSource && dataSource.type === 'USER_DATA') {
|
|
850
|
+
type = 'user_data';
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
return type;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
_proto.getFeatureProperties = function getFeatureProperties(features) {
|
|
857
|
+
var properties = [];
|
|
858
|
+
|
|
859
|
+
if (features && features.length) {
|
|
860
|
+
features.forEach(function (feature) {
|
|
861
|
+
var property = feature.properties;
|
|
862
|
+
property && properties.push(property);
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
return properties;
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
_proto.parseGeoJsonData2Feature = function parseGeoJsonData2Feature(metaData) {
|
|
870
|
+
var allFeatures = metaData.allDatas.features;
|
|
871
|
+
var features = [];
|
|
872
|
+
|
|
873
|
+
for (var i = 0, len = allFeatures.length; i < len; i++) {
|
|
874
|
+
var feature = allFeatures[i];
|
|
875
|
+
var coordinate = feature.geometry.coordinates;
|
|
876
|
+
|
|
877
|
+
if (allFeatures[i].geometry.type === 'Point') {
|
|
878
|
+
if (allFeatures[i].properties) {
|
|
879
|
+
allFeatures[i].properties.lon = coordinate[0];
|
|
880
|
+
allFeatures[i].properties.lat = coordinate[1];
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
feature.properties['index'] = i + '';
|
|
885
|
+
features.push(feature);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
return features;
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
_proto._getDataFromIportal = function _getDataFromIportal(serverId, layerInfo) {
|
|
892
|
+
var _this11 = this;
|
|
893
|
+
|
|
894
|
+
var features;
|
|
895
|
+
var url = this.serverUrl + "web/datas/" + serverId + "/content.json?pageSize=9999999¤tPage=1";
|
|
896
|
+
|
|
897
|
+
if (this.accessToken) {
|
|
898
|
+
url = url + "&" + this.accessKey + "=" + this.accessToken;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
return new Promise(function (resolve, reject) {
|
|
902
|
+
url = _this11.handleParentRes(url);
|
|
903
|
+
|
|
904
|
+
var proxy = _this11.handleProxy();
|
|
905
|
+
|
|
906
|
+
SuperMap.FetchRequest.get(url, null, {
|
|
907
|
+
withCredentials: _this11.handleWithCredentials(proxy, url, _this11.withCredentials),
|
|
908
|
+
proxy: proxy
|
|
909
|
+
}).then(function (response) {
|
|
910
|
+
return response.json();
|
|
911
|
+
}).then(function (data) {
|
|
912
|
+
return __awaiter(_this11, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
913
|
+
var _layerInfo$dataSource, divisionType, divisionField, geojson;
|
|
914
|
+
|
|
915
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
916
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
917
|
+
case 0:
|
|
918
|
+
if (data.succeed === false) {
|
|
919
|
+
reject(data.error);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
if (!(data && data.type)) {
|
|
923
|
+
_context2.next = 22;
|
|
924
|
+
break;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
if (!(data.type === 'JSON' || data.type === 'GEOJSON')) {
|
|
928
|
+
_context2.next = 7;
|
|
929
|
+
break;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
data.content = JSON.parse(data.content.trim());
|
|
933
|
+
features = this._formatGeoJSON(data.content);
|
|
934
|
+
_context2.next = 21;
|
|
935
|
+
break;
|
|
936
|
+
|
|
937
|
+
case 7:
|
|
938
|
+
if (!(data.type === 'EXCEL' || data.type === 'CSV')) {
|
|
939
|
+
_context2.next = 20;
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
if (!(layerInfo.dataSource && layerInfo.dataSource.administrativeInfo)) {
|
|
944
|
+
_context2.next = 17;
|
|
945
|
+
break;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
data.content.rows.unshift(data.content.colTitles);
|
|
949
|
+
_layerInfo$dataSource = layerInfo.dataSource.administrativeInfo, divisionType = _layerInfo$dataSource.divisionType, divisionField = _layerInfo$dataSource.divisionField;
|
|
950
|
+
_context2.next = 13;
|
|
951
|
+
return this._excelData2FeatureByDivision(data.content, divisionType, divisionField);
|
|
952
|
+
|
|
953
|
+
case 13:
|
|
954
|
+
geojson = _context2.sent;
|
|
955
|
+
features = this._formatGeoJSON(geojson);
|
|
956
|
+
_context2.next = 18;
|
|
957
|
+
break;
|
|
958
|
+
|
|
959
|
+
case 17:
|
|
960
|
+
features = this._excelData2Feature(data.content, layerInfo && layerInfo.xyField || {});
|
|
961
|
+
|
|
962
|
+
case 18:
|
|
963
|
+
_context2.next = 21;
|
|
964
|
+
break;
|
|
965
|
+
|
|
966
|
+
case 20:
|
|
967
|
+
if (data.type === 'SHP') {
|
|
968
|
+
data.content = JSON.parse(data.content.trim());
|
|
969
|
+
features = this._formatGeoJSON(data.content.layers[0]);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
case 21:
|
|
973
|
+
resolve({
|
|
974
|
+
type: 'feature',
|
|
975
|
+
features: features
|
|
976
|
+
});
|
|
977
|
+
|
|
978
|
+
case 22:
|
|
979
|
+
case "end":
|
|
980
|
+
return _context2.stop();
|
|
981
|
+
}
|
|
982
|
+
}, _callee2, this);
|
|
983
|
+
}));
|
|
984
|
+
}).catch(function (error) {
|
|
985
|
+
reject(error);
|
|
986
|
+
});
|
|
987
|
+
});
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
_proto._getDataFromHosted = function _getDataFromHosted(_ref) {
|
|
991
|
+
var _this12 = this;
|
|
992
|
+
|
|
993
|
+
var layer = _ref.layer,
|
|
994
|
+
serverId = _ref.serverId,
|
|
995
|
+
baseProjection = _ref.baseProjection;
|
|
996
|
+
var isMapService = layer.layerType === 'HOSTED_TILE';
|
|
997
|
+
return new Promise(function (resolve, reject) {
|
|
998
|
+
_this12._checkUploadToRelationship(serverId).then(function (result) {
|
|
999
|
+
if (result && result.length > 0) {
|
|
1000
|
+
var datasetName = result[0].name;
|
|
1001
|
+
var featureType = result[0].type.toUpperCase();
|
|
1002
|
+
|
|
1003
|
+
_this12._getDataService(serverId, datasetName).then(function (data) {
|
|
1004
|
+
var dataItemServices = data.dataItemServices;
|
|
1005
|
+
|
|
1006
|
+
if (dataItemServices.length === 0) {
|
|
1007
|
+
reject('noDataServices');
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
var param = {
|
|
1011
|
+
layer: layer,
|
|
1012
|
+
dataItemServices: dataItemServices,
|
|
1013
|
+
datasetName: datasetName,
|
|
1014
|
+
featureType: featureType,
|
|
1015
|
+
resolve: resolve,
|
|
1016
|
+
reject: reject,
|
|
1017
|
+
baseProjection: baseProjection
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
if (isMapService) {
|
|
1021
|
+
var dataService = dataItemServices.filter(function (info) {
|
|
1022
|
+
return info && info.serviceType === 'RESTDATA';
|
|
1023
|
+
})[0];
|
|
1024
|
+
|
|
1025
|
+
_this12._isMvt(dataService.address, datasetName, baseProjection).then(function (info) {
|
|
1026
|
+
_this12._getServiceInfoFromLayer(param, info);
|
|
1027
|
+
}).catch(function () {
|
|
1028
|
+
_this12._getServiceInfoFromLayer(param);
|
|
1029
|
+
});
|
|
1030
|
+
} else {
|
|
1031
|
+
_this12._getServiceInfoFromLayer(param);
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
} else {
|
|
1035
|
+
reject('resultIsEmpty');
|
|
1036
|
+
}
|
|
1037
|
+
}).catch(function (error) {
|
|
1038
|
+
reject(error);
|
|
1039
|
+
});
|
|
1040
|
+
});
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
_proto._isMvt = function _isMvt(serviceUrl, datasetName, baseProjection) {
|
|
1044
|
+
return this._getDatasetsInfo(serviceUrl, datasetName).then(function (info) {
|
|
1045
|
+
if (info.epsgCode == baseProjection.split('EPSG:')[1]) {
|
|
1046
|
+
return SuperMap.FetchRequest.get(info.url + "/tilefeature.mvt").then(function (response) {
|
|
1047
|
+
return response.json();
|
|
1048
|
+
}).then(function (result) {
|
|
1049
|
+
info.isMvt = result.error && result.error.code === 400;
|
|
1050
|
+
return info;
|
|
1051
|
+
}).catch(function () {
|
|
1052
|
+
return info;
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
return info;
|
|
1057
|
+
});
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
_proto._getServiceInfoFromLayer = function _getServiceInfoFromLayer(_ref2, info) {
|
|
1061
|
+
var _this13 = this;
|
|
1062
|
+
|
|
1063
|
+
var layer = _ref2.layer,
|
|
1064
|
+
dataItemServices = _ref2.dataItemServices,
|
|
1065
|
+
datasetName = _ref2.datasetName,
|
|
1066
|
+
featureType = _ref2.featureType,
|
|
1067
|
+
resolve = _ref2.resolve,
|
|
1068
|
+
reject = _ref2.reject,
|
|
1069
|
+
baseProjection = _ref2.baseProjection;
|
|
1070
|
+
var isMapService = info ? !info.isMvt : layer.layerType === 'HOSTED_TILE';
|
|
1071
|
+
var isAdded = false;
|
|
1072
|
+
dataItemServices.forEach(function (service) {
|
|
1073
|
+
if (isAdded) {
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
if (service && isMapService && service.serviceType === 'RESTMAP') {
|
|
1078
|
+
isAdded = true;
|
|
1079
|
+
|
|
1080
|
+
_this13._getTileLayerInfo(service.address, baseProjection).then(function (restMaps) {
|
|
1081
|
+
resolve({
|
|
1082
|
+
type: 'restMap',
|
|
1083
|
+
restMaps: restMaps
|
|
1084
|
+
});
|
|
1085
|
+
});
|
|
1086
|
+
} else if (service && !isMapService && service.serviceType === 'RESTDATA') {
|
|
1087
|
+
if (info && info.isMvt) {
|
|
1088
|
+
resolve({
|
|
1089
|
+
type: 'mvt',
|
|
1090
|
+
info: info,
|
|
1091
|
+
featureType: featureType
|
|
1092
|
+
});
|
|
1093
|
+
} else {
|
|
1094
|
+
isAdded = true;
|
|
1095
|
+
|
|
1096
|
+
_this13._getDatasources(service.address).then(function (datasourceName) {
|
|
1097
|
+
layer.dataSource.dataSourceName = datasourceName + ':' + datasetName;
|
|
1098
|
+
layer.dataSource.url = service.address + "/data";
|
|
1099
|
+
|
|
1100
|
+
_this13._getFeatureBySQL(layer.dataSource.url, [layer.dataSource.dataSourceName || layer.name], function (result) {
|
|
1101
|
+
var features = _this13.parseGeoJsonData2Feature({
|
|
1102
|
+
allDatas: {
|
|
1103
|
+
features: result.result.features.features
|
|
1104
|
+
}
|
|
1105
|
+
});
|
|
1106
|
+
|
|
1107
|
+
resolve({
|
|
1108
|
+
type: 'feature',
|
|
1109
|
+
features: features
|
|
1110
|
+
});
|
|
1111
|
+
}, function (err) {
|
|
1112
|
+
reject(err);
|
|
1113
|
+
});
|
|
1114
|
+
}, function (err) {
|
|
1115
|
+
reject(err);
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}, this);
|
|
1120
|
+
|
|
1121
|
+
if (!isAdded) {
|
|
1122
|
+
reject('noService');
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
_proto._getDatasetsInfo = function _getDatasetsInfo(serviceUrl, datasetName) {
|
|
1127
|
+
var _this14 = this;
|
|
1128
|
+
|
|
1129
|
+
return this._getDatasources(serviceUrl).then(function (datasourceName) {
|
|
1130
|
+
var url = serviceUrl + "/data/datasources/" + datasourceName + "/datasets/" + datasetName;
|
|
1131
|
+
|
|
1132
|
+
var proxy = _this14.handleProxy();
|
|
1133
|
+
|
|
1134
|
+
url = _this14.handleParentRes(url);
|
|
1135
|
+
return SuperMap.FetchRequest.get(url, null, {
|
|
1136
|
+
withCredentials: _this14.handleWithCredentials(proxy, url, false),
|
|
1137
|
+
proxy: proxy
|
|
1138
|
+
}).then(function (response) {
|
|
1139
|
+
return response.json();
|
|
1140
|
+
}).then(function (datasetsInfo) {
|
|
1141
|
+
return {
|
|
1142
|
+
epsgCode: datasetsInfo.datasetInfo.prjCoordSys.epsgCode,
|
|
1143
|
+
bounds: datasetsInfo.datasetInfo.bounds,
|
|
1144
|
+
datasourceName: datasourceName,
|
|
1145
|
+
datasetName: datasetName,
|
|
1146
|
+
url: url
|
|
1147
|
+
};
|
|
1148
|
+
});
|
|
1149
|
+
});
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
_proto._getDatasources = function _getDatasources(url) {
|
|
1153
|
+
var proxy = this.handleProxy();
|
|
1154
|
+
var serviceUrl = url + "/data/datasources.json";
|
|
1155
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1156
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1157
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, false),
|
|
1158
|
+
proxy: proxy
|
|
1159
|
+
}).then(function (response) {
|
|
1160
|
+
return response.json();
|
|
1161
|
+
}).then(function (datasource) {
|
|
1162
|
+
if (datasource.code === 401) {
|
|
1163
|
+
throw Error(datasource.errorMsg);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
var datasourceNames = datasource.datasourceNames;
|
|
1167
|
+
return datasourceNames[0];
|
|
1168
|
+
});
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
_proto._getDataService = function _getDataService(fileId, datasetName) {
|
|
1172
|
+
var proxy = this.handleProxy();
|
|
1173
|
+
var serviceUrl = this.serverUrl + "web/datas/" + fileId + ".json";
|
|
1174
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1175
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1176
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
|
|
1177
|
+
proxy: proxy
|
|
1178
|
+
}).then(function (response) {
|
|
1179
|
+
return response.json();
|
|
1180
|
+
}).then(function (result) {
|
|
1181
|
+
result.fileId = fileId;
|
|
1182
|
+
result.datasetName = datasetName;
|
|
1183
|
+
return result;
|
|
1184
|
+
});
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
_proto._checkUploadToRelationship = function _checkUploadToRelationship(fileId) {
|
|
1188
|
+
var proxy = this.handleProxy();
|
|
1189
|
+
var serviceUrl = this.serverUrl + "web/datas/" + fileId + "/datasets.json";
|
|
1190
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1191
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1192
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
|
|
1193
|
+
proxy: proxy
|
|
1194
|
+
}).then(function (response) {
|
|
1195
|
+
return response.json();
|
|
1196
|
+
}).then(function (result) {
|
|
1197
|
+
return result;
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
_proto._handleMapUrl = function _handleMapUrl() {
|
|
1202
|
+
var mapUrl = this.serverUrl + 'web/maps/' + this.mapId + '/map';
|
|
1203
|
+
|
|
1204
|
+
if (this.accessToken || this.accessKey) {
|
|
1205
|
+
mapUrl += true ? 'token=' + this.accessToken : undefined;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
var filter = 'getUrlResource.json?url=';
|
|
1209
|
+
|
|
1210
|
+
if (this.excludePortalProxyUrl && this.serverUrl.indexOf(filter) > -1) {
|
|
1211
|
+
var urlArray = this.serverUrl.split(filter);
|
|
1212
|
+
|
|
1213
|
+
if (urlArray.length > 1) {
|
|
1214
|
+
mapUrl = urlArray[0] + filter + this.serverUrl + 'web/maps/' + this.mapId + '/map.json';
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
mapUrl = mapUrl.indexOf('.json') === -1 ? mapUrl + ".json" : mapUrl;
|
|
1219
|
+
return mapUrl;
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
_proto.handleProxy = function handleProxy(type) {
|
|
1223
|
+
if (!this.proxy) {
|
|
1224
|
+
return null;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
var proxySuffix = this.proxyOptions[type || 'data'];
|
|
1228
|
+
var proxy = this.serverUrl + proxySuffix;
|
|
1229
|
+
|
|
1230
|
+
if (typeof this.proxy === 'string') {
|
|
1231
|
+
proxy = this.proxy;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
return proxy;
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1237
|
+
_proto.handleWithCredentials = function handleWithCredentials(proxyUrl, serviceUrl, defaultValue) {
|
|
1238
|
+
if (defaultValue === void 0) {
|
|
1239
|
+
defaultValue = this.withCredentials;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
if (serviceUrl === null || serviceUrl === void 0 ? void 0 : serviceUrl.includes('https://www.supermapol.com')) {
|
|
1243
|
+
return '';
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
if (proxyUrl && proxyUrl.startsWith(this.serverUrl) && (!serviceUrl || serviceUrl.startsWith(proxyUrl))) {
|
|
1247
|
+
return true;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
if (serviceUrl && this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0) {
|
|
1251
|
+
return true;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
return defaultValue;
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
_proto.isIportalResourceUrl = function isIportalResourceUrl(serviceUrl) {
|
|
1258
|
+
return serviceUrl.startsWith(this.serverUrl) || this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0;
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
_proto.handleParentRes = function handleParentRes(url, parentResId, parentResType) {
|
|
1262
|
+
if (parentResId === void 0) {
|
|
1263
|
+
parentResId = this.mapId;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
if (parentResType === void 0) {
|
|
1267
|
+
parentResType = 'MAP';
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
if (!this.isIportalResourceUrl(url)) {
|
|
1271
|
+
return url;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
return (0, _util.urlAppend)(url, "parentResType=" + parentResType + "&parentResId=" + parentResId);
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
_proto._formatGeoJSON = function _formatGeoJSON(data) {
|
|
1278
|
+
var features = data.features;
|
|
1279
|
+
features.forEach(function (row, index) {
|
|
1280
|
+
row.properties['index'] = index;
|
|
1281
|
+
});
|
|
1282
|
+
return features;
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
_proto._excelData2Feature = function _excelData2Feature(dataContent, xyField) {
|
|
1286
|
+
if (xyField === void 0) {
|
|
1287
|
+
xyField = {};
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
var fieldCaptions = dataContent.colTitles;
|
|
1291
|
+
var xfieldIndex = fieldCaptions.indexOf(xyField.xField);
|
|
1292
|
+
var yfieldIndex = fieldCaptions.indexOf(xyField.yField);
|
|
1293
|
+
|
|
1294
|
+
if (yfieldIndex < 0 || xfieldIndex < 0) {
|
|
1295
|
+
for (var i = 0, len = fieldCaptions.length; i < len; i++) {
|
|
1296
|
+
if ((0, _util.isXField)(fieldCaptions[i])) {
|
|
1297
|
+
xfieldIndex = i;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
if ((0, _util.isYField)(fieldCaptions[i])) {
|
|
1301
|
+
yfieldIndex = i;
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
var features = [];
|
|
1307
|
+
|
|
1308
|
+
for (var _i = 0, _len = dataContent.rows.length; _i < _len; _i++) {
|
|
1309
|
+
var row = dataContent.rows[_i];
|
|
1310
|
+
var x = Number(row[xfieldIndex]);
|
|
1311
|
+
var y = Number(row[yfieldIndex]);
|
|
1312
|
+
|
|
1313
|
+
if (isNaN(x) || isNaN(y)) {
|
|
1314
|
+
continue;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
var attributes = {};
|
|
1318
|
+
|
|
1319
|
+
for (var index = 0; index < dataContent.colTitles.length; index++) {
|
|
1320
|
+
var element = dataContent.colTitles[index].trim();
|
|
1321
|
+
attributes[element] = dataContent.rows[_i][index];
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
attributes['index'] = _i + '';
|
|
1325
|
+
var feature = {
|
|
1326
|
+
type: 'Feature',
|
|
1327
|
+
geometry: {
|
|
1328
|
+
type: 'Point',
|
|
1329
|
+
coordinates: [x, y]
|
|
1330
|
+
},
|
|
1331
|
+
properties: attributes
|
|
1332
|
+
};
|
|
1333
|
+
features.push(feature);
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
return features;
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
_proto._excelData2FeatureByDivision = function _excelData2FeatureByDivision(content, divisionType, divisionField) {
|
|
1340
|
+
var _this15 = this;
|
|
1341
|
+
|
|
1342
|
+
var dataName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData' : 'ProvinceData';
|
|
1343
|
+
|
|
1344
|
+
if (window[dataName] && window[dataName].features) {
|
|
1345
|
+
return new Promise(function (resolve) {
|
|
1346
|
+
resolve(_this15._combineFeature(content, window[dataName], divisionField));
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
var dataFileName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData.js' : 'ProvincialData.js';
|
|
1351
|
+
var proxy = this.handleProxy();
|
|
1352
|
+
var dataUrl = this.serverUrl + "apps/dataviz/libs/administrative_data/" + dataFileName;
|
|
1353
|
+
return SuperMap.FetchRequest.get(dataUrl, null, {
|
|
1354
|
+
withCredentials: false,
|
|
1355
|
+
proxy: proxy,
|
|
1356
|
+
withoutFormatSuffix: true
|
|
1357
|
+
}).then(function (response) {
|
|
1358
|
+
return response.text();
|
|
1359
|
+
}).then(function (result) {
|
|
1360
|
+
new Function(result)();
|
|
1361
|
+
return _this15._combineFeature(content, window[dataName], divisionField);
|
|
1362
|
+
});
|
|
1363
|
+
};
|
|
1364
|
+
|
|
1365
|
+
_proto._combineFeature = function _combineFeature(properties, geoData, divisionField) {
|
|
1366
|
+
var _this16 = this;
|
|
1367
|
+
|
|
1368
|
+
var geojson = {
|
|
1369
|
+
type: 'FeatureCollection',
|
|
1370
|
+
features: []
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
if (properties.length < 2) {
|
|
1374
|
+
return geojson;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
var titles = properties.colTitles;
|
|
1378
|
+
var rows = properties.rows;
|
|
1379
|
+
var fieldIndex = titles.findIndex(function (title) {
|
|
1380
|
+
return title === divisionField;
|
|
1381
|
+
});
|
|
1382
|
+
rows.forEach(function (row) {
|
|
1383
|
+
var feature = geoData.features.find(function (item) {
|
|
1384
|
+
return _this16._isMatchAdministrativeName(item.properties.Name, row[fieldIndex]);
|
|
1385
|
+
});
|
|
1386
|
+
|
|
1387
|
+
if (feature) {
|
|
1388
|
+
var province = feature.properties.Province;
|
|
1389
|
+
var combineFeature = {
|
|
1390
|
+
properties: {},
|
|
1391
|
+
geometry: feature.geometry,
|
|
1392
|
+
type: 'Feature'
|
|
1393
|
+
};
|
|
1394
|
+
row.forEach(function (item, idx) {
|
|
1395
|
+
combineFeature.properties[titles[idx]] = item;
|
|
1396
|
+
});
|
|
1397
|
+
|
|
1398
|
+
if (province) {
|
|
1399
|
+
combineFeature.properties.Province = province;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
geojson.features.push(combineFeature);
|
|
1403
|
+
}
|
|
1404
|
+
});
|
|
1405
|
+
return geojson;
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
_proto._isMatchAdministrativeName = function _isMatchAdministrativeName(featureName, fieldName) {
|
|
1409
|
+
if (featureName && typeof fieldName === 'string' && fieldName.constructor === String) {
|
|
1410
|
+
var shortName = featureName.trim().substr(0, 2);
|
|
1411
|
+
|
|
1412
|
+
if (shortName === '张家') {
|
|
1413
|
+
shortName = featureName.trim().substr(0, 3);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
if (shortName === '阿拉') {
|
|
1417
|
+
shortName = featureName.trim().substr(0, 3);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
return !!fieldName.match(new RegExp(shortName));
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
return false;
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
_proto._getTileLayerInfo = function _getTileLayerInfo(url, baseProjection) {
|
|
1427
|
+
var _this17 = this;
|
|
1428
|
+
|
|
1429
|
+
var proxy = this.handleProxy();
|
|
1430
|
+
var epsgCode = baseProjection.split('EPSG:')[1];
|
|
1431
|
+
var serviceUrl = url + "/maps.json";
|
|
1432
|
+
serviceUrl = this.handleParentRes(serviceUrl);
|
|
1433
|
+
return SuperMap.FetchRequest.get(serviceUrl, null, {
|
|
1434
|
+
withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
|
|
1435
|
+
proxy: proxy
|
|
1436
|
+
}).then(function (response) {
|
|
1437
|
+
return response.json();
|
|
1438
|
+
}).then(function (mapInfo) {
|
|
1439
|
+
var promises = [];
|
|
1440
|
+
|
|
1441
|
+
if (mapInfo) {
|
|
1442
|
+
mapInfo.forEach(function (info) {
|
|
1443
|
+
var promise = SuperMap.FetchRequest.get(info.path + ".json?prjCoordSys=" + JSON.stringify({
|
|
1444
|
+
epsgCode: epsgCode
|
|
1445
|
+
}), null, {
|
|
1446
|
+
withCredentials: _this17.withCredentials,
|
|
1447
|
+
proxy: proxy
|
|
1448
|
+
}).then(function (response) {
|
|
1449
|
+
return response.json();
|
|
1450
|
+
}).then(function (restMapInfo) {
|
|
1451
|
+
restMapInfo.url = info.path;
|
|
1452
|
+
return restMapInfo;
|
|
1453
|
+
});
|
|
1454
|
+
promises.push(promise);
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
return Promise.all(promises).then(function (allRestMaps) {
|
|
1459
|
+
return allRestMaps;
|
|
1460
|
+
});
|
|
1461
|
+
});
|
|
1462
|
+
};
|
|
1463
|
+
|
|
1464
|
+
_proto._getFeatureBySQL = function _getFeatureBySQL(url, datasetNames, _processCompleted2, processFaild, baseProjection) {
|
|
1465
|
+
var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
|
|
1466
|
+
getFeatureParam = new SuperMap.FilterParameter({
|
|
1467
|
+
name: datasetNames.join().replace(':', '@'),
|
|
1468
|
+
attributeFilter: null
|
|
1469
|
+
});
|
|
1470
|
+
getFeatureBySQLParams = new SuperMap.GetFeaturesBySQLParameters({
|
|
1471
|
+
queryParameter: getFeatureParam,
|
|
1472
|
+
datasetNames: datasetNames,
|
|
1473
|
+
fromIndex: 0,
|
|
1474
|
+
toIndex: -1,
|
|
1475
|
+
maxFeatures: -1,
|
|
1476
|
+
returnContent: true
|
|
1477
|
+
});
|
|
1478
|
+
|
|
1479
|
+
if (baseProjection) {
|
|
1480
|
+
if (baseProjection === 'EPSG:3857' || baseProjection === 'EPSG:-1000') {
|
|
1481
|
+
getFeatureBySQLParams.targetEpsgCode = 4326;
|
|
1482
|
+
} else {
|
|
1483
|
+
getFeatureBySQLParams.targetEpsgCode = +baseProjection.split(':')[1];
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
var proxy = this.handleProxy();
|
|
1488
|
+
var options = {
|
|
1489
|
+
proxy: proxy,
|
|
1490
|
+
withCredentials: this.handleWithCredentials(proxy, url, false),
|
|
1491
|
+
eventListeners: {
|
|
1492
|
+
processCompleted: function processCompleted(getFeaturesEventArgs) {
|
|
1493
|
+
var result = getFeaturesEventArgs.result;
|
|
1494
|
+
|
|
1495
|
+
if (result && result.datasetInfos) {
|
|
1496
|
+
var fields = [];
|
|
1497
|
+
var fieldCaptions = [];
|
|
1498
|
+
var fieldTypes = [];
|
|
1499
|
+
var fieldInfos = result.datasetInfos[0].fieldInfos;
|
|
1500
|
+
fieldInfos.forEach(function (fieldInfo) {
|
|
1501
|
+
if (fieldInfo.name) {
|
|
1502
|
+
fields.push(fieldInfo.name.toUpperCase());
|
|
1503
|
+
fieldCaptions.push(fieldInfo.caption.toUpperCase());
|
|
1504
|
+
fieldTypes.push(fieldInfo.type);
|
|
1505
|
+
}
|
|
1506
|
+
});
|
|
1507
|
+
var data = (0, _statistics.statisticsFeatures)(result.features.features, fields, fieldCaptions, fieldTypes);
|
|
1508
|
+
getFeaturesEventArgs.result.features.features = data.features;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
_processCompleted2 && _processCompleted2(getFeaturesEventArgs);
|
|
1512
|
+
},
|
|
1513
|
+
processFailed: function processFailed(e) {
|
|
1514
|
+
processFaild && processFaild(e);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
};
|
|
1518
|
+
var serviceUrl = this.handleParentRes(url);
|
|
1519
|
+
getFeatureBySQLService = new SuperMap.GetFeaturesBySQLService(serviceUrl, options);
|
|
1520
|
+
getFeatureBySQLService.processAsync(getFeatureBySQLParams);
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
_proto.getEpsgCodeInfo = function getEpsgCodeInfo(epsgCode, iPortalUrl) {
|
|
1524
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
1525
|
+
var url, codeUrl, wkt;
|
|
1526
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
1527
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1528
|
+
case 0:
|
|
1529
|
+
url = iPortalUrl.slice(-1) === '/' ? iPortalUrl : iPortalUrl + "/";
|
|
1530
|
+
codeUrl = url + "epsgcodes/" + epsgCode + ".json";
|
|
1531
|
+
_context3.next = 4;
|
|
1532
|
+
return SuperMap.FetchRequest.get(codeUrl, null).then(function (response) {
|
|
1533
|
+
return response.json();
|
|
1534
|
+
}).then(function (epsgcodeInfo) {
|
|
1535
|
+
return epsgcodeInfo.wkt;
|
|
1536
|
+
}).catch(function (err) {
|
|
1537
|
+
console.error(err);
|
|
1538
|
+
return undefined;
|
|
1539
|
+
});
|
|
1540
|
+
|
|
1541
|
+
case 4:
|
|
1542
|
+
wkt = _context3.sent;
|
|
1543
|
+
return _context3.abrupt("return", wkt);
|
|
1544
|
+
|
|
1545
|
+
case 6:
|
|
1546
|
+
case "end":
|
|
1547
|
+
return _context3.stop();
|
|
1548
|
+
}
|
|
1549
|
+
}, _callee3);
|
|
1550
|
+
}));
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
return WebMapService;
|
|
1554
|
+
}(_Events2.Events);
|
|
1555
|
+
|
|
1556
|
+
/***/ }),
|
|
1557
|
+
|
|
1558
|
+
/***/ 252:
|
|
1559
|
+
/***/ (function(module, exports) {
|
|
1560
|
+
|
|
1561
|
+
module.exports = require("xml-js");
|
|
1562
|
+
|
|
1563
|
+
/***/ }),
|
|
1564
|
+
|
|
1565
|
+
/***/ 253:
|
|
1566
|
+
/***/ (function(module, exports) {
|
|
1567
|
+
|
|
1568
|
+
module.exports = require("lodash.min");
|
|
1569
|
+
|
|
1570
|
+
/***/ }),
|
|
1571
|
+
|
|
1572
|
+
/***/ 38:
|
|
1573
|
+
/***/ (function(module, exports) {
|
|
1574
|
+
|
|
1575
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_utils/statistics.js");
|
|
1576
|
+
|
|
1577
|
+
/***/ }),
|
|
1578
|
+
|
|
1579
|
+
/***/ 43:
|
|
1580
|
+
/***/ (function(module, exports) {
|
|
1581
|
+
|
|
1582
|
+
module.exports = require("@babel/runtime/regenerator");
|
|
1583
|
+
|
|
1584
|
+
/***/ }),
|
|
1585
|
+
|
|
1586
|
+
/***/ 59:
|
|
1587
|
+
/***/ (function(module, exports) {
|
|
1588
|
+
|
|
1589
|
+
module.exports = require("lodash.max");
|
|
1590
|
+
|
|
1591
|
+
/***/ }),
|
|
1592
|
+
|
|
1593
|
+
/***/ 6:
|
|
1594
|
+
/***/ (function(module, exports) {
|
|
1595
|
+
|
|
1596
|
+
module.exports = require("@babel/runtime/helpers/inheritsLoose");
|
|
1597
|
+
|
|
1598
|
+
/***/ }),
|
|
1599
|
+
|
|
1600
|
+
/***/ 9:
|
|
1601
|
+
/***/ (function(module, exports) {
|
|
1602
|
+
|
|
1603
|
+
module.exports = require("@supermapgis/vue-iclient-leaflet/lib/_utils/util.js");
|
|
1604
|
+
|
|
1605
|
+
/***/ })
|
|
1606
|
+
|
|
1607
|
+
/******/ });
|