Can I use Leaflet.MarkerCluster.Freezable with vue2Leaflet?
I have tried to include it and use it with a ref on my marker cluster like this : this.$refs.cluster.disableClustering();
, but it gave the error "TypeError: this.$refs.cluster.disableClustering is not a function".
Asked
Active
Viewed 97 times
0

panbak
- 406
- 3
- 10
-
Where is the error printed? In console of browser or during compilation? And do you use TypeScript? – ghybs Apr 09 '21 at 11:49
-
In the browser console yes. I dont use Typescript. I have tried to import it as the docs say, but webpack needs the module to have an export default in order for this to work, which is not the case. I also tried to append it with script tag from cdn to the page body after the component mounted. But it also did not work. – panbak Apr 09 '21 at 12:17
-
"_webpack needs the module to have an export default in order for this to work_": I am pretty sure it does not need, but could you show how you have tried ro import it? And providing a live reproduction example on StackBlitz or CodeSandbox would greatly help. – ghybs Apr 09 '21 at 15:22