33692f80 by unknown

20191218

1 parent 1c20dea7
/*
* @Author: jiangbotao
* @Date: 2019-12-12 17:39:25
* @LastEditors: jiangbotao
* @LastEditTime: 2019-12-13 01:27:49
* @LastEditors : jiangbotao
* @LastEditTime : 2019-12-18 22:30:01
* @FilePath: \supermapvue\config\index.js
*/
'use strict'
......@@ -18,11 +18,11 @@ module.exports = {
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
// '/api':{
// target: 'http://support.supermap.com.cn:8090', //源地址
// '/zj':{
// target: 'http://www.zjditu.cn', //源地址
// changeOrigin: true, //改变源
// pathRewrite: {
// '^/api': 'http://support.supermap.com.cn:8090' //路径重写
// '^/zj': 'http://127.0.0.1:7000' //路径重写
// }
// }
},
......
......@@ -24,15 +24,15 @@ export default {
}
},
mounted(){
$.ajax({
type: "GET",
url: "http://www.zjditu.cn/vtiles/styles/tdt/streets.json",
type: 'get',
dataType: 'json', // 请求方式为jsonp
crossDomain: true,
success: function(data){
console.log(data);
// var mapboxgl_style = 'http://www.zjditu.cn/vtiles/styles/tdt/dark.json';
// $.ajax({
// type: "GET",
// url: "/api/vtiles/styles/tdt/streets.json",
// type: 'get',
// dataType: 'json', // 请求方式为jsonp
// crossDomain: true,
// success: function(data){
// console.log(data);
var mapboxgl_style = 'zj/vtiles/styles/tdt/dark.json';
var map = new mapboxgl.Map({
container: 'map',
zoom: 12,
......@@ -41,13 +41,7 @@ export default {
localIdeographFontFamily: "'黑体','san-serif'",
pitch: 50,
bearing: -10,
style: {
"version": data.version,
"sources": data.sources,
"sprite": data.sprite,
"glyphs": data.glyphs,
"layers": data.layers
},
style: mapboxgl_style,
shading: 'realistic',
light: {
main: {
......@@ -66,8 +60,8 @@ export default {
zlevel: 1
});
map.addControl(new mapboxgl.NavigationControl(), 'top-left');
}
});
// }
// });
}
}
</script>
......
<!--
* @Author: jiangbotao
* @Date: 2019-12-13 23:53:57
* @LastEditors: jiangbotao
* @LastEditTime: 2019-12-18 01:35:19
* @LastEditors : jiangbotao
* @LastEditTime : 2019-12-18 22:32:19
* @FilePath: \supermapvue\src\components\menu\MyMenu.vue
-->
<template>
......