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.
- package/package.json +9 -8
- package/{vue2-openlayers/vue2-openlayers.common.js → vue2-openlayers.common.js} +121 -96
- package/{vue2-openlayers/vue2-openlayers.common.js.map → vue2-openlayers.common.js.map} +1 -1
- package/{vue2-openlayers/vue2-openlayers.css → vue2-openlayers.css} +1 -1
- package/{vue2-openlayers/vue2-openlayers.umd.js → vue2-openlayers.umd.js} +121 -96
- package/{vue2-openlayers/vue2-openlayers.umd.js.map → vue2-openlayers.umd.js.map} +1 -1
- package/vue2-openlayers.umd.min.js +2 -0
- package/vue2-openlayers.umd.min.js.map +1 -0
- package/README.md +0 -24
- package/babel.config.js +0 -5
- package/dist/css/index.34f0f0b9.css +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/img/bottom_box.625e42a5.png +0 -0
- package/dist/img/car1.dd9a098b.png +0 -0
- package/dist/img/complete.2d0fa612.png +0 -0
- package/dist/img/diago_content.0d88c929.png +0 -0
- package/dist/img/diago_text_box.2e4da66b.png +0 -0
- package/dist/img/diago_title.2bd95b7a.png +0 -0
- package/dist/img/exception.a1eeefc3.png +0 -0
- package/dist/img/info1.829a6d7e.png +0 -0
- package/dist/img/info2.09e6e79e.png +0 -0
- package/dist/img/info3.3f96f756.png +0 -0
- package/dist/img/info4.6adcb927.png +0 -0
- package/dist/img/info5.ff3fdd2f.png +0 -0
- package/dist/img/info6.6e159d95.png +0 -0
- package/dist/img/left_box.40419b36.png +0 -0
- package/dist/img/money1.0743e701.png +0 -0
- package/dist/img/money2.58610d4d.png +0 -0
- package/dist/img/operating_fee.e6523ccc.png +0 -0
- package/dist/img/processing.28e46e7f.png +0 -0
- package/dist/img/public_content_box.39782fb5.png +0 -0
- package/dist/img/public_title_box1.6002afd4.png +0 -0
- package/dist/img/right_box.08458fe5.png +0 -0
- package/dist/img/success1.0cbc58af.png +0 -0
- package/dist/img/success2.af1a7499.png +0 -0
- package/dist/img/success3.d74caac5.png +0 -0
- package/dist/img/success4.37cc2343.png +0 -0
- package/dist/img/top_box.806bc756.png +0 -0
- package/dist/img/warehouse_map_popup.fa26d6cd.png +0 -0
- package/dist/img/work_error.3c528fdd.png +0 -0
- package/dist/img/work_su.0cbc58af.png +0 -0
- package/dist/img/work_wait.a2a706c9.png +0 -0
- package/dist/index.html +0 -13
- package/dist/js/chunk-vendors.901bdf0b.js +0 -8
- package/dist/js/chunk-vendors.901bdf0b.js.map +0 -1
- package/dist/js/index.29606843.js +0 -2
- package/dist/js/index.29606843.js.map +0 -1
- package/docs/.vuepress/config.js +0 -25
- package/docs/.vuepress/dist/404.html +0 -20
- package/docs/.vuepress/dist/assets/css/0.styles.7cfabf05.css +0 -1
- package/docs/.vuepress/dist/assets/img/7F8296FF-4A75-4013-BBFC-D482BF5303FF.597ff8a1.png +0 -0
- package/docs/.vuepress/dist/assets/img/gateway.98d6c8ec.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/mysql_images.07b3a3e5.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/nacos.741b050d.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/rabbitmq.50b12be7.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/redis_images.f0979945.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/search.83621669.svg +0 -1
- package/docs/.vuepress/dist/assets/img/server-structure.6e0aa81e.png +0 -0
- package/docs/.vuepress/dist/assets/js/10.285f55d1.js +0 -1
- package/docs/.vuepress/dist/assets/js/11.decff412.js +0 -1
- package/docs/.vuepress/dist/assets/js/12.b9ed6e21.js +0 -1
- package/docs/.vuepress/dist/assets/js/13.d9c8c7a9.js +0 -1
- package/docs/.vuepress/dist/assets/js/14.6495a0e6.js +0 -1
- package/docs/.vuepress/dist/assets/js/15.70d64d1a.js +0 -1
- package/docs/.vuepress/dist/assets/js/16.a93c018c.js +0 -1
- package/docs/.vuepress/dist/assets/js/17.ed91eb16.js +0 -1
- package/docs/.vuepress/dist/assets/js/18.d07cd593.js +0 -1
- package/docs/.vuepress/dist/assets/js/19.4b8a0f22.js +0 -1
- package/docs/.vuepress/dist/assets/js/2.2668fa1b.js +0 -1
- package/docs/.vuepress/dist/assets/js/20.52de9326.js +0 -1
- package/docs/.vuepress/dist/assets/js/21.2293a5ca.js +0 -1
- package/docs/.vuepress/dist/assets/js/3.fd22fded.js +0 -1
- package/docs/.vuepress/dist/assets/js/4.ad26b2fa.js +0 -1
- package/docs/.vuepress/dist/assets/js/5.a1c97bcb.js +0 -1
- package/docs/.vuepress/dist/assets/js/6.32f67120.js +0 -1
- package/docs/.vuepress/dist/assets/js/7.99161716.js +0 -1
- package/docs/.vuepress/dist/assets/js/8.a0d65864.js +0 -1
- package/docs/.vuepress/dist/assets/js/9.2d06e692.js +0 -1
- package/docs/.vuepress/dist/assets/js/app.0be82e56.js +0 -15
- package/docs/.vuepress/dist/config/config_list.html +0 -58
- package/docs/.vuepress/dist/config/index.html +0 -69
- package/docs/.vuepress/dist/guide/admin.html +0 -26
- package/docs/.vuepress/dist/guide/deepchange.html +0 -213
- package/docs/.vuepress/dist/guide/gateway.html +0 -45
- package/docs/.vuepress/dist/guide/hystrix.html +0 -26
- package/docs/.vuepress/dist/guide/index.html +0 -66
- package/docs/.vuepress/dist/guide/nacos.html +0 -26
- package/docs/.vuepress/dist/guide/opsdev.html +0 -26
- package/docs/.vuepress/dist/guide/rabbitmq.html +0 -26
- package/docs/.vuepress/dist/guide/skywarking.html +0 -52
- package/docs/.vuepress/dist/guide/summary.html +0 -74
- package/docs/.vuepress/dist/help/index.html +0 -28
- package/docs/.vuepress/dist/help/markdown.html +0 -33
- package/docs/.vuepress/dist/images/7F8296FF-4A75-4013-BBFC-D482BF5303FF.png +0 -0
- package/docs/.vuepress/dist/images/gateway.jpg +0 -0
- package/docs/.vuepress/dist/images/mysql_images.jpg +0 -0
- package/docs/.vuepress/dist/images/nacos.jpg +0 -0
- package/docs/.vuepress/dist/images/rabbitmq.jpg +0 -0
- package/docs/.vuepress/dist/images/redis_images.jpg +0 -0
- package/docs/.vuepress/dist/images/server-structure.png +0 -0
- package/docs/.vuepress/dist/index.html +0 -26
- package/docs/.vuepress/dist/logo.jpg +0 -0
- package/docs/.vuepress/nav.js +0 -34
- package/docs/.vuepress/public/images/7F8296FF-4A75-4013-BBFC-D482BF5303FF.png +0 -0
- package/docs/.vuepress/public/images/gateway.jpg +0 -0
- package/docs/.vuepress/public/images/mysql_images.jpg +0 -0
- package/docs/.vuepress/public/images/nacos.jpg +0 -0
- package/docs/.vuepress/public/images/rabbitmq.jpg +0 -0
- package/docs/.vuepress/public/images/redis_images.jpg +0 -0
- package/docs/.vuepress/public/images/server-structure.png +0 -0
- package/docs/.vuepress/public/logo.jpg +0 -0
- package/docs/.vuepress/sidebar.js +0 -62
- package/docs/README.md +0 -15
- package/docs/config/README.md +0 -108
- package/docs/config/config_list.md +0 -42
- package/docs/guide/README.md +0 -79
- package/docs/guide/admin.md +0 -25
- package/docs/guide/deepchange.md +0 -393
- package/docs/guide/gateway.md +0 -40
- package/docs/guide/hystrix.md +0 -21
- package/docs/guide/nacos.md +0 -7
- package/docs/guide/opsdev.md +0 -12
- package/docs/guide/rabbitmq.md +0 -15
- package/docs/guide/skywarking.md +0 -77
- package/docs/guide/summary.md +0 -120
- package/docs/help/README.md +0 -29
- package/docs/help/markdown.md +0 -165
- package/examples/App.vue +0 -21
- package/examples/assets/css/map-base.scss +0 -333
- package/examples/assets/fonts/pmzd.ttf +0 -0
- package/examples/assets/icons/index.js +0 -9
- package/examples/assets/icons/svg/404.svg +0 -1
- package/examples/assets/icons/svg/bug.svg +0 -1
- package/examples/assets/icons/svg/build.svg +0 -1
- package/examples/assets/icons/svg/button.svg +0 -1
- package/examples/assets/icons/svg/cascader.svg +0 -1
- package/examples/assets/icons/svg/chart.svg +0 -1
- package/examples/assets/icons/svg/checkbox.svg +0 -1
- package/examples/assets/icons/svg/clipboard.svg +0 -1
- package/examples/assets/icons/svg/code.svg +0 -1
- package/examples/assets/icons/svg/color.svg +0 -1
- package/examples/assets/icons/svg/component.svg +0 -1
- package/examples/assets/icons/svg/dashboard.svg +0 -1
- package/examples/assets/icons/svg/date-range.svg +0 -1
- package/examples/assets/icons/svg/date.svg +0 -1
- package/examples/assets/icons/svg/dict.svg +0 -1
- package/examples/assets/icons/svg/documentation.svg +0 -1
- package/examples/assets/icons/svg/download.svg +0 -1
- package/examples/assets/icons/svg/drag.svg +0 -1
- package/examples/assets/icons/svg/druid.svg +0 -1
- package/examples/assets/icons/svg/edit.svg +0 -1
- package/examples/assets/icons/svg/education.svg +0 -1
- package/examples/assets/icons/svg/email.svg +0 -1
- package/examples/assets/icons/svg/example.svg +0 -1
- package/examples/assets/icons/svg/excel.svg +0 -1
- package/examples/assets/icons/svg/exit-fullscreen.svg +0 -1
- package/examples/assets/icons/svg/eye-open.svg +0 -1
- package/examples/assets/icons/svg/eye.svg +0 -1
- package/examples/assets/icons/svg/form.svg +0 -1
- package/examples/assets/icons/svg/fullscreen.svg +0 -1
- package/examples/assets/icons/svg/github.svg +0 -1
- package/examples/assets/icons/svg/guide.svg +0 -1
- package/examples/assets/icons/svg/icon.svg +0 -1
- package/examples/assets/icons/svg/input.svg +0 -1
- package/examples/assets/icons/svg/international.svg +0 -1
- package/examples/assets/icons/svg/job.svg +0 -1
- package/examples/assets/icons/svg/language.svg +0 -1
- package/examples/assets/icons/svg/link.svg +0 -1
- package/examples/assets/icons/svg/list.svg +0 -1
- package/examples/assets/icons/svg/lock.svg +0 -1
- package/examples/assets/icons/svg/log.svg +0 -1
- package/examples/assets/icons/svg/logininfor.svg +0 -1
- package/examples/assets/icons/svg/message.svg +0 -1
- package/examples/assets/icons/svg/money.svg +0 -1
- package/examples/assets/icons/svg/monitor.svg +0 -2
- package/examples/assets/icons/svg/nested.svg +0 -1
- package/examples/assets/icons/svg/number.svg +0 -1
- package/examples/assets/icons/svg/online.svg +0 -1
- package/examples/assets/icons/svg/password.svg +0 -1
- package/examples/assets/icons/svg/pdf.svg +0 -1
- package/examples/assets/icons/svg/people.svg +0 -1
- package/examples/assets/icons/svg/peoples.svg +0 -1
- package/examples/assets/icons/svg/phone.svg +0 -1
- package/examples/assets/icons/svg/post.svg +0 -1
- package/examples/assets/icons/svg/qq.svg +0 -1
- package/examples/assets/icons/svg/question.svg +0 -1
- package/examples/assets/icons/svg/radio.svg +0 -1
- package/examples/assets/icons/svg/rate.svg +0 -1
- package/examples/assets/icons/svg/redis.svg +0 -1
- package/examples/assets/icons/svg/row.svg +0 -1
- package/examples/assets/icons/svg/search.svg +0 -1
- package/examples/assets/icons/svg/select.svg +0 -1
- package/examples/assets/icons/svg/server.svg +0 -1
- package/examples/assets/icons/svg/shopping.svg +0 -1
- package/examples/assets/icons/svg/size.svg +0 -1
- package/examples/assets/icons/svg/skill.svg +0 -1
- package/examples/assets/icons/svg/slider.svg +0 -1
- package/examples/assets/icons/svg/star.svg +0 -1
- package/examples/assets/icons/svg/swagger.svg +0 -1
- package/examples/assets/icons/svg/switch.svg +0 -1
- package/examples/assets/icons/svg/system.svg +0 -2
- package/examples/assets/icons/svg/tab.svg +0 -1
- package/examples/assets/icons/svg/table.svg +0 -1
- package/examples/assets/icons/svg/textarea.svg +0 -1
- package/examples/assets/icons/svg/theme.svg +0 -1
- package/examples/assets/icons/svg/time-range.svg +0 -1
- package/examples/assets/icons/svg/time.svg +0 -1
- package/examples/assets/icons/svg/tool.svg +0 -1
- package/examples/assets/icons/svg/tree-table.svg +0 -1
- package/examples/assets/icons/svg/tree.svg +0 -1
- package/examples/assets/icons/svg/turn-right.svg +0 -1
- package/examples/assets/icons/svg/upload.svg +0 -1
- package/examples/assets/icons/svg/user.svg +0 -1
- package/examples/assets/icons/svg/validCode.svg +0 -1
- package/examples/assets/icons/svg/wechat.svg +0 -1
- package/examples/assets/icons/svg/zip.svg +0 -1
- package/examples/assets/icons/svgo.yml +0 -22
- package/examples/assets/images/close_diago.png +0 -0
- package/examples/assets/images/red_circle.png +0 -0
- package/examples/assets/images/w_mj_map.png +0 -0
- package/examples/assets/images/warehouse_map_popup.png +0 -0
- package/examples/assets/images/warehouse_map_success.png +0 -0
- package/examples/assets/images/warehouse_map_warning.png +0 -0
- package/examples/assets/js/gps.js +0 -222
- package/examples/assets/logo.png +0 -0
- package/examples/components/HelloWorld.vue +0 -273
- package/examples/components/MapPopup.vue +0 -80
- package/examples/data/510000.js +0 -2056
- package/examples/data/510000.json +0 -2055
- package/examples/data/testData.js +0 -2088
- package/examples/main.js +0 -28
- package/examples/utils/echarts/esresize.js +0 -110
- package/jsconfig.json +0 -19
- package/vue.config.js +0 -54
- package/vue2-openlayers/package.json +0 -56
- package/vue2-openlayers/vue2-openlayers.umd.min.js +0 -2
- package/vue2-openlayers/vue2-openlayers.umd.min.js.map +0 -1
- /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
|
+
"version": "0.1.6",
|
4
4
|
"private": false,
|
5
|
-
"
|
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=
|
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("
|
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
|
-
|
42604
|
-
type:
|
42605
|
-
default:
|
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
|
-
|
42652
|
-
|
42653
|
-
|
42654
|
-
|
42655
|
-
|
42656
|
-
|
42657
|
-
|
42658
|
-
|
42659
|
-
|
42660
|
-
|
42661
|
-
|
42662
|
-
|
42663
|
-
|
42664
|
-
|
42665
|
-
|
42666
|
-
|
42667
|
-
|
42668
|
-
|
42669
|
-
|
42670
|
-
|
42671
|
-
|
42672
|
-
|
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
|
-
//
|
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
|
42707
|
-
duration: 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("
|
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: [
|
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=
|
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=
|
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
|
-
"
|
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=
|
42983
|
-
var
|
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
|
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('批量坐标转换数量:'
|
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
|
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
|
-
|
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
|
-
|
53628
|
-
|
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
|
-
"
|
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=
|
54063
|
-
var
|
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
|
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
|
-
|
58393
|
-
|
58394
|
-
|
58395
|
-
|
58396
|
-
|
58397
|
-
|
58398
|
-
|
58399
|
-
|
58400
|
-
|
58401
|
-
|
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
|
-
|
58424
|
-
|
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
|
-
"
|
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=
|
58440
|
-
var
|
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
|
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
|
-
|
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=
|
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=
|
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
|
-
|
58590
|
-
|
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
|
-
"
|
58618
|
+
"26b6c6d8",
|
58594
58619
|
null
|
58595
58620
|
|
58596
58621
|
)
|