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 }); } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.