ry-vue-map 0.2.2 → 0.2.5

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 (48) hide show
  1. package/README.MD +1 -1
  2. package/lib/ryui.common.js +81115 -75690
  3. package/lib/ryui.common.js.gz +0 -0
  4. package/lib/ryui.css +1 -1
  5. package/lib/ryui.umd.js +81115 -75690
  6. package/lib/ryui.umd.js.gz +0 -0
  7. package/lib/ryui.umd.min.js +5 -5
  8. package/lib/ryui.umd.min.js.gz +0 -0
  9. package/package.json +7 -3
  10. package/src/assets/map.png +0 -0
  11. package/src/components/index.js +5 -1
  12. package/src/components/maps/models/ryKML/index.js +29 -0
  13. package/src/components/maps/models/ryKMLs/index.js +41 -0
  14. package/src/components/maps/models/ryMapTool/mapTool.js +7 -0
  15. package/src/components/maps/models/ryOfflineMap/map.js +140 -0
  16. package/src/components/maps/models/ryOfflineMap/view.js +62 -0
  17. package/src/components/maps/models/ryStaticMap/map.js +36 -0
  18. package/src/components/maps/models/ryStaticMap/view.js +66 -0
  19. package/src/components/maps/ryClusters/src/index.vue +4 -2
  20. package/src/components/maps/ryKML/index.js +7 -0
  21. package/src/components/maps/ryKML/src/index.vue +174 -0
  22. package/src/components/maps/ryKMLs/index.js +7 -0
  23. package/src/components/maps/ryKMLs/src/index.vue +217 -0
  24. package/src/components/maps/ryMap/src/index.vue +4 -2
  25. package/src/components/maps/ryMapTool/src/index.vue +6 -6
  26. package/src/components/maps/ryOfflineMap/index.js +6 -0
  27. package/src/components/maps/ryOfflineMap/src/index.vue +329 -0
  28. package/src/components/maps/ryPolygons/src/index.vue +0 -1
  29. package/src/components/maps/ryStaticMap/index.js +7 -0
  30. package/src/components/maps/ryStaticMap/src/index.vue +233 -0
  31. package/src/components/maps/ryVectorMap/src/index.vue +1 -3
  32. package/src/components/maps/switchMap/src/newIndex.vue +39 -19
  33. package/src/main.js +10 -8
  34. package/src/router/index.js +28 -3
  35. package/src/utils/lMapServices.js +50 -5
  36. package/src/views/docx/index.vue +36 -0
  37. package/src/views/excel/index.vue +26 -0
  38. package/src/views/map/330112.js +220 -0
  39. package/src/views/map/dksj.js +1103 -0
  40. package/src/views/map/index.vue +69 -429
  41. package/src/views/map/index3.vue +207 -0
  42. package/src/views/map/index4.vue +207 -0
  43. package/src/views/map/indexNew.vue +625 -0
  44. package/src/views/map/indexStatic.vue +205 -0
  45. package/src/views/pdf/index.vue +24 -0
  46. package/src/views/staticMap/index.vue +90 -0
  47. package/src/views/tree/index.vue +193 -0
  48. package/src/views/vectorMap/index.vue +26 -5
@@ -0,0 +1,207 @@
1
+ <template>
2
+ <div class="map-style">
3
+
4
+ <ry-map projection="EPSG:4326" :zoom="10" :minZoom="1" :maxZoom="maxZoom" :center="center" @load="load($event)"
5
+ :isCrossHair="isRyMapTool" :isRight="true" :isRyMapTool="true" @drawSuccess="drawSuccess"
6
+ @drawError="drawError" :isShowRangingTool="true" :isShowDrawTool="isRyMapTool" :bindMapClick="true"
7
+ @mapClick="mapClick($event)" @crossHairClick="crossHairClick($event)" :bindMapMoveend="true"
8
+ @mapMoveend="mapMoveend($event)"
9
+ v-if="dto"
10
+ :boundaryModel="dto"
11
+ :urls="urls"
12
+ :bbox="bbox"
13
+ >
14
+
15
+
16
+ </ry-map>
17
+
18
+ <button @click="onClick()">测试</button>
19
+ <button @click="onClick2()">测试2</button>
20
+ <button @click="onClick3()">测试3</button>
21
+
22
+ <aside class="aside-style">
23
+ <el-button
24
+ class="ele-text-primary" v-show="isShowPaly" style="padding:10px;" @click.stop="onShowPaly(false)">
25
+ 轨迹回放 </el-button>
26
+
27
+ <el-button
28
+ class="ele-text-primary" v-show="!isShowPaly" style="padding:10px; color: red;" @click.stop="onShowPaly(true)">
29
+ 结束轨迹回放 </el-button>
30
+ </aside>
31
+ </div>
32
+ </template>
33
+
34
+ <script>
35
+ import dayjs from 'dayjs'
36
+ import RyMap from '@/components/maps/ryOfflineMap/src/index.vue';
37
+ import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
38
+ import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
39
+ import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
40
+ import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
41
+ import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
42
+ import geoJson from "./330112";
43
+
44
+
45
+
46
+ export default {
47
+ components: {
48
+ RyMap,
49
+ RyMapTool,
50
+ RyPolygon,
51
+ RyPolygons,
52
+ RyClustersMarker,
53
+ RyPolygonGeo,
54
+ },
55
+ data() {
56
+ return {
57
+ map: null,
58
+ lMap: null,
59
+ polygonColorObj: null,
60
+ // const bbox = [ 118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064 ];
61
+ // const center = [119.34667114000006, 30.198078622500038];
62
+
63
+
64
+ bbox: [118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064],
65
+ isClear: false,
66
+ colors: [],
67
+ modelArr2: [
68
+ {id:'ceshi1', x:120.15535003220648,y:30.179378795342608},
69
+ {id:'ceshi2',x:120.16369976775891,y:30.1967116895034},
70
+ {id:'ceshi3',x:120.156817,y:30.1753985} ,
71
+ {id:'ceshi4',x:120.1538245,y:30.183076} ,
72
+ ],
73
+ center: [119.34667114000006, 30.198078622500038],
74
+ polygonColors: [],
75
+ remove: 'ceshi1',
76
+ removes: [],
77
+ ranges: [],
78
+ restFit: true,
79
+ range: 'ceshi2',
80
+ isFit: false,
81
+ insert: null,
82
+ showPolygon: null,
83
+ showPolygons: [{
84
+ id: 'ceshi2',
85
+ isShow: false
86
+ }],
87
+ inserts: [],
88
+ isShowAll: false,
89
+ polygonModel: null,
90
+ mapTool: null,
91
+ isCheckPoint: null,
92
+ gpsType: 0,
93
+ isRyMapTool: true,
94
+ maxZoom: 18,
95
+ lineData1:null,
96
+ lineData2:null,
97
+ clearLiens:false,
98
+ // startMarkerDto:null,
99
+ // endMarkerDto:null,
100
+ startMarkerDto: {
101
+ url:require('@/assets/startpoint.png'),
102
+ height:23,
103
+ offset:[8, -11],
104
+ width:28
105
+ },
106
+ endMarkerDto:{
107
+ url:require('@/assets/stoppoint.png'),
108
+ height:16,
109
+ offset:[0, -8],
110
+ width:16
111
+ },
112
+ lineAppend:[],
113
+ isShowPaly:true,
114
+ layerArr:[2,2],
115
+ urls:[
116
+ `http://127.0.0.1:10006/${330112}/satellite/{z}/{x}/{y}.jpg`,
117
+ `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
118
+ ],
119
+ dto:null,
120
+ };
121
+ },
122
+ created() {
123
+ this.dto={
124
+ geo:geoJson,
125
+ width:4,
126
+ color:'#000'
127
+ };
128
+ console.log(this.dto);
129
+ },
130
+ methods: {
131
+ onShowPaly(b) {
132
+ this.isShowPaly = b;
133
+
134
+ },
135
+ load(obj) {
136
+ this.lMap = obj.mapServices;
137
+ this.map = obj.map;
138
+ console.log(this.lMap);
139
+
140
+ },
141
+ drawSuccess(obj) {
142
+ this.polygonModel = {
143
+ fillColor: '#000',
144
+ stroke: '#fff',
145
+ width: 4,
146
+ text: '',
147
+ geo: obj.geoJson,
148
+ id: 'ceshi',
149
+ };
150
+ },
151
+ drawError(obj) {},
152
+ mapClick(e) {
153
+ // alert(e);
154
+ },
155
+ onLoad(e) {},
156
+ crossHairClick(e) {
157
+ // console.log(e);
158
+ },
159
+ mapMoveend(e) {
160
+ // alert(1);
161
+ // console.log(e);
162
+ },
163
+ loadDrawPolygonEvent(e) {
164
+ this.mapTool = e;
165
+ },
166
+ clusterCallback({
167
+ id,
168
+ isShow
169
+ }) {
170
+ setTimeout(r => {
171
+ this.showPolygon = {
172
+ id,
173
+ isShow
174
+ };
175
+ this.isCheckPoint = {
176
+ id,
177
+ isShow
178
+ };
179
+ }, 50);
180
+ },
181
+ changeSwitchMap(obj) {
182
+ if (obj.mapType == 2) {
183
+ this.gpsType = 0;
184
+ return;
185
+ }
186
+ this.gpsType = obj.mapType;
187
+ },
188
+ onClick() {
189
+ this.isRyMapTool = !this.isRyMapTool;
190
+ },
191
+ onClick2() {
192
+ this.maxZoom = 28;
193
+ },
194
+ onClick3() {
195
+ this.maxZoom = 10;
196
+ },
197
+
198
+ }
199
+ };
200
+ </script>
201
+
202
+ <style lang="scss" scoped>
203
+ .map-style {
204
+ height: 100vh;
205
+ position: relative;
206
+ }
207
+ </style>
@@ -0,0 +1,207 @@
1
+ <template>
2
+ <div class="map-style">
3
+
4
+ <ry-map projection="EPSG:4326" :zoom="10" :minZoom="1" :maxZoom="maxZoom" :center="center" @load="load($event)"
5
+ :isCrossHair="isRyMapTool" :isRight="true" :isRyMapTool="true" @drawSuccess="drawSuccess"
6
+ @drawError="drawError" :isShowRangingTool="true" :isShowDrawTool="isRyMapTool" :bindMapClick="true"
7
+ @mapClick="mapClick($event)" @crossHairClick="crossHairClick($event)" :bindMapMoveend="true"
8
+ @mapMoveend="mapMoveend($event)"
9
+ v-if="dto"
10
+ :boundaryModel="dto"
11
+ :urls="urls"
12
+ :bbox="bbox"
13
+ >
14
+
15
+
16
+ </ry-map>
17
+
18
+ <button @click="onClick()">测试</button>
19
+ <button @click="onClick2()">测试2</button>
20
+ <button @click="onClick3()">测试3</button>
21
+
22
+ <aside class="aside-style">
23
+ <el-button
24
+ class="ele-text-primary" v-show="isShowPaly" style="padding:10px;" @click.stop="onShowPaly(false)">
25
+ 轨迹回放 </el-button>
26
+
27
+ <el-button
28
+ class="ele-text-primary" v-show="!isShowPaly" style="padding:10px; color: red;" @click.stop="onShowPaly(true)">
29
+ 结束轨迹回放 </el-button>
30
+ </aside>
31
+ </div>
32
+ </template>
33
+
34
+ <script>
35
+ import dayjs from 'dayjs'
36
+ import RyMap from '@/components/maps/ryOfflineMap/src/index.vue';
37
+ import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
38
+ import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
39
+ import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
40
+ import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
41
+ import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
42
+ import geoJson from "./330112";
43
+
44
+
45
+
46
+ export default {
47
+ components: {
48
+ RyMap,
49
+ RyMapTool,
50
+ RyPolygon,
51
+ RyPolygons,
52
+ RyClustersMarker,
53
+ RyPolygonGeo,
54
+ },
55
+ data() {
56
+ return {
57
+ map: null,
58
+ lMap: null,
59
+ polygonColorObj: null,
60
+ // const bbox = [ 118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064 ];
61
+ // const center = [119.34667114000006, 30.198078622500038];
62
+
63
+
64
+ bbox: [118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064],
65
+ isClear: false,
66
+ colors: [],
67
+ modelArr2: [
68
+ {id:'ceshi1', x:120.15535003220648,y:30.179378795342608},
69
+ {id:'ceshi2',x:120.16369976775891,y:30.1967116895034},
70
+ {id:'ceshi3',x:120.156817,y:30.1753985} ,
71
+ {id:'ceshi4',x:120.1538245,y:30.183076} ,
72
+ ],
73
+ center: [119.34667114000006, 30.198078622500038],
74
+ polygonColors: [],
75
+ remove: 'ceshi1',
76
+ removes: [],
77
+ ranges: [],
78
+ restFit: true,
79
+ range: 'ceshi2',
80
+ isFit: false,
81
+ insert: null,
82
+ showPolygon: null,
83
+ showPolygons: [{
84
+ id: 'ceshi2',
85
+ isShow: false
86
+ }],
87
+ inserts: [],
88
+ isShowAll: false,
89
+ polygonModel: null,
90
+ mapTool: null,
91
+ isCheckPoint: null,
92
+ gpsType: 0,
93
+ isRyMapTool: true,
94
+ maxZoom: 18,
95
+ lineData1:null,
96
+ lineData2:null,
97
+ clearLiens:false,
98
+ // startMarkerDto:null,
99
+ // endMarkerDto:null,
100
+ startMarkerDto: {
101
+ url:require('@/assets/startpoint.png'),
102
+ height:23,
103
+ offset:[8, -11],
104
+ width:28
105
+ },
106
+ endMarkerDto:{
107
+ url:require('@/assets/stoppoint.png'),
108
+ height:16,
109
+ offset:[0, -8],
110
+ width:16
111
+ },
112
+ lineAppend:[],
113
+ isShowPaly:true,
114
+ layerArr:[2,2],
115
+ urls:[
116
+ `http://127.0.0.1:10006/${330112}/satellite/{z}/{x}/{y}.jpg`,
117
+ `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
118
+ ],
119
+ dto:null,
120
+ };
121
+ },
122
+ created() {
123
+ this.dto={
124
+ geo:geoJson,
125
+ width:4,
126
+ color:'#000'
127
+ };
128
+ console.log(this.dto);
129
+ },
130
+ methods: {
131
+ onShowPaly(b) {
132
+ this.isShowPaly = b;
133
+
134
+ },
135
+ load(obj) {
136
+ this.lMap = obj.mapServices;
137
+ this.map = obj.map;
138
+ console.log(this.lMap);
139
+
140
+ },
141
+ drawSuccess(obj) {
142
+ this.polygonModel = {
143
+ fillColor: '#000',
144
+ stroke: '#fff',
145
+ width: 4,
146
+ text: '',
147
+ geo: obj.geoJson,
148
+ id: 'ceshi',
149
+ };
150
+ },
151
+ drawError(obj) {},
152
+ mapClick(e) {
153
+ // alert(e);
154
+ },
155
+ onLoad(e) {},
156
+ crossHairClick(e) {
157
+ // console.log(e);
158
+ },
159
+ mapMoveend(e) {
160
+ // alert(1);
161
+ // console.log(e);
162
+ },
163
+ loadDrawPolygonEvent(e) {
164
+ this.mapTool = e;
165
+ },
166
+ clusterCallback({
167
+ id,
168
+ isShow
169
+ }) {
170
+ setTimeout(r => {
171
+ this.showPolygon = {
172
+ id,
173
+ isShow
174
+ };
175
+ this.isCheckPoint = {
176
+ id,
177
+ isShow
178
+ };
179
+ }, 50);
180
+ },
181
+ changeSwitchMap(obj) {
182
+ if (obj.mapType == 2) {
183
+ this.gpsType = 0;
184
+ return;
185
+ }
186
+ this.gpsType = obj.mapType;
187
+ },
188
+ onClick() {
189
+ this.isRyMapTool = !this.isRyMapTool;
190
+ },
191
+ onClick2() {
192
+ this.maxZoom = 28;
193
+ },
194
+ onClick3() {
195
+ this.maxZoom = 10;
196
+ },
197
+
198
+ }
199
+ };
200
+ </script>
201
+
202
+ <style lang="scss" scoped>
203
+ .map-style {
204
+ height: 100vh;
205
+ position: relative;
206
+ }
207
+ </style>