Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build a CDN version of the Leaflet markercluster plugin for Vue? #49

Open
johanneeriksson opened this issue Sep 21, 2020 · 4 comments

Comments

@johanneeriksson
Copy link

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);
@jmiguelv
Copy link

@johanneeriksson have you been able to figure this out? I have tried several config options as well, but with no luck? Thank you.

@quentin-aslan
Copy link

Any news?

@qsinger
Copy link

qsinger commented Dec 2, 2022

Any news ?

@pablosalazarbr
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants