isboyjc / vue-cli-plugin-cesium Goto Github PK
View Code? Open in Web Editor NEWCesium encapsulation based on Vue cli
Home Page: https://isboyjc.top/vue-cli-plugin-cesium/
Cesium encapsulation based on Vue cli
Home Page: https://isboyjc.top/vue-cli-plugin-cesium/
以下是进行测试的情形:
如题,谢谢
如果不用第三方收费工具的话,怎么自己实现倾斜摄影在线单体化。
完全按照配置运行后控制台报错
[Vue warn]: Error in mounted hook: "ReferenceError: Cesium is not defined"
是不是该适当修改CESIUM_BASE_URL?
Cesium.Ion.defaultAccessToken = my token
;
package:
"dependencies": {
"cesium": "1.20.0",
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-cli-plugin-cesium": "^1.1.7",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0", ...
}
1.方式二操作:
npm ERR! code ENOENT npm ERR! syscall rename npm ERR! path D:\workspace\KingoSpace\vue_cesium\vue-cli-plugin-cesium-demo\node_modules\[email protected]@accepts\node_modules\negotiator npm ERR! dest D:\workspace\KingoSpace\vue_cesium\vue-cli-plugin-cesium-demo\node_modules\[email protected]@accepts\node_modules\negotiator npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, rename 'D:\workspace\KingoSpace\vue_cesium\vue-cli-plugin-cesium-demo\node_modules\[email protected]@accepts\node_modules\negotiator' -> 'D:\workspace\KingoSpace\vue_cesium\vue-cli-plugin-cesium-demo\node_modules\[email protected]@accepts\node_modules\negotiator' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
这个插件非常方便,点赞!
另外,请教下如何在Vue之外的文件中引入Cesium?
I find it can't build the Cesium files like 'Assets'、'ThirdParty'... ,I copy the files to the public folder,it's ok.
ps:反正就是win7 nodejs12环境,win7升级不了node14. 运行这些文件404,我拿这些文件复制过去就可以用
是因为cli版本太新了吗
ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
- options[0] has an unknown property 'to'. These properties are valid:
object { patterns, options? }
- options[1] has an unknown property 'to'. These properties are valid:
object { patterns, options? }
- options[2] has an unknown property 'to'. These properties are valid:
object { patterns, options? }
- options[3] has an unknown property 'to'. These properties are valid:
object { patterns, options? }
ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
代码 var tileset = new Cesium.Cesium3DTileset({
url: "Tileset/tileset.json",
});
tileset.readyPromise
.then(function (tileset) {
viewer.scene.primitives.add(tileset);
viewer.zoomTo(
tileset,
new Cesium.HeadingPitchRange(
0.0,
-0.5,
tileset.boundingSphere.radius * 2.0
)
);
})
.otherwise(function (error) {
console.log(error);
});
、
似乎是vue-cli-plugin-cesium
的问题, 没有保任何异常就是出不来。(其他vue离线加载都出来。)
使用vue add安装完成后 npm run dev报错
This dependency was not found:
To install it, you can run: npm install --save cesium/Widgets/widgets.css
没有代码提示怎么办啊
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.