While going down the list of errors found by standard.js a few stand out:
Is detection of AMD still a thing? I can't remember running in to something using it. 'define' is not defined. (no-undef)
(function (factory) {
if (typeof define === 'function' && define.amd) { <== 'define' is not defined. (no-undef)
// AMD
define(['leaflet'], factory)
} else if (typeof module !== 'undefined') {
// Node/CommonJS
module.exports = factory(require('leaflet'))
} else {
// Browser globals
if (typeof window.L === 'undefined') { throw new Error('Leaflet must be loaded first') }
factory(window.L)
}
})
I have no idea what to do with that AMD thingy. Any sugestions?
Support for IE 8/9. I know that's not a thing. I think, in the case XMLHttpRequest() not available, just throw that error.
let request
try {
request = new window.XMLHttpRequest()
} catch (e) {
throw new Error('XMLHttpRequest is not supported')
}
The non-existing labs-common.js Google tracking script is just an annoyance. I'm not in favor of visitor tracking, but it's your web-site.
So far, I have only touched files in /src and fixed all but the AMD thing, except from adding your favicon.png to index.html and examples/geocoding-nominatim.html.
While going down the list of errors found by
standard.js
a few stand out:Is detection of
AMD
still a thing? I can't remember running in to something using it.'define' is not defined. (no-undef)
I have no idea what to do with that
AMD
thingy. Any sugestions?Support for IE 8/9. I know that's not a thing. I think, in the case
XMLHttpRequest()
not available, just throw that error.The non-existing
labs-common.js
Google tracking script is just an annoyance. I'm not in favor of visitor tracking, but it's your web-site.So far, I have only touched files in
/src
and fixed all but theAMD
thing, except from adding yourfavicon.png
toindex.html
andexamples/geocoding-nominatim.html
.I have pushed my changes to format/refactor branch.
Next I will jump into
examples
directory, if you want.