(1)将图元转化为范围
ESRI.ArcGIS.Client.Geometry.Envelope selectedFeatureExtent = selectedFeature.Geometry.Extent;
(2)Geometry是所有图形类型的祖,因此所有图形类型都可以被强制转化为Geometry;反之不成立
(2.1) TextSymbol textSymbol = new TextSymbol()
{
FontFamily = new System.Windows.Media.FontFamily("Arial"),
Foreground = new System.Windows.Media.SolidColorBrush(Colors.Black),
OffsetX = 16,
OffsetY = -5,
FontSize = 12,
Text = name
};
Graphic graphicText = new Graphic()
{
Geometry = new MapPoint(Convert.ToDouble(x), Convert.ToDouble(y)),
Symbol = textSymbol
};
(2.2)Graphic graphic = new Graphic()
{
Geometry = new MapPoint(x1, y1),
Symbol = this.DefaultMarkerSymbol
};