Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Transitioning from 10.0 to 10.1 and creating MOLE symbology in ArcGlobe - the application crashes at the following line of code

Globe.AddLayerType(graphicsLayer.GlobeGraphicsLayer as ILayer , esriGlobeLayerType.esriGlobeLayerTypeUnknown, false);

Leading up to this I do the following:

I have a custom class called 3DDataLayer which has the following properties: IForceElementLayer (named MoleLayer) , IGlobeGraphicsLayer (named GlobeGraphicsLayer) and other properties that aren't relevant.

The first thing I do is create a workspace by doing the following

IFeatureWorkspace featureWorkspace;

myWorkspace = myWorkspaceFactory.CreateNewScratchWorkspace();
featureWorkspace = myWorkspace as IFeatureWorkspace;

myFields = new FieldsClass();
//... // Setting my field names and alianses and properties
featureWorkspace.CreateFeatureClass(inName, myFields,  null  , null , esriFeatureType.esriFTSimple , "Shape" , String.Empty);


//Create a mole layer

I create the mole layer as follows

Code:

IFeatureClass featureClass = LoadFeatureClass(inName);

IGeofeatureLayer featureLayer = new FeatureLayer() as IGeofeatureLayer;
featureLayer.FeatureClass = featureClass;

ICachedGraphicFeatureLayer moleLayer = new ForceElementLayer() as ICachedGraphicFeatureLayer;
moleLayer.FeatureLayer = featureLayer;

//Set properties such as size / 3d settings / 

ILayer layer = moleLayer as ILayer;
layer.Name = inName;

Globe.AddLayerType(layer , esriGlobeLayerType.esriGlobeLayerTypeDraped, false);
myMoleFeatureClass = featureClass;

Any ideas why this is blowing up? I need this so I can turn on Military Symbology based upon certain trigger conditions.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.