admin管理员组文章数量:1414604
I tried:
czmlDataSource.load(czmlurl).then(function(){
viewer.dataSources.add(czmlDataSource).then(function(){
viewer.flyTo(viewer.dataSources,offset);
});
});
This:
czmlDataSource.load(czmlurl).then(function(){
viewer.dataSources.add(czmlDataSource).then(function(){
viewer.zoomTo(viewer.dataSources,offset);
});
});
And this:
czmlDataSource.load(czmlurl).then(function(){
viewer.dataSources.add(czmlDataSource);
viewer.flyTo(viewer.dataSources,offset);
});
And its .zoomTo
equivalent without success. What to do now?
Edit: The answer that works is: viewer.flyTo(czmlDataSource) I thought I had to use the viewer's data source as in viewer.DataSources, which was my mistake, that did not work.
Stack overflow has bee so stale people waste their time correcting grammar and spelling on 3 year old posts.
I tried:
czmlDataSource.load(czmlurl).then(function(){
viewer.dataSources.add(czmlDataSource).then(function(){
viewer.flyTo(viewer.dataSources,offset);
});
});
This:
czmlDataSource.load(czmlurl).then(function(){
viewer.dataSources.add(czmlDataSource).then(function(){
viewer.zoomTo(viewer.dataSources,offset);
});
});
And this:
czmlDataSource.load(czmlurl).then(function(){
viewer.dataSources.add(czmlDataSource);
viewer.flyTo(viewer.dataSources,offset);
});
And its .zoomTo
equivalent without success. What to do now?
Edit: The answer that works is: viewer.flyTo(czmlDataSource) I thought I had to use the viewer's data source as in viewer.DataSources, which was my mistake, that did not work.
Stack overflow has bee so stale people waste their time correcting grammar and spelling on 3 year old posts.
Share Improve this question edited May 29, 2019 at 20:41 TTR asked Nov 21, 2015 at 10:44 TTRTTR 1832 silver badges13 bronze badges 1- Please provide full code context. – Andrew Commented May 22, 2019 at 18:43
1 Answer
Reset to default 4Give this a try:
viewer.dataSources.add(czmlDataSource);
czmlDataSource.load(czmlurl).then(function() {
viewer.flyTo(czmlDataSource, options);
});
See also: viewer.flyTo for the available options
.
Also remember to check the web console for any errors, and include them with your question if they are relevant.
本文标签: javascriptHow to zoom entitiesdatasources with CesiumStack Overflow
版权声明:本文标题:javascript - How to zoom entitiesdatasources with Cesium? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745193883a2647043.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论