map-integration
Version:
vue集成地图第三方插件
73 lines (71 loc) • 1.28 kB
JavaScript
/*
* @Descripttion:
* @Author: xuyanqi
* @Date: 2022-06-07 17:57:11
*/
// 引入
import { Vector as SourceVec } from 'ol/source'
import VectorLayer from 'ol/layer/Vector'
import Feature from 'ol/Feature'
import LineString from 'ol/geom/LineString'
import Style from 'ol/style/Style'
import Stroke from 'ol/style/Stroke'
import Icon from 'ol/style/Icon'
import { asArray } from 'ol/color'
import Point from 'ol/geom/Point'
import { toSize } from 'ol/size'
import Select from 'ol/interaction/Select'
import { getTopLeft, getWidth } from 'ol/extent'
import TileLayer from 'ol/layer/Tile'
import WMTS from 'ol/source/WMTS'
import WMTSTileGrid from 'ol/tilegrid/WMTS'
import { get } from 'ol/proj'
import XYZ from 'ol/source/XYZ'
import { Map, View } from 'ol'
import { defaults } from 'ol/control'
let ol = {
Feature,
Map,
View,
control: {
defaults,
},
source: {
SourceVec,
WMTS,
XYZ,
},
tilegrid: {
WMTSTileGrid,
},
proj: {
get,
},
layer: {
VectorLayer,
TileLayer,
},
color: {
asArray,
},
extent: {
getTopLeft,
getWidth,
},
interaction: {
Select,
},
geom: {
Point,
LineString,
},
size: {
toSize,
},
style: {
Style,
Stroke,
Icon,
},
}
export default ol