1486afb6 by unknown

20191219

1 parent 33692f80
......@@ -18,11 +18,11 @@ module.exports = {
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
// '/zj':{
// target: 'http://www.zjditu.cn', //源地址
// '/zjtdt':{
// target: 'http://127.0.0.1:3000', //源地址
// changeOrigin: true, //改变源
// pathRewrite: {
// '^/zj': 'http://127.0.0.1:7000' //路径重写
// '^/zjtdt': '' //路径重写
// }
// }
},
......
<!--
* @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
}]
......
......@@ -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');
// }
......