private void UpdateGlobeLayer(int layerIndex, Dropdown dropdown, bool isExtruded) { string layerName = dropdown.options[dropdown.value].text; GlobeLayerInfo globeLayer = globe.layers[layerIndex]; if (globeLayer.name == null || layerName != globeLayer.name) { if (isExtruded) { Debug.LogFormat("Setting extruded layer {0} to {1}", layerIndex, layerName); layerApplier.ApplyLayer(layerName, new DateTime(2016, 8, 16), LayerApplier.LayerVisualizationStyle.Volumetric, layerIndex); } else { Debug.LogFormat("Setting flat layer {0} to {1}", layerIndex, layerName); layerApplier.ApplyLayer(layerName, new DateTime(2016, 8, 16), LayerApplier.LayerVisualizationStyle.Flat, layerIndex); } } }
private void UpdateGlobeLayer(int layerIndex, string layerName, bool isExtruded = false) { GlobeLayerInfo globeLayer = globe.layers[layerIndex]; var date = new DateTime(2015, 9, 16); if (globeLayer.name == null || layerName != globeLayer.name || isExtruded) { if (isExtruded) { Debug.LogFormat("Setting extruded layer {0} to {1}", layerIndex, layerName); dateLabelText.text = string.Format("Current Date: {0:MM/dd/yyyy}", date); layerApplier.ApplyLayer(layerName, date, LayerApplier.LayerVisualizationStyle.Volumetric, layerIndex); } else { dateLabelText.text = string.Format("Current Date: {0:MM/dd/yyyy}", date); Debug.LogFormat("Setting flat layer {0} to {1}", layerIndex, layerName); layerApplier.ApplyLayer(layerName, date, LayerApplier.LayerVisualizationStyle.Flat, layerIndex); } } }
public void ApplyPreset(int toApply) { print("Applying preset " + toApply); if (presets.Count > toApply && toApply >= 0) { currentPreset = toApply; layerApplier.dataVisualizer0.Reset(); layerApplier.dataVisualizer1.Reset(); Preset set = presets[toApply]; for (int i = 0; i < set.layersInPreset.Count; i++) { layerApplier.ApplyLayer(set.layersInPreset[i], date.ToDateTime, LayerApplier.LayerVisualizationStyle.Flat, i); } for (int i = 0; i < 2; i++) { if (!string.IsNullOrEmpty(set.volumetricLayers[i])) { layerApplier.ApplyLayer(set.volumetricLayers[i], date.ToDateTime, LayerApplier.LayerVisualizationStyle.Volumetric, i); } } } }