vue2-openlayers 0.1.3 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. package/package.json +9 -8
  2. package/{vue2-openlayers/vue2-openlayers.common.js → vue2-openlayers.common.js} +121 -96
  3. package/{vue2-openlayers/vue2-openlayers.common.js.map → vue2-openlayers.common.js.map} +1 -1
  4. package/{vue2-openlayers/vue2-openlayers.css → vue2-openlayers.css} +1 -1
  5. package/{vue2-openlayers/vue2-openlayers.umd.js → vue2-openlayers.umd.js} +121 -96
  6. package/{vue2-openlayers/vue2-openlayers.umd.js.map → vue2-openlayers.umd.js.map} +1 -1
  7. package/vue2-openlayers.umd.min.js +2 -0
  8. package/vue2-openlayers.umd.min.js.map +1 -0
  9. package/README.md +0 -24
  10. package/babel.config.js +0 -5
  11. package/dist/css/index.34f0f0b9.css +0 -1
  12. package/dist/favicon.ico +0 -0
  13. package/dist/img/bottom_box.625e42a5.png +0 -0
  14. package/dist/img/car1.dd9a098b.png +0 -0
  15. package/dist/img/complete.2d0fa612.png +0 -0
  16. package/dist/img/diago_content.0d88c929.png +0 -0
  17. package/dist/img/diago_text_box.2e4da66b.png +0 -0
  18. package/dist/img/diago_title.2bd95b7a.png +0 -0
  19. package/dist/img/exception.a1eeefc3.png +0 -0
  20. package/dist/img/info1.829a6d7e.png +0 -0
  21. package/dist/img/info2.09e6e79e.png +0 -0
  22. package/dist/img/info3.3f96f756.png +0 -0
  23. package/dist/img/info4.6adcb927.png +0 -0
  24. package/dist/img/info5.ff3fdd2f.png +0 -0
  25. package/dist/img/info6.6e159d95.png +0 -0
  26. package/dist/img/left_box.40419b36.png +0 -0
  27. package/dist/img/money1.0743e701.png +0 -0
  28. package/dist/img/money2.58610d4d.png +0 -0
  29. package/dist/img/operating_fee.e6523ccc.png +0 -0
  30. package/dist/img/processing.28e46e7f.png +0 -0
  31. package/dist/img/public_content_box.39782fb5.png +0 -0
  32. package/dist/img/public_title_box1.6002afd4.png +0 -0
  33. package/dist/img/right_box.08458fe5.png +0 -0
  34. package/dist/img/success1.0cbc58af.png +0 -0
  35. package/dist/img/success2.af1a7499.png +0 -0
  36. package/dist/img/success3.d74caac5.png +0 -0
  37. package/dist/img/success4.37cc2343.png +0 -0
  38. package/dist/img/top_box.806bc756.png +0 -0
  39. package/dist/img/warehouse_map_popup.fa26d6cd.png +0 -0
  40. package/dist/img/work_error.3c528fdd.png +0 -0
  41. package/dist/img/work_su.0cbc58af.png +0 -0
  42. package/dist/img/work_wait.a2a706c9.png +0 -0
  43. package/dist/index.html +0 -13
  44. package/dist/js/chunk-vendors.901bdf0b.js +0 -8
  45. package/dist/js/chunk-vendors.901bdf0b.js.map +0 -1
  46. package/dist/js/index.29606843.js +0 -2
  47. package/dist/js/index.29606843.js.map +0 -1
  48. package/docs/.vuepress/config.js +0 -25
  49. package/docs/.vuepress/dist/404.html +0 -20
  50. package/docs/.vuepress/dist/assets/css/0.styles.7cfabf05.css +0 -1
  51. package/docs/.vuepress/dist/assets/img/7F8296FF-4A75-4013-BBFC-D482BF5303FF.597ff8a1.png +0 -0
  52. package/docs/.vuepress/dist/assets/img/gateway.98d6c8ec.jpg +0 -0
  53. package/docs/.vuepress/dist/assets/img/mysql_images.07b3a3e5.jpg +0 -0
  54. package/docs/.vuepress/dist/assets/img/nacos.741b050d.jpg +0 -0
  55. package/docs/.vuepress/dist/assets/img/rabbitmq.50b12be7.jpg +0 -0
  56. package/docs/.vuepress/dist/assets/img/redis_images.f0979945.jpg +0 -0
  57. package/docs/.vuepress/dist/assets/img/search.83621669.svg +0 -1
  58. package/docs/.vuepress/dist/assets/img/server-structure.6e0aa81e.png +0 -0
  59. package/docs/.vuepress/dist/assets/js/10.285f55d1.js +0 -1
  60. package/docs/.vuepress/dist/assets/js/11.decff412.js +0 -1
  61. package/docs/.vuepress/dist/assets/js/12.b9ed6e21.js +0 -1
  62. package/docs/.vuepress/dist/assets/js/13.d9c8c7a9.js +0 -1
  63. package/docs/.vuepress/dist/assets/js/14.6495a0e6.js +0 -1
  64. package/docs/.vuepress/dist/assets/js/15.70d64d1a.js +0 -1
  65. package/docs/.vuepress/dist/assets/js/16.a93c018c.js +0 -1
  66. package/docs/.vuepress/dist/assets/js/17.ed91eb16.js +0 -1
  67. package/docs/.vuepress/dist/assets/js/18.d07cd593.js +0 -1
  68. package/docs/.vuepress/dist/assets/js/19.4b8a0f22.js +0 -1
  69. package/docs/.vuepress/dist/assets/js/2.2668fa1b.js +0 -1
  70. package/docs/.vuepress/dist/assets/js/20.52de9326.js +0 -1
  71. package/docs/.vuepress/dist/assets/js/21.2293a5ca.js +0 -1
  72. package/docs/.vuepress/dist/assets/js/3.fd22fded.js +0 -1
  73. package/docs/.vuepress/dist/assets/js/4.ad26b2fa.js +0 -1
  74. package/docs/.vuepress/dist/assets/js/5.a1c97bcb.js +0 -1
  75. package/docs/.vuepress/dist/assets/js/6.32f67120.js +0 -1
  76. package/docs/.vuepress/dist/assets/js/7.99161716.js +0 -1
  77. package/docs/.vuepress/dist/assets/js/8.a0d65864.js +0 -1
  78. package/docs/.vuepress/dist/assets/js/9.2d06e692.js +0 -1
  79. package/docs/.vuepress/dist/assets/js/app.0be82e56.js +0 -15
  80. package/docs/.vuepress/dist/config/config_list.html +0 -58
  81. package/docs/.vuepress/dist/config/index.html +0 -69
  82. package/docs/.vuepress/dist/guide/admin.html +0 -26
  83. package/docs/.vuepress/dist/guide/deepchange.html +0 -213
  84. package/docs/.vuepress/dist/guide/gateway.html +0 -45
  85. package/docs/.vuepress/dist/guide/hystrix.html +0 -26
  86. package/docs/.vuepress/dist/guide/index.html +0 -66
  87. package/docs/.vuepress/dist/guide/nacos.html +0 -26
  88. package/docs/.vuepress/dist/guide/opsdev.html +0 -26
  89. package/docs/.vuepress/dist/guide/rabbitmq.html +0 -26
  90. package/docs/.vuepress/dist/guide/skywarking.html +0 -52
  91. package/docs/.vuepress/dist/guide/summary.html +0 -74
  92. package/docs/.vuepress/dist/help/index.html +0 -28
  93. package/docs/.vuepress/dist/help/markdown.html +0 -33
  94. package/docs/.vuepress/dist/images/7F8296FF-4A75-4013-BBFC-D482BF5303FF.png +0 -0
  95. package/docs/.vuepress/dist/images/gateway.jpg +0 -0
  96. package/docs/.vuepress/dist/images/mysql_images.jpg +0 -0
  97. package/docs/.vuepress/dist/images/nacos.jpg +0 -0
  98. package/docs/.vuepress/dist/images/rabbitmq.jpg +0 -0
  99. package/docs/.vuepress/dist/images/redis_images.jpg +0 -0
  100. package/docs/.vuepress/dist/images/server-structure.png +0 -0
  101. package/docs/.vuepress/dist/index.html +0 -26
  102. package/docs/.vuepress/dist/logo.jpg +0 -0
  103. package/docs/.vuepress/nav.js +0 -34
  104. package/docs/.vuepress/public/images/7F8296FF-4A75-4013-BBFC-D482BF5303FF.png +0 -0
  105. package/docs/.vuepress/public/images/gateway.jpg +0 -0
  106. package/docs/.vuepress/public/images/mysql_images.jpg +0 -0
  107. package/docs/.vuepress/public/images/nacos.jpg +0 -0
  108. package/docs/.vuepress/public/images/rabbitmq.jpg +0 -0
  109. package/docs/.vuepress/public/images/redis_images.jpg +0 -0
  110. package/docs/.vuepress/public/images/server-structure.png +0 -0
  111. package/docs/.vuepress/public/logo.jpg +0 -0
  112. package/docs/.vuepress/sidebar.js +0 -62
  113. package/docs/README.md +0 -15
  114. package/docs/config/README.md +0 -108
  115. package/docs/config/config_list.md +0 -42
  116. package/docs/guide/README.md +0 -79
  117. package/docs/guide/admin.md +0 -25
  118. package/docs/guide/deepchange.md +0 -393
  119. package/docs/guide/gateway.md +0 -40
  120. package/docs/guide/hystrix.md +0 -21
  121. package/docs/guide/nacos.md +0 -7
  122. package/docs/guide/opsdev.md +0 -12
  123. package/docs/guide/rabbitmq.md +0 -15
  124. package/docs/guide/skywarking.md +0 -77
  125. package/docs/guide/summary.md +0 -120
  126. package/docs/help/README.md +0 -29
  127. package/docs/help/markdown.md +0 -165
  128. package/examples/App.vue +0 -21
  129. package/examples/assets/css/map-base.scss +0 -333
  130. package/examples/assets/fonts/pmzd.ttf +0 -0
  131. package/examples/assets/icons/index.js +0 -9
  132. package/examples/assets/icons/svg/404.svg +0 -1
  133. package/examples/assets/icons/svg/bug.svg +0 -1
  134. package/examples/assets/icons/svg/build.svg +0 -1
  135. package/examples/assets/icons/svg/button.svg +0 -1
  136. package/examples/assets/icons/svg/cascader.svg +0 -1
  137. package/examples/assets/icons/svg/chart.svg +0 -1
  138. package/examples/assets/icons/svg/checkbox.svg +0 -1
  139. package/examples/assets/icons/svg/clipboard.svg +0 -1
  140. package/examples/assets/icons/svg/code.svg +0 -1
  141. package/examples/assets/icons/svg/color.svg +0 -1
  142. package/examples/assets/icons/svg/component.svg +0 -1
  143. package/examples/assets/icons/svg/dashboard.svg +0 -1
  144. package/examples/assets/icons/svg/date-range.svg +0 -1
  145. package/examples/assets/icons/svg/date.svg +0 -1
  146. package/examples/assets/icons/svg/dict.svg +0 -1
  147. package/examples/assets/icons/svg/documentation.svg +0 -1
  148. package/examples/assets/icons/svg/download.svg +0 -1
  149. package/examples/assets/icons/svg/drag.svg +0 -1
  150. package/examples/assets/icons/svg/druid.svg +0 -1
  151. package/examples/assets/icons/svg/edit.svg +0 -1
  152. package/examples/assets/icons/svg/education.svg +0 -1
  153. package/examples/assets/icons/svg/email.svg +0 -1
  154. package/examples/assets/icons/svg/example.svg +0 -1
  155. package/examples/assets/icons/svg/excel.svg +0 -1
  156. package/examples/assets/icons/svg/exit-fullscreen.svg +0 -1
  157. package/examples/assets/icons/svg/eye-open.svg +0 -1
  158. package/examples/assets/icons/svg/eye.svg +0 -1
  159. package/examples/assets/icons/svg/form.svg +0 -1
  160. package/examples/assets/icons/svg/fullscreen.svg +0 -1
  161. package/examples/assets/icons/svg/github.svg +0 -1
  162. package/examples/assets/icons/svg/guide.svg +0 -1
  163. package/examples/assets/icons/svg/icon.svg +0 -1
  164. package/examples/assets/icons/svg/input.svg +0 -1
  165. package/examples/assets/icons/svg/international.svg +0 -1
  166. package/examples/assets/icons/svg/job.svg +0 -1
  167. package/examples/assets/icons/svg/language.svg +0 -1
  168. package/examples/assets/icons/svg/link.svg +0 -1
  169. package/examples/assets/icons/svg/list.svg +0 -1
  170. package/examples/assets/icons/svg/lock.svg +0 -1
  171. package/examples/assets/icons/svg/log.svg +0 -1
  172. package/examples/assets/icons/svg/logininfor.svg +0 -1
  173. package/examples/assets/icons/svg/message.svg +0 -1
  174. package/examples/assets/icons/svg/money.svg +0 -1
  175. package/examples/assets/icons/svg/monitor.svg +0 -2
  176. package/examples/assets/icons/svg/nested.svg +0 -1
  177. package/examples/assets/icons/svg/number.svg +0 -1
  178. package/examples/assets/icons/svg/online.svg +0 -1
  179. package/examples/assets/icons/svg/password.svg +0 -1
  180. package/examples/assets/icons/svg/pdf.svg +0 -1
  181. package/examples/assets/icons/svg/people.svg +0 -1
  182. package/examples/assets/icons/svg/peoples.svg +0 -1
  183. package/examples/assets/icons/svg/phone.svg +0 -1
  184. package/examples/assets/icons/svg/post.svg +0 -1
  185. package/examples/assets/icons/svg/qq.svg +0 -1
  186. package/examples/assets/icons/svg/question.svg +0 -1
  187. package/examples/assets/icons/svg/radio.svg +0 -1
  188. package/examples/assets/icons/svg/rate.svg +0 -1
  189. package/examples/assets/icons/svg/redis.svg +0 -1
  190. package/examples/assets/icons/svg/row.svg +0 -1
  191. package/examples/assets/icons/svg/search.svg +0 -1
  192. package/examples/assets/icons/svg/select.svg +0 -1
  193. package/examples/assets/icons/svg/server.svg +0 -1
  194. package/examples/assets/icons/svg/shopping.svg +0 -1
  195. package/examples/assets/icons/svg/size.svg +0 -1
  196. package/examples/assets/icons/svg/skill.svg +0 -1
  197. package/examples/assets/icons/svg/slider.svg +0 -1
  198. package/examples/assets/icons/svg/star.svg +0 -1
  199. package/examples/assets/icons/svg/swagger.svg +0 -1
  200. package/examples/assets/icons/svg/switch.svg +0 -1
  201. package/examples/assets/icons/svg/system.svg +0 -2
  202. package/examples/assets/icons/svg/tab.svg +0 -1
  203. package/examples/assets/icons/svg/table.svg +0 -1
  204. package/examples/assets/icons/svg/textarea.svg +0 -1
  205. package/examples/assets/icons/svg/theme.svg +0 -1
  206. package/examples/assets/icons/svg/time-range.svg +0 -1
  207. package/examples/assets/icons/svg/time.svg +0 -1
  208. package/examples/assets/icons/svg/tool.svg +0 -1
  209. package/examples/assets/icons/svg/tree-table.svg +0 -1
  210. package/examples/assets/icons/svg/tree.svg +0 -1
  211. package/examples/assets/icons/svg/turn-right.svg +0 -1
  212. package/examples/assets/icons/svg/upload.svg +0 -1
  213. package/examples/assets/icons/svg/user.svg +0 -1
  214. package/examples/assets/icons/svg/validCode.svg +0 -1
  215. package/examples/assets/icons/svg/wechat.svg +0 -1
  216. package/examples/assets/icons/svg/zip.svg +0 -1
  217. package/examples/assets/icons/svgo.yml +0 -22
  218. package/examples/assets/images/close_diago.png +0 -0
  219. package/examples/assets/images/red_circle.png +0 -0
  220. package/examples/assets/images/w_mj_map.png +0 -0
  221. package/examples/assets/images/warehouse_map_popup.png +0 -0
  222. package/examples/assets/images/warehouse_map_success.png +0 -0
  223. package/examples/assets/images/warehouse_map_warning.png +0 -0
  224. package/examples/assets/js/gps.js +0 -222
  225. package/examples/assets/logo.png +0 -0
  226. package/examples/components/HelloWorld.vue +0 -273
  227. package/examples/components/MapPopup.vue +0 -80
  228. package/examples/data/510000.js +0 -2056
  229. package/examples/data/510000.json +0 -2055
  230. package/examples/data/testData.js +0 -2088
  231. package/examples/main.js +0 -28
  232. package/examples/utils/echarts/esresize.js +0 -110
  233. package/jsconfig.json +0 -19
  234. package/vue.config.js +0 -54
  235. package/vue2-openlayers/package.json +0 -56
  236. package/vue2-openlayers/vue2-openlayers.umd.min.js +0 -2
  237. package/vue2-openlayers/vue2-openlayers.umd.min.js.map +0 -1
  238. /package/{vue2-openlayers/demo.html → demo.html} +0 -0
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "vue2-openlayers",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "private": false,
5
- "main": "index.js",
5
+ "author": "ifyang",
6
+ "license": "MIT",
6
7
  "scripts": {
7
8
  "dev": "vue-cli-service serve",
8
9
  "build": "vue-cli-service build",
@@ -16,7 +17,8 @@
16
17
  "@turf/turf": "^7.0.0",
17
18
  "core-js": "^3.8.3",
18
19
  "ol": "^9.2.4",
19
- "vue": "^2.6.14"
20
+ "vue": "^2.6.14",
21
+ "vue-template-compiler": "^2.7.16"
20
22
  },
21
23
  "devDependencies": {
22
24
  "@babel/core": "^7.12.16",
@@ -24,15 +26,14 @@
24
26
  "@vue/cli-plugin-babel": "~5.0.0",
25
27
  "@vue/cli-plugin-eslint": "~5.0.0",
26
28
  "@vue/cli-service": "~5.0.0",
29
+ "echarts": "4.9.0",
27
30
  "eslint": "^7.32.0",
28
31
  "eslint-plugin-vue": "^8.0.3",
29
32
  "postcss-pxtorem": "^6.1.0",
30
- "vue-template-compiler": "^2.6.14",
31
- "vuepress": "^1.9.10",
32
- "echarts": "4.9.0",
33
33
  "px2rem-loader": "^0.1.9",
34
34
  "sass": "^1.43.4",
35
- "sass-loader": "^14.2.1"
35
+ "sass-loader": "^14.2.1",
36
+ "vuepress": "^1.9.10"
36
37
  },
37
38
  "eslintConfig": {
38
39
  "root": true,
@@ -53,4 +54,4 @@
53
54
  "last 2 versions",
54
55
  "not dead"
55
56
  ]
56
- }
57
+ }
@@ -5887,12 +5887,12 @@ if (typeof window !== 'undefined') {
5887
5887
  // Indicate to webpack that this file can be concatenated
5888
5888
  /* harmony default export */ var setPublicPath = (null);
5889
5889
 
5890
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/YlMap.vue?vue&type=template&id=d8c9bfda&scoped=true
5890
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/YlMap.vue?vue&type=template&id=dd63274a&scoped=true
5891
5891
  var render = function render() {
5892
5892
  var _vm = this,
5893
5893
  _c = _vm._self._c;
5894
5894
  return _c('div', {
5895
- staticClass: "wapper"
5895
+ staticClass: "yl-map-wapper"
5896
5896
  }, [_c('div', {
5897
5897
  ref: _vm.mapId,
5898
5898
  staticStyle: {
@@ -5902,12 +5902,7 @@ var render = function render() {
5902
5902
  attrs: {
5903
5903
  "id": _vm.mapId
5904
5904
  }
5905
- }, [_vm._t("yl-map-layers"), _c('div', {
5906
- staticClass: "ol-popup",
5907
- attrs: {
5908
- "id": "popup"
5909
- }
5910
- }, [_vm._t("yl-map-overlay")], 2)], 2)]);
5905
+ }, [_vm._t("default")], 2)]);
5911
5906
  };
5912
5907
  var staticRenderFns = [];
5913
5908
 
@@ -42600,20 +42595,9 @@ class Overlay extends ol_Object {
42600
42595
  /* harmony default export */ var YlMapvue_type_script_lang_js = ({
42601
42596
  name: "YlMap",
42602
42597
  props: {
42603
- baseMap: {
42604
- type: Object,
42605
- default: function () {
42606
- // openlayers叠加mapbox自定义底图
42607
- let accessToken = 'pk.eyJ1IjoiZ2FwNDE3IiwiYSI6ImNseTlsc2J3ZDBvZGwybHNhanhnbWRibTMifQ.QSQ15RREYt2jYX79hNeMnA';
42608
- let mapBoxStyleId = 'clybcf4b900dp01pf94zj0mbh';
42609
- let mapboxUserName = 'gap417';
42610
- return new layer_Tile({
42611
- source: new source_XYZ({
42612
- url: `https://api.mapbox.com/styles/v1/${mapboxUserName}/${mapBoxStyleId}/tiles/256/{z}/{x}/{y}?access_token=${accessToken}`
42613
- }),
42614
- name: "底图"
42615
- });
42616
- }
42598
+ mapUrl: {
42599
+ type: String,
42600
+ default: 'https://webrd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}'
42617
42601
  },
42618
42602
  center: {
42619
42603
  type: Array,
@@ -42648,28 +42632,28 @@ class Overlay extends ol_Object {
42648
42632
  methods: {
42649
42633
  //弹窗
42650
42634
  showPopup(parms) {
42651
- // parms.element = document.getElementById('popup');
42652
- console.info(parms);
42653
- //弹窗显示方法
42654
- this.overlay = new ol_Overlay({
42655
- element: document.getElementById('popup'),
42656
- //是否自动平移,即假如标记在屏幕边缘,弹出时自动平移地图使弹出框完全可见
42657
- autoPan: parms.duration != null ? true : false,
42658
- autoPanAnimation: {
42659
- duration: parms.duration
42660
- },
42661
- offset: [5, -25],
42662
- // 偏移量
42663
- positioning: "bottom-center",
42664
- // 对齐方式
42665
- coordinate: [104.06, 30.67],
42666
- // 位置
42667
- ...parms
42668
- });
42669
- //设置overlay的显示位置
42670
- this.overlay.setPosition(parms.position);
42671
- //显示overlay
42672
- this.map.addOverlay(this.overlay);
42635
+ if (parms && parms.element) {
42636
+ //弹窗显示方法
42637
+ this.overlay = new ol_Overlay({
42638
+ element: document.getElementById('popup'),
42639
+ //是否自动平移,即假如标记在屏幕边缘,弹出时自动平移地图使弹出框完全可见
42640
+ autoPan: parms.duration != null ? true : false,
42641
+ autoPanAnimation: {
42642
+ duration: parms.duration
42643
+ },
42644
+ offset: [5, -25],
42645
+ // 偏移量
42646
+ positioning: "bottom-center",
42647
+ // 对齐方式
42648
+ coordinate: [104.06, 30.67],
42649
+ // 位置
42650
+ ...parms
42651
+ });
42652
+ //设置overlay的显示位置
42653
+ this.overlay.setPosition(parms.position);
42654
+ //显示overlay
42655
+ this.map.addOverlay(this.overlay);
42656
+ }
42673
42657
  },
42674
42658
  close() {
42675
42659
  //弹窗关闭方法(防止外部调用此方法——所以先要判断是否为空)
@@ -42696,19 +42680,48 @@ class Overlay extends ol_Object {
42696
42680
  box3 = Math.max.apply(null, box3s);
42697
42681
  box4 = Math.max.apply(null, box4s);
42698
42682
  let view = this.map.getView();
42699
- // let size = this.map.getSize();
42683
+ // let size = this.map.getSize();
42700
42684
  let mzoom = view.getZoom();
42701
42685
  let coorBox = [box1, box2, box3, box4];
42702
42686
  //fit()其它属性无效--暂定解决方案 animate
42703
42687
  view.fit(coorBox);
42704
42688
  if (state) {
42705
42689
  view.animate({
42706
- zoom: zoom == undefined ? mzoom : zoom,
42707
- duration: duration == undefined ? 1000 : duration
42690
+ zoom: zoom ? mzoom : zoom,
42691
+ duration: duration ? 1000 : duration
42708
42692
  });
42709
42693
  }
42710
42694
  }
42711
42695
  },
42696
+ fitViewSource(source) {
42697
+ let view = this.map.getView();
42698
+ var feature = source.getFeatures()[0];
42699
+ var polygon = feature.getGeometry();
42700
+ view.fit(polygon, {
42701
+ padding: [50, 50, 50, 150]
42702
+ });
42703
+ },
42704
+ fitViewfeature(feature) {
42705
+ let view = this.map.getView();
42706
+ var polygon = feature.getGeometry();
42707
+ view.fit(polygon, {
42708
+ padding: [300, 300, 300, 150]
42709
+ });
42710
+ },
42711
+ fitCenter(center, zoom, duration = 700) {
42712
+ let view = this.map.getView();
42713
+ let mzoom = view.getZoom();
42714
+ function flyTo(location) {
42715
+ view.animate({
42716
+ center: location,
42717
+ duration: duration,
42718
+ zoom: mzoom ? mzoom : zoom
42719
+ });
42720
+ }
42721
+ if (center[0] && center[1]) {
42722
+ flyTo(center);
42723
+ }
42724
+ },
42712
42725
  CustomEvent() {
42713
42726
  let _this = this;
42714
42727
  class Drag extends Pointer {
@@ -42764,9 +42777,16 @@ class Overlay extends ol_Object {
42764
42777
  //点击后执行的事件
42765
42778
  function clickEvent() {
42766
42779
  // 点击回调事件
42767
- _this.$emit("handleDownEvent", evt.coordinate, feature.values_._md_ == undefined ? feature.values_ : feature.values_._md_, feature);
42780
+ _this.$emit("handleDownFeatureEvent", {
42781
+ evtCoordinate: evt.coordinate,
42782
+ value: feature.values_._md_ == undefined ? feature.values_ : feature.values_._md_,
42783
+ feature: feature,
42784
+ evt: evt,
42785
+ featureCoordinate: feature.getGeometry().getCoordinates()
42786
+ });
42768
42787
  }
42769
42788
  });
42789
+ _this.$emit("handleDownEvent", evt);
42770
42790
  }
42771
42791
 
42772
42792
  /**
@@ -42816,12 +42836,12 @@ class Overlay extends ol_Object {
42816
42836
  }
42817
42837
  },
42818
42838
  created() {
42819
- console.info("map-created");
42839
+ // console.info("map-created");
42820
42840
  this.mapId = "map" + new Date().getTime();
42821
42841
  },
42822
42842
  mounted() {
42823
42843
  let CustomEvent = this.CustomEvent();
42824
- console.info("地图组件挂载,id:" + this.mapId);
42844
+ // console.info("地图组件挂载,id:" + this.mapId);
42825
42845
  let view = new ol_View({
42826
42846
  center: this.center,
42827
42847
  projection: "EPSG:4326",
@@ -42833,14 +42853,19 @@ class Overlay extends ol_Object {
42833
42853
  const map = new ol_Map({
42834
42854
  interactions: defaults_defaults().extend([new CustomEvent()]),
42835
42855
  target: this.$refs[this.mapId],
42836
- layers: [this.baseMap],
42856
+ layers: [new layer_Tile({
42857
+ source: new source_XYZ({
42858
+ url: this.mapUrl
42859
+ }),
42860
+ name: "底图"
42861
+ })],
42837
42862
  view: view
42838
42863
  });
42839
42864
  this.map = map;
42840
42865
  // this.$bus.$emit(this.mapId + "ready", {});
42841
42866
  },
42842
42867
  beforeDestroy() {
42843
- console.info("map-beforeDestroy");
42868
+ // console.info("map-beforeDestroy");
42844
42869
  if (this.map) {
42845
42870
  this.map.setTarget(null);
42846
42871
  this.map = null;
@@ -42849,10 +42874,10 @@ class Overlay extends ol_Object {
42849
42874
  });
42850
42875
  ;// CONCATENATED MODULE: ./packages/yl-map/YlMap.vue?vue&type=script&lang=js
42851
42876
  /* harmony default export */ var yl_map_YlMapvue_type_script_lang_js = (YlMapvue_type_script_lang_js);
42852
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/YlMap.vue?vue&type=style&index=0&id=d8c9bfda&prod&scoped=true&lang=css
42877
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/YlMap.vue?vue&type=style&index=0&id=dd63274a&prod&scoped=true&lang=css
42853
42878
  // extracted by mini-css-extract-plugin
42854
42879
 
42855
- ;// CONCATENATED MODULE: ./packages/yl-map/YlMap.vue?vue&type=style&index=0&id=d8c9bfda&prod&scoped=true&lang=css
42880
+ ;// CONCATENATED MODULE: ./packages/yl-map/YlMap.vue?vue&type=style&index=0&id=dd63274a&prod&scoped=true&lang=css
42856
42881
 
42857
42882
  ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
42858
42883
  /* globals __VUE_SSR_CONTEXT__ */
@@ -42967,7 +42992,7 @@ var component = normalizeComponent(
42967
42992
  staticRenderFns,
42968
42993
  false,
42969
42994
  null,
42970
- "d8c9bfda",
42995
+ "dd63274a",
42971
42996
  null
42972
42997
 
42973
42998
  )
@@ -42979,13 +43004,13 @@ YlMap.install = function (Vue) {
42979
43004
  Vue.component(YlMap.name, YlMap);
42980
43005
  };
42981
43006
  /* harmony default export */ var yl_map = (YlMap);
42982
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-line/YlLine.vue?vue&type=template&id=015841aa&scoped=true
42983
- var YlLinevue_type_template_id_015841aa_scoped_true_render = function render() {
43007
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-line/YlLine.vue?vue&type=template&id=a3ffcf04&scoped=true
43008
+ var YlLinevue_type_template_id_a3ffcf04_scoped_true_render = function render() {
42984
43009
  var _vm = this,
42985
43010
  _c = _vm._self._c;
42986
43011
  return _c('div');
42987
43012
  };
42988
- var YlLinevue_type_template_id_015841aa_scoped_true_staticRenderFns = [];
43013
+ var YlLinevue_type_template_id_a3ffcf04_scoped_true_staticRenderFns = [];
42989
43014
 
42990
43015
  ;// CONCATENATED MODULE: ./node_modules/ol/structs/RBush.js
42991
43016
  /**
@@ -53377,7 +53402,7 @@ function localConvert(list, lngName, latName, usePR) {
53377
53402
  lng: n[lngName]
53378
53403
  };
53379
53404
  });
53380
- console.info('批量坐标转换数量:' + locations.length);
53405
+ // console.info('批量坐标转换数量:'+locations.length);
53381
53406
  let results = batchGps2gd(locations);
53382
53407
  if (usePR) {
53383
53408
  for (let i = 0; i < results.length; i++) {
@@ -53391,7 +53416,7 @@ function localConvert(list, lngName, latName, usePR) {
53391
53416
  }
53392
53417
  }
53393
53418
  } else if (list instanceof Object && list != null && list != undefined) {
53394
- console.info('转换坐标1个');
53419
+ // console.info('转换坐标1个');
53395
53420
  let res = gps2gd(list[latName], list[lngName]);
53396
53421
  if (usePR) {
53397
53422
  list.P = res.lat;
@@ -53541,7 +53566,7 @@ function gpsToGd(wgLon, wgLat) {
53541
53566
  setLineStyle(info) {
53542
53567
  // 优化 方法调用 多次调用问题
53543
53568
  let style = this.lineFun(info);
53544
- if (style && style.color && style.width) {
53569
+ if (style) {
53545
53570
  let lintStyle = new style_Style({
53546
53571
  stroke: new style_Stroke({
53547
53572
  //地图连线的样式
@@ -53602,9 +53627,9 @@ function gpsToGd(wgLon, wgLat) {
53602
53627
  // todo 事件监听 优化
53603
53628
  // 任务调度
53604
53629
  // 兼容 vue3没有bus
53605
- this.$bus.$on(this.$parent.mapId + "ready", () => {
53606
- this.initData();
53607
- });
53630
+ // this.$bus.$on(this.$parent.mapId + "ready", () => {
53631
+ // this.initData();
53632
+ // });
53608
53633
  },
53609
53634
  beforeMount() {},
53610
53635
  mounted() {},
@@ -53624,11 +53649,11 @@ function gpsToGd(wgLon, wgLat) {
53624
53649
  ;
53625
53650
  var YlLine_component = normalizeComponent(
53626
53651
  yl_line_YlLinevue_type_script_lang_js,
53627
- YlLinevue_type_template_id_015841aa_scoped_true_render,
53628
- YlLinevue_type_template_id_015841aa_scoped_true_staticRenderFns,
53652
+ YlLinevue_type_template_id_a3ffcf04_scoped_true_render,
53653
+ YlLinevue_type_template_id_a3ffcf04_scoped_true_staticRenderFns,
53629
53654
  false,
53630
53655
  null,
53631
- "015841aa",
53656
+ "a3ffcf04",
53632
53657
  null
53633
53658
 
53634
53659
  )
@@ -54059,13 +54084,13 @@ YlPoint.install = function (Vue) {
54059
54084
  Vue.component(YlPoint.name, YlPoint);
54060
54085
  };
54061
54086
  /* harmony default export */ var yl_point = (YlPoint);
54062
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-fiy-line/YlFiyLine.vue?vue&type=template&id=4ee1c066&scoped=true
54063
- var YlFiyLinevue_type_template_id_4ee1c066_scoped_true_render = function render() {
54087
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-fiy-line/YlFiyLine.vue?vue&type=template&id=568a88e4&scoped=true
54088
+ var YlFiyLinevue_type_template_id_568a88e4_scoped_true_render = function render() {
54064
54089
  var _vm = this,
54065
54090
  _c = _vm._self._c;
54066
54091
  return _c('div');
54067
54092
  };
54068
- var YlFiyLinevue_type_template_id_4ee1c066_scoped_true_staticRenderFns = [];
54093
+ var YlFiyLinevue_type_template_id_568a88e4_scoped_true_staticRenderFns = [];
54069
54094
 
54070
54095
  ;// CONCATENATED MODULE: ./node_modules/ol/geom/MultiPoint.js
54071
54096
  /**
@@ -58388,18 +58413,18 @@ var turf_length_default = (/* unused pure expression or super */ null && (esm_le
58388
58413
  },
58389
58414
  beforeCreate() {},
58390
58415
  created() {
58391
- this.$bus.$on(this.$parent.mapId + "ready", () => {
58392
- if (this.map == null) {
58393
- this.map = this.$parent.map;
58394
- }
58395
- if (this.mapLayers.length > 0) {
58396
- for (let i in this.mapLayers) {
58397
- this.map.removeLayer(this.mapLayers[i]);
58398
- }
58399
- this.mapLayers = [];
58400
- }
58401
- this.addPointLayer();
58402
- });
58416
+ // this.$bus.$on(this.$parent.mapId + "ready", () => {
58417
+ // if (this.map == null) {
58418
+ // this.map = this.$parent.map;
58419
+ // }
58420
+ // if (this.mapLayers.length > 0) {
58421
+ // for (let i in this.mapLayers) {
58422
+ // this.map.removeLayer(this.mapLayers[i]);
58423
+ // }
58424
+ // this.mapLayers = [];
58425
+ // }
58426
+ // this.addPointLayer();
58427
+ // });
58403
58428
  },
58404
58429
  beforeMount() {},
58405
58430
  mounted() {},
@@ -58420,11 +58445,11 @@ var turf_length_default = (/* unused pure expression or super */ null && (esm_le
58420
58445
  ;
58421
58446
  var YlFiyLine_component = normalizeComponent(
58422
58447
  yl_fiy_line_YlFiyLinevue_type_script_lang_js,
58423
- YlFiyLinevue_type_template_id_4ee1c066_scoped_true_render,
58424
- YlFiyLinevue_type_template_id_4ee1c066_scoped_true_staticRenderFns,
58448
+ YlFiyLinevue_type_template_id_568a88e4_scoped_true_render,
58449
+ YlFiyLinevue_type_template_id_568a88e4_scoped_true_staticRenderFns,
58425
58450
  false,
58426
58451
  null,
58427
- "4ee1c066",
58452
+ "568a88e4",
58428
58453
  null
58429
58454
 
58430
58455
  )
@@ -58436,13 +58461,13 @@ YlFiyLine.install = function (Vue) {
58436
58461
  Vue.component(YlFiyLine.name, YlFiyLine);
58437
58462
  };
58438
58463
  /* harmony default export */ var yl_fiy_line = (YlFiyLine);
58439
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=template&id=365d966c&scoped=true
58440
- var YlGeoJsonvue_type_template_id_365d966c_scoped_true_render = function render() {
58464
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=template&id=26b6c6d8&scoped=true
58465
+ var YlGeoJsonvue_type_template_id_26b6c6d8_scoped_true_render = function render() {
58441
58466
  var _vm = this,
58442
58467
  _c = _vm._self._c;
58443
58468
  return _c('div');
58444
58469
  };
58445
- var YlGeoJsonvue_type_template_id_365d966c_scoped_true_staticRenderFns = [];
58470
+ var YlGeoJsonvue_type_template_id_26b6c6d8_scoped_true_staticRenderFns = [];
58446
58471
 
58447
58472
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=script&lang=js
58448
58473
  /**
@@ -58558,9 +58583,9 @@ var YlGeoJsonvue_type_template_id_365d966c_scoped_true_staticRenderFns = [];
58558
58583
  },
58559
58584
  beforeCreate() {},
58560
58585
  created() {
58561
- this.$bus.$on(this.$parent.mapId + "ready", () => {
58562
- this.initData();
58563
- });
58586
+ // this.$bus.$on(this.$parent.mapId + "ready", () => {
58587
+ // this.initData();
58588
+ // });
58564
58589
  },
58565
58590
  beforeMount() {},
58566
58591
  mounted() {},
@@ -58570,10 +58595,10 @@ var YlGeoJsonvue_type_template_id_365d966c_scoped_true_staticRenderFns = [];
58570
58595
  });
58571
58596
  ;// CONCATENATED MODULE: ./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=script&lang=js
58572
58597
  /* harmony default export */ var yl_geo_json_YlGeoJsonvue_type_script_lang_js = (YlGeoJsonvue_type_script_lang_js);
58573
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=style&index=0&id=365d966c&prod&scoped=true&lang=css
58598
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=style&index=0&id=26b6c6d8&prod&scoped=true&lang=css
58574
58599
  // extracted by mini-css-extract-plugin
58575
58600
 
58576
- ;// CONCATENATED MODULE: ./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=style&index=0&id=365d966c&prod&scoped=true&lang=css
58601
+ ;// CONCATENATED MODULE: ./packages/yl-map/yl-geo-json/YlGeoJson.vue?vue&type=style&index=0&id=26b6c6d8&prod&scoped=true&lang=css
58577
58602
 
58578
58603
  ;// CONCATENATED MODULE: ./packages/yl-map/yl-geo-json/YlGeoJson.vue
58579
58604
 
@@ -58586,11 +58611,11 @@ var YlGeoJsonvue_type_template_id_365d966c_scoped_true_staticRenderFns = [];
58586
58611
 
58587
58612
  var YlGeoJson_component = normalizeComponent(
58588
58613
  yl_geo_json_YlGeoJsonvue_type_script_lang_js,
58589
- YlGeoJsonvue_type_template_id_365d966c_scoped_true_render,
58590
- YlGeoJsonvue_type_template_id_365d966c_scoped_true_staticRenderFns,
58614
+ YlGeoJsonvue_type_template_id_26b6c6d8_scoped_true_render,
58615
+ YlGeoJsonvue_type_template_id_26b6c6d8_scoped_true_staticRenderFns,
58591
58616
  false,
58592
58617
  null,
58593
- "365d966c",
58618
+ "26b6c6d8",
58594
58619
  null
58595
58620
 
58596
58621
  )