Hello,
I am adding a custom label to a feature on our map. I can get the text I want on the map, in the location that I want, without much issue. What I want to do is to surround that text with a box, so as to highlight it more. Is there a way to do this, such that the surrounding box sizes itself to the text? I'm trying to not have to write a routine that determines the size of the box based on the length of the text.
Here is what I am currently doing:
Dim layerLabel As New InMemoryFeatureLayer
layerLabel = New InMemoryFeatureLayer
layerLabel.IsVisible = True
layerLabel.Open()
layerLabel.Columns.Add(New FeatureSourceColumn("StormName"))
layerLabel.Close()
layerLabel.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Railway1("StormName")
layerLabel.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.SimpleColors.White
layerLabel.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
Dim fea2 As New Feature(New PointShape(-theAdvisory.CurrentLocation.Lon - 1, theAdvisory.CurrentLocation.Lat - 1))
fea2.ColumnValues("StormName") = theAdvisory.StormName.ToString
layerLabel.Open()
layerLabel.EditTools.BeginTransaction()
layerLabel.EditTools.Add(fea2)
layerLabel.EditTools.CommitTransaction()
layerLabel.Close()