ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Graphics.Add(graphic);
ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Graphics.Remove(graphic);
ahh thanks very much, yeah def still learning. have left ole VB and began using C# aww sooo much better!!!. Now I am still a bit stuck though looking at the Mapdisplay.graphics trying to pull a particular item from the Collection. still trying to figure out the Contains method kinda of seems 'not too powerful' I guess if you need to move it comes in help. Also doesn't look like you can use LINQ against the collection either???Brian want-to-be-programmer
public class WidgetItem{//user class to define associated attributes to Graphic Objects public string Name { get; set; } public DateTime DateAdded { get; set; } public Graphic Graphic { get; set; } public WidgetItem (){ this.DateAdded = DateTime.Now; } }
List<WidgetItem> widgets = new List<WidgetItem>(); // Create and populate Widget Objects WidgetItem wi = new WidgetItem(); wi.Name = "Brian"; wi.Graphic = somegraphic; //probably the result of a track() operation widgets.Add(wi);
var removeus = (from w in widgets where w.Name.StartsWith("B") && w.Graphic != null select w.Graphic); ActiveMapDisplay.Graphics.Remove(removeus);
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.