@geoway/vmap-legend
v1.0.3
Published
Generate a legend from vmap style
Downloads
4
Readme
vmap-legend
基于vmap专题地图样式文件快速生成图例
使用方法
cdn引入
<div id="container"></div>
<script src="//unpkg.com/@geoway/vmap-legend@latest/dist/vmap-legend.min.js"></script>
<script>
window.onload = () => {
VLegend.setConfig({
background: '#054066',
item: {
width: 25,
height: 15,
lineHeight: 25,
fontSize: 14
}
})
VLegend.createLegend({
container: 'container',
style: 'http://47.110.239.66/api/maps/v1/dev/mytest'
})
}
</script>
通过npm安装
npm install @geoway/vmap
import * as VMap from '@geoway/vmap'
VLegend.createLegend({
container: 'container',
style: 'http://47.110.239.66/api/maps/v1/dev/mytest'
})
开发
npm install
npm run start
# 在浏览器打开http://localhost:8080/debug查看预览
npm run build
发布
将发布的文件复制到deploy文件夹,然后在deploy文件夹内运行npm publish