UNPKG

tchen-vuelayers

Version:

Web map Vue components with the power of OpenLayers

66 lines (58 loc) 1.33 kB
/** * VueLayers * Web map Vue components with the power of OpenLayers * * @package vuelayers * @author Vladimir Vershinin <ghettovoice@gmail.com> * @version 0.11.1 * @license MIT * @copyright (c) 2017-2019, Vladimir Vershinin <ghettovoice@gmail.com> */ import cmp from './ol-cmp'; import stubVNode from './stub-vnode'; /** * Basic ol component with stub VNode, i.e. virtual component */ var olVirtCmp = { mixins: [stubVNode, cmp], methods: { /** * @return {Promise} * @protected */ init: function init() { return cmp.methods.init.call(this); }, /** * @return {void|Promise<void>} * @protected */ deinit: function deinit() { return cmp.methods.deinit.call(this); }, /** * @return {*} * @protected * @abstract */ createOlObject: function createOlObject() { throw new Error('Not implemented method'); }, /** * Redefine for easy call in child components * @returns {Object} * @protected */ getServices: function getServices() { return cmp.methods.getServices.call(this); }, /** * Refresh internal ol objects * @return {Promise} */ refresh: function refresh() { return cmp.methods.refresh.call(this); } } }; export default olVirtCmp;