Verified Commit a6648abe authored by jxtxzzw's avatar jxtxzzw
Browse files

修复:为地图添加 API Token


Signed-off-by: jxtxzzw's avatarZhenwei Zhang <jxtxzzw@126.com>
parent 1015875f
Pipeline #456 passed with stages
in 16 minutes and 3 seconds
......@@ -15,5 +15,9 @@
"food": "/data/food/",
"honor": "/data/honor/",
"footprint": "/data/footprint/"
},
"token": {
"gaode": "atokenxxxxxxxx",
"mapbox": "pk.eyxxx.xxx_x_XXXX"
}
}
......@@ -51,6 +51,7 @@ function getPointLayer(data, that) {
export function constructMapAndScene(map, source, that) {
const { Scene, Popup } = that.$l7
const { GaodeMap, Mapbox } = that.$l7maps
const { setting } = require('./reader')
// Step 1: 创建 Scene 对象
const config = {
......@@ -58,6 +59,7 @@ export function constructMapAndScene(map, source, that) {
pitch: 0,
zoom: 4,
maxZoom: 18,
token: map === 'china' ? setting.token.gaode : setting.token.mapbox,
}
const scene = new Scene({
id: `${map}Footprint`,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment