leaflet-extras / leaflet-map

Leaflet map as web component
https://leaflet-extras.github.io/leaflet-map
116 stars 72 forks source link

Fix error with default icon image path #84

Open tonimc opened 7 years ago

tonimc commented 7 years ago

If you try to use leaflet-map inside a component, the component fails because leaflet is not able to get the default icon image path due to leaftlet-map suppose that you are imported the component main document.

Using polymer component method resolveUrl (https://www.polymer-project.org/1.0/docs/api/Polymer.Base#method-resolveUrl) you can get the URL of a component and use it to get the correct icon default URL.

fegan104 commented 7 years ago

This just saved me so much time; thank you!