cesium 練習集合

2021-09-28 13:12:37 字數 2893 閱讀 6345

<

!doctype html>

"utf-8"

>

"viewport" content=

"width=device-width,initial-scale=1.0"

>

"x-ua-compatible" content=

"ie=edge"

>

/title>

"./cesium/cesium.js"

>

<

/script>

"stylesheet " href=

"./cesium/widgets/widgets.css"

>

<

/head>

"cesiumcontainer"

>

<

/div>

//----載入中國谷歌影像地圖

var guge=

newcesium.urltemplateimageryprovider

(&y=&z='

, tilingscheme:

newcesium.webmercatortilingscheme()

, minimumlevel:1,

maximumlevel:20}

);var viewer =

newcesium.viewer

('cesiumcontainer',)

})//-------設定視角

viewer.camera.

setview

(// destination : cesium.cartesian3.fromdegrees(116.39, 39.9, 1000.0), // (北京)座標和高度(公尺)

// orientation: })

//-------設定資料樣式(樓層,根據高度)

var city = viewer.scene.primitives.

add(

newcesium.cesium3dtileset()

);var transparentstyle =

newcesium.cesium3dtilestyle

( >= 300"

,"rgba(45, 0, 75, 0.5)"],

["$ >= 200"

,"rgb(102, 71, 151)"],

["$ >= 100"

,"rgb(170, 164, 204)"],

["$ >= 50"

,"rgb(224, 226, 238)"],

["$ >= 25"

,"rgb(252, 230, 200)"],

["$ >= 10"

,"rgb(248, 176, 87)"],

["$ >= 5"

,"rgb(198, 106, 11)"],

["true"

,"rgb(127, 59, 8)"]]

}}) city.style = transparentstyle;

//--------geojson

var geojsonoptions=

;var neighborhoodspromise = cesium.geojsondatasource.

load

('./assets/china_zz_20191009.json'

,geojsonoptions)

;var neighborhoods;

neighborhoodspromise.

then

(function (datasource));

entity.polygon.classificationtype = cesium.classificationtype.terrain;

var polypostions = entity.polygon.hierarchy.

getvalue

(cesium.juliandate.

now())

.positions;

var polycenter = cesium.boundingsphere.

frompoints

(polypostions)

.center;

polycenter = cesium.ellipsoid.wgs84.

scaletogeodeticsu***ce

(polycenter)

; entity.position = polycenter;

entity.label =;}

}})//------kml檔案載入

var viewer =

newcesium.viewer

('cesiumcontainer');

// 載入kml資料,更改description資訊,多了黃色的標籤裡面包含的

var kmloptions =

;// load geocache points of interest from a kml file

// data from :

var geocachepromise = cesium.kmldatasource.

load

('./assets/doc.kml'

, kmloptions)

;// add geocache billboard entities to scene and style them

geocachepromise.

then

(function

(datasource)}}

);<

/script>

<

/body>

<

/html>

集合,集合的練習

set不支援 索引,切片,重複,連線,因為set是無序的 s print s 列表去重 li 1,2,3,1,2,3 print list set li s1 s2 print 並集 s1.union s2 並集 print 交集 s1.intersection s2 交集 求交集時,把s1的值更新...

C 集合練習

namespace listdemo endregion region 把分揀奇偶數的程式用泛型實現。list random rand new random listl1 new list listl2 new list int i 0 while i 10 foreach var item in ...

集合的練習

案例 把分揀奇偶數的程式用泛型實現。int nums 奇數在左邊 偶數在右邊 listlist new list listodd new list 奇數 listeven new list 偶數 for int i 0 i list.count i else stringbuilder sb new...