ff700ae813
Draw is a plugin that adds support for drawing and editing vectors and markers on Leaflet maps. This will be used to create selections on the document. Source code: https://github.com/Leaflet/Leaflet.draw Licence: MIT
42 lines
No EOL
797 B
JavaScript
42 lines
No EOL
797 B
JavaScript
(function() {
|
|
function getFiles() {
|
|
var memo = {},
|
|
files = [],
|
|
i, src;
|
|
|
|
function addFiles(srcs) {
|
|
for (var j = 0, len = srcs.length; j < len; j++) {
|
|
memo[srcs[j]] = true;
|
|
}
|
|
}
|
|
|
|
for (i in deps) {
|
|
addFiles(deps[i].src);
|
|
}
|
|
|
|
for (src in memo) {
|
|
files.push(src);
|
|
}
|
|
|
|
return files;
|
|
}
|
|
var scripts = getFiles();
|
|
|
|
function getSrcUrl() {
|
|
var scripts = document.getElementsByTagName('script');
|
|
for (var i = 0; i < scripts.length; i++) {
|
|
var src = scripts[i].src;
|
|
if (src) {
|
|
var res = src.match(/^(.*)leaflet.draw-include\.js$/);
|
|
if (res) {
|
|
return res[1] + '../src/';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
var path = getSrcUrl();
|
|
for (var i = 0; i < scripts.length; i++) {
|
|
document.writeln("<script src='" + path + scripts[i] + "'></script>");
|
|
}
|
|
})(); |