openlayer-controls
v2.0.1
Published
## 安装 ``` npm i openlayer-controls ```
Downloads
3
Readme
openlayer-controls
安装
npm i openlayer-controls
使用示例
<template>
<div>
<h1>zoomValue:{{ zoomValue }}</h1>
<ZoomControl @change="zoomChange" :zoom-value="zoomValue" :min-zoom="6"></ZoomControl>
<h1>typeValue:{{ typeValue }}</h1>
<ToggleControl @change="toggleChange"></ToggleControl>
</div>
</template>
<script>
import { ZoomControl, ToggleControl } from 'openlayer-controls'
export default {
name: 'Test2',
components: {
ZoomControl, ToggleControl
},
data () {
return {
zoomValue: 6,
typeValue: 1
}
},
methods: {
zoomChange (val) {
this.zoomValue = val
},
toggleChange (val) {
this.typeValue = val
}
}
}
</script>