Skip to content

Commit

Permalink
Merge pull request #1 from Avalon-Lab/master
Browse files Browse the repository at this point in the history
fix issue in Chrome : Couldn't autodetect L.Icon.Default.imagePath
  • Loading branch information
marko911 committed Aug 3, 2018
2 parents b86b914 + 98cd4bb commit db8088e
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions leaflet-core.html
Original file line number Diff line number Diff line change
Expand Up @@ -648,20 +648,7 @@
return;
}

var scripts = document.getElementsByTagName('link'),
leafletRe = /[\/^]leaflet-map.html$/;

var i, len, src, matches, path;

for (i = 0, len = scripts.length; i < len; i++) {
src = scripts[i].href;
matches = src.match(leafletRe);

if (matches) {
path = src.split(leafletRe)[0];
L.Icon.Default.imagePath = (path ? path + '/' : '') + '../leaflet/dist/images';
}
}
L.Icon.Default.imagePath = this.resolveUrl('../leaflet/dist/images');
}

domReady() {
Expand Down

0 comments on commit db8088e

Please sign in to comment.