|
@@ -247,6 +247,21 @@ export default {
|
|
|
showLineLatLng: null
|
|
|
},
|
|
|
methods: {
|
|
|
+ loadHeatMap: async function() {
|
|
|
+ var heatNumbers = 150, heatRadius = 30;
|
|
|
+ var num = parseInt(heatNumbers);
|
|
|
+ num = (num > 0) ? num : 0;
|
|
|
+ var radius = parseInt(heatRadius);
|
|
|
+ radius = (radius > 0) ? radius : 0;
|
|
|
+ var heatPoints = [];
|
|
|
+ for (var i = 0; i < num; i++) {
|
|
|
+ heatPoints[i] = [Math.random() * 0.28 + 42, Math.random() * 0.5 + 125, Math.random() * 80];
|
|
|
+ }
|
|
|
+ var resultLayer = window.L.heatLayer(heatPoints, {
|
|
|
+ radius: radius,
|
|
|
+ minOpacity: 0.5
|
|
|
+ }).addTo(this.map);
|
|
|
+ },
|
|
|
clearM: async function(isAggregation) { //清理地图标点
|
|
|
if (isAggregation) {
|
|
|
if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {
|