Hi Sunil,
Just from your description, I think the HaloPen doesn’t fit your requirement, HaloPen shows the text with halo following the path of the Route, Shown as below:
Do you mean that showing the border of the Text like as following?
If it is, I think we need to develop our own inherited from ZoomLevel and overwrite the method DrawCore, here is the demo code, and hope it's helpful to you.
Note: The comment "todo" is the place where you need to implement it
class customZoomLevel : ZoomLevel
{
protected override void DrawCore(GeoCanvas canvas, IEnumerable<Feature> features, Collection<SimpleCandidate> currentLayerLabels, Collection<SimpleCandidate> allLayerLabels)
{
base.DrawCore(canvas, features, currentLayerLabels, allLayerLabels);
//Todo: All have been drawn, now we need to draw the rectangle based on the text
if (!string.IsNullOrEmpty(DefaultTextStyle.TextColumnName))
{
// Draw canvas
Collection<RectangleShape> recs = GenerateTextBorders(new List<Feature>(features));
// Use AreaStyle to draw the rectangle
AreaStyle areaStyle = new AreaStyle(); // Todo: Define the style based on your requirement
Collection<BaseShape> baseshapes = new Collection<BaseShape>();
foreach (RectangleShape item in recs)
{
baseshapes.Add(item);
}
areaStyle.Draw(baseshapes, canvas, currentLayerLabels, allLayerLabels);
}
}
private Collection<RectangleShape> GenerateTextBorders(List<Feature> textPointFeatures)
{
// Get the rectangle based on text
}
}
Thanks,
Johnny