()
| 580 | }, |
| 581 | methods: { |
| 582 | drawHeatmapLayer () { |
| 583 | this.heatmapLayer = new L7.HeatmapLayer({ |
| 584 | blend: 'normal' |
| 585 | }).source(this.data, { |
| 586 | parser: { |
| 587 | type: 'json', |
| 588 | x: 'lng', |
| 589 | y: 'lat', |
| 590 | }, |
| 591 | }).shape(this.option.selectType.default).size('count', [0, 1]) // weight映射通道 |
| 592 | .style({ |
| 593 | intensity: this.option.intensity, |
| 594 | radius: this.option.radius, |
| 595 | opacity: this.option.opacity, |
| 596 | rampColors: { |
| 597 | colors: this.option.rampColors, |
| 598 | positions: [0, 0.2, 0.4, 0.6, 0.8, 1.0] |
| 599 | } |
| 600 | }) |
| 601 | this.scene.addLayer(this.heatmapLayer) |
| 602 | }, |
| 603 | async initData () { |
| 604 | if (this.option.data.length === 0) { |
| 605 | const defaultData = await axios.get('./excel/heatCity.json') |
nothing calls this directly
no outgoing calls
no test coverage detected