UNPKG

tchen-vuelayers

Version:

Web map Vue components with the power of OpenLayers

42 lines (36 loc) 911 B
/** * 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 { isFunction } from '../util/minilo'; /** @module ol-ext/util */ /** * heuristic check that value is ol collection * @param value * @return {boolean} */ function isCollection(value) { return value && isFunction(value.getArray); } /** * heuristic check that value is ol vector source * @param value * @return {*} */ function isVectorSource(value) { return value && isFunction(value.getAttributions) && isFunction(value.getFeatureById); } /** * @param value * @return {*} */ function isCircle(value) { return isFunction(value.getCenter) && isFunction(value.getRadius); } export { isCollection, isVectorSource, isCircle };