Thanks for example.Is there a way to take esri symbol and generate bitmap from it?
public class MyCustomLayer : ElementLayer, ILegendSupport { public event EventHandler<EventArgs> LegendChanged; public void QueryLegendInfos(Action<LayerLegendInfo> callback, Action<Exception> errorCallback) { BitmapImage bitmapImage1 = new BitmapImage(new Uri("Images/collapse.png", UriKind.Relative)); BitmapImage bitmapImage2 = new BitmapImage (new Uri("Images/logo.png", UriKind.Relative)); var legendItemInfos = new List<LegendItemInfo> { new LegendItemInfo {Label = "Legend Item1", ImageSource = bitmapImage1}, new LegendItemInfo {Label = "Legend Item2", ImageSource = bitmapImage2} }; callback(new LayerLegendInfo { LegendItemInfos = legendItemInfos }); } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.