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); } }
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; } }
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; } }
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); }