Cesium.cartesian3 is not a constructor
时间: 2024-03-21 09:40:06 浏览: 109
The error "Cesium.cartesian3 is not a constructor" usually occurs when the Cesium library is not properly loaded or initialized in your code.
To resolve this error, make sure that you have included the Cesium library in your HTML file and that it has been loaded before your JavaScript code runs.
You can include the Cesium library using a CDN link or by downloading and hosting it locally. Additionally, make sure that you are using the correct syntax when calling the Cesium.cartesian3 constructor.
For example, you should use the following syntax to create a new Cartesian3 object:
```
var myCartesian3 = new Cesium.Cartesian3(x, y, z);
```
Replace x, y, and z with the Cartesian coordinates you want to use.
阅读全文