I am using leaflet-webgl-heatmap in my VueJs application. It is giving me the following error:
TypeError: leaflet__WEBPACK_IMPORTED_MODULE_6___default.a.webGLHeatmap is not a constructor
The code is the following:
<div id="heat-map" style="height: 400px"></div>
In the script I am doing the import as:
import L from 'leaflet'
import 'leaflet-webgl-heatmap'
and
const base = L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png')
const map = L.map('heat-map', {
layers: [base],
center: this.centerLoc,
zoom: 8
})
const heatmap = new L.webGLHeatmap({ size: 1000 })
heatmap.setData(this.getStopHeatMap);
map.addLayer(heatmap)