Direct import via <script src=... > not working
simplynail opened this issue · 1 comments
I'd like to use Vue2leaflet only for part of the webpage, and without node/webpack overhead, which I am additionally not familiar with.
Vue website has quite comprehensive description on how to use framework itself by importing it via <script src="./vue.js">
I tried afterwards importing Vue2leaflet to the webpage also with <script src=... > and then registering components in my script, as described in Vue2leaflet documentation " If Imported by CDN" section:
Vue.component('l-map', Vue2Leaflet.LMap);
Vue.component('l-tile-layer', Vue2Leaflet.LTileLayer);
Vue.component("l-circle", Vue2leaflet.LCircle)
I am able to render openStreetMaps with tile layer however I am not able to render l-circle to the map.
Here's the code: https://jsfiddle.net/b2c1rzfa/14/
Why the circles don't get drawn (for either tried option)? Is the described importing and registering method of Vue2leaflet components correct?
fixed - my bad, I was using self closing tags in browser, which are not rendering correct DOM tree
(so <l-tile-layer :url="ll.url"/>
needed to be changed to <l-tile-layer :url="ll.url"></l-tile-layer>
)
Closing