Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I convert from an ESRI.ArcGIS.Geometry.IPoint to an ESRI.ArcGIS.Client.Graphic point object?

In other words, I'm wanting to convert from an IGeometry to a runtime geometry, I guess.

share|improve this question
Are you working in SilverLight? Have you looked at the sample given here:… – Devdatta Tengshe Jan 15 '13 at 16:45
Yes, actually I've been looking at this link this morning, but couldn't really pin-point my answer. I'll take another look at it. Maybe I'm just missing something. Thanks! – Renee Cammarere Jan 15 '13 at 18:47
If you are working in the Silverlight API, you won't have an IPoint. That exists only in the ArcObjects API. In silverlight, you will have a MapPoint. The linked page, shows how you can make a graphic from a MapPoint. – Devdatta Tengshe Jan 16 '13 at 3:13
up vote 3 down vote accepted

I was able to do this with the following code snippit . . .

       //  *********************   Convert from IGeometry to runtime geometry    *********************
       // Create a new instance of one Graphic.
       ESRI.ArcGIS.Client.Graphic aGraphic = new ESRI.ArcGIS.Client.Graphic();

       // Create a SpatialReference for the Graphic. Point Graphics are known as MapPoint objects
       ESRI.ArcGIS.Client.Geometry.SpatialReference aSpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(4326);
       // Create a MapPoint object and set its SpatialReference and coordinate (X,Y,Z) information. 
       ESRI.ArcGIS.Client.Geometry.MapPoint aMapPoint = new ESRI.ArcGIS.Client.Geometry.MapPoint();
       aMapPoint.SpatialReference = aSpatialReference;
       aMapPoint.X = Point.X;// Point is an IPoint object
       aMapPoint.Y = Point.Y;
       aMapPoint.Z = Point.Z;

       // Create a new instance of a SimpleMarkerSymbol and set its Style, and Size Properties.
       ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol aSimpleMarkerSymbol = new ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol();
       aSimpleMarkerSymbol.Style = ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol.SimpleMarkerStyle.Circle;
       aSimpleMarkerSymbol.Size = 10;

        // Apply the Graphic's Geometry and Symbol Properties.
       aGraphic.Geometry = (ESRI.ArcGIS.Client.Geometry.Geometry)aMapPoint;
       aGraphic.Symbol = (ESRI.ArcGIS.Client.Symbols.Symbol)aSimpleMarkerSymbol;

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.