From 98cd4bb642f96e64702afc36e8c9fa8292b6bd00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Le=20Foll?= Date: Mon, 14 May 2018 18:01:45 +0200 Subject: [PATCH] fix issue in Chrome Couldn't autodetect L.Icon.Default.imagePath --- leaflet-core.html | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/leaflet-core.html b/leaflet-core.html index 1fa580c..d1a6b79 100644 --- a/leaflet-core.html +++ b/leaflet-core.html @@ -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() {