ThinkGeo.com    |     Documentation    |     Premium Support

How to Add a Scale Bar on the map

We want to add a scale bar and custom Legend in the map
Thanks Pervaiz Ahmad

Hi Pervaiz,

You can add them like this:

        ScaleBarAdornmentLayer scalebar = new ScaleBarAdornmentLayer();
        LegendAdornmentLayer legend = new LegendAdornmentLayer();
        // Set the items for custom legend here

        map.AdornmentOverlay.Layers.Add(scalebar);
        map.AdornmentOverlay.Layers.Add(legend);

Wish that’s helpful.

Regards,

Don

Hi Don,

Thanks alot I will try it and will let you know if faced any issue :slight_smile:

Regards,

Hi Pervaiz,

I am glad to hear that’s helpful.

Regards,

Don