Vue 2.x components for CesiumJS. Load Cesium built package or other third-party packages which are built on Cesium.
VueCesium
using the built CesiumJS library. You can use online, local, official native libraries or third-party libraries built on Cesium depending on your project needs.
In the gradual improvement...
npm i --save vue-cesium
import Vue from 'vue'
import VueCesium from 'vue-cesium'
// Vue-Cesium will load Cesium.js from `https://unpkg.com/cesium/Build/Cesium/Cesium.js`
Vue.use(VueCesium)
import Vue from 'vue'
import VueCesium from 'vue-cesium'
Vue.use(VueCesium, {
// cesiumPath is path of Cesium.js', for example:
// local Cesium Build package:
// cesiumPath: /static/Cesium/Cesium.js
// Personal online Cesium Build package:
// cesiumPath: 'https://zouyaoji.top/vue-cesium/statics/Cesium/Cesium.js'
// Personal online SuperMap Cesium Build package:
// cesiumPath: 'https://zouyaoji.top/vue-cesium/statics/SuperMapCesium/Cesium.js'
// Official Online Cesium Build package:
cesiumPath: 'https://unpkg.com/cesium/Build/Cesium/Cesium.js'
})
<template>
<div class="viewer">
<vc-viewer> </vc-viewer>
</div>
</template>
<style>
.viewer {
width: 100%;
height: 400px;
}
</style>
- Add more components
- ...
Copyright (c) 2018-present, zouyaoji 370681295@qq.com
Two good projects: vue-baidu-map and vuelayers.