Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
蒋波涛
/
super_mapboxgl_vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1486afb6
authored
2019-12-19 16:20:29 +0800
by
unknown
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
20191219
1 parent
33692f80
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
40 deletions
config/index.js
src/components/layers/Map_ags.vue
src/components/layers/Map_zj_basic.vue
config/index.js
View file @
1486afb
...
...
@@ -18,11 +18,11 @@ module.exports = {
assetsSubDirectory
:
'static'
,
assetsPublicPath
:
'/'
,
proxyTable
:
{
// '/zj':{
// target: 'http://
www.zjditu.cn
', //源地址
// '/zj
tdt
':{
// target: 'http://
127.0.0.1:3000
', //源地址
// changeOrigin: true, //改变源
// pathRewrite: {
// '^/zj
': 'http://127.0.0.1:7000
' //路径重写
// '^/zj
tdt': '
' //路径重写
// }
// }
},
...
...
src/components/layers/Map_ags.vue
View file @
1486afb
<!--
* @Author: jiangbotao
* @Date: 2019-12-18 01:40:38
* @LastEditors: jiangbotao
* @LastEditTime: 2019-12-19 00:13:46
* @FilePath: \supermapvue\client\src\components\layers\Map_ags.vue
-->
<
template
>
<div
>
<div
id=
"map"
></div>
...
...
@@ -26,25 +33,12 @@ export default {
"type"
:
"raster"
,
"tiles"
:
[
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}"
],
"tileSize"
:
256
},
"img"
:
{
"type"
:
"raster"
,
"tiles"
:
[
"https://services.wzmap.gov.cn/server/rest/services/TDT/YX2017/MapServer/tile/{z}/{y}/{x}?blankTile=false"
],
"tileSize"
:
256
}
},
"layers"
:
[
// {
// "id": "simple-tiles",
// "type": "raster",
// "source": "raster-tiles",
// "minzoom": 0,
// "maxzoom": 22
// },
{
"id"
:
"img_lyr"
,
"layers"
:
[{
"id"
:
"simple-tiles"
,
"type"
:
"raster"
,
"source"
:
"
img
"
,
"source"
:
"
raster-tiles
"
,
"minzoom"
:
0
,
"maxzoom"
:
22
}]
...
...
src/components/layers/Map_zj_basic.vue
View file @
1486afb
...
...
@@ -32,32 +32,13 @@ export default {
// crossDomain: true,
// success: function(data){
// console.log(data);
var
mapboxgl_style
=
'
zj/vtiles/styles/tdt/dark
.json'
;
var
mapboxgl_style
=
'
/zjtdt?vtiles/styles/tdt/streets_zw
.json'
;
var
map
=
new
mapboxgl
.
Map
({
container
:
'map'
,
zoom
:
12
,
center
:
[
120.15
,
30.25
],
renderWorldCopies
:
false
,
localIdeographFontFamily
:
"'黑体','san-serif'"
,
pitch
:
50
,
bearing
:
-
10
,
style
:
mapboxgl_style
,
shading
:
'realistic'
,
light
:
{
main
:
{
intensity
:
0.5
,
shadow
:
false
},
ambient
:
{
intensity
:
0.2
},
ambientCubemap
:
{
exposure
:
1
,
diffuseIntensity
:
0.5
,
specularIntensity
:
2
}
},
zlevel
:
1
crs
:
'EPSG:4490'
,
});
map
.
addControl
(
new
mapboxgl
.
NavigationControl
(),
'top-left'
);
// }
...
...
Please
register
or
sign in
to post a comment