59 lines
786 B
Markdown
59 lines
786 B
Markdown
|
---
|
|||
|
title: 本地部署CesiumJS
|
|||
|
author: ac
|
|||
|
date: 2022-01-12
|
|||
|
tags:
|
|||
|
- CesiumJS
|
|||
|
categories:
|
|||
|
- GIS
|
|||
|
---
|
|||
|
|
|||
|
> 本地部署CesiumJS
|
|||
|
|
|||
|
### 1.资料准备
|
|||
|
|
|||
|
1. 安装Node.js
|
|||
|
|
|||
|
2. 下载CesiumJS源码
|
|||
|
|
|||
|
github地址:https://github.com/CesiumGS/cesium
|
|||
|
|
|||
|
官网:https://cesium.com/downloads/
|
|||
|
|
|||
|
3. 解压并安装依赖
|
|||
|
|
|||
|
```javascript
|
|||
|
npm i
|
|||
|
```
|
|||
|
|
|||
|
4. start
|
|||
|
|
|||
|
```javascript
|
|||
|
npm run start
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
|
|||
|
### 2. local links
|
|||
|
|
|||
|
运行完成后可以在http://localhost:8080 访问本地启动的 `CesiumJS` 文档。
|
|||
|
|
|||
|
> 如果8080端口被占用,会启动失败。
|
|||
|
|
|||
|

|
|||
|
|
|||
|
本地资源可以点击Local links下面的链接查看。
|
|||
|
|
|||
|
- Documentatioin :API文档
|
|||
|
- Hello World :快速起步的Demo
|
|||
|
- Sandcastle :示例
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|