| | |
| | | }, |
| | | beginCome() { |
| | | this.getdata = this.getQueryVariable('data');//url解码 |
| | | console.log(this.getdata) |
| | | // console.log(this.getdata) |
| | | // this.getdata = [{ |
| | | // jd: 115.91042800000002, |
| | | // wd: 28.68094757898212, |
| | |
| | | var that = this; |
| | | var center = [data[0].wd,data[0].jd]; |
| | | this.seedata = data[0].datas; |
| | | console.log(this.seedata) |
| | | // console.log(this.seedata) |
| | | var createMap = () => { |
| | | map = L.map('map', { //初始化地图 |
| | | center: center, |
| | |
| | | busIcon = new transportIcon({ |
| | | iconUrl: './img/red.png' |
| | | }); |
| | | console.log(data, 43545343) |
| | | // console.log(data, 43545343) |
| | | var setData = (a) => {//定义图标 |
| | | marker = L.marker([a.wd, a.jd], { |
| | | icon: a.dtype == 0 ? carIcon : a.dtype == 1 ? planeIcon : a.dtype == 2 ? busIcon : '', |