Supermap iClient3D WebGL for Vue.js
npm install gtmap-supermap`` bashinstall dependencies
npm install
`
注:项目存放文件夹路径中不能有中文字符,否则启动会有异常报错。
` bash`
npm install @supermap/iclient3d-vue-for-webgl --save-d
##### 1、修改main.js文件:
` bash
import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App);
// 完整引入第三方库,部分组件需要
import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
app.use(ElementPlus)
//import * as echarts from 'echarts';
//window.echarts = echarts //挂载到window上
// 引入webgl3d组件包
import '@supermap/iclient3d-vue-for-webgl/lib/theme/index.css'
import webgl3d from "@supermap/iclient3d-vue-for-webgl"
app.use(webgl3d)
app.mount('#app')
`
##### 2、修改index.html文件:
- 引入依赖: 在node_module里找到本组件安装包,复制里面的public里需要的资源到工程目录public文件下,然后在index.html里引入cesium等资源文件。
` bash`
##### 3、在App.vue里测试使用量算功能组件:
` bash
rel="stylesheet">