tchen-vuelayers
Version:
Web map Vue components with the power of OpenLayers
26 lines (20 loc) • 432 B
JavaScript
import { pick } from '../../util/minilo'
import Source from './source.vue'
/**
* @param {Vue} Vue
* @param {VueLayersOptions} [options]
*/
function plugin (Vue, options = {}) {
if (plugin.installed) {
return
}
plugin.installed = true
options = pick(options, 'dataProjection')
Object.assign(Source, options)
Vue.component(Source.name, Source)
}
export default plugin
export {
Source,
plugin as install,
}