Select to view content in your preferred language

How to add a  field for a mappoints?

498
2
05-29-2011 06:19 AM
anyu
by
Emerging Contributor
How to add a field for mappoints?..
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
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;
0 Kudos
anyu
by
Emerging Contributor
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;


Thank you,expert!
0 Kudos