2.0.1 • Published 10 months ago

gd-openlayers-facilities v2.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

gd-openlayers-facilities 使用说明

version

1.组件安装

# 安装组件
npm install gd-openlayers-facilities -S
# 安装所需依赖 
npm install vue axios element-ui js-base64 html2canvas -S

2.openlayers静态资源处理

把态资源包openlayers的js文件拷贝到项目工程的静态目录public下。

3.引入openlayers

修改项目工程的index.html文件,加入以下代码:

<script src="./ol.js"></script>

4.注册组件

import GdOpenlayersFacilities from 'gd-openlayers-facilities'
import 'gd-openlayers-facilities/index.css'
// 注册element-ui组件库
import ElementUI from 'element-ui'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(GdOpenlayersFacilities)
Vue.use(ElementUI, { zhLocale })

5.使用组件

在需要使用组件的vue文件里直接使用openlayersMapLib组件(无需参数):

<template>
  <div>
    <openlayersMapLib ref="openlayersMapLib"/>
  </div>
</template>

Customize configuration

See Configuration Reference.

1.0.6

10 months ago

1.0.5

10 months ago

2.0.1

10 months ago

1.0.4

10 months ago

2.0.0

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago