Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to drape floating layers in a globe document onto a new elevation surface programmatically, but haven't had much luck. The big picture is as follows:

1) Assign globe document to my application's GlobeControl

2) Add an elevation layer to the globe

3) Loop through all floating layers, and re-drape on that elevation surface.

I found several ESRI developer articles on the various pieces, but haven't had success putting them together. Here's the code:


 IGlobe theGlobe = axGlobeControl1.Globe;
 IRasterLayer mergedElevLyr = new RasterLayerClass();
 mergedElevLyr.Visible = false;
 theGlobe.AddLayerType((ILayer)mergedElevLyr, esriGlobeLayerType.esriGlobeLayerTypeElevation, false);

RE-DRAPE FLOATING LAYERS (doesn't seem to work):

 IGlobeDisplay theGlobeDisp = theGlobe.GlobeDisplay;
 IGlobeDisplayLayers theGlobeDispLyrs = (IGlobeDisplayLayers)theGlobeDisp;

IGlobeLayerProperties globeLayerPropertiesCls = new GlobeLayerPropertiesClass();
 globeLayerPropertiesCls.Type = esriGlobeDataType.esriGlobeDataElevation;

ILayerExtensions layerExtension = (ILayerExtensions)mergedElevLyr;

IGlobeLayerProperties pGlobeLyrProps = null;
 IGlobeHeightProperties pGlobeHtProps = null;

// Find and loop through floating layers (works OK)
 IEnumLayer floatingLayers = theGlobe.get_GlobeLayers(null, false, false, true);
 ILayer theFloatingLayer = floatingLayers.Next();
 while (theFloatingLayer != null)
 pGlobeLyrProps = theGlobeDispLyrs.FindGlobeProperties(theFloatingLayer);
 pGlobeHtProps = pGlobeLyrProps.HeightProperties;

pGlobeHtProps.BaseLayer = mergedElevLyr;
 pGlobeHtProps.BaseOption = esriGlobeLayerBaseOption.esriGlobeLayerBaseLayer;
 pGlobeHtProps.Apply(theGlobe, theFloatingLayer);

theFloatingLayer = floatingLayers.Next();
 pGlobeLyrProps = null;
 pGlobeHtProps = null;

For the re-draping, I'm doing what I found in the following articles:

If I go into ArcGlobe, add the elevation layer, and then do the re-draping everything seems to be OK. However, when doing it in my application, I don't see any change in the view after the re-draping.

If anyone can offer any suggestions, I'd really appreciate it. Thanks!

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.