Skip to content

zheyi420/cesium-demo

Repository files navigation

cesium-demo

  • Module Bundler: Vite 3
  • JavaScript Framework for Web User Interfaces: Vue 3
  • Store Library for Vue: Pinia 2
  • Router: Vue Router 4
  • JavaScript library for creating world-class 3D globes and maps: CesiumJS

Function Demonstration

File Structure

  • /public (Directory to serve as plain static assets.) vitejs#publicDir
    • /cesium/Build/Cesium (The URL on your server where CesiumJS's static files are hosted.)
  • /src
    • App.vue (root component)
    • /components (for Vue components)
    • /utils
      • /cesium (cesium related utils code)

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint

About 'VITE_BUILD_PATH_PREFIX'

The files .env.development and .env.production are configs for development and production environment.

Since it is deployed on GitHub Pages https://<USERNAME>.github.io/<REPO>/, you need to set VITE_BUILD_PATH_PREFIX='<REPO>' to refer to the static files in /public.

In general or dev env, just set VITE_BUILD_PATH_PREFIX='', it should be no problem.

Project References

About

A WebGIS demo built with Vue.js(3.x), Vite and CesiumJS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published