From 837d19093307eb5eeb1fca6536962a1ab1573dd5 Mon Sep 17 00:00:00 2001 From: Jeff Barnes Date: Fri, 30 Sep 2016 02:11:52 -0800 Subject: [PATCH] Fix webpack using valid image file for default icon path (#4849) (#4979) --- dist/leaflet.css | 2 +- src/layer/marker/Icon.Default.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/leaflet.css b/dist/leaflet.css index 9c7e2d11..f9c501ff 100644 --- a/dist/leaflet.css +++ b/dist/leaflet.css @@ -376,7 +376,7 @@ /* Default icon URLs */ .leaflet-default-icon-path { - background-image: url(images/); + background-image: url(images/marker-icon.png); } diff --git a/src/layer/marker/Icon.Default.js b/src/layer/marker/Icon.Default.js index 56139695..cb365635 100644 --- a/src/layer/marker/Icon.Default.js +++ b/src/layer/marker/Icon.Default.js @@ -44,6 +44,6 @@ L.Icon.Default = L.Icon.extend({ document.body.removeChild(el); return path.indexOf('url') === 0 ? - path.replace(/^url\([\"\']?/, '').replace(/[\"\']?\)$/, '') : ''; + path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '') : ''; } });