vue2-leaflet-markercluster
vue2-leaflet-markercluster copied to clipboard
How to build a CDN version of the Leaflet markercluster plugin for Vue?
I have been tumbling around with npm and webpack to get a plain JS file to include without any success.
The Vue2 Leaflet docs provide a CDN version that is easy to implement. https://vue2-leaflet.netlify.app/quickstart/#installation
How is it possible get a plain JS file for the cluster plugin to use with Vue?
Then this would be possible in a simple HTML file:
<link rel="stylesheet" href="//unpkg.com/leaflet/dist/leaflet.css" />
<script src="//unpkg.com/leaflet/dist/leaflet.js"></script>
<script src="//unpkg.com/vue2-leaflet"></script>
<script src="//unpkg.com/vue2-leaflet-markercluster"></script>
Then register components:
Vue.component('v-map', window.Vue2Leaflet.LMap);
Vue.component('v-tilelayer', window.Vue2Leaflet.LTileLayer);
Vue.component('v-marker', window.Vue2Leaflet.LMarker);
Vue.component('v-marker-cluster', window.Vue2LeafletMarkercluster);
@johanneeriksson have you been able to figure this out? I have tried several config options as well, but with no luck? Thank you.
Any news?
Any news ?
I am facing same issue, it seems like there is an issue trying to import everything using a cdn. Please let me know if someone was able to figure this out (I will update this in case I find something).