Monday, 21 November 2011

Custom Symbology does not display after a particular zoom level - S O L V E D :)

IMap pMap= mxDocument.FocusMap;
IGraphicsContainer graphicContainer= pMap as IGraphicsContainer;

// QI FeatureLayer to IGeofeatureLayer-> renderer-> use the method to get symbology of any feature by
//passing your IFeature

IElement element= markerElement as IElement;
IGroupElement grpElement= new GroupElementClass();
grpElement.Add(element);

// QI the IGroupElement back to IEement after adding all your element to a IGroupElement.
// you can also loop the IEnumElement from IGroupElement to add individual element to the active view, but
// HERE COMES THE ISSUE OF NOT DISPLAYING THE SYMBOLOGY GRAPHICS
// BEYOND CERTAIN ZOOM SCALE. My case was 200 scale, I doubt this could be a ESRI bug!!!.

graphicContainer.Add(graphicContainer as IElement,0);

// Refesh your active view


Cheers
happy Coding


No comments:

Post a Comment