{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3818","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3818/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3818/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3818/events","html_url":"https://github.com/Leaflet/Leaflet/issues/3818","id":105262732,"number":3818,"title":"Leaflet confused about its default marker icon URL","user":{"login":"mk-pmb","id":3442602,"avatar_url":"https://avatars.githubusercontent.com/u/3442602?v=3","gravatar_id":"","url":"https://api.github.com/users/mk-pmb","html_url":"https://github.com/mk-pmb","followers_url":"https://api.github.com/users/mk-pmb/followers","following_url":"https://api.github.com/users/mk-pmb/following{/other_user}","gists_url":"https://api.github.com/users/mk-pmb/gists{/gist_id}","starred_url":"https://api.github.com/users/mk-pmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mk-pmb/subscriptions","organizations_url":"https://api.github.com/users/mk-pmb/orgs","repos_url":"https://api.github.com/users/mk-pmb/repos","events_url":"https://api.github.com/users/mk-pmb/events{/privacy}","received_events_url":"https://api.github.com/users/mk-pmb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-07T20:03:40Z","updated_at":"2015-09-08T21:01:22Z","closed_at":"2015-09-08T08:09:15Z","body":"On my [demo page](http://mk-pmb.github.io/leaflet-js-demos/default-marker-icon-src.html) ([repo](https://github.com/mk-pmb/leaflet-js-demos)), the default marker image is broken. Its image URL contains `/404/prepare-js.cgi?` which leads me to believe that Leaflet was confused about its script URL.\r\nIn case it helps, I demonstrated my favorite way to detect a script's src URL when loaded into a website.\r\n\r\nI'm testing with Firefox 40.0.3 on Ubuntu 12.04.5 LTS."},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/138698563","html_url":"https://github.com/Leaflet/Leaflet/issues/3818#issuecomment-138698563","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3818","id":138698563,"user":{"login":"danzel","id":393086,"avatar_url":"https://avatars.githubusercontent.com/u/393086?v=3","gravatar_id":"","url":"https://api.github.com/users/danzel","html_url":"https://github.com/danzel","followers_url":"https://api.github.com/users/danzel/followers","following_url":"https://api.github.com/users/danzel/following{/other_user}","gists_url":"https://api.github.com/users/danzel/gists{/gist_id}","starred_url":"https://api.github.com/users/danzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danzel/subscriptions","organizations_url":"https://api.github.com/users/danzel/orgs","repos_url":"https://api.github.com/users/danzel/repos","events_url":"https://api.github.com/users/danzel/events{/privacy}","received_events_url":"https://api.github.com/users/danzel/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T21:01:21Z","updated_at":"2015-09-08T21:01:21Z","body":"Our code looks for a script tag with a (possibly versioned) leaflet.js file in it.\r\nhttps://github.com/Leaflet/Leaflet/blob/master/src/layer/marker/Icon.Default.js\r\n\r\n@mk-pmb has this, finding the last script tag (at script load time?)\r\nhttps://github.com/mk-pmb/leaflet-js-demos/blob/gh-pages/lib_demos.js#L8-L11\r\nGoogle suggests this might be a good way to do it: http://stackoverflow.com/questions/2976651/javascript-how-do-i-get-the-url-of-script-being-called\r\n\r\nMaybe we should grab the last script tag that matches instead? Looks like it might be more reliable. There would still be edge cases but yeah..."}}