Forked from: tkama's Cesium rectangle object JAPAN MESH 1st View Diff (37)

Cesium rectangle object JAPAN MESH 1st

tkama

License: MIT License

Fork
2
Fav
0
View
108
  • Play

Fullscreen

Smart Phone

Fork tree

  • Readme
  • JavaScript 54 lines
  • HTML 4 lines
  • CSS 17 lines

3次メッシュ3D棒グラフオブジェクト作成関数によるデモ

関数の概要

/**
 * 3次メッシュ3D棒グラフオブジェクト作成関数
 * @param  <Number>  meshcode3rd (required) 3次メッシュコード
 * @param  <Number>  h (required) 高さ(単位メートル)
 * @param  <string>    color_abgr (required)  色
 * @param  <string> description_text (required) オブジェクトの説明文
 * @retrun <object> ans_entities rectangleオブジェクト
 **/
function getJapan3rdmeshRectangle( meshcode3rd , h, color_abgr , description_text ){

    var strMeshcoe = String(meshcode3rd);
    var p = parseInt(strMeshcoe.slice(0,2));
    var u = parseInt(strMeshcoe.slice(2,4));
    var q = parseInt(strMeshcoe.slice(4,5));
    var v = parseInt(strMeshcoe.slice(5,6));
    var r = parseInt(strMeshcoe.slice(6,7));
    var w = parseInt(strMeshcoe.slice(7,8));
    var lat = p / 1.5 + q * 1 / 12 + r * 1 / 120;
    var lon = u + 100 + v * 0.125 + w * 0.0125;

    var ans_entities = {
            id:meshcode3rd ,
            description : "<p>"+description_text+"</p>",
            rectangle : {
                coordinates : Cesium.Rectangle.fromDegrees( lon , lat , lon+0.0125 , lat+0.008333333 ),
                height : 0,
                extrudedHeight : h,
                material : Cesium.Color.fromRgba( color_abgr )
            }
        };
    return ans_entities ;

}
  • Cesium rectangle object JAPAN MESH 1st
  • Cesium rectangle object JAPAN MESH 1st

play

Complete!

Description What kind of game?

Control Device

jsdo.it websocket controller

Mouse

keyboard

smartphone

Fullscreen

tkama

Author

Default Panel

Size

  • Width: px
  • Height: px

code

QR Code

Discussion

Questions on this code?

Tags

Forked

sort by