Skip to content

Commit

Permalink
fix issue in Chrome Couldn't autodetect L.Icon.Default.imagePath
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffLeFoll committed May 14, 2018
1 parent df6444b commit 98cd4bb
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 98cd4bb

Please sign in to comment.