rindy 5 vuotta sitten
commit
13763505e6
100 muutettua tiedostoa jossa 5362 lisäystä ja 0 poistoa
  1. 22 0
      .gitignore
  2. 41 0
      Apps/CesiumViewer/CesiumViewer.css
  3. 395 0
      Apps/CesiumViewer/CesiumViewer.js
  4. BIN
      Apps/CesiumViewer/Images/ajax-loader.gif
  5. BIN
      Apps/CesiumViewer/favicon.ico
  6. 23 0
      Apps/CesiumViewer/index.html
  7. 74 0
      Apps/CesiumViewer/rectangle.js
  8. 3715 0
      CHANGES.md
  9. 988 0
      LICENSE.md
  10. 62 0
      README.md
  11. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_0.json
  12. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_1.json
  13. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_10.json
  14. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_11.json
  15. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_12.json
  16. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_13.json
  17. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_14.json
  18. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_15.json
  19. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_16.json
  20. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_17.json
  21. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_18.json
  22. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_19.json
  23. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_2.json
  24. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_20.json
  25. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_21.json
  26. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_22.json
  27. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_23.json
  28. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_24.json
  29. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_25.json
  30. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_26.json
  31. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_27.json
  32. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_3.json
  33. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_4.json
  34. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_5.json
  35. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_6.json
  36. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_7.json
  37. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_8.json
  38. 1 0
      Source/Assets/IAU2006_XYS/IAU2006_XYS_9.json
  39. BIN
      Source/Assets/Images/bing_maps_credit.png
  40. BIN
      Source/Assets/Images/cesium_credit.png
  41. BIN
      Source/Assets/Images/google_earth_credit.png
  42. BIN
      Source/Assets/Images/ion-credit.png
  43. BIN
      Source/Assets/Textures/LensFlare/DirtMask.jpg
  44. BIN
      Source/Assets/Textures/LensFlare/StarBurst.jpg
  45. BIN
      Source/Assets/Textures/NaturalEarthII/0/0/0.jpg
  46. BIN
      Source/Assets/Textures/NaturalEarthII/0/1/0.jpg
  47. BIN
      Source/Assets/Textures/NaturalEarthII/1/0/0.jpg
  48. BIN
      Source/Assets/Textures/NaturalEarthII/1/0/1.jpg
  49. BIN
      Source/Assets/Textures/NaturalEarthII/1/1/0.jpg
  50. BIN
      Source/Assets/Textures/NaturalEarthII/1/1/1.jpg
  51. BIN
      Source/Assets/Textures/NaturalEarthII/1/2/0.jpg
  52. BIN
      Source/Assets/Textures/NaturalEarthII/1/2/1.jpg
  53. BIN
      Source/Assets/Textures/NaturalEarthII/1/3/0.jpg
  54. BIN
      Source/Assets/Textures/NaturalEarthII/1/3/1.jpg
  55. BIN
      Source/Assets/Textures/NaturalEarthII/2/0/0.jpg
  56. BIN
      Source/Assets/Textures/NaturalEarthII/2/0/1.jpg
  57. BIN
      Source/Assets/Textures/NaturalEarthII/2/0/2.jpg
  58. BIN
      Source/Assets/Textures/NaturalEarthII/2/0/3.jpg
  59. BIN
      Source/Assets/Textures/NaturalEarthII/2/1/0.jpg
  60. BIN
      Source/Assets/Textures/NaturalEarthII/2/1/1.jpg
  61. BIN
      Source/Assets/Textures/NaturalEarthII/2/1/2.jpg
  62. BIN
      Source/Assets/Textures/NaturalEarthII/2/1/3.jpg
  63. BIN
      Source/Assets/Textures/NaturalEarthII/2/2/0.jpg
  64. BIN
      Source/Assets/Textures/NaturalEarthII/2/2/1.jpg
  65. BIN
      Source/Assets/Textures/NaturalEarthII/2/2/2.jpg
  66. BIN
      Source/Assets/Textures/NaturalEarthII/2/2/3.jpg
  67. BIN
      Source/Assets/Textures/NaturalEarthII/2/3/0.jpg
  68. BIN
      Source/Assets/Textures/NaturalEarthII/2/3/1.jpg
  69. BIN
      Source/Assets/Textures/NaturalEarthII/2/3/2.jpg
  70. BIN
      Source/Assets/Textures/NaturalEarthII/2/3/3.jpg
  71. BIN
      Source/Assets/Textures/NaturalEarthII/2/4/0.jpg
  72. BIN
      Source/Assets/Textures/NaturalEarthII/2/4/1.jpg
  73. BIN
      Source/Assets/Textures/NaturalEarthII/2/4/2.jpg
  74. BIN
      Source/Assets/Textures/NaturalEarthII/2/4/3.jpg
  75. BIN
      Source/Assets/Textures/NaturalEarthII/2/5/0.jpg
  76. BIN
      Source/Assets/Textures/NaturalEarthII/2/5/1.jpg
  77. BIN
      Source/Assets/Textures/NaturalEarthII/2/5/2.jpg
  78. BIN
      Source/Assets/Textures/NaturalEarthII/2/5/3.jpg
  79. BIN
      Source/Assets/Textures/NaturalEarthII/2/6/0.jpg
  80. BIN
      Source/Assets/Textures/NaturalEarthII/2/6/1.jpg
  81. BIN
      Source/Assets/Textures/NaturalEarthII/2/6/2.jpg
  82. BIN
      Source/Assets/Textures/NaturalEarthII/2/6/3.jpg
  83. BIN
      Source/Assets/Textures/NaturalEarthII/2/7/0.jpg
  84. BIN
      Source/Assets/Textures/NaturalEarthII/2/7/1.jpg
  85. BIN
      Source/Assets/Textures/NaturalEarthII/2/7/2.jpg
  86. BIN
      Source/Assets/Textures/NaturalEarthII/2/7/3.jpg
  87. 14 0
      Source/Assets/Textures/NaturalEarthII/tilemapresource.xml
  88. BIN
      Source/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg
  89. BIN
      Source/Assets/Textures/SkyBox/tycho2t3_80_my.jpg
  90. BIN
      Source/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg
  91. BIN
      Source/Assets/Textures/SkyBox/tycho2t3_80_px.jpg
  92. BIN
      Source/Assets/Textures/SkyBox/tycho2t3_80_py.jpg
  93. BIN
      Source/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg
  94. BIN
      Source/Assets/Textures/maki/airfield.png
  95. BIN
      Source/Assets/Textures/maki/airport.png
  96. BIN
      Source/Assets/Textures/maki/alcohol-shop.png
  97. BIN
      Source/Assets/Textures/maki/america-football.png
  98. BIN
      Source/Assets/Textures/maki/art-gallery.png
  99. BIN
      Source/Assets/Textures/maki/bakery.png
  100. 0 0
      Source/Assets/Textures/maki/bank.png

+ 22 - 0
.gitignore

@@ -0,0 +1,22 @@
+.DS_Store
+node_modules
+/dist
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+Build

+ 41 - 0
Apps/CesiumViewer/CesiumViewer.css

@@ -0,0 +1,41 @@
+@import url(../../Source/Widgets/widgets.css);
+@import url(../../Source/Widgets/lighter.css);
+
+html {
+    height: 100%;
+}
+
+body {
+    height: 100%;
+    width: 100%;
+    margin: 0;
+    overflow: hidden;
+    padding: 0;
+    background: #000;
+}
+
+.fullWindow {
+    position: absolute;
+    top: 0;
+    left: 0;
+    height: 100%;
+    width: 100%;
+    margin: 0;
+    overflow: hidden;
+    padding: 0;
+    font-family: sans-serif;
+}
+
+.loadingIndicator {
+    display: block;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    margin-top: -33px;
+    margin-left: -33px;
+    width: 66px;
+    height: 66px;
+    background-position: center;
+    background-repeat: no-repeat;
+    background-image: url(Images/ajax-loader.gif);
+}

+ 395 - 0
Apps/CesiumViewer/CesiumViewer.js

@@ -0,0 +1,395 @@
+window.CESIUM_BASE_URL = '../../Source/';
+
+// import {
+//     Cartesian3,
+//     createWorldTerrain,
+//     defined,
+//     formatError,
+//     Math as CesiumMath,
+//     objectToQuery,
+//     queryToObject,
+//     CzmlDataSource,
+//     GeoJsonDataSource,
+//     KmlDataSource,
+//     TileMapServiceImageryProvider,
+//     Viewer,
+//     viewerCesiumInspectorMixin,
+//     viewerDragDropMixin,
+//     UrlTemplateImageryProvider,
+//     WebMapTileServiceImageryProvider,
+//     GeographicTilingScheme
+// } from '../../Source/Cesium.js';
+import * as Cesium from '../../Source/Cesium.js';
+import{drawRectangle} from './rectangle.js'
+window.Cesium = Cesium
+var defined = Cesium.defined
+var formatError = Cesium.formatError
+var CesiumMath = Cesium.Math
+var objectToQuery = Cesium.objectToQuery
+var queryToObject = Cesium.queryToObject
+var TileMapServiceImageryProvider = Cesium.TileMapServiceImageryProvider
+var Viewer = Cesium.Viewer
+var viewerCesiumInspectorMixin = Cesium.viewerCesiumInspectorMixin
+var viewerDragDropMixin = Cesium.viewerDragDropMixin
+var UrlTemplateImageryProvider = Cesium.UrlTemplateImageryProvider
+var WebMapTileServiceImageryProvider = Cesium.WebMapTileServiceImageryProvider
+var GeographicTilingScheme = Cesium.GeographicTilingScheme
+
+// 创建热力图
+function createHeatMap(max, data) {
+    // 创建元素
+    var heatDoc = document.createElement("div");
+    heatDoc.setAttribute("style", "width:1000px;height:1000px;margin: 0px;display: none;");
+    document.body.appendChild(heatDoc);
+    // 创建热力图对象
+    var heatmap = h337.create({
+        container: heatDoc,
+        radius: 20,
+        maxOpacity: .5,
+        minOpacity: 0,
+        blur: .75,
+        gradient: {
+            '0.9': 'red',
+            '0.8': 'orange',
+            '0.7': 'yellow',
+            '0.5': 'blue',
+            '0.3': 'green',
+        },
+    });
+    // 添加数据
+    heatmap.setData({
+        max: max,
+        data: data
+    });
+    return heatmap;
+}
+
+// 创建正方形 绑定热力图 
+function createRectangle(viewer, coordinate, heatMap) {
+    viewer.entities.add({
+        name: 'Rotating rectangle with rotating texture coordinate',
+        show: true,
+        rectangle: {
+            coordinates:new Cesium.Rectangle(coordinate[0], coordinate[1], coordinate[2], coordinate[3]),  //Cesium.Rectangle.fromDegrees(coordinate[0], coordinate[1], coordinate[2], coordinate[3]),
+            material: heatMap._renderer.canvas // 核心语句,填充热力图
+        }
+    });
+}
+
+
+// 生成len个随机数据
+function getData(len) {
+    //构建一些随机数据点
+    var points = [];
+    var max = 0;
+    var width = 1000;
+    var height = 1000;
+    while (len--) {
+        var val = Math.floor(Math.random() * 500);
+        max = Math.max(max, val);
+        var point = {
+            x: Math.floor(Math.random() * width),
+            y: Math.floor(Math.random() * height),
+            value: val
+        };
+        points.push(point);
+    }
+    return {
+        max: max,
+        data: points
+    }
+}
+
+function main() {
+    /*
+     Options parsed from query string:
+       source=url          The URL of a CZML/GeoJSON/KML data source to load at startup.
+                           Automatic data type detection uses file extension.
+       sourceType=czml/geojson/kml
+                           Override data type detection for source.
+       flyTo=false         Don't automatically fly to the loaded source.
+       tmsImageryUrl=url   Automatically use a TMS imagery provider.
+       lookAt=id           The ID of the entity to track at startup.
+       stats=true          Enable the FPS performance display.
+       inspector=true      Enable the inspector widget.
+       debug=true          Full WebGL error reporting at substantial performance cost.
+       theme=lighter       Use the dark-text-on-light-background theme.
+       scene3DOnly=true    Enable 3D only mode.
+       view=longitude,latitude,[height,heading,pitch,roll]
+                           Automatically set a camera view. Values in degrees and meters.
+                           [height,heading,pitch,roll] default is looking straight down, [300,0,-90,0]
+       saveCamera=false    Don't automatically update the camera view in the URL when it changes.
+     */
+    var endUserOptions = queryToObject(window.location.search.substring(1));
+
+    var imageryProvider;
+    if (defined(endUserOptions.tmsImageryUrl)) {
+        imageryProvider = new TileMapServiceImageryProvider({
+            url: endUserOptions.tmsImageryUrl
+        });
+    }
+
+    var loadingIndicator = document.getElementById('loadingIndicator');
+    var viewer;
+    try {
+        // var hasBaseLayerPicker = !defined(imageryProvider);
+        // viewer = new Viewer('cesiumContainer', {
+        //     imageryProvider : imageryProvider,
+        //     baseLayerPicker : hasBaseLayerPicker,
+        //     scene3DOnly : endUserOptions.scene3DOnly,
+        //     requestRenderMode : true
+        // });
+
+        // if (hasBaseLayerPicker) {
+        //     var viewModel = viewer.baseLayerPicker.viewModel;
+        //     viewModel.selectedTerrain = viewModel.terrainProviderViewModels[1];
+        // } else {
+        //     viewer.terrainProvider = createWorldTerrain({
+        //         requestWaterMask: true,
+        //         requestVertexNormals: true
+        //     });
+        // }
+
+        var Google = new UrlTemplateImageryProvider({
+            url: "http://mt3.google.cn/vt/lyrs=y@110&hl=zh-CN&gl=cn&src=app&x={x}&y={y}&z={z}&s=Ga",
+        })
+
+        var TianDiTu = new WebMapTileServiceImageryProvider({
+            url: "http://{s}.tianditu.gov.cn/img_c/wmts?tk=4bbbafdfeca49cb6fb5efb1a40164445&service=wmts&request=GetTile&version=1.0.0" +
+                "&LAYER=img&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}" +
+                "&style=default&format=tiles",
+            layer: "tdtImg_c",
+            style: "default",
+            format: "tiles",
+            tileMatrixSetID: "c",
+            subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
+            tilingScheme: new GeographicTilingScheme(),
+            tileMatrixLabels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"],
+            maximumLevel: 50,
+            show: false
+        })
+
+        TianDiTu = new WebMapTileServiceImageryProvider({
+            url: 'http://t0.tianditu.gov.cn/img_w/wmts?tk=4bbbafdfeca49cb6fb5efb1a40164445',
+            layer: 'img',
+            style: 'default',
+            tileMatrixSetID: 'w',
+            format: 'tiles',
+            maximumLevel: 18
+        });
+
+        var PBF = createMVTWithStyle(Cesium, ol, createMapboxStreetsV6Style, {
+            //url: '/static/poi/{z}/{x}/{y}.pbf',
+            url: 'http://localhost:8080/wts/poi/{z}/{x}/{y}',
+            //url:"https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/{z}/{x}/{y}.vector.pbf?access_token={k}",
+            key: "pk.eyJ1IjoibXV5YW8xOTg3IiwiYSI6ImNpcm9ueHd6cjAwNzZoa20xazY1aWlubjIifQ.5tLtC5j1rh8Eqjlyrq3OaA"
+
+        });
+
+
+        viewer = window.viewer = new Viewer('cesiumContainer', {
+            resolutionScale: 1,
+            terrainProviderViewModels: [],
+            animation: false, //动画控制不显示     
+            baseLayerPicker: false,
+            fullscreenButton: false, //全屏按钮,默认显示true
+            geocoder: false, //地名查找,默认true
+            timeline: false, //时间线,默认true
+            vrButton: false, //双屏模式,默认不显示false
+            homeButton: true, //主页按钮,默认true
+            infoBox: false, //点击要素之后显示的信息,默认true
+            selectionIndicator: false, //选中元素显示,默认true
+            sceneModePicker: false, //是否显示投影方式控件
+            navigationHelpButton: true, //是否显示帮助信息控件
+            maximumRenderTimeChange: Infinity,
+            requestRenderMode: true,
+            imageryProvider: Google,
+        });
+
+        viewer.scene.debugShowFramesPerSecond = true;
+        viewer.scene.screenSpaceCameraController.enableTranslate = false;
+        viewer.scene.screenSpaceCameraController.enableTilt = false;
+        viewer.scene.screenSpaceCameraController.enableLook = false;
+        viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
+
+        //var imageryLayers = viewer.imageryLayers;
+        //imageryLayers.addImageryProvider(PBF);
+
+
+        viewer.camera.setView({
+            destination: Cesium.Cartesian3.fromDegrees(113.07242100, 22.58652789, 1000.0),
+            orientation: {
+                heading: 5.205384767667713,
+                pitch: -1.0220630084744524,
+                roll: 6.27919703978724
+            }
+        })
+
+        // 第一个热力图
+        // var coordinate1 = [1.9733857532084744,  0.39425835263667813,  1.9733970408057608,  0.39426568435545245];
+        // var heatMap1 = createHeatMap(getData(1000).max, getData(1000).data);
+        // createRectangle(viewer, coordinate1, heatMap1);
+
+        // 第二个热力图
+        // var coordinate2 = [-109.0, 30.0, -80.0, 41.0];
+        // var heatMap2 = createHeatMap(getData(3000).max, getData(3000).data);
+        // createRectangle(viewer, coordinate2, heatMap2);
+
+        // // 第三个热力图
+        // var coordinate3 = [-109.0, 41.0, -80.0, 50.0];
+        // var heatMap3 = createHeatMap(getData(5000).max, getData(5000).data);
+        // createRectangle(viewer, coordinate3, heatMap3);
+
+
+        var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
+    
+        drawRectangle(Cesium,viewer,handler,function(coords){
+            console.log(coords)
+            var heatMap1 = createHeatMap(getData(1000).max, getData(1000).data);
+            createRectangle(viewer, [coords.west,coords.south,coords.east,coords.north], heatMap1);
+        })
+
+
+    } catch (exception) {
+        loadingIndicator.style.display = 'none';
+        var message = formatError(exception);
+        console.error(message);
+        if (!document.querySelector('.cesium-widget-errorPanel')) {
+            window.alert(message); //eslint-disable-line no-alert
+        }
+        return;
+    }
+
+    viewer.extend(viewerDragDropMixin);
+    if (endUserOptions.inspector) {
+        viewer.extend(viewerCesiumInspectorMixin);
+    }
+
+    var showLoadError = function (name, error) {
+        var title = 'An error occurred while loading the file: ' + name;
+        var message = 'An error occurred while loading the file, which may indicate that it is invalid.  A detailed error report is below:';
+        viewer.cesiumWidget.showErrorPanel(title, message, error);
+    };
+
+    viewer.dropError.addEventListener(function (viewerArg, name, error) {
+        showLoadError(name, error);
+    });
+
+    var scene = viewer.scene;
+    var context = scene.context;
+    if (endUserOptions.debug) {
+        context.validateShaderProgram = true;
+        context.validateFramebuffer = true;
+        context.logShaderCompilation = true;
+        context.throwOnWebGLError = true;
+    }
+
+    // var view = endUserOptions.view;
+    // var source = endUserOptions.source;
+    // if (defined(source)) {
+    //     var sourceType = endUserOptions.sourceType;
+    //     if (!defined(sourceType)) {
+    //         // autodetect using file extension if not specified
+    //         if (/\.czml$/i.test(source)) {
+    //             sourceType = 'czml';
+    //         } else if (/\.geojson$/i.test(source) || /\.json$/i.test(source) || /\.topojson$/i.test(source)) {
+    //             sourceType = 'geojson';
+    //         } else if (/\.kml$/i.test(source) || /\.kmz$/i.test(source)) {
+    //             sourceType = 'kml';
+    //         }
+    //     }
+
+    //     var loadPromise;
+    //     if (sourceType === 'czml') {
+    //         loadPromise = CzmlDataSource.load(source);
+    //     } else if (sourceType === 'geojson') {
+    //         loadPromise = GeoJsonDataSource.load(source);
+    //     } else if (sourceType === 'kml') {
+    //         loadPromise = KmlDataSource.load(source, {
+    //             camera: scene.camera,
+    //             canvas: scene.canvas
+    //         });
+    //     } else {
+    //         showLoadError(source, 'Unknown format.');
+    //     }
+
+    //     if (defined(loadPromise)) {
+    //         viewer.dataSources.add(loadPromise).then(function (dataSource) {
+    //             var lookAt = endUserOptions.lookAt;
+    //             if (defined(lookAt)) {
+    //                 var entity = dataSource.entities.getById(lookAt);
+    //                 if (defined(entity)) {
+    //                     viewer.trackedEntity = entity;
+    //                 } else {
+    //                     var error = 'No entity with id "' + lookAt + '" exists in the provided data source.';
+    //                     showLoadError(source, error);
+    //                 }
+    //             } else if (!defined(view) && endUserOptions.flyTo !== 'false') {
+    //                 viewer.flyTo(dataSource);
+    //             }
+    //         }).otherwise(function (error) {
+    //             showLoadError(source, error);
+    //         });
+    //     }
+    // }
+
+    if (endUserOptions.stats) {
+        scene.debugShowFramesPerSecond = true;
+    }
+
+    var theme = endUserOptions.theme;
+    if (defined(theme)) {
+        if (endUserOptions.theme === 'lighter') {
+            document.body.classList.add('cesium-lighter');
+            viewer.animation.applyThemeChanges();
+        } else {
+            var error = 'Unknown theme: ' + theme;
+            viewer.cesiumWidget.showErrorPanel(error, '');
+        }
+    }
+
+    // if (defined(view)) {
+    //     var splitQuery = view.split(/[ ,]+/);
+    //     if (splitQuery.length > 1) {
+    //         var longitude = !isNaN(+splitQuery[0]) ? +splitQuery[0] : 0.0;
+    //         var latitude = !isNaN(+splitQuery[1]) ? +splitQuery[1] : 0.0;
+    //         var height = ((splitQuery.length > 2) && (!isNaN(+splitQuery[2]))) ? +splitQuery[2] : 300.0;
+    //         var heading = ((splitQuery.length > 3) && (!isNaN(+splitQuery[3]))) ? CesiumMath.toRadians(+splitQuery[3]) : undefined;
+    //         var pitch = ((splitQuery.length > 4) && (!isNaN(+splitQuery[4]))) ? CesiumMath.toRadians(+splitQuery[4]) : undefined;
+    //         var roll = ((splitQuery.length > 5) && (!isNaN(+splitQuery[5]))) ? CesiumMath.toRadians(+splitQuery[5]) : undefined;
+
+    //         viewer.camera.setView({
+    //             destination: Cartesian3.fromDegrees(longitude, latitude, height),
+    //             orientation: {
+    //                 heading: heading,
+    //                 pitch: pitch,
+    //                 roll: roll
+    //             }
+    //         });
+    //     }
+    // }
+
+    var camera = viewer.camera;
+
+    function saveCamera() {
+        var position = camera.positionCartographic;
+        var hpr = '';
+        if (defined(camera.heading)) {
+            hpr = ',' + CesiumMath.toDegrees(camera.heading) + ',' + CesiumMath.toDegrees(camera.pitch) + ',' + CesiumMath.toDegrees(camera.roll);
+        }
+        endUserOptions.view = CesiumMath.toDegrees(position.longitude) + ',' + CesiumMath.toDegrees(position.latitude) + ',' + position.height + hpr;
+        history.replaceState(undefined, '', '?' + objectToQuery(endUserOptions));
+    }
+
+    var timeout;
+    if (endUserOptions.saveCamera !== 'false') {
+        camera.changed.addEventListener(function () {
+            window.clearTimeout(timeout);
+            timeout = window.setTimeout(saveCamera, 1000);
+        });
+    }
+
+    loadingIndicator.style.display = 'none';
+}
+
+main();

BIN
Apps/CesiumViewer/Images/ajax-loader.gif


BIN
Apps/CesiumViewer/favicon.ico


+ 23 - 0
Apps/CesiumViewer/index.html

@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <!-- Use correct character set. -->
+    <meta charset="utf-8">
+    <!-- Tell IE to use the latest, best version. -->
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
+    <title>Cesium Viewer</title>
+    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
+    <link rel="stylesheet" href="CesiumViewer.css" media="screen">
+</head>
+<body style="background: #000;">
+    <div id="cesiumContainer" class="fullWindow"></div>
+    <div id="loadingIndicator" class="loadingIndicator"></div>
+    <script src="../../static/heatmap.min.js"></script>
+    <script src="../../static/mapbox-streets-v6-style.js"></script>
+    <script src="../../static/ol.js"></script>
+    <script src="../../static/mvt.js"></script>
+    <script src="CesiumViewer.js" type="module"></script>
+</body>
+</html>

+ 74 - 0
Apps/CesiumViewer/rectangle.js

@@ -0,0 +1,74 @@
+var selector;
+var firstPointSet = false;
+var mouseDown = false;
+var camera
+
+export function drawRectangle(Cesium, viewer, screenSpaceEventHandler,cb) {
+    if (camera) {
+        return
+    }
+
+    var rectangleSelector = new Cesium.Rectangle();
+    var screenSpaceEventHandler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
+    var cartesian = new Cesium.Cartesian3();
+    var tempCartographic = new Cesium.Cartographic();
+    var center = new Cesium.Cartographic();
+    var firstPoint = new Cesium.Cartographic();
+
+    camera = viewer.camera;
+
+    screenSpaceEventHandler.setInputAction(function drawSelector(movement) {
+        if (!mouseDown) {
+            return;
+        }
+
+        cartesian = camera.pickEllipsoid(movement.endPosition, viewer.scene.globe.ellipsoid, cartesian);
+
+        if (cartesian) {
+            //mouse cartographic
+            tempCartographic = Cesium.Cartographic.fromCartesian(cartesian, Cesium.Ellipsoid.WGS84, tempCartographic);
+
+            if (!firstPointSet) {
+                Cesium.Cartographic.clone(tempCartographic, firstPoint);
+                firstPointSet = true;
+            } else {
+                rectangleSelector.east = Math.max(tempCartographic.longitude, firstPoint.longitude);
+                rectangleSelector.west = Math.min(tempCartographic.longitude, firstPoint.longitude);
+                rectangleSelector.north = Math.max(tempCartographic.latitude, firstPoint.latitude);
+                rectangleSelector.south = Math.min(tempCartographic.latitude, firstPoint.latitude);
+                selector.show = true;
+            }
+        }
+    }, Cesium.ScreenSpaceEventType.MOUSE_MOVE, Cesium.KeyboardEventModifier.SHIFT);
+
+    var getSelectorLocation = new Cesium.CallbackProperty(function getSelectorLocation(time, result) {
+        return Cesium.Rectangle.clone(rectangleSelector, result);
+    }, false);
+
+    screenSpaceEventHandler.setInputAction(function startClickShift() {
+        mouseDown = true;
+        selector.rectangle.coordinates = getSelectorLocation;
+    }, Cesium.ScreenSpaceEventType.LEFT_DOWN, Cesium.KeyboardEventModifier.SHIFT);
+
+    screenSpaceEventHandler.setInputAction(function endClickShift() {
+        mouseDown = false;
+        firstPointSet = false;
+        selector.rectangle.coordinates = rectangleSelector;
+        cb && cb(rectangleSelector)
+    }, Cesium.ScreenSpaceEventType.LEFT_UP, Cesium.KeyboardEventModifier.SHIFT);
+
+    //Hide the selector by clicking anywhere
+    screenSpaceEventHandler.setInputAction(function hideSelector() {
+        selector.show = false;
+    }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+
+
+    selector = viewer.entities.add({
+        selectable: false,
+        show: false,
+        rectangle: {
+            coordinates: getSelectorLocation,
+            material: Cesium.Color.RED.withAlpha(0.5)
+        }
+    });
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3715 - 0
CHANGES.md


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 988 - 0
LICENSE.md


+ 62 - 0
README.md

@@ -0,0 +1,62 @@
+<p align="center">
+<img src="https://github.com/AnalyticalGraphicsInc/cesium/wiki/logos/Cesium_Logo_Color.jpg" width="50%" />
+</p>
+
+[![Build Status](https://travis-ci.org/AnalyticalGraphicsInc/cesium.svg?branch=master)](https://travis-ci.org/AnalyticalGraphicsInc/cesium)&nbsp;
+[![Docs](https://img.shields.io/badge/docs-online-orange.svg)](https://cesium.com/docs/) [![Greenkeeper badge](https://badges.greenkeeper.io/AnalyticalGraphicsInc/cesium.svg)](https://greenkeeper.io/)
+
+CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.
+
+[CesiumJS Homepage](https://cesium.com/cesiumjs)
+
+[CesiumJS Features Checklist](https://github.com/AnalyticalGraphicsInc/cesium/wiki/CesiumJS-Features-Checklist)
+
+### :rocket: Get Started
+
+Visit the [Downloads page](https://cesium.com/downloads/) or use the npm module:
+```
+npm install cesium
+```
+
+Have questions?  Ask them on the [forum](https://groups.google.com/forum/?hl=en#!forum/cesium-dev).
+
+Interested in contributing?  See [CONTRIBUTING.md](CONTRIBUTING.md). :heart:
+
+### :snowflake: Mission
+
+Our mission is to create the leading 3D globe and map for static and time-dynamic content, with the best possible performance, precision, visual quality, platform support, community, and ease of use.
+
+### :green_book: License
+
+[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).  CesiumJS is free for both commercial and non-commercial use.
+
+### :earth_americas: Where Does the 3D Content Come From? ###
+
+CesiumJS can stream 3D content such as terrain, imagery, and 3D Tiles from the commercial [Cesium ion](https://cesium.com/blog/2018/03/01/hello-cesium-ion/)
+platform and other content sources.  You are free to use any combination of content sources with CesiumJS that you please.
+Using Cesium ion helps support CesiumJS development. :heart:
+
+### :clap: Featured Demos
+
+<p> 
+<a href="https://cesium.com/blog/2018/08/21/cybercity/"><img src="https://cesium.com/blog/images/2018/08-21/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://apps.agi.com/SatelliteViewer/?Status=Operational"><img src="https://cesium.com/blog/images/2018/03-29/comspoc-cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2018/02/05/historic-pharsalia-cabin-point-cloud/"><img src="https://cesium.com/blog/images/2018/02-05/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2017/12/12/onesky/"><img src="https://cesium.com/blog/images/2017/12-12/cover.jpg" width="30%" /></a>&nbsp; 
+<a href="https://cesium.com/blog/2017/11/20/nasa-storm-virtual-globe/"><img src="https://cesium.com/blog/images/2017/11-20/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2017/11/16/gefs/"><img src="https://cesium.com/blog/images/2017/11-16/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2019/01/04/norad-tracks-santa/"><img src="https://cesium.com/blog/images/2019/01-04/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2017/07/23/drcog/"><img src="https://cesium.com/blog/images/2017/07-23/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://demos.cesium.com/NewYork/"><img src="https://cesium.com/blog/images/2017/05-05/nyc-cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2018/09/27/swisstopo-live/"><img src="https://cesium.com/blog/images/2018/09-27/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2016/12/12/stk-czml/"><img src="https://cesium.com/blog/images/2016/12-12/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2016/09/29/contextcapture/"><img src="https://cesium.com/blog/images/2016/09-29/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2016/04/20/flightradar24/"><img src="https://cesium.com/blog/images/2016/04-20/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2016/02/03/fodarearth/"><img src="https://cesium.com/blog/images/2016/02-03/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2015/08/19/mars-trek/"><img src="https://cesium.com/blog/images/2015/08-19/cover.jpg" width="30%" /></a>&nbsp;
+<a href="https://cesium.com/blog/2015/07/16/hiroshima-archive/"><img src="https://cesium.com/blog/images/2015/07-16/cover.jpg" width="30%" /></a>&nbsp; 
+<a href="https://cesium.com/blog/2019/06/13/red-bull-x-alps-in-cesium/"><img src="https://cesium.com/blog/images/2019/06-12/redbullxalps.jpg" width="30%" /></a>&nbsp;
+<br/>
+<br/>
+</p>
+<h4><a href="https://cesium.com/blog/categories/userstories">See all demos</a></h4>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_0.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_1.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_10.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_11.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_12.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_13.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_14.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_15.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_16.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_17.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_18.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_19.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_2.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_20.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_21.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_22.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_23.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_24.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_25.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_26.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_27.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_3.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_4.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_5.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_6.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_7.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_8.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
Source/Assets/IAU2006_XYS/IAU2006_XYS_9.json


BIN
Source/Assets/Images/bing_maps_credit.png


BIN
Source/Assets/Images/cesium_credit.png


BIN
Source/Assets/Images/google_earth_credit.png


BIN
Source/Assets/Images/ion-credit.png


BIN
Source/Assets/Textures/LensFlare/DirtMask.jpg


BIN
Source/Assets/Textures/LensFlare/StarBurst.jpg


BIN
Source/Assets/Textures/NaturalEarthII/0/0/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/0/1/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/0/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/0/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/1/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/1/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/2/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/2/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/3/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/1/3/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/0/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/0/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/0/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/0/3.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/1/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/1/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/1/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/1/3.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/2/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/2/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/2/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/2/3.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/3/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/3/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/3/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/3/3.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/4/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/4/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/4/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/4/3.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/5/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/5/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/5/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/5/3.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/6/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/6/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/6/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/6/3.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/7/0.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/7/1.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/7/2.jpg


BIN
Source/Assets/Textures/NaturalEarthII/2/7/3.jpg


+ 14 - 0
Source/Assets/Textures/NaturalEarthII/tilemapresource.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+    <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
+      <Title>NE2_HR_LC_SR_W_DR_recolored.tif</Title>
+      <Abstract></Abstract>
+      <SRS>EPSG:4326</SRS>
+      <BoundingBox miny="-90.00000000000000" minx="-180.00000000000000" maxy="90.00000000000000" maxx="180.00000000000000"/>
+      <Origin y="-90.00000000000000" x="-180.00000000000000"/>
+      <TileFormat width="256" height="256" mime-type="image/jpg" extension="jpg"/>
+      <TileSets profile="geodetic">
+        <TileSet href="0" units-per-pixel="0.70312500000000" order="0"/>
+        <TileSet href="1" units-per-pixel="0.35156250000000" order="1"/>
+        <TileSet href="2" units-per-pixel="0.17578125000000" order="2"/>
+      </TileSets>
+    </TileMap>

BIN
Source/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg


BIN
Source/Assets/Textures/SkyBox/tycho2t3_80_my.jpg


BIN
Source/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg


BIN
Source/Assets/Textures/SkyBox/tycho2t3_80_px.jpg


BIN
Source/Assets/Textures/SkyBox/tycho2t3_80_py.jpg


BIN
Source/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg


BIN
Source/Assets/Textures/maki/airfield.png


BIN
Source/Assets/Textures/maki/airport.png


BIN
Source/Assets/Textures/maki/alcohol-shop.png


BIN
Source/Assets/Textures/maki/america-football.png


BIN
Source/Assets/Textures/maki/art-gallery.png


BIN
Source/Assets/Textures/maki/bakery.png


+ 0 - 0
Source/Assets/Textures/maki/bank.png


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä