コード例 #1
0
        public void NavigateToCoordinate(string bbox)
        {
            TerrainModelManager        terrainModelManager = TerrainModelManager.Instance;
            XRInteractableGlobeTerrain globe = (XRInteractableGlobeTerrain)terrainModelManager.GlobeModel.InteractionController;

            if (globe)
            {
                BoundingBox boundingBox = BoundingBoxUtils.ParseBoundingBox(bbox);
                Vector2     latLon      = BoundingBoxUtils.MedianLatLon(boundingBox);
                Camera      eye         = UserInterfaceManager.Instance.XRCamera;
                globe.NavigateTo(latLon, eye.transform.position);
            }
        }
コード例 #2
0
        public void SetLocationNamesVisibility(bool?visible)
        {
            if (visible == null)
            {
                return;
            }
            TerrainModelManager terrainModelManager = TerrainModelManager.Instance;

            if (terrainModelManager.GlobeModelIsVisible())
            {
                XRInteractableGlobeTerrain globe = (XRInteractableGlobeTerrain)terrainModelManager.GlobeModel.InteractionController;
                globe.EnableNomenclatures = (bool)visible;
            }
        }
コード例 #3
0
        public void SetCoordinateIndicatorsVisibility(bool?visible)
        {
            if (visible == null)
            {
                return;
            }
            TerrainModelManager terrainModelManager = TerrainModelManager.Instance;

            if (terrainModelManager.GlobeModelIsVisible())
            {
                XRInteractableGlobeTerrain globe = (XRInteractableGlobeTerrain)terrainModelManager.GlobeModel.InteractionController;
                globe.EnableCoordinateLines = (bool)visible;
            }
        }
コード例 #4
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);
        }