Skip to content

Commit e521b7f

Browse files
【示例网站】【侧边栏相关问题修改】【bug任务提交】
1 parent b0bbcc8 commit e521b7f

29 files changed

+526
-338
lines changed

website/public/static/demo/config/config-vue-mapboxgl.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,6 @@
137137
"icon": "arcgislayer.png",
138138
"update": "最后更新时间:2021-01-07"
139139
},
140-
{
141-
"name": "Google图层",
142-
"file": "googlelayer",
143-
"diffcult": "2",
144-
"detail": "",
145-
"icon": "googlelayer.png",
146-
"update": "最后更新时间:2021-01-07"
147-
},
148140
{
149141
"name": "天地图图层",
150142
"file": "tdtlayer",
@@ -187,6 +179,22 @@
187179
}
188180
]
189181
},
182+
{
183+
"name": "Vue-ArcGIS",
184+
"iconfont": "icon_ogc",
185+
"folder": "vue-arcgis",
186+
"leaffolder": true,
187+
"childs": [
188+
{
189+
"name": "ArcGIS瓦片",
190+
"file": "arcgisTile",
191+
"diffcult": "2",
192+
"detail": "",
193+
"icon": "marker.png",
194+
"update": "最后更新时间:2021-06-04"
195+
}
196+
]
197+
},
190198
{
191199
"name": "Vue-交互",
192200
"iconfont": "iconhand_draw",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
6+
<title>Vue-arcgisTile</title>
7+
<script include="vue" exclude="plugin" src="./static/libs/include-mapboxgl-local.js"></script>
8+
<style type="text/css">
9+
body {
10+
margin: 0px !important;
11+
}
12+
#app {
13+
margin: 0 0;
14+
width: 100vw;
15+
height: 100vh;
16+
overflow: hidden;
17+
}
18+
.map {
19+
position: absolute; /* 只能是绝对布局 */
20+
top: 0;
21+
bottom: 0;
22+
height: 100%;
23+
width: 100%;
24+
}
25+
</style>
26+
</head>
27+
28+
<body>
29+
<div id="app">
30+
<mapgis-web-map
31+
id="map"
32+
:map-style="mapStyle"
33+
:zoom="mapZoom"
34+
:center="outerCenter"
35+
:crs="mapCrs"
36+
v-on:load="handleMapLoad">
37+
<mapgis-arcgis-tile-layer
38+
:layer-id="layertileid"
39+
:base-url="tileurl">
40+
</mapgis-arcgis-tile-layer>
41+
</mapgis-web-map>
42+
</div>
43+
<script>
44+
new Vue({
45+
el: '#app',
46+
data() {
47+
return {
48+
mapStyle: {
49+
//设置版本号,一定要设置
50+
version: 8,
51+
//添加来源
52+
sources: {},
53+
//设置加载并显示来源的图层信息
54+
layers: []
55+
}, // 地图样式
56+
mapZoom: 8, // 地图初始化级数
57+
outerCenter: [114.299039,30.594797], // 地图显示中心
58+
mapCrs: 'EPSG:3857',
59+
layertileid:"layerid",
60+
tileurl:"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer"
61+
};
62+
},
63+
methods: {
64+
handleMapLoad(payload) {
65+
this.map = payload.map;
66+
}
67+
}
68+
});
69+
</script>
70+
</body>
71+
</html>

website/public/static/demo/vue-mapboxgl/example/vue-control/attribution.htm

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,31 @@
2323
<div id="app">
2424
<mapgis-web-map
2525
id="map"
26-
:access-token="accessToken"
2726
:map-style="mapStyle"
2827
:zoom="mapZoom"
2928
:center="outerCenter"
3029
:crs="mapCrs"
3130
v-on:load="handleMapLoad"
3231
>
33-
<mapgis-ogc-wmts-layer :layer="layerWmts" :layer-id="layerWmtsId" :source-id="sourceWmtsId" :url="wmtsurl">
34-
</mapgis-ogc-wmts-layer>
35-
<mapgis-rastertile-layer
36-
:layer="layerRaster"
37-
:layer-id="layerRasterId"
38-
:source="sourceRaster"
39-
:source-id="sourceRasterId"
40-
>
41-
</mapgis-rastertile-layer>
42-
<mapgis-attribution :position="position" :compact="compact" :custom-attribution="attrbution"/>
32+
<mapgis-ogc-wmts-layer
33+
:layer-id="layerWmtsId"
34+
:source-id="sourceWmtsId"
35+
:base-url="wmtsurl"
36+
:tile-matrix-set="tileMatrixSet"
37+
:wmts-layer="layer"
38+
:format="format"
39+
:token="token">
40+
</mapgis-ogc-wmts-layer>
41+
<mapgis-rastertile-layer
42+
:layer="layerRaster"
43+
:layer-id="layerRasterId"
44+
:source="sourceRaster"
45+
:source-id="sourceRasterId">
46+
</mapgis-rastertile-layer>
47+
<mapgis-attribution
48+
:position="position"
49+
:compact="compact"
50+
:custom-attribution="attrbution"/>
4351
</mapgis-web-map>
4452
</div>
4553
<script>
@@ -62,7 +70,11 @@
6270
layerWmts: {},
6371
layerWmtsId: 'ogcwmts_layerId',
6472
sourceWmtsId: 'ogcwmts_sourceId',
65-
wmtsurl: 'http://t0.tianditu.com/DataServer?T=vec_c&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752',
73+
wmtsurl: 'http://t0.tianditu.gov.cn/vec_c/wmts',
74+
layer:"vec",
75+
tileMatrixSet:"c",
76+
format:"tiles",
77+
token:"f5347cab4b28410a6e8ba5143e3d5a35",
6678

6779
layerRaster: {},
6880
sourceRaster: {

0 commit comments

Comments
 (0)