# How to add labels to InternalFeatures

**URL:** <https://community.thinkgeo.com/t/how-to-add-labels-to-internalfeatures/253>\
**Category:** WinForms\
**Created:** [February 20, 2009, 4:12pm UTC](https://community.thinkgeo.com/t/how-to-add-labels-to-internalfeatures/253 "2009-02-20T16:12:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Steve](https://community.thinkgeo.com/u/Steve)\
**Post date:** [February 20, 2009, 4:12pm UTC](https://community.thinkgeo.com/t/how-to-add-labels-to-internalfeatures/253/1 "2009-02-20T16:12:19Z")

</div>

I&nbsp;am&nbsp;plotting&nbsp;vehicle&nbsp;positions&nbsp;on&nbsp;a&nbsp;map&nbsp;pulled&nbsp;from&nbsp;a&nbsp;database,&nbsp;and&nbsp;under&nbsp;each&nbsp;I&nbsp;need&nbsp;a&nbsp;label&nbsp;displaying&nbsp;the&nbsp;name&nbsp;the&nbsp;car,&nbsp;for&nbsp;example&nbsp;"Bob's&nbsp;Car".&nbsp;I&nbsp;have&nbsp;looked&nbsp;in&nbsp;the&nbsp;documentation&nbsp;but&nbsp;it&nbsp;is&nbsp;not&nbsp;clear&nbsp;to&nbsp;me&nbsp;on&nbsp;how&nbsp;to&nbsp;do&nbsp;this.&nbsp;Here&nbsp;is&nbsp;some&nbsp;of&nbsp;my&nbsp;sample&nbsp;code:  
  
&nbsp;&nbsp;`InMemoryFeatureLayer            bitmapLayer = new InMemoryFeatureLayer();            bitmapLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.PointType = PointType.Bitmap;            bitmapLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.Image = new GeoImage(@"c:\MapIcons\charger.png");            bitmapLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;            bitmapLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle(null, "Arial", 9, DrawingFontStyles.Bold, GeoColor.SimpleColors.Black);            winformsMap1.StaticOverlay.Layers.Add("BitmapLayer", bitmapLayer);            // Plot single marker for testing            bitmapLayer.InternalFeatures.Add("Bob's Car", new Feature(new PointShape(-85.1511, 33.6855)));            winformsMap1.Refresh();`

---

<div class="post-metadata">

**Author:** ![Ryan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@Ryan](https://community.thinkgeo.com/u/Ryan)\
**Post date:** [February 20, 2009, 4:23pm UTC](https://community.thinkgeo.com/t/how-to-add-labels-to-internalfeatures/253/2 "2009-02-20T16:23:28Z")

</div>

Steve,

This&nbsp;is&nbsp;actually&nbsp;fairly&nbsp;easy&nbsp;to&nbsp;setup,&nbsp;but&nbsp;the&nbsp;documentation&nbsp;is&nbsp;a&nbsp;bit&nbsp;sparse&nbsp;on&nbsp;setting&nbsp;this&nbsp;up.

First&nbsp;you&nbsp;need&nbsp;to&nbsp;setup&nbsp;Columns&nbsp;for&nbsp;your&nbsp;InMemoryLayer&nbsp;to&nbsp;contain&nbsp;your&nbsp;label&nbsp;information.

InMemoryFeatureLayer&nbsp;inMemoryLayer&nbsp;=&nbsp;new&nbsp;InMemoryFeatureLayer();  
  
inMemoryLayer.Columns.Add(new&nbsp;FeatureSourceColumn("Label1"));  
  
  
  
Next&nbsp;you&nbsp;need&nbsp;to&nbsp;create&nbsp;your&nbsp;new&nbsp;Feature&nbsp;and&nbsp;add&nbsp;the&nbsp;ColumnValue&nbsp;data&nbsp;for&nbsp;it.  
  
  
  
Feature&nbsp;testFeature&nbsp;=&nbsp;new&nbsp;Feature(new&nbsp;PointShape(45,&nbsp;45));  
  
testFeature.ColumnValues.Add("Label1",&nbsp;"TEST&nbsp;LABEL");  
  
inMemoryLayer.InternalFeatures.Add(testFeature);  
  
inMemoryLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle&nbsp;=&nbsp;TextStyles.City1("Label1");  
  
inMemoryLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20;

Note&nbsp;that&nbsp;if&nbsp;you&nbsp;setup&nbsp;a&nbsp;Column&nbsp;for&nbsp;your&nbsp;InMemoryLayer&nbsp;that&nbsp;all&nbsp;the&nbsp;InternalFeatures&nbsp;you&nbsp;add&nbsp;must&nbsp;have&nbsp;a&nbsp;ColumnValue&nbsp;specified&nbsp;for&nbsp;that&nbsp;Column.&nbsp;That&nbsp;is&nbsp;to&nbsp;say&nbsp;that&nbsp;you&nbsp;need&nbsp;to&nbsp;have&nbsp;either&nbsp;valid&nbsp;data&nbsp;or&nbsp;a&nbsp;blank&nbsp;string&nbsp;for&nbsp;the&nbsp;Label1&nbsp;ColumnValue&nbsp;for&nbsp;all&nbsp;your&nbsp;features.
