ry-vue-map 0.3.6 → 0.3.7

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ry-vue-map",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "private": false,
5
5
  "main": "lib/ryui.umd.min.js",
6
6
  "description": "ry公共组件库",
@@ -16,7 +16,7 @@ export default class MapDto {
16
16
  // 最大缩放率
17
17
  this.maxZoom = {
18
18
  type: Number,
19
- default: 18,
19
+ default: 21,
20
20
  };
21
21
 
22
22
  // 最小缩放率
@@ -1,30 +1,30 @@
1
1
  <template>
2
2
  <div class="map-box">
3
3
  <div v-lmap:loadMap class="map-style"></div>
4
- <RyMapTool class="ry-map-tool" :class="{
4
+ <RyMapTool class="ry-map-tool" :class="{
5
5
  'left':!isRight,
6
6
  'right':isRight
7
7
  }" v-if="lMap.map && isRyMapTool" @crossHairClick="crossHairClick($event)" :lMap="lMap"
8
- :isShowRangingTool="isShowRangingTool" :initModifyPolygon="initModifyPolygon"
9
- :isShowDrawTool="isShowDrawTool" :isRight="isRight" :isCrossHair="isCrossHair" :hideAdd="hideAdd"
10
- :hidePoint="hidePoint" :hideCancel="hideCancel" :hideDelete="hideDelete" :hideSave="hideSave"
11
- :hideLine="hideLine" :hideArea="hideArea" :isSwitchMap="isSwitchMap" :isSwitchMapRight="isSwitchMapRight"
12
- :gpsType="lastMapType" @loadDrawPolygonEvent="loadDrawPolygonEvent($event)" @success="drawSuccess($event)"
13
- @error="drawError($event)">
14
- <template>
15
- <slot name="maptool"></slot>
16
- </template>
17
- </RyMapTool>
18
-
19
- <template v-if="map">
20
- <slot name="polygon" :mapDto="{map,lMap}">
21
-
22
- </slot>
23
-
24
- <slot name="marker" :mapDto="{map,lMap}">
25
-
26
- </slot>
27
- </template>
8
+ :isShowRangingTool="isShowRangingTool" :initModifyPolygon="initModifyPolygon"
9
+ :isShowDrawTool="isShowDrawTool" :isRight="isRight" :isCrossHair="isCrossHair" :hideAdd="hideAdd"
10
+ :hidePoint="hidePoint" :hideCancel="hideCancel" :hideDelete="hideDelete" :hideSave="hideSave"
11
+ :hideLine="hideLine" :hideArea="hideArea" :isSwitchMap="isSwitchMap" :isSwitchMapRight="isSwitchMapRight"
12
+ :gpsType="lastMapType" @loadDrawPolygonEvent="loadDrawPolygonEvent($event)" @success="drawSuccess($event)"
13
+ @error="drawError($event)">
14
+ <template>
15
+ <slot name="maptool"></slot>
16
+ </template>
17
+ </RyMapTool>
18
+
19
+ <template v-if="map">
20
+ <slot name="polygon" :mapDto="{map,lMap}">
21
+
22
+ </slot>
23
+
24
+ <slot name="marker" :mapDto="{map,lMap}">
25
+
26
+ </slot>
27
+ </template>
28
28
  </div>
29
29
  </template>
30
30
  <script>
@@ -84,9 +84,9 @@
84
84
  m(val) {
85
85
  this.m = val;
86
86
  },
87
- boundaryModel(val){
88
- if(!this.map) return;
89
- }
87
+ boundaryModel(val) {
88
+ if (!this.map) return;
89
+ }
90
90
  },
91
91
  data() {
92
92
  return {
@@ -114,17 +114,30 @@
114
114
  async loadMap(el) {
115
115
  this.lMap.initOfflineMap(100, {
116
116
  el,
117
- urls:this.urls,
117
+ urls: this.urls,
118
118
  callback: ({
119
119
  map,
120
120
  lMap
121
121
  }) => {
122
122
  lMap.setView(this.center, this.bbox);
123
- lMap.getView().fit(this.bbox, [
123
+ const _view = lMap.getView();
124
+ _view.fit(this.bbox, [
124
125
  50, 50, 50, 50
125
126
  ]);
126
- const {geo,width,color,lineDash} = this.boundaryModel;
127
- lMap.initMapMaskEvent(map.getLayers(), geo,{width,color,lineDash});
127
+ _view.setMaxZoom(this.minZoom);
128
+ _view.setMaxZoom(this.maxZoom);
129
+ // _view.seZoom(this.zoom);
130
+ const {
131
+ geo,
132
+ width,
133
+ color,
134
+ lineDash
135
+ } = this.boundaryModel;
136
+ lMap.initMapMaskEvent(map.getLayers(), geo, {
137
+ width,
138
+ color,
139
+ lineDash
140
+ });
128
141
  }
129
142
  });
130
143
  },
@@ -120,7 +120,8 @@
120
120
  isShowPaly: true,
121
121
  layerArr: [2, 2],
122
122
  urls: [
123
- `https://zjhzla.ryaims.com/overlay/330112/roadmap/{z}/{x}/{y}.png`,
123
+ `https://zjhzla.ryaims.com/overlay/330112/satellite/{z}/{x}/{y}.jpg`,
124
+ // `https://zjhzla.ryaims.com/overlay/330112/roadmap/{z}/{x}/{y}.png`,
124
125
  // `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
125
126
  ],
126
127
  dto: null,
@@ -131,10 +132,8 @@
131
132
  geo: geoJson,
132
133
  width: 6,
133
134
  color: '#00adfd',
134
- lineDash: [1, 2, 3, 4, 5, 6,8,9,10],
135
-
135
+ lineDash: [1, 2, 3, 4, 5, 6, 8, 9, 10],
136
136
  };
137
- console.log(this.dto);
138
137
  },
139
138
  methods: {
140
139
  onShowPaly(b) {