Cesium Deployment

Use Cesium open source library to build 3D WebGIS, first deploy Cesium locally, I use vs

1. Go to its official website http://cesiumjs.org, download Cesium, and unzip it locally. The file path is as follows:

2. Go to the official website of node.js, download the latest version of node.js and install it. After installation, you can use cmd to node --versioncheck whether the installation is successful

3. Install the runtime library in cmd:

npm install express
npm install compression
npm install request
npm install yargs

4、安装完成后就可以输入node server.js开启服务器

5. Enter in the browser to enter localhost:8080/Apps/HelloWorld.htmlHelloWorld on our local server. This should be the same as given on the official website.

6. If the installation is complete, you need to point to the decompression path of Cesium in cmd, then execute node server.js to start the service, and then you can enter HelloWorld on the local server

7. Create a new website in Vs and build your own project: We use CesiumUnminified in the build folder for development (the folder name will be changed to Cesium below)

8. Add the startup Index.html to the newly created blank website, and modify its content as follows:

 

9. The content of hello.js is as follows:

10. Run this project, Hello World is complete!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324608400&siteId=291194637