1 using System.Windows;
2 using System.Windows.Controls;
3 using System.Windows.Media;
4 using ESRI.ArcGIS.Client;
5 using ESRI.ArcGIS.Client.WebMap;
6
7 namespace ArcGISSilverlightSDK
8 {
9 public partial class WebMapNotesPopups : UserControl
10 {
11 public WebMapNotesPopups()
12 {
13 InitializeComponent();
14
15 Document webMap = new Document();
16 webMap.GetMapCompleted += webMap_GetMapCompleted;
17
18 webMap.GetMapAsync("2ccf901c5b414e5c98a346edb75e3c13");
19 }
20
21 void webMap_GetMapCompleted(object sender, GetMapCompletedEventArgs e)
22 {
23 if (e.Error == null)
24 {//发现下面代码并没有起到什么作用?????
25 foreach (Layer layer in e.Map.Layers)
26 {
27 if (layer is GraphicsLayer)
28 {
29 GraphicsLayer glayer = layer as GraphicsLayer;
30 // Modification of the default map tip style
31 Border border = glayer.MapTip as Border;
32 if (border != null)
33 {
34 border.Background = new SolidColorBrush(Color.FromArgb(200, 102, 150, 255));
35 border.CornerRadius = new CornerRadius(4);
36 }
37 }
38 }
39 LayoutRoot.Children.Add(e.Map);
40 }
41 }
42 }
43 }