Vue-Cesium is a comprehensive component library designed for seamlessly integrating CesiumJS into Vue 3 applications. It provides a rich set of Vue components that encapsulate core CesiumJS functionalities, simplifying the development of interactive 3D globes and maps. The current stable version is 3.2.12, with frequent beta releases indicating active development and a steady cadence of bug fixes and minor feature enhancements. Key differentiators include its full adoption of Vue 3's Composition API, its implementation in TypeScript for enhanced type safety, and its explicit compatibility with various Cesium-based platforms such as SuperMap iClient3D, Earth SDK, Mars3D, and DC-SDK, extending its utility beyond just the official CesiumJS library. This broad support makes it a versatile choice for diverse GIS development ecosystems.
npm install vue-cesiumVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up a basic Vue 3 application with Vue-Cesium, including global plugin registration, CesiumJS asset imports, and a minimal `vc-viewer` component with a simple entity. It also shows how to set the Cesium Ion access token.
If experiencing styling issues, check for class name conflicts. For versions >=3.2.12, ensure your CSS doesn't override `vc-` prefixed classes or adjust your framework's configuration to avoid collision. If using older versions, manual style overrides might be necessary.
Ensure `import 'cesium/Build/Cesium/Widgets/widgets.css';` is included in your entry file. For applications using bundlers, configure webpack/vite to copy CesiumJS assets from `node_modules/cesium/Build/Cesium` to your build output directory, especially the `Assets`, `Widgets`, `Workers`, and `ThirdParty` folders.
Always refer to the official Vue-Cesium documentation or changelog for recommended CesiumJS versions. When upgrading either library, test thoroughly and ensure compatibility, especially if experiencing new issues.
Configure your build tool (e.g., Vite, Webpack) to copy the contents of `node_modules/cesium/Build/Cesium` to a public path. For Vite, you might use a plugin like `vite-plugin- cesium` or manual configuration in `vite.config.ts`. For Webpack, use `copy-webpack-plugin`.
Obtain a free token from Cesium Ion (https://cesium.com/ion/) and set it in your application's entry file: `Cesium.Ion.defaultAccessToken = 'YOUR_ION_ACCESS_TOKEN';`.
Ensure you are calling `app.use(VueCesium);` after creating your Vue app instance and before mounting it. Also, verify that named components (e.g., `VcViewer`) are imported explicitly if not relying on global component registration.