Graphic g = new Graphic() { Geometry = new MapPoint(x, y, MyMap.SpatialReference) }; g.Attributes["CurrentDate"] = DateTime.UtcNow; g.Attributes["Greeting"] = "Hello, world!"; g.Attributes["Distance"] = 123.45;
Do you mean how to add attributes to a graphic that has MapPoint geometry?Graphic g = new Graphic() { Geometry = new MapPoint(x, y, MyMap.SpatialReference) }; g.Attributes["CurrentDate"] = DateTime.UtcNow; g.Attributes["Greeting"] = "Hello, world!"; g.Attributes["Distance"] = 123.45;