(id, mapConfig, callback)
| 9 | Vue.mixin({ |
| 10 | methods: { |
| 11 | initL7Map (id, mapConfig, callback) { |
| 12 | /** 初始化 L7地图 |
| 13 | * @name: |
| 14 | * @param {id 地图id mapConfig 地图初始化参数 callback初始化成功回调} |
| 15 | * @return {*} |
| 16 | */ |
| 17 | const scene = new L7.Scene({ |
| 18 | id, |
| 19 | map: new L7.GaodeMap({ |
| 20 | style: mapConfig.style, // 样式URL |
| 21 | center: mapConfig.center, |
| 22 | pitch: mapConfig.pitch, |
| 23 | zoom: mapConfig.zoom, |
| 24 | plugin: mapConfig.plugin || [], |
| 25 | token: 'b1876df77766a9ea12e4e047fc3588fc' |
| 26 | }) |
| 27 | |
| 28 | }); |
| 29 | scene.on('loaded', () => { |
| 30 | callback(scene) |
| 31 | }); |
| 32 | }, |
| 33 | async searchGeo (address, radius, callback) { |
| 34 | /** 地理转坐标并获取radius范围内的路网数据并转换为geoData |
| 35 | * @name: |
nothing calls this directly
no outgoing calls
no test coverage detected