51913992 by unknown

20191227

1 parent 1486afb6
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
2 * MapboxGL基本地图设置并从服务器上获取相关信息 2 * MapboxGL基本地图设置并从服务器上获取相关信息
3 * @Author: jiangbotao 3 * @Author: jiangbotao
4 * @Date: 2019-12-09 23:17:48 4 * @Date: 2019-12-09 23:17:48
5 * @LastEditors: jiangbotao 5 * @LastEditors : jiangbotao
6 * @LastEditTime: 2019-12-15 12:28:03 6 * @LastEditTime : 2019-12-27 17:45:58
7 * @FilePath: \mymapbox\src\components\Map3857.vue 7 * @FilePath: \mymapbox\src\components\Map3857.vue
8 --> 8 -->
9 <template> 9 <template>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: jiangbotao 2 * @Author: jiangbotao
3 * @Date: 2019-12-09 23:17:48 3 * @Date: 2019-12-09 23:17:48
4 * @LastEditors : jiangbotao 4 * @LastEditors : jiangbotao
5 * @LastEditTime : 2019-12-18 19:27:37 5 * @LastEditTime : 2019-12-27 15:00:11
6 * @FilePath: \mymapbox\src\components\Map3857.vue 6 * @FilePath: \mymapbox\src\components\Map3857.vue
7 --> 7 -->
8 <template> 8 <template>
...@@ -87,6 +87,8 @@ export default { ...@@ -87,6 +87,8 @@ export default {
87 } 87 }
88 88
89 function removeMsg() { 89 function removeMsg() {
90 console.log('deleted');
91 // draw.deleteAll();
90 } 92 }
91 93
92 map.on('draw.create', measure); 94 map.on('draw.create', measure);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: jiangbotao 2 * @Author: jiangbotao
3 * @Date: 2019-12-09 23:17:48 3 * @Date: 2019-12-09 23:17:48
4 * @LastEditors : jiangbotao 4 * @LastEditors : jiangbotao
5 * @LastEditTime : 2019-12-18 19:29:18 5 * @LastEditTime : 2019-12-27 11:35:00
6 * @FilePath: \mymapbox\src\components\Map3857.vue 6 * @FilePath: \mymapbox\src\components\Map3857.vue
7 --> 7 -->
8 <template> 8 <template>
......
1 <!--
2 * @Author: jiangbotao
3 * @Date: 2019-12-09 23:17:48
4 * @LastEditors : jiangbotao
5 * @LastEditTime : 2019-12-27 17:49:16
6 * @FilePath: \mymapbox\src\components\Map3857.vue
7 -->
8 <template>
9 <div >
10 <div id="map"></div>
11 </div>
12 </template>
13
14 <script>
15 import mapboxgl from 'mapbox-gl';
16 import { Logo } from '@supermap/iclient-mapboxgl';
17
18 export default {
19 name: 'RasterTiles',
20 data () {
21 return {
22
23 }
24 },
25 mounted(){
26 var map, host = "http://192.168.1.100:8090";
27 var url = host + "/iserver/services/map-world/rest/maps/World";
28 var map = new mapboxgl.Map({
29 container: 'map',
30 attributionControl: false,
31 background: {
32 color: '#FFFFFF'
33 },
34 style: {
35 "version": 8,
36 "sources": {
37 "raster-tiles": {
38 "attribution": '展示栅格瓦片和各种Mapbox控件',
39 "type": "raster",
40 "tiles": [host + '/iserver/services/map-ugcv5-Blurmap/rest/maps/Blurmap'],
41 "tileSize": 256,
42 "transparent": true,
43 "format": "png",
44 "rasterSource": 'iserver'
45 }
46 },
47 "layers": [{
48 id: 'background',
49 type: 'background',
50 paint: { 'background-color': "#000000" }
51 },{
52 "id": "simple-tiles",
53 "type": "raster",
54 "source": "raster-tiles",
55 "minzoom": 0,
56 "maxzoom": 22
57 }]
58 },
59 center: [120.47, 27.78169], // starting position
60 crs: 'EPSG:4490',
61 pitch: 50, // pitch in degrees
62 bearing: -10, //
63 maxZoom: 13,
64 minZoom: 8,
65 zoom: 9 // starting zoom
66 });
67 map.addControl(new Logo(), 'bottom-right');
68 map.addControl(new mapboxgl.NavigationControl(), 'top-left');
69 map.addControl(new mapboxgl.ScaleControl({}));
70 map.addControl(new mapboxgl.FullscreenControl(),'top-right');
71
72 // var popup = new mapboxgl.Popup({ closeOnClick: false })
73 // .setLngLat([120.47, 27.78169])
74 // .setHTML('<h1>Hello World!</h1>')
75 // .addTo(map);
76 }
77 }
78 </script>
79
80 <style scoped>
81 #map {
82 position: absolute;
83 height: 100%;
84 width: 100%;
85 background-color: white
86 }
87 </style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: jiangbotao 2 * @Author: jiangbotao
3 * @Date: 2019-12-12 17:40:15 3 * @Date: 2019-12-12 17:40:15
4 * @LastEditors : jiangbotao 4 * @LastEditors : jiangbotao
5 * @LastEditTime : 2019-12-18 20:05:46 5 * @LastEditTime : 2019-12-27 15:10:45
6 * @FilePath: \supermapvue\src\router\index.js 6 * @FilePath: \supermapvue\src\router\index.js
7 */ 7 */
8 /* 8 /*
...@@ -62,7 +62,7 @@ export default new Router({ ...@@ -62,7 +62,7 @@ export default new Router({
62 { 62 {
63 path: '/rastertile', 63 path: '/rastertile',
64 name: 'MapRasterTile', 64 name: 'MapRasterTile',
65 component: () => import('@/components/basic/Map_rastertiles') 65 component: () => import('@/components/basic/Map_rastertiles_iserver')
66 }, 66 },
67 { 67 {
68 path: '/mvt', 68 path: '/mvt',
......
This diff could not be displayed because it is too large.