diff --git a/lib/mapp.mjs b/lib/mapp.mjs index c166c17817..af1457fefd 100644 --- a/lib/mapp.mjs +++ b/lib/mapp.mjs @@ -24,7 +24,7 @@ import location from './location/_location.mjs' import Mapview from './mapview/_mapview.mjs' -import * as plugins from './plugins.mjs' +import plugins from './plugins/_plugins.mjs' hooks.parse(); diff --git a/lib/plugins.mjs b/lib/plugins.mjs deleted file mode 100644 index e4f7b34ceb..0000000000 --- a/lib/plugins.mjs +++ /dev/null @@ -1,192 +0,0 @@ -/** -## mapp.plugins{} - -@module plugins -*/ - -export async function svg_templates(plugin, mapview) { - - if (typeof mapp.utils.svgSymbols.templates !== 'object') { - mapp.utils.svgSymbols.templates = {} - } - - // Iterate through svg_templates entries. - const promises = Object.entries(plugin).map(entry => { - - // Fetch entry value. - return fetch(entry[1]) - .then(response => response.text()) - .then(svgString => { - - // Assign parsed svgString as entry key to templates object. - mapp.utils.svgSymbols.templates[entry[0]] = svgString - }) - }) - - await Promise.all(promises) -} - -export function locator(plugin, mapview) { - - const btnColumn = document.getElementById('mapButton'); - - // the btnColumn element only exist in the default mapp view. - if (!btnColumn) return; - - const btn = mapp.utils.html.node` -