コード例 #1
0
 public void GetHeightProfile(string points, double?sampleCount, string requestId)
 {
     if (sampleCount == null)
     {
         return;
     }
     ToolsWebService.GetHeightProfile(points, (int)sampleCount, res => {
         ZFBrowserUtils.SendDataResponse(_browser, requestId, res);
     });
 }
コード例 #2
0
        public void GetCurrentViewSettings(string requestId)
        {
            // TODO Un-hardcode this data
            TerrainModelManager        terrainModelManager = TerrainModelManager.Instance;
            XRInteractableGlobeTerrain globe      = (XRInteractableGlobeTerrain)terrainModelManager.GlobeModel.InteractionController;
            TerrainModel currentTerrainModel      = terrainModelManager.CurrentVisibleModel;
            IDictionary <string, object> settings = new Dictionary <string, object>()
            {
                { "terrainType", currentTerrainModel is GlobeTerrainModel ? "globe" : "local" },
                { "heightExaggeration", terrainModelManager.HeightExagerration },
                { "textures", terrainModelManager.TerrainTexturesEnabled },
                { "coordinates", globe.EnableCoordinateLines },
                { "locationNames", globe.EnableNomenclatures },
            };

            ZFBrowserUtils.SendDataResponse(_browser, requestId, settings);
        }
コード例 #3
0
 public void GetDistance(string points, string requestId)
 {
     ToolsWebService.GetDistance(points, res => {
         ZFBrowserUtils.SendDataResponse(_browser, requestId, res);
     });
 }