# Problem with GetLabelingCandidates

**URL:** <https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157>\
**Category:** Services\
**Created:** [August 1, 2011, 10:28am UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157 "2011-08-01T10:28:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [August 1, 2011, 10:28am UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/1 "2011-08-01T10:28:37Z")

</div>

Hello&nbsp;all,

I'm&nbsp;having&nbsp;an&nbsp;issue&nbsp;using&nbsp;the&nbsp;GetLabelingCandidates&nbsp;method&nbsp;in&nbsp;the&nbsp;PositionStyle&nbsp;class,&nbsp;and&nbsp;I'm&nbsp;not&nbsp;terribly&nbsp;sure&nbsp;why.&nbsp;&nbsp;I'm&nbsp;using&nbsp;this&nbsp;in&nbsp;a&nbsp;custom&nbsp;style,&nbsp;so&nbsp;I'm&nbsp;sure&nbsp;it's&nbsp;something&nbsp;I'm&nbsp;not&nbsp;doing&nbsp;correctly.&nbsp;Upon&nbsp;using&nbsp;the&nbsp;method,&nbsp;I&nbsp;always&nbsp;get&nbsp;an&nbsp;error,&nbsp;"Value&nbsp;cannot&nbsp;be&nbsp;null.&nbsp;Parameter&nbsp;name:&nbsp;key".&nbsp;&nbsp;At&nbsp;first&nbsp;I&nbsp;thought&nbsp;it&nbsp;might&nbsp;be&nbsp;the&nbsp;Feature&nbsp;parameter,&nbsp;but&nbsp;the&nbsp;Column&nbsp;Values&nbsp;that&nbsp;are&nbsp;needed&nbsp;are&nbsp;included&nbsp;in&nbsp;the&nbsp;Feature.&nbsp;So&nbsp;that&nbsp;leaves&nbsp;me&nbsp;with&nbsp;the&nbsp;GeoCanvas&nbsp;parameter,&nbsp;and&nbsp;I&nbsp;have&nbsp;absolutley&nbsp;no&nbsp;idea&nbsp;what&nbsp;the&nbsp;method&nbsp;is&nbsp;trying&nbsp;to&nbsp;pull&nbsp;from&nbsp;there.&nbsp;Is&nbsp;there&nbsp;any&nbsp;place&nbsp;I&nbsp;can&nbsp;find&nbsp;out&nbsp;what&nbsp;properties&nbsp;of&nbsp;the&nbsp;GeoCanvas&nbsp;this&nbsp;method&nbsp;is&nbsp;using,&nbsp;so&nbsp;that&nbsp;I&nbsp;can&nbsp;make&nbsp;sure&nbsp;they're&nbsp;correctly&nbsp;filled?&nbsp;&nbsp;Thanks&nbsp;in&nbsp;advance!

-Dustin

EDIT:&nbsp;I&nbsp;failed&nbsp;to&nbsp;mention&nbsp;that&nbsp;I&nbsp;am&nbsp;using&nbsp;a&nbsp;GeoImage&nbsp;to&nbsp;draw&nbsp;directly&nbsp;to&nbsp;(not&nbsp;unlike&nbsp;the&nbsp;WMS&nbsp;example&nbsp;included&nbsp;with&nbsp;the&nbsp;Services&nbsp;Edition),&nbsp;and&nbsp;as&nbsp;such,&nbsp;I&nbsp;am&nbsp;not&nbsp;using&nbsp;the&nbsp;MapEngine.

---

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [August 1, 2011, 1:16pm UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/2 "2011-08-01T13:16:14Z")

</div>

As&nbsp;an&nbsp;update,&nbsp;I&nbsp;have&nbsp;given&nbsp;the&nbsp;whole&nbsp;Map&nbsp;Engine&nbsp;thing&nbsp;a&nbsp;whirl,&nbsp;and&nbsp;am&nbsp;getting&nbsp;the&nbsp;same&nbsp;error&nbsp;on&nbsp;this&nbsp;particular&nbsp;custom&nbsp;style.&nbsp;I&nbsp;was&nbsp;thinking&nbsp;the&nbsp;GetLabelingCandidates&nbsp;method&nbsp;was&nbsp;looking&nbsp;for&nbsp;keys&nbsp;for&nbsp;the&nbsp;layers,&nbsp;so&nbsp;I&nbsp;assigned&nbsp;them&nbsp;as&nbsp;I&nbsp;was&nbsp;adding&nbsp;them&nbsp;to&nbsp;the&nbsp;map&nbsp;engine,&nbsp;but&nbsp;it&nbsp;appears&nbsp;that&nbsp;didn’t&nbsp;solve&nbsp;the&nbsp;problem.&nbsp;  
&nbsp;-Dustin

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 2, 2011, 9:23am UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/3 "2011-08-02T09:23:46Z")

</div>

Dustin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;it’s&nbsp;not&nbsp;because&nbsp;GeoCanvas&nbsp;is&nbsp;null,&nbsp;if&nbsp;that&nbsp;the&nbsp;error&nbsp;message&nbsp;should&nbsp;be&nbsp;“The&nbsp;parameter&nbsp;you&nbsp;supplied&nbsp;may&nbsp;not&nbsp;be&nbsp;null.”&nbsp;And&nbsp;I&nbsp;check&nbsp;our&nbsp;validators&nbsp;system,&nbsp;there&nbsp;is&nbsp;no&nbsp;"Value&nbsp;cannot&nbsp;be&nbsp;null.&nbsp;Parameter&nbsp;name:&nbsp;key"&nbsp;threw&nbsp;by&nbsp;our&nbsp;core,&nbsp;so&nbsp;it&nbsp;maybe&nbsp;a&nbsp;unhandled&nbsp;exception.&nbsp;PositionStyle&nbsp;is&nbsp;an&nbsp;abstract&nbsp;class&nbsp;and&nbsp;GetLabelingCandidates&nbsp;is&nbsp;an&nbsp;protected&nbsp;method&nbsp;which&nbsp;can&nbsp;not&nbsp;use&nbsp;it&nbsp;directly.&nbsp;Could&nbsp;you&nbsp;give&nbsp;me&nbsp;a&nbsp;sample&nbsp;code&nbsp;to&nbsp;show&nbsp;how&nbsp;you&nbsp;call&nbsp;this&nbsp;method&nbsp;with&nbsp;instance&nbsp;parameters,&nbsp;and&nbsp;also&nbsp;it’s&nbsp;better&nbsp;you&nbsp;can&nbsp;provide&nbsp;a&nbsp;stack-trace&nbsp;for&nbsp;the&nbsp;error.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;James&nbsp;

---

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [August 2, 2011, 11:17am UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/4 "2011-08-02T11:17:30Z")

</div>

Hi&nbsp;James,

It's&nbsp;not&nbsp;an&nbsp;error&nbsp;being&nbsp;thrown&nbsp;by&nbsp;the&nbsp;core,&nbsp;for&nbsp;sure.&nbsp;It's&nbsp;being&nbsp;thrown&nbsp;by&nbsp;the&nbsp;MS&nbsp;library&nbsp;System.Collections&nbsp;for&nbsp;something&nbsp;trying&nbsp;to&nbsp;access&nbsp;an&nbsp;invalid&nbsp;key/value&nbsp;in&nbsp;a&nbsp;Dictionary,&nbsp;but&nbsp;I'm&nbsp;not&nbsp;sure&nbsp;what&nbsp;it's&nbsp;trying&nbsp;to&nbsp;find.&nbsp;The&nbsp;only&nbsp;Dictionary&nbsp;I&nbsp;can&nbsp;see&nbsp;in&nbsp;either&nbsp;the&nbsp;canvas&nbsp;or&nbsp;feature&nbsp;objects&nbsp;is&nbsp;in&nbsp;the&nbsp;Feature,&nbsp;and&nbsp;that&nbsp;is&nbsp;ColumnValues,&nbsp;though&nbsp;the&nbsp;one&nbsp;column&nbsp;key/value&nbsp;that&nbsp;I&nbsp;require&nbsp;is&nbsp;present.&nbsp;&nbsp;My&nbsp;custom&nbsp;style&nbsp;also&nbsp;inherits&nbsp;from&nbsp;PositionStyle,&nbsp;so&nbsp;that&nbsp;is&nbsp;how&nbsp;I'm&nbsp;able&nbsp;to&nbsp;call&nbsp;the&nbsp;GetLabelingCandidates&nbsp;method.&nbsp;There&nbsp;is&nbsp;a&nbsp;lot&nbsp;of&nbsp;code&nbsp;that&nbsp;goes&nbsp;into&nbsp;the&nbsp;class,&nbsp;so&nbsp;I'm&nbsp;not&nbsp;sure&nbsp;exactly&nbsp;what&nbsp;to&nbsp;include&nbsp;for&nbsp;you.&nbsp;It&nbsp;would&nbsp;be&nbsp;great&nbsp;if&nbsp;I&nbsp;could&nbsp;find&nbsp;out&nbsp;which&nbsp;Dictionary&nbsp;the&nbsp;method&nbsp;is&nbsp;trying&nbsp;to&nbsp;access,&nbsp;and&nbsp;which&nbsp;key/value&nbsp;it's&nbsp;trying&nbsp;to&nbsp;find.&nbsp;

Thanks&nbsp;so&nbsp;much&nbsp;for&nbsp;your&nbsp;help.

-Dustin

Stack&nbsp;trace&nbsp;follows:

&nbsp;&nbsp;&nbsp;at&nbsp;System.Collections.Generic.Dictionary`2.FindEntry(TKey&nbsp;key)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;System.Collections.Generic.Dictionary`2.ContainsKey(TKey&nbsp;key)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.PositionStyle.GetLabelingCandidateCore(Feature&nbsp;feature,&nbsp;GeoCanvas&nbsp;canvas)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.PositionStyle.GetLabelingCandidates(Feature&nbsp;feature,&nbsp;GeoCanvas&nbsp;canvas)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;WmsServer.ScaledStyle.DrawCore(IEnumerable`1&nbsp;features,&nbsp;GeoCanvas&nbsp;canvas,&nbsp;Collection`1&nbsp;labelsInThisLayer,&nbsp;Collection`1&nbsp;labelsInAllLayers)&nbsp;in&nbsp;C:\Projects\WmsServer\WmsServer\ScaledStyle.cs:line&nbsp;82  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.Style.Draw(IEnumerable`1&nbsp;features,&nbsp;GeoCanvas&nbsp;canvas,&nbsp;Collection`1&nbsp;labelsInThisLayer,&nbsp;Collection`1&nbsp;labelsInAllLayers)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.ZoomLevel.DrawCore(GeoCanvas&nbsp;canvas,&nbsp;IEnumerable`1&nbsp;features,&nbsp;Collection`1&nbsp;currentLayerLabels,&nbsp;Collection`1&nbsp;allLayerLabels)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.ZoomLevel.Draw(GeoCanvas&nbsp;canvas,&nbsp;IEnumerable`1&nbsp;features,&nbsp;Collection`1&nbsp;currentLayerLabels,&nbsp;Collection`1&nbsp;allLayerLabels)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.FeatureLayer.DrawCore(GeoCanvas&nbsp;canvas,&nbsp;Collection`1&nbsp;labelsInAllLayers)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas&nbsp;canvas,&nbsp;Collection`1&nbsp;labelsInAllLayers)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.MapEngine.6Bw=(Layer&nbsp;6Rw=,&nbsp;Object&nbsp;6hw=)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.MapEngine.zxw=(IEnumerable`1&nbsp;3Bw=,&nbsp;GeoImage&nbsp;3Rw=,&nbsp;GeographyUnit&nbsp;3hw=,&nbsp;Boolean&nbsp;3xw=)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.MapEngine.DrawStaticLayers(GeoImage&nbsp;image,&nbsp;GeographyUnit&nbsp;mapUnit)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;WmsServer.WmsServer.GetMap(GetMapRequest&nbsp;MapRequest)&nbsp;in&nbsp;C:\Projects\WmsServer\WmsServer\WmsServer.aspx.cs:line&nbsp;96  
  
&nbsp;&nbsp;&nbsp;at&nbsp;WmsServer.WmsServer.Page\_Load(Object&nbsp;sender,&nbsp;EventArgs&nbsp;e)&nbsp;in&nbsp;C:\Projects\WmsServer\WmsServer\WmsServer.aspx.cs:line&nbsp;29  
  
&nbsp;&nbsp;&nbsp;at&nbsp;System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr&nbsp;fp,&nbsp;Object&nbsp;o,&nbsp;Object&nbsp;t,&nbsp;EventArgs&nbsp;e)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object&nbsp;sender,&nbsp;EventArgs&nbsp;e)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;System.Web.UI.Control.OnLoad(EventArgs&nbsp;e)  
  
&nbsp;&nbsp;&nbsp;at&nbsp;System.Web.UI.Control.LoadRecursive()  
  
&nbsp;&nbsp;&nbsp;at&nbsp;System.Web.UI.Page.ProcessRequestMain(Boolean&nbsp;includeStagesBeforeAsyncPoint,&nbsp;Boolean&nbsp;includeStagesAfterAsyncPoint)

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 2, 2011, 12:00pm UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/5 "2011-08-02T12:00:10Z")

</div>

Dustin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;need&nbsp;to&nbsp;assign&nbsp;a&nbsp;value&nbsp;to&nbsp;TextColumnName&nbsp;and&nbsp;use&nbsp;it&nbsp;as&nbsp;key&nbsp;to&nbsp;add&nbsp;KeyValuePair&nbsp;to&nbsp;input&nbsp;feature.ColumnValues,&nbsp;otherwise&nbsp;it&nbsp;could&nbsp;get&nbsp;labeling&nbsp;candidate,&nbsp;for&nbsp;example,&nbsp;you&nbsp;set&nbsp;TextColumnName&nbsp;=&nbsp;"CountryName",&nbsp;and&nbsp;set&nbsp;feature.ColumnValues&nbsp;=&nbsp;"USA".&nbsp;  
&nbsp;&nbsp;  
&nbsp;Let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;solve&nbsp;the&nbsp;problem&nbsp;or&nbsp;not.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;James

---

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [August 2, 2011, 12:27pm UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/6 "2011-08-02T12:27:37Z")

</div>

Thanks&nbsp;for&nbsp;the&nbsp;reply&nbsp;James.

I've&nbsp;actually&nbsp;already&nbsp;had&nbsp;both&nbsp;of&nbsp;those&nbsp;things&nbsp;set,&nbsp;hence&nbsp;my&nbsp;confusion.&nbsp;&nbsp;My&nbsp;custom&nbsp;style&nbsp;is&nbsp;essentially&nbsp;a&nbsp;ValueBreak&nbsp;style&nbsp;that&nbsp;compares&nbsp;the&nbsp;current&nbsp;map&nbsp;scale&nbsp;to&nbsp;the&nbsp;assigned&nbsp;value&nbsp;of&nbsp;the&nbsp;break,&nbsp;instead&nbsp;of&nbsp;a&nbsp;column&nbsp;value.&nbsp;So,&nbsp;the&nbsp;setup&nbsp;of&nbsp;the&nbsp;class&nbsp;goes&nbsp;something&nbsp;like&nbsp;this.

&nbsp;

`ShapeFileFeatureLayer CanHwyLayer = new ShapeFileFeatureLayer(this.MapPath("") + @"\App_Data\canhwy.shp");CanHwyLayer.Name = "CanHwy";                    ScaledStyleBreak s3 = new ScaledStyleBreak(4500000, LineStyles.CreateSimpleLineStyle(GeoColor.FromArgb(255, 201, 176, 57), 1, GeoColor.FromArgb(255, 193, 167, 108), 3, false));s3.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("NAME", "Arial", 8, DrawingFontStyles.Regular, GeoColor.SimpleColors.Black);ScaledStyle ScaledStyle = new ScaledStyle(new Collection<ScaledStyleBreak>() { s3 });                            CanHwyLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(ScaledStyle);CanHwyLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;`

So&nbsp;here&nbsp;you&nbsp;can&nbsp;see&nbsp;that&nbsp;the&nbsp;TextColumn&nbsp;field&nbsp;is&nbsp;set.&nbsp;Also,&nbsp;when&nbsp;the&nbsp;ScaledStyle&nbsp;is&nbsp;created,&nbsp;the&nbsp;TextColumn&nbsp;is&nbsp;added&nbsp;to&nbsp;the&nbsp;RequiredFields,&nbsp;which&nbsp;propagates&nbsp;to&nbsp;the&nbsp;Features.&nbsp;When&nbsp;DrawCore&nbsp;is&nbsp;called,&nbsp;I&nbsp;loop&nbsp;through&nbsp;the&nbsp;features&nbsp;of&nbsp;the&nbsp;layer,&nbsp;all&nbsp;of&nbsp;which&nbsp;have&nbsp;the&nbsp;"NAME"&nbsp;key/value&nbsp;pair,&nbsp;and&nbsp;try&nbsp;to&nbsp;call&nbsp;the&nbsp;method&nbsp;in&nbsp;question&nbsp;on&nbsp;the&nbsp;feature&nbsp;and&nbsp;the&nbsp;canvas&nbsp;provided&nbsp;as&nbsp;a&nbsp;parameter&nbsp;to&nbsp;the&nbsp;DrawCore&nbsp;method.&nbsp;Apologies&nbsp;for&nbsp;the&nbsp;formatting,&nbsp;it&nbsp;wasn't&nbsp;really&nbsp;cooperating.

`  protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, System.Collections.ObjectModel.Collection<SimpleCandidate> labelsInThisLayer, System.Collections.ObjectModel.Collection<SimpleCandidate> labelsInAllLayers)        {            ScaledStyleBreak CurrentScaledStyleBreak = new ScaledStyleBreak();            double CurrentScale = ExtentHelper.GetScale(canvas.CurrentWorldExtent, canvas.Width, GeographyUnit.DecimalDegree);            for (int i = 0; i < ScaledStyleBreaks.Count; i++)            {                if ((i + 1 >= ScaledStyleBreaks.Count && CurrentScale >= ScaledStyleBreaks.OrderBy(s => s.MinimumScale).ElementAt(i).MinimumScale) || (i + 1 < ScaledStyleBreaks.Count && CurrentScale < ScaledStyleBreaks.OrderBy(s => s.MinimumScale).ElementAt(i + 1).MinimumScale && CurrentScale >= ScaledStyleBreaks.OrderBy(s => s.MinimumScale).ElementAt(i).MinimumScale))                {                    CurrentScaledStyleBreak = ScaledStyleBreaks.OrderBy(s => s.MinimumScale).ElementAt(i);                    break;                }            }            if (CurrentScaledStyleBreak != null)            {                foreach (Feature feature in features)                { if (CurrentScaledStyleBreak.DefaultTextStyle != null)                    {                        //Error happens here                         Collection<LabelingCandidate> LabelingCandidates = GetLabelingCandidates(feature, canvas);                        foreach (LabelingCandidate LabelingCandidate in LabelingCandidates)                        { //do stuff here } } } }`

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 3, 2011, 11:21am UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/7 "2011-08-03T11:21:06Z")

</div>

Dustin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;From&nbsp;your&nbsp;code,&nbsp;I&nbsp;can&nbsp;see&nbsp;you&nbsp;set&nbsp;s3.DefaultTextStyle.TextColumnName&nbsp;to&nbsp;“NAME”&nbsp;from&nbsp;code&nbsp;s3.DefaultTextStyle&nbsp;=&nbsp;TextStyles.CreateSimpleTextStyle(“NAME”,&nbsp;…,&nbsp;but&nbsp;I&nbsp;don’t&nbsp;see&nbsp;you&nbsp;set&nbsp;it&nbsp;to&nbsp;ScaledStyle&nbsp;which&nbsp;I&nbsp;guess&nbsp;is&nbsp;inherit&nbsp;from&nbsp;PositionStyle,&nbsp;in&nbsp;overrided&nbsp;DrawCore&nbsp;method,&nbsp;you&nbsp;can&nbsp;check&nbsp;TextColumnName&nbsp;again&nbsp;before&nbsp;calling&nbsp;GetLabelingCandidates,&nbsp;such&nbsp;like&nbsp;“Debug.WriteLine(TextColumnName&nbsp;)”&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;James

---

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [August 3, 2011, 11:42am UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/8 "2011-08-03T11:42:10Z")

</div>

Thanks&nbsp;James!&nbsp;  
&nbsp;That&nbsp;was&nbsp;it&nbsp;exactly.&nbsp;I&nbsp;was&nbsp;intending&nbsp;to&nbsp;use&nbsp;the&nbsp;ScaledStyle&nbsp;class&nbsp;as&nbsp;simply&nbsp;a&nbsp;collection&nbsp;that&nbsp;holds&nbsp;ScaledStyleBreaks,&nbsp;so&nbsp;it&nbsp;never&nbsp;occured&nbsp;to&nbsp;me&nbsp;that&nbsp;the&nbsp;method&nbsp;was&nbsp;going&nbsp;to&nbsp;be&nbsp;looking&nbsp;in&nbsp;the&nbsp;ScaledStyle&nbsp;for&nbsp;properties.&nbsp;Looks&nbsp;like&nbsp;I’ve&nbsp;got&nbsp;a&nbsp;bit&nbsp;of&nbsp;reworking&nbsp;to&nbsp;do!&nbsp;Thanks&nbsp;again!&nbsp;  
&nbsp;-Dustin

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 4, 2011, 10:26am UTC](https://community.thinkgeo.com/t/problem-with-getlabelingcandidates/7157/9 "2011-08-04T10:26:50Z")

</div>

Dustin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You’re&nbsp;welcome,&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;more&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;James
