Before we discuss geometry, we need to talk about what you assign geometry to. Basically, you are going to assign geometry to a graphic or a geodatabase feature.
As you can see in the diagram, the GeodatabaseFeature
and Graphic
classes inherit from the abstract class called Feature
. A Feature
class has geometry and attributes (fields) and comes from either a feature service (online), Runtime geodatabase (offline), or some other source, such as a shapefile. A graphic can be added to GraphicsLayer
or GraphicsOverlay
. The big difference between a Graphic
and a Feature
class is that a Feature
class is persisted to FeatureLayer
, either in a web service or to disk. A Graphic
class is stored in
GraphicsLayer
or GraphicsOverlay
, but is not persisted. Both the GeodatabaseFeature
and Graphic
classes can have their geometry set like this:
// Create a new Graphic. Graphic graphic = new Graphic(); // Create a new MapPoint and set it to the Graphics geometry. MapPoint mapPoint = new...