当前位置:网站首页>Cesium building loading (with height)
Cesium building loading (with height)
2022-06-25 11:45:00 【GIS roast lamb leg is delicious】
1. Load building
var promise=Cesium.GeoJsonDataSource.load('static/qunee/json/huangpuqu.json');
promise.then(function(dataSource) {
self.$viewer.dataSources.add(dataSource);
var entities = dataSource.entities.values;
var colorHash = {};
for (var i = 0; i < entities.length; i++) {
var entity = entities[i];
var color = Cesium.Color.RED.withAlpha(0.2);
entity.polygon.outlineColor=Cesium.Color.fromCssColorString('rgb(228,250,255)').withAlpha(0.7),
entity.polygon.material = color;
entity.polygon.outline = true;
entity.polygon.extrudedHeight =entity.properties.Floor._value*10;
entity.description="<div>"+entity.name+"</div>"
}
})
self.$viewer.flyTo(promise);
2.json data format
{"type":"FeatureCollection", "features": [
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[121.4853406658038,31.247058287445054],[121.4852114601025,31.247076242618622],[121.48515766035248,31.246663496976442],[121.48528686519148,31.24665471027884],[121.4853406658038,31.247058287445054]]]},"properties":{"Name":" Dexin noodle restaurant ","Floor":"3"}},
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[121.47433148624742,31.193284594140593],[121.47437454585763,31.193293888732274],[121.47441760314949,31.193330703415207],[121.47444989535822,31.193367487788922],[121.47446065576591,31.19342255819529],[121.4744498890723,31.19344087455375],[121.4744391215954,31.193468364251146],[121.47440682232205,31.193514139974507],[121.47436375953929,31.193541538718378],[121.47433146345989,31.19355062112739],[121.47428840231676,31.19355967325554],[121.47425610786017,31.19355040904155],[121.47422381342561,31.193541144844726],[121.47418075552352,31.19351350371729],[121.47416999203642,31.193495126768212],[121.47414846428381,31.193467546206442],[121.47413770158995,31.19343999591326],[121.47413770394746,31.1934124758826],[121.47413770630497,31.193384955844536],[121.47414847371384,31.19335746606902],[121.47415924033928,31.193339149639897],[121.47418077202583,31.19332086348544],[121.47423459971343,31.193293494832627],[121.47427766080735,31.1932844426407],[121.47430995606409,31.193284533534648],[121.47433148624742,31.193284594140593]]]},"properties":{"Name":"","Floor":"5"}}
]}
边栏推荐
- CFCA安心签接入
- Comment TCP gère - t - il les exceptions lors de trois poignées de main et de quatre vagues?
- 金太阳教育美股上市:市值3.6亿美元 成小盘中概股
- try-catch-finally
- TCP如何處理三次握手和四次揮手期間的异常
- Idea local launch Flink task
- Bayes
- How TCP handles exceptions during three handshakes and four waves
- How terrible is it not to use error handling in VFP?
- 西山科技冲刺科创板:拟募资6.6亿 郭毅军夫妇有60%表决权
猜你喜欢
Course paper + code and executable EXE file of library information management system based on C language
Double tampon transparent cryptage et décryptage basé sur le cadre minifilter
Detailed explanation of spark specification
SQL injection vulnerability (type chapter)
杭州/北京内推 | 阿里达摩院招聘视觉生成方向学术实习生(人才计划)
Ladder Side-Tuning:预训练模型的“过墙梯”
Startups must survive
TCP如何處理三次握手和四次揮手期間的异常
Vulnérabilité à l'injection SQL (contournement)
CFCA安心签接入
随机推荐
Handler、Message、Looper、MessageQueue
Why can't the form be closed? The magic of revealing VFP object references
揭秘GaussDB(for Redis):全面对比Codis
What are the ways to simulate and burn programs? (including common tools and usage)
WebRTC Native M96 基础Base模块介绍之实用方法的封装(MD5、Base64、时间、随机数)
Bayes
Yisheng biological sprint scientific innovation board: 25% of the revenue comes from the sales of new crown products, and it is planned to raise 1.1 billion yuan
ThingsPanel 发布物联网手机客户端(多图)
金太阳教育美股上市:市值3.6亿美元 成小盘中概股
Hangzhou / Beijing neitui Ali Dharma academy recruits academic interns in visual generation (talent plan)
依概率收敛
An interesting logic SRC mining
Develop two modes of BS mode verification code with VFP to make your website more secure
剑指 Offer II 091. 粉刷房子 : 状态机 DP 运用题
Use of comparable (for arrays.sort)
JSON format processing
Source code analysis of AQS & reentrantlock
Subclass a inherits from parent class B, a a = new a(); Then the execution sequence of the constructor of parent class B, the static code block of parent class B, the non static code block of parent c
建造者模式
交易期货沪镍产品网上怎么开户