zheyi420 / cesium-demo

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

Home Page:https://zheyi420.github.io/cesium-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

https://zheyi420.github.io/cesium-demo/

License:Apache License 2.0


Languages

Language:JavaScript 62.6%Language:CSS 30.3%Language:Vue 6.7%Language:Shell 0.3%Language:HTML 0.1%Language:Less 0.1%