How to define a halo color for a DynamicLabelingInfo

07-07-2016 12:14 PM
Esri Contributor

I am using the ArcGIS Runtime for .NET (10.2.7). Is it possible to define a halo color for a TextSymbol within a DynamicLabelingInfo that is used to display labels for a DynamicLayerInfo? There is an example found at (Label map features—ArcGIS Runtime SDK for .NET | ArcGIS for Developers ) under the "Define labels for a dynamic layer" section but it does not show how to define the halo color. This appears to work for an AttributeLabelClass but not for the DynamicLabelingInfo class? I know this is possible with the WPF Runtime thus I assume that the ArcGIS Server REST API can handle a halo color for a text label on a DynamicLayerInfo so I assume I am either missing something simple or this has not be implemented yet?

0 Kudos
3 Replies
Esri Frequent Contributor

Hi Eric,

We do plan to add support for halo, kerning, etc in a future release. In the meantime, can you achieve the desired effect using either BackGroundColor or BorderLineColor?



0 Kudos
New Contributor

Hi Mark,

I am also curious as to when the support for halo will be added for ArcGIS Runtime SDK (for slightly different reason). I am currently using ESRI basemaps when connected to Wi-Fi along with an offline map my group has created on an iPad. Black labels work great on the blank white basemap, but not so much with orthoimagery turned on. We hope to see this supported soon!

Offline map without online basemap turned onWith online basemap turned on

0 Kudos
Esri Contributor


Thanks for the reply. So as it stands now there does not seem to be a way to add a halo effect when labeling a DynamicLayerInfo. Using the BorderLineColor and BackGroundColor on TextSymbol instructs ArcGIS Server to put a square background and border behind each label. This is not the halo effect. ArcGIS Server seems to be able to support both the square background and halo background for a Text Symbol but the ArcGIS Runtime for .NET does not seem to support a halo for labels.

Symbol Objects (ArcGIS Server REST API)

According to this page:

New in 10.1

    Four new properties were added - text, borderLineSize, haloColor and haloSize.

When we set the BorderLineColor and BackGroundColor on TextSymbol the JSON that gets sent to the server correctly has “borderLineSize" and “borderlineColor” and a square background appears behind the labels. The TextSymbol in the ArcGIS Runtime for .NET does not have the HaloColor and HaloSize properties so there is no way the Runtime can produce JSON with “haloColor” and “haloSize” to send to ArcGIS Server.

So we believe that the TextSymbol needs to have a HaloColor and HaloSize properties added so that the correct JSON can be generated for a halo background to be generated by ArcGIS Server.

Now in a separate issue (not to complicate what was said above) I think there is a similar problem with the AttributeLabelClass, specifically how the TextSymbol is used to generate labels on the client. For example, when using the AttributeLabelClass with a local CSV file, if you use the BorderLineColor and BorderLineSize properties it will generate a halo effect around the labels (which we think is wrong). I believe in this scenario ArcGIS Server was not used and the layer was processed locally in the Runtime. Setting the BorderLineColor and BorderLineSize properties should produce a square background behind the labels (just like ArcGIS Server does) and thus we still need the Text Symbol to have the HaloColor and HaloSize added so the halo effect can be applied using a local CSV file and the AttributeLabelClass.

Can you verify our findings?



0 Kudos