UNPKG

octopus-map

Version:

基于openlayer V6.6.1 为基础,进行二次开发的地图工具包,通过二次封装,简化 openlayer 的开发难度

47 lines (40 loc) 1.1 kB
/** * * @description 测量 * * @author OctopusRoe * * @version 0.0.1 * */ // import Draw from 'ol/interaction/Draw' // import Feature from 'ol/Feature' // import { Vector as VectorLayer } from 'ol/layer' // import { Vector as VectorSource } from 'ol/source' // import { LineString, Polygon } from 'ol/geom' // import { getArea, getLength } from 'ol/extent' // import { unByKey } from 'ol/Observable' // import { Circle, Fill, Stroke, Style } from 'ol/geom' // export default class Measure { // /** // * // * @param {*} options // */ // constructor (options) { // /** @description 用于储存 Feature 实例的仓库 */ // this._feature = [] // /** @description 创建源 */ // this._source = new VectorSource({ wrapX: false }) // /** @description 创建图层 */ // this._layer = new VectorLayer({ // source: this._source, // style: (feature) => this._returnStyle(feature) // }) // } // /** // * // * @param {*} options // */ // _returnStyle (options) { // } // }