@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.
Files changed (719) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/dist/iclient-leaflet-vue.css +24471 -0
  4. package/dist/iclient-leaflet-vue.js +190317 -0
  5. package/dist/iclient-leaflet-vue.min.css +9 -0
  6. package/dist/iclient-leaflet-vue.min.js +517 -0
  7. package/dist/index.js +15 -0
  8. package/lib/_assets/iconfont/icon-sm-components.css +245 -0
  9. package/lib/_assets/iconfont/icon-sm-components.eot +0 -0
  10. package/lib/_assets/iconfont/icon-sm-components.svg +197 -0
  11. package/lib/_assets/iconfont/icon-sm-components.ttf +0 -0
  12. package/lib/_assets/iconfont/icon-sm-components.woff +0 -0
  13. package/lib/_assets/iconfont/icon-sm-components.woff2 +0 -0
  14. package/lib/_lang/en.js +446 -0
  15. package/lib/_lang/index.js +385 -0
  16. package/lib/_lang/zh.js +445 -0
  17. package/lib/_mixin/AntdRender.js +686 -0
  18. package/lib/_mixin/Card.js +197 -0
  19. package/lib/_mixin/GridLayer.js +153 -0
  20. package/lib/_mixin/Layer.js +140 -0
  21. package/lib/_mixin/Options.js +114 -0
  22. package/lib/_mixin/Popper.js +134 -0
  23. package/lib/_mixin/Theme.js +441 -0
  24. package/lib/_mixin/ThirdService.js +243 -0
  25. package/lib/_mixin/TileLayer.js +138 -0
  26. package/lib/_mixin/Timer.js +230 -0
  27. package/lib/_mixin/VmUpdater.js +204 -0
  28. package/lib/_mixin/WebMapBase.js +3467 -0
  29. package/lib/_mixin/map-events.js +200 -0
  30. package/lib/_mixin/map-getter.js +341 -0
  31. package/lib/_types/AddressMatchParameter.js +118 -0
  32. package/lib/_types/GeoJSONParamter.js +113 -0
  33. package/lib/_types/RestDataParameter.js +141 -0
  34. package/lib/_types/RestMapParameter.js +141 -0
  35. package/lib/_types/RestParameter.js +121 -0
  36. package/lib/_types/event/BaseTypes.js +124 -0
  37. package/lib/_types/event/Event.js +442 -0
  38. package/lib/_types/event/Events.js +484 -0
  39. package/lib/_types/event/Pixel.js +295 -0
  40. package/lib/_types/event/Util.js +305 -0
  41. package/lib/_types/iPortalDataParameter.js +121 -0
  42. package/lib/_types/iServerBaseParameter.js +111 -0
  43. package/lib/_types/iServerDataParameter.js +154 -0
  44. package/lib/_types/iServerMapParameter.js +154 -0
  45. package/lib/_types/index.js +231 -0
  46. package/lib/_types/map-event.js +163 -0
  47. package/lib/_utils/EchartsDataService.js +843 -0
  48. package/lib/_utils/RestService.js +7096 -0
  49. package/lib/_utils/WebMapService.js +1607 -0
  50. package/lib/_utils/epsg-define.js +181 -0
  51. package/lib/_utils/get-features.js +232 -0
  52. package/lib/_utils/global-event.js +134 -0
  53. package/lib/_utils/iPortalDataService.js +7459 -0
  54. package/lib/_utils/iServerRestService.js +7603 -0
  55. package/lib/_utils/props-binder.js +129 -0
  56. package/lib/_utils/statistics.js +147 -0
  57. package/lib/_utils/style/color/colorPalette.js +192 -0
  58. package/lib/_utils/style/color/serialColors.js +352 -0
  59. package/lib/_utils/style/common/common.css +1 -0
  60. package/lib/_utils/style/mixins/config.css +0 -0
  61. package/lib/_utils/style/mixins/mixins.css +0 -0
  62. package/lib/_utils/style/theme/antd.css +25242 -0
  63. package/lib/_utils/style/theme/antdVar.css +0 -0
  64. package/lib/_utils/style/theme/chart.js +7477 -0
  65. package/lib/_utils/style/theme/set-theme.js +200 -0
  66. package/lib/_utils/style/theme/theme.css +0 -0
  67. package/lib/_utils/style/theme/theme.json +356 -0
  68. package/lib/_utils/util.js +484 -0
  69. package/lib/_utils/vue-types/index.js +396 -0
  70. package/lib/_utils/vue-types/utils.js +318 -0
  71. package/lib/avatar/index.js +656 -0
  72. package/lib/avatar/style/avatar.css +1 -0
  73. package/lib/avatar/style/css.js +9 -0
  74. package/lib/avatar/style/index.css +2135 -0
  75. package/lib/avatar/style/index.js +9 -0
  76. package/lib/border/index.js +642 -0
  77. package/lib/border/style/border.css +1 -0
  78. package/lib/border/style/css.js +7 -0
  79. package/lib/border/style/index.js +7 -0
  80. package/lib/breadcrumb/index.js +813 -0
  81. package/lib/breadcrumb/style/breadcrumb.css +1 -0
  82. package/lib/breadcrumb/style/css.js +9 -0
  83. package/lib/breadcrumb/style/index.css +2102 -0
  84. package/lib/breadcrumb/style/index.js +9 -0
  85. package/lib/button/index.js +758 -0
  86. package/lib/button/style/button.css +1 -0
  87. package/lib/button/style/css.js +9 -0
  88. package/lib/button/style/index.css +3571 -0
  89. package/lib/button/style/index.js +9 -0
  90. package/lib/card/index.js +824 -0
  91. package/lib/card/style/card.css +1 -0
  92. package/lib/card/style/css.js +9 -0
  93. package/lib/card/style/index.css +2379 -0
  94. package/lib/card/style/index.js +9 -0
  95. package/lib/chart/index.js +9471 -0
  96. package/lib/chart/style/chart.css +1 -0
  97. package/lib/chart/style/css.js +11 -0
  98. package/lib/chart/style/index.js +11 -0
  99. package/lib/checkbox/index.js +756 -0
  100. package/lib/checkbox/style/checkbox.css +1 -0
  101. package/lib/checkbox/style/css.js +9 -0
  102. package/lib/checkbox/style/index.css +2286 -0
  103. package/lib/checkbox/style/index.js +9 -0
  104. package/lib/collapse/index.js +446 -0
  105. package/lib/collapse/style/collapse.css +1 -0
  106. package/lib/collapse/style/css.js +9 -0
  107. package/lib/collapse/style/index.css +2187 -0
  108. package/lib/collapse/style/index.js +9 -0
  109. package/lib/collapse-card/index.js +588 -0
  110. package/lib/collapse-card/style/collapse-card.css +1 -0
  111. package/lib/collapse-card/style/css.js +7 -0
  112. package/lib/collapse-card/style/index.js +7 -0
  113. package/lib/color-picker/index.js +521 -0
  114. package/lib/color-picker/style/color-picker.css +1 -0
  115. package/lib/color-picker/style/css.js +7 -0
  116. package/lib/color-picker/style/index.js +7 -0
  117. package/lib/date-picker/index.js +680 -0
  118. package/lib/date-picker/style/css.js +9 -0
  119. package/lib/date-picker/style/date-picker.css +1 -0
  120. package/lib/date-picker/style/index.css +4236 -0
  121. package/lib/date-picker/style/index.js +9 -0
  122. package/lib/dropdown/index.js +347 -0
  123. package/lib/dropdown/style/css.js +9 -0
  124. package/lib/dropdown/style/dropdown.css +1 -0
  125. package/lib/dropdown/style/index.css +2344 -0
  126. package/lib/dropdown/style/index.js +9 -0
  127. package/lib/empty/index.js +643 -0
  128. package/lib/empty/style/css.js +9 -0
  129. package/lib/empty/style/empty.css +1 -0
  130. package/lib/empty/style/index.css +2095 -0
  131. package/lib/empty/style/index.js +9 -0
  132. package/lib/icon/index.js +681 -0
  133. package/lib/icon/style/css.js +9 -0
  134. package/lib/icon/style/icon.css +1 -0
  135. package/lib/icon/style/index.css +2058 -0
  136. package/lib/icon/style/index.js +9 -0
  137. package/lib/identify/index.js +1081 -0
  138. package/lib/identify/style/css.js +9 -0
  139. package/lib/identify/style/identify.css +1 -0
  140. package/lib/identify/style/index.js +9 -0
  141. package/lib/iframe/index.js +344 -0
  142. package/lib/iframe/style/css.js +7 -0
  143. package/lib/iframe/style/iframe.css +1 -0
  144. package/lib/iframe/style/index.js +7 -0
  145. package/lib/image/index.js +446 -0
  146. package/lib/image/style/css.js +7 -0
  147. package/lib/image/style/image.css +1 -0
  148. package/lib/image/style/index.js +7 -0
  149. package/lib/index.js +1040 -0
  150. package/lib/indicator/index.js +996 -0
  151. package/lib/indicator/style/countTo.css +1 -0
  152. package/lib/indicator/style/css.js +7 -0
  153. package/lib/indicator/style/index.js +7 -0
  154. package/lib/indicator/style/indicator.css +1 -0
  155. package/lib/init.js +207 -0
  156. package/lib/input/index.js +1151 -0
  157. package/lib/input/style/css.js +9 -0
  158. package/lib/input/style/index.css +2549 -0
  159. package/lib/input/style/index.js +9 -0
  160. package/lib/input/style/input.css +1 -0
  161. package/lib/input-number/index.js +739 -0
  162. package/lib/input-number/style/css.js +9 -0
  163. package/lib/input-number/style/index.css +2360 -0
  164. package/lib/input-number/style/index.js +9 -0
  165. package/lib/input-number/style/input-number.css +1 -0
  166. package/lib/layout/index.js +700 -0
  167. package/lib/layout/style/css.js +9 -0
  168. package/lib/layout/style/index.css +2185 -0
  169. package/lib/layout/style/index.js +9 -0
  170. package/lib/layout/style/layout.css +0 -0
  171. package/lib/liquid-fill/index.js +983 -0
  172. package/lib/liquid-fill/style/css.js +7 -0
  173. package/lib/liquid-fill/style/index.js +7 -0
  174. package/lib/liquid-fill/style/liquid-fill.css +1 -0
  175. package/lib/marker/index.js +649 -0
  176. package/lib/marker/style/css.js +0 -0
  177. package/lib/marker/style/index.js +0 -0
  178. package/lib/menu/index.js +858 -0
  179. package/lib/menu/style/css.js +9 -0
  180. package/lib/menu/style/index.css +2777 -0
  181. package/lib/menu/style/index.js +9 -0
  182. package/lib/menu/style/menu.css +0 -0
  183. package/lib/message/index.js +174 -0
  184. package/lib/message/style/css.js +9 -0
  185. package/lib/message/style/index.css +2143 -0
  186. package/lib/message/style/index.js +9 -0
  187. package/lib/message/style/message.css +1 -0
  188. package/lib/modal/index.js +742 -0
  189. package/lib/modal/style/css.js +9 -0
  190. package/lib/modal/style/index.css +2289 -0
  191. package/lib/modal/style/index.js +9 -0
  192. package/lib/modal/style/modal.css +1 -0
  193. package/lib/nav/style/css.js +9 -0
  194. package/lib/nav/style/index.js +9 -0
  195. package/lib/nav/style/nav.css +1 -0
  196. package/lib/notification/index.js +151 -0
  197. package/lib/notification/style/css.js +9 -0
  198. package/lib/notification/style/index.css +2285 -0
  199. package/lib/notification/style/index.js +9 -0
  200. package/lib/notification/style/notification.css +1 -0
  201. package/lib/pagination/index.js +352 -0
  202. package/lib/pagination/style/css.js +9 -0
  203. package/lib/pagination/style/index.css +2529 -0
  204. package/lib/pagination/style/index.js +9 -0
  205. package/lib/pagination/style/pagination.css +1 -0
  206. package/lib/popup/index.js +800 -0
  207. package/lib/popup/style/css.js +0 -0
  208. package/lib/popup/style/index.js +0 -0
  209. package/lib/progress/index.js +1146 -0
  210. package/lib/progress/style/css.js +9 -0
  211. package/lib/progress/style/index.css +2226 -0
  212. package/lib/progress/style/index.js +9 -0
  213. package/lib/progress/style/progress.css +1 -0
  214. package/lib/radio/index.js +852 -0
  215. package/lib/radio/style/css.js +9 -0
  216. package/lib/radio/style/index.css +2381 -0
  217. package/lib/radio/style/index.js +9 -0
  218. package/lib/radio/style/radio.css +1 -0
  219. package/lib/select/index.js +836 -0
  220. package/lib/select/style/css.js +9 -0
  221. package/lib/select/style/index.css +2655 -0
  222. package/lib/select/style/index.js +9 -0
  223. package/lib/select/style/select.css +1 -0
  224. package/lib/slider/index.js +347 -0
  225. package/lib/slider/style/css.js +9 -0
  226. package/lib/slider/style/index.css +2233 -0
  227. package/lib/slider/style/index.js +9 -0
  228. package/lib/slider/style/slider.css +1 -0
  229. package/lib/slideshow/index.js +913 -0
  230. package/lib/slideshow/style/css.js +9 -0
  231. package/lib/slideshow/style/index.js +9 -0
  232. package/lib/slideshow/style/slideshow.css +1 -0
  233. package/lib/spin/index.js +357 -0
  234. package/lib/spin/style/css.js +9 -0
  235. package/lib/spin/style/index.css +2268 -0
  236. package/lib/spin/style/index.js +9 -0
  237. package/lib/spin/style/spin.css +1 -0
  238. package/lib/steps/index.js +748 -0
  239. package/lib/steps/style/css.js +9 -0
  240. package/lib/steps/style/index.css +2724 -0
  241. package/lib/steps/style/index.js +9 -0
  242. package/lib/steps/style/steps.css +1 -0
  243. package/lib/style.js +7 -0
  244. package/lib/switch/index.js +654 -0
  245. package/lib/switch/style/css.js +9 -0
  246. package/lib/switch/style/index.css +2241 -0
  247. package/lib/switch/style/index.js +9 -0
  248. package/lib/switch/style/switch.css +1 -0
  249. package/lib/table/index.js +810 -0
  250. package/lib/table/style/css.js +9 -0
  251. package/lib/table/style/index.css +2909 -0
  252. package/lib/table/style/index.js +9 -0
  253. package/lib/table/style/table.css +1 -0
  254. package/lib/table-popup/index.js +438 -0
  255. package/lib/table-popup/style/css.js +9 -0
  256. package/lib/table-popup/style/index.js +9 -0
  257. package/lib/table-popup/style/table-popup.css +1 -0
  258. package/lib/tabs/index.js +743 -0
  259. package/lib/tabs/style/css.js +9 -0
  260. package/lib/tabs/style/index.css +2692 -0
  261. package/lib/tabs/style/index.js +9 -0
  262. package/lib/tabs/style/tabs.css +1 -0
  263. package/lib/text/index.js +434 -0
  264. package/lib/text/style/css.js +7 -0
  265. package/lib/text/style/index.js +7 -0
  266. package/lib/text/style/text.css +1 -0
  267. package/lib/tile-layer/index.js +535 -0
  268. package/lib/tile-layer/style/css.js +0 -0
  269. package/lib/tile-layer/style/index.js +0 -0
  270. package/lib/time-line/index.js +654 -0
  271. package/lib/time-line/style/css.js +7 -0
  272. package/lib/time-line/style/index.js +7 -0
  273. package/lib/time-line/style/time-line.css +1 -0
  274. package/lib/time-picker/index.js +669 -0
  275. package/lib/time-picker/style/css.js +9 -0
  276. package/lib/time-picker/style/index.css +2418 -0
  277. package/lib/time-picker/style/index.js +9 -0
  278. package/lib/time-picker/style/time-picker.css +1 -0
  279. package/lib/time-range/index.js +526 -0
  280. package/lib/time-range/style/css.js +7 -0
  281. package/lib/time-range/style/index.js +7 -0
  282. package/lib/time-range/style/time-range.css +1 -0
  283. package/lib/time-slider/index.js +1169 -0
  284. package/lib/time-slider/style/css.js +7 -0
  285. package/lib/time-slider/style/index.js +7 -0
  286. package/lib/time-slider/style/time-slider.css +1 -0
  287. package/lib/time-text/index.js +393 -0
  288. package/lib/time-text/style/css.js +7 -0
  289. package/lib/time-text/style/index.js +7 -0
  290. package/lib/time-text/style/time-text.css +1 -0
  291. package/lib/tooltip/index.js +635 -0
  292. package/lib/tooltip/style/css.js +9 -0
  293. package/lib/tooltip/style/index.css +2231 -0
  294. package/lib/tooltip/style/index.js +9 -0
  295. package/lib/tooltip/style/tooltip.css +0 -0
  296. package/lib/transfer/index.js +636 -0
  297. package/lib/transfer/style/css.js +9 -0
  298. package/lib/transfer/style/index.css +2302 -0
  299. package/lib/transfer/style/index.js +9 -0
  300. package/lib/transfer/style/transfer.css +1 -0
  301. package/lib/tree/index.js +857 -0
  302. package/lib/tree/style/css.js +9 -0
  303. package/lib/tree/style/index.css +2644 -0
  304. package/lib/tree/style/index.js +9 -0
  305. package/lib/tree/style/tree.css +1 -0
  306. package/lib/tree-select/index.js +765 -0
  307. package/lib/tree-select/style/css.js +9 -0
  308. package/lib/tree-select/style/index.css +2508 -0
  309. package/lib/tree-select/style/index.js +9 -0
  310. package/lib/tree-select/style/tree-select.css +1 -0
  311. package/lib/video-player/index.js +1472 -0
  312. package/lib/video-player/style/css.js +11 -0
  313. package/lib/video-player/style/index.js +11 -0
  314. package/lib/video-player/style/video-player.css +1 -0
  315. package/lib/web-map/index.js +2241 -0
  316. package/lib/web-map/style/css.js +15 -0
  317. package/lib/web-map/style/index.js +15 -0
  318. package/lib/web-map/style/web-map.css +1 -0
  319. package/package.json +97 -0
  320. package/src/common/_assets/iconfont/icon-sm-components.css +245 -0
  321. package/src/common/_assets/iconfont/icon-sm-components.eot +0 -0
  322. package/src/common/_assets/iconfont/icon-sm-components.svg +197 -0
  323. package/src/common/_assets/iconfont/icon-sm-components.ttf +0 -0
  324. package/src/common/_assets/iconfont/icon-sm-components.woff +0 -0
  325. package/src/common/_assets/iconfont/icon-sm-components.woff2 +0 -0
  326. package/src/common/_lang/en.js +355 -0
  327. package/src/common/_lang/index.js +177 -0
  328. package/src/common/_lang/zh.js +342 -0
  329. package/src/common/_mixin/AntdRender.ts +114 -0
  330. package/src/common/_mixin/Card.ts +22 -0
  331. package/src/common/_mixin/Theme.ts +222 -0
  332. package/src/common/_mixin/ThirdService.ts +58 -0
  333. package/src/common/_mixin/Timer.ts +58 -0
  334. package/src/common/_mixin/VmUpdater.ts +46 -0
  335. package/src/common/_types/AddressMatchParameter.js +9 -0
  336. package/src/common/_types/GeoJSONParamter.ts +17 -0
  337. package/src/common/_types/RestDataParameter.js +8 -0
  338. package/src/common/_types/RestMapParameter.js +8 -0
  339. package/src/common/_types/RestParameter.js +12 -0
  340. package/src/common/_types/event/BaseTypes.js +24 -0
  341. package/src/common/_types/event/Event.js +315 -0
  342. package/src/common/_types/event/Events.js +353 -0
  343. package/src/common/_types/event/Pixel.js +177 -0
  344. package/src/common/_types/event/Util.js +173 -0
  345. package/src/common/_types/iPortalDataParameter.js +12 -0
  346. package/src/common/_types/iServerBaseParameter.ts +28 -0
  347. package/src/common/_types/iServerDataParameter.ts +13 -0
  348. package/src/common/_types/iServerMapParameter.ts +13 -0
  349. package/src/common/_utils/EchartsDataService.js +527 -0
  350. package/src/common/_utils/RestService.js +130 -0
  351. package/src/common/_utils/WebMapService.ts +1292 -0
  352. package/src/common/_utils/epsg-define.js +55 -0
  353. package/src/common/_utils/get-features.js +92 -0
  354. package/src/common/_utils/global-event.js +6 -0
  355. package/src/common/_utils/iPortalDataService.js +444 -0
  356. package/src/common/_utils/iServerRestService.js +487 -0
  357. package/src/common/_utils/statistics.js +36 -0
  358. package/src/common/_utils/style/color/colorPalette.ts +63 -0
  359. package/src/common/_utils/style/color/serialColors.ts +207 -0
  360. package/src/common/_utils/style/common/common.scss +39 -0
  361. package/src/common/_utils/style/mixins/config.scss +4 -0
  362. package/src/common/_utils/style/mixins/mixins.scss +48 -0
  363. package/src/common/_utils/style/theme/antd.less +2 -0
  364. package/src/common/_utils/style/theme/antdVar.less +371 -0
  365. package/src/common/_utils/style/theme/chart.js +548 -0
  366. package/src/common/_utils/style/theme/set-theme.ts +43 -0
  367. package/src/common/_utils/style/theme/theme.json +356 -0
  368. package/src/common/_utils/style/theme/theme.scss +495 -0
  369. package/src/common/_utils/util.js +251 -0
  370. package/src/common/_utils/vue-types/index.js +267 -0
  371. package/src/common/_utils/vue-types/utils.js +194 -0
  372. package/src/common/avatar/Avatar.vue +41 -0
  373. package/src/common/avatar/index.js +9 -0
  374. package/src/common/avatar/style/avatar.scss +8 -0
  375. package/src/common/avatar/style/index.js +4 -0
  376. package/src/common/avatar/style/index.less +3 -0
  377. package/src/common/border/Border.vue +121 -0
  378. package/src/common/border/assets/border.config.json +67 -0
  379. package/src/common/border/assets/image/border1.png +0 -0
  380. package/src/common/border/assets/image/border10.png +0 -0
  381. package/src/common/border/assets/image/border11.png +0 -0
  382. package/src/common/border/assets/image/border12.png +0 -0
  383. package/src/common/border/assets/image/border13.png +0 -0
  384. package/src/common/border/assets/image/border2.png +0 -0
  385. package/src/common/border/assets/image/border3.png +0 -0
  386. package/src/common/border/assets/image/border4.png +0 -0
  387. package/src/common/border/assets/image/border5.png +0 -0
  388. package/src/common/border/assets/image/border6.png +0 -0
  389. package/src/common/border/assets/image/border7.png +0 -0
  390. package/src/common/border/assets/image/border8.png +0 -0
  391. package/src/common/border/assets/image/border9.png +0 -0
  392. package/src/common/border/index.js +9 -0
  393. package/src/common/border/style/border.scss +19 -0
  394. package/src/common/border/style/index.js +4 -0
  395. package/src/common/breadcrumb/Breadcrumb.vue +21 -0
  396. package/src/common/breadcrumb/BreadcrumbItem.vue +21 -0
  397. package/src/common/breadcrumb/BreadcrumbSeparator.vue +19 -0
  398. package/src/common/breadcrumb/index.js +13 -0
  399. package/src/common/breadcrumb/style/breadcrumb.scss +21 -0
  400. package/src/common/breadcrumb/style/index.js +4 -0
  401. package/src/common/breadcrumb/style/index.less +3 -0
  402. package/src/common/button/Button.vue +34 -0
  403. package/src/common/button/Group.vue +31 -0
  404. package/src/common/button/index.js +11 -0
  405. package/src/common/button/style/button.scss +91 -0
  406. package/src/common/button/style/index.js +4 -0
  407. package/src/common/button/style/index.less +3 -0
  408. package/src/common/button/style/mixin.scss +56 -0
  409. package/src/common/card/Card.vue +32 -0
  410. package/src/common/card/Grid.vue +20 -0
  411. package/src/common/card/Meta.vue +20 -0
  412. package/src/common/card/index.js +13 -0
  413. package/src/common/card/style/card.scss +43 -0
  414. package/src/common/card/style/index.js +4 -0
  415. package/src/common/card/style/index.less +3 -0
  416. package/src/common/chart/ChartMixin.vue +1572 -0
  417. package/src/common/chart/index.js +9 -0
  418. package/src/common/chart/style/chart.scss +10 -0
  419. package/src/common/chart/style/index.js +5 -0
  420. package/src/common/checkbox/Checkbox.vue +37 -0
  421. package/src/common/checkbox/Group.vue +36 -0
  422. package/src/common/checkbox/index.js +11 -0
  423. package/src/common/checkbox/style/checkbox.scss +40 -0
  424. package/src/common/checkbox/style/index.js +4 -0
  425. package/src/common/checkbox/style/index.less +3 -0
  426. package/src/common/collapse/Collapse.vue +32 -0
  427. package/src/common/collapse/Panel.vue +26 -0
  428. package/src/common/collapse/index.js +11 -0
  429. package/src/common/collapse/style/collapse.scss +10 -0
  430. package/src/common/collapse/style/index.js +4 -0
  431. package/src/common/collapse/style/index.less +3 -0
  432. package/src/common/collapse-card/CollapseCard.vue +150 -0
  433. package/src/common/collapse-card/index.js +9 -0
  434. package/src/common/collapse-card/style/collapse-card.scss +176 -0
  435. package/src/common/collapse-card/style/index.js +4 -0
  436. package/src/common/color-picker/ColorPicker.vue +106 -0
  437. package/src/common/color-picker/index.js +9 -0
  438. package/src/common/color-picker/style/color-picker.scss +37 -0
  439. package/src/common/color-picker/style/index.js +4 -0
  440. package/src/common/config-provider/ConfigProvider.vue +31 -0
  441. package/src/common/config-provider/index.js +9 -0
  442. package/src/common/date-picker/BaseMixin.vue +23 -0
  443. package/src/common/date-picker/DatePicker.vue +20 -0
  444. package/src/common/date-picker/MonthPicker.vue +20 -0
  445. package/src/common/date-picker/RangePicker.vue +20 -0
  446. package/src/common/date-picker/WeekPicker.vue +20 -0
  447. package/src/common/date-picker/index.js +15 -0
  448. package/src/common/date-picker/style/date-picker.scss +290 -0
  449. package/src/common/date-picker/style/index.js +4 -0
  450. package/src/common/date-picker/style/index.less +3 -0
  451. package/src/common/date-picker/style/mixin.scss +75 -0
  452. package/src/common/dropdown/Dropdown.vue +31 -0
  453. package/src/common/dropdown/index.js +9 -0
  454. package/src/common/dropdown/style/dropdown.scss +22 -0
  455. package/src/common/dropdown/style/index.js +4 -0
  456. package/src/common/dropdown/style/index.less +3 -0
  457. package/src/common/empty/Empty.vue +26 -0
  458. package/src/common/empty/RenderEmpty.ts +50 -0
  459. package/src/common/empty/assets/image/empty.png +0 -0
  460. package/src/common/empty/index.js +9 -0
  461. package/src/common/empty/style/empty.scss +31 -0
  462. package/src/common/empty/style/index.js +4 -0
  463. package/src/common/empty/style/index.less +3 -0
  464. package/src/common/icon/Icon.vue +66 -0
  465. package/src/common/icon/index.js +9 -0
  466. package/src/common/icon/style/icon.scss +12 -0
  467. package/src/common/icon/style/index.js +4 -0
  468. package/src/common/icon/style/index.less +3 -0
  469. package/src/common/iframe/Iframe.vue +17 -0
  470. package/src/common/iframe/index.js +9 -0
  471. package/src/common/iframe/style/iframe.scss +7 -0
  472. package/src/common/iframe/style/index.js +4 -0
  473. package/src/common/image/Image.vue +83 -0
  474. package/src/common/image/index.js +9 -0
  475. package/src/common/image/style/image.scss +33 -0
  476. package/src/common/image/style/index.js +4 -0
  477. package/src/common/indicator/CountTo.vue +92 -0
  478. package/src/common/indicator/Indicator.vue +308 -0
  479. package/src/common/indicator/index.js +11 -0
  480. package/src/common/indicator/style/countTo.scss +7 -0
  481. package/src/common/indicator/style/index.js +4 -0
  482. package/src/common/indicator/style/indicator.scss +47 -0
  483. package/src/common/input/BaseMixin.vue +24 -0
  484. package/src/common/input/Group.vue +31 -0
  485. package/src/common/input/Input.vue +41 -0
  486. package/src/common/input/Password.vue +41 -0
  487. package/src/common/input/Search.vue +40 -0
  488. package/src/common/input/TextArea.vue +25 -0
  489. package/src/common/input/index.js +17 -0
  490. package/src/common/input/style/index.js +4 -0
  491. package/src/common/input/style/index.less +3 -0
  492. package/src/common/input/style/input.scss +72 -0
  493. package/src/common/input/style/mixin.scss +42 -0
  494. package/src/common/input-number/InputNumber.vue +44 -0
  495. package/src/common/input-number/index.js +9 -0
  496. package/src/common/input-number/style/index.js +4 -0
  497. package/src/common/input-number/style/index.less +3 -0
  498. package/src/common/input-number/style/input-number.scss +43 -0
  499. package/src/common/layout/Content.vue +25 -0
  500. package/src/common/layout/Footer.vue +25 -0
  501. package/src/common/layout/Header.vue +25 -0
  502. package/src/common/layout/Layout.vue +25 -0
  503. package/src/common/layout/Sider.vue +33 -0
  504. package/src/common/layout/index.js +17 -0
  505. package/src/common/layout/style/index.js +4 -0
  506. package/src/common/layout/style/index.less +3 -0
  507. package/src/common/layout/style/layout.scss +5 -0
  508. package/src/common/liquid-fill/LiquidFill.vue +209 -0
  509. package/src/common/liquid-fill/index.js +9 -0
  510. package/src/common/liquid-fill/style/index.js +4 -0
  511. package/src/common/liquid-fill/style/liquid-fill.scss +6 -0
  512. package/src/common/menu/Menu.vue +31 -0
  513. package/src/common/menu/MenuItem.vue +37 -0
  514. package/src/common/menu/SubMenu.vue +51 -0
  515. package/src/common/menu/index.js +13 -0
  516. package/src/common/menu/style/index.js +4 -0
  517. package/src/common/menu/style/index.less +3 -0
  518. package/src/common/menu/style/menu.scss +0 -0
  519. package/src/common/message/Message.js +12 -0
  520. package/src/common/message/index.js +3 -0
  521. package/src/common/message/style/index.js +4 -0
  522. package/src/common/message/style/index.less +3 -0
  523. package/src/common/message/style/message.scss +16 -0
  524. package/src/common/modal/Modal.vue +64 -0
  525. package/src/common/modal/index.js +9 -0
  526. package/src/common/modal/main.ts +49 -0
  527. package/src/common/modal/style/index.js +4 -0
  528. package/src/common/modal/style/index.less +3 -0
  529. package/src/common/modal/style/modal.scss +23 -0
  530. package/src/common/nav/Nav.vue +158 -0
  531. package/src/common/nav/assets/image/background_image.png +0 -0
  532. package/src/common/nav/assets/image/item_active.png +0 -0
  533. package/src/common/nav/index.js +9 -0
  534. package/src/common/nav/style/index.js +5 -0
  535. package/src/common/nav/style/nav.scss +55 -0
  536. package/src/common/notification/Notification.js +10 -0
  537. package/src/common/notification/index.js +3 -0
  538. package/src/common/notification/style/index.js +4 -0
  539. package/src/common/notification/style/index.less +3 -0
  540. package/src/common/notification/style/notification.scss +30 -0
  541. package/src/common/pagination/Pagination.vue +32 -0
  542. package/src/common/pagination/index.js +9 -0
  543. package/src/common/pagination/style/index.js +4 -0
  544. package/src/common/pagination/style/index.less +3 -0
  545. package/src/common/pagination/style/pagination.scss +131 -0
  546. package/src/common/progress/Progress.vue +98 -0
  547. package/src/common/progress/index.js +9 -0
  548. package/src/common/progress/style/index.js +4 -0
  549. package/src/common/progress/style/index.less +3 -0
  550. package/src/common/progress/style/progress.scss +43 -0
  551. package/src/common/radio/Button.vue +18 -0
  552. package/src/common/radio/Group.vue +48 -0
  553. package/src/common/radio/Radio.vue +36 -0
  554. package/src/common/radio/index.js +13 -0
  555. package/src/common/radio/style/index.js +4 -0
  556. package/src/common/radio/style/index.less +3 -0
  557. package/src/common/radio/style/radio.scss +127 -0
  558. package/src/common/select/OptGroup.vue +20 -0
  559. package/src/common/select/Option.vue +22 -0
  560. package/src/common/select/Select.vue +49 -0
  561. package/src/common/select/index.js +13 -0
  562. package/src/common/select/style/index.js +4 -0
  563. package/src/common/select/style/index.less +3 -0
  564. package/src/common/select/style/select.scss +140 -0
  565. package/src/common/slider/Slider.vue +31 -0
  566. package/src/common/slider/index.js +9 -0
  567. package/src/common/slider/style/index.js +4 -0
  568. package/src/common/slider/style/index.less +3 -0
  569. package/src/common/slider/style/slider.scss +8 -0
  570. package/src/common/slideshow/Slideshow.vue +354 -0
  571. package/src/common/slideshow/SlideshowItem.vue +17 -0
  572. package/src/common/slideshow/Swiper.js +29 -0
  573. package/src/common/slideshow/index.js +11 -0
  574. package/src/common/slideshow/style/index.js +5 -0
  575. package/src/common/slideshow/style/slideshow.scss +48 -0
  576. package/src/common/spin/Spin.vue +17 -0
  577. package/src/common/spin/index.js +9 -0
  578. package/src/common/spin/main.ts +13 -0
  579. package/src/common/spin/style/index.js +4 -0
  580. package/src/common/spin/style/index.less +3 -0
  581. package/src/common/spin/style/spin.scss +14 -0
  582. package/src/common/steps/Step.vue +33 -0
  583. package/src/common/steps/Steps.vue +39 -0
  584. package/src/common/steps/index.js +11 -0
  585. package/src/common/steps/style/index.js +4 -0
  586. package/src/common/steps/style/index.less +3 -0
  587. package/src/common/steps/style/mixin.scss +67 -0
  588. package/src/common/steps/style/steps.scss +98 -0
  589. package/src/common/switch/Switch.vue +41 -0
  590. package/src/common/switch/index.js +9 -0
  591. package/src/common/switch/style/index.js +4 -0
  592. package/src/common/switch/style/index.less +3 -0
  593. package/src/common/switch/style/switch.scss +20 -0
  594. package/src/common/table/Column.vue +18 -0
  595. package/src/common/table/ColumnGroup.vue +19 -0
  596. package/src/common/table/Table.vue +18 -0
  597. package/src/common/table/index.js +13 -0
  598. package/src/common/table/style/index.js +4 -0
  599. package/src/common/table/style/index.less +3 -0
  600. package/src/common/table/style/table.scss +138 -0
  601. package/src/common/table-popup/TablePopup.vue +73 -0
  602. package/src/common/table-popup/index.js +9 -0
  603. package/src/common/table-popup/style/index.js +5 -0
  604. package/src/common/table-popup/style/table-popup.scss +52 -0
  605. package/src/common/tabs/TabPane.vue +26 -0
  606. package/src/common/tabs/Tabs.vue +41 -0
  607. package/src/common/tabs/index.js +11 -0
  608. package/src/common/tabs/style/index.js +4 -0
  609. package/src/common/tabs/style/index.less +3 -0
  610. package/src/common/tabs/style/tabs.scss +95 -0
  611. package/src/common/text/Text.vue +69 -0
  612. package/src/common/text/index.js +9 -0
  613. package/src/common/text/style/index.js +4 -0
  614. package/src/common/text/style/text.scss +23 -0
  615. package/src/common/time-line/TimeLine.vue +260 -0
  616. package/src/common/time-line/index.js +9 -0
  617. package/src/common/time-line/style/index.js +4 -0
  618. package/src/common/time-line/style/time-line.scss +10 -0
  619. package/src/common/time-picker/TimePicker.vue +47 -0
  620. package/src/common/time-picker/index.js +9 -0
  621. package/src/common/time-picker/style/index.js +4 -0
  622. package/src/common/time-picker/style/index.less +3 -0
  623. package/src/common/time-picker/style/time-picker.scss +69 -0
  624. package/src/common/time-range/TimeRange.vue +122 -0
  625. package/src/common/time-range/index.js +9 -0
  626. package/src/common/time-range/style/index.js +4 -0
  627. package/src/common/time-range/style/time-range.scss +10 -0
  628. package/src/common/time-slider/TimeSlider.vue +591 -0
  629. package/src/common/time-slider/index.js +9 -0
  630. package/src/common/time-slider/style/index.js +4 -0
  631. package/src/common/time-slider/style/mixin.scss +36 -0
  632. package/src/common/time-slider/style/time-slider.scss +147 -0
  633. package/src/common/time-text/TimeText.vue +51 -0
  634. package/src/common/time-text/index.js +9 -0
  635. package/src/common/time-text/style/index.js +4 -0
  636. package/src/common/time-text/style/time-text.scss +14 -0
  637. package/src/common/tooltip/Tooltip.vue +21 -0
  638. package/src/common/tooltip/index.js +9 -0
  639. package/src/common/tooltip/style/index.js +4 -0
  640. package/src/common/tooltip/style/index.less +3 -0
  641. package/src/common/tooltip/style/tooltip.scss +5 -0
  642. package/src/common/transfer/Transfer.vue +19 -0
  643. package/src/common/transfer/index.js +9 -0
  644. package/src/common/transfer/style/index.js +4 -0
  645. package/src/common/transfer/style/index.less +3 -0
  646. package/src/common/transfer/style/transfer.scss +52 -0
  647. package/src/common/tree/DirectoryTree.vue +32 -0
  648. package/src/common/tree/Tree.vue +32 -0
  649. package/src/common/tree/TreeNode.vue +49 -0
  650. package/src/common/tree/index.js +13 -0
  651. package/src/common/tree/style/index.js +4 -0
  652. package/src/common/tree/style/index.less +3 -0
  653. package/src/common/tree/style/tree.scss +16 -0
  654. package/src/common/tree-select/TreeSelect.vue +43 -0
  655. package/src/common/tree-select/TreeSelectNode.vue +49 -0
  656. package/src/common/tree-select/index.js +11 -0
  657. package/src/common/tree-select/style/index.js +4 -0
  658. package/src/common/tree-select/style/index.less +3 -0
  659. package/src/common/tree-select/style/tree-select.scss +38 -0
  660. package/src/common/video-player/VideoPlayer.vue +423 -0
  661. package/src/common/video-player/index.js +9 -0
  662. package/src/common/video-player/style/index.js +5 -0
  663. package/src/common/video-player/style/video-player.scss +266 -0
  664. package/src/common/web-map/WebMapBase.ts +1178 -0
  665. package/src/common/web-map/config/MunicipalCenter.json +1 -0
  666. package/src/common/web-map/config/ProvinceCenter.json +1 -0
  667. package/src/image.d.ts +7 -0
  668. package/src/init.js +38 -0
  669. package/src/leaflet/README.md +31 -0
  670. package/src/leaflet/_mixin/GridLayer.js +33 -0
  671. package/src/leaflet/_mixin/Layer.js +26 -0
  672. package/src/leaflet/_mixin/Options.js +10 -0
  673. package/src/leaflet/_mixin/Popper.js +25 -0
  674. package/src/leaflet/_mixin/TileLayer.js +18 -0
  675. package/src/leaflet/_mixin/map-getter.ts +122 -0
  676. package/src/leaflet/_types/index.js +17 -0
  677. package/src/leaflet/_types/map-event.js +34 -0
  678. package/src/leaflet/_utils/props-binder.js +23 -0
  679. package/src/leaflet/chart/Chart.vue +25 -0
  680. package/src/leaflet/chart/ChartViewModel.js +44 -0
  681. package/src/leaflet/chart/index.js +9 -0
  682. package/src/leaflet/components.ts +206 -0
  683. package/src/leaflet/css.js +3 -0
  684. package/src/leaflet/entrys.json +106 -0
  685. package/src/leaflet/identify/Identify.vue +233 -0
  686. package/src/leaflet/identify/IdentifyViewModel.js +114 -0
  687. package/src/leaflet/identify/index.js +9 -0
  688. package/src/leaflet/identify/style/identify.scss +30 -0
  689. package/src/leaflet/identify/style/index.js +4 -0
  690. package/src/leaflet/index.ts +5 -0
  691. package/src/leaflet/leaflet-wrapper.js +125 -0
  692. package/src/leaflet/marker/Marker.vue +46 -0
  693. package/src/leaflet/marker/MarkerViewModel.js +31 -0
  694. package/src/leaflet/marker/index.js +9 -0
  695. package/src/leaflet/package.json +97 -0
  696. package/src/leaflet/popup/Popup.vue +93 -0
  697. package/src/leaflet/popup/PopupViewModel.js +75 -0
  698. package/src/leaflet/popup/index.js +9 -0
  699. package/src/leaflet/style.js +3 -0
  700. package/src/leaflet/style.scss +52 -0
  701. package/src/leaflet/web-map/WebMap.vue +213 -0
  702. package/src/leaflet/web-map/WebMapViewModel.ts +1102 -0
  703. package/src/leaflet/web-map/_mixin/map-events.ts +65 -0
  704. package/src/leaflet/web-map/index.js +9 -0
  705. package/src/leaflet/web-map/layer/tile/TileLayer.vue +88 -0
  706. package/src/leaflet/web-map/layer/tile/TileLayerViewModel.js +66 -0
  707. package/src/leaflet/web-map/layer/tile/index.js +9 -0
  708. package/src/leaflet/web-map/style/index.js +7 -0
  709. package/src/leaflet/web-map/style/web-map.scss +32 -0
  710. package/src/sfc.d.ts +50 -0
  711. package/src/vue-i18n.d.ts +26 -0
  712. package/src/vue-options.d.ts +18 -0
  713. package/static/libs/echarts-layer/EchartsLayer.js +390 -0
  714. package/static/libs/geostats/geostats.js +1227 -0
  715. package/static/libs/iclient-common/iclient-common.js +2 -0
  716. package/static/libs/iclient-leaflet/iclient-leaflet.min.css +8 -0
  717. package/static/libs/iclient-leaflet/iclient-leaflet.min.js +1741 -0
  718. package/static/libs/json-sql/jsonsql.js +125 -0
  719. 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&currentPage=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
+ /******/ });