本文整理汇总了C#中Document.GetMapAsync方法的典型用法代码示例。如果您正苦于以下问题:C# Document.GetMapAsync方法的具体用法?C# Document.GetMapAsync怎么用?C# Document.GetMapAsync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Document
的用法示例。
在下文中一共展示了Document.GetMapAsync方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadMapButton_Click
private void LoadMapButton_Click(object sender, RoutedEventArgs e)
{
WebClient webClient = new WebClient();
string uri = string.Format("http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?supressStatus=true&key={0}", BingKeyTextBox.Text);
webClient.OpenReadCompleted += (s, a) =>
{
if (a.Error == null)
{
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(BingAuthentication));
BingAuthentication bingAuthentication = serializer.ReadObject(a.Result) as BingAuthentication;
a.Result.Close();
if (bingAuthentication.authenticationResultCode == "ValidCredentials")
{
Document webMap = new Document();
webMap.BingToken = BingKeyTextBox.Text;
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("75e222ec54b244a5b73aeef40ce76adc");
BingKeyGrid.Visibility = System.Windows.Visibility.Collapsed;
InvalidBingKeyTextBlock.Visibility = System.Windows.Visibility.Collapsed;
}
else InvalidBingKeyTextBlock.Visibility = System.Windows.Visibility.Visible;
}
else InvalidBingKeyTextBlock.Visibility = System.Windows.Visibility.Visible;
};
webClient.OpenReadAsync(new System.Uri(uri));
}
示例2: LoadMapButton_Click
private void LoadMapButton_Click(object sender, RoutedEventArgs e)
{
WebClient webClient = new WebClient();
string uri = string.Format("http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?supressStatus=true&key={0}", BingKeyTextBox.Text);
webClient.OpenReadCompleted += (s, a) =>
{
if (a.Error == null)
{
JsonValue jsonResponse = JsonObject.Load(a.Result);
string authenticationResult = jsonResponse["authenticationResultCode"];
a.Result.Close();
BingKeyGrid.Visibility = System.Windows.Visibility.Collapsed;
InvalidBingKeyTextBlock.Visibility = System.Windows.Visibility.Collapsed;
if (authenticationResult == "ValidCredentials")
{
Document webMap = new Document();
webMap.BingToken = BingKeyTextBox.Text;
webMap.GetMapCompleted += (s1, e1) =>
{
if (e1.Error == null)
LayoutRoot.Children.Add(e1.Map);
};
webMap.GetMapAsync("75e222ec54b244a5b73aeef40ce76adc");
}
else InvalidBingKeyTextBlock.Visibility = System.Windows.Visibility.Visible;
}
else InvalidBingKeyTextBlock.Visibility = System.Windows.Visibility.Visible;
};
webClient.OpenReadAsync(new System.Uri(uri));
}
示例3: LoadWebMapButton_Click
private void LoadWebMapButton_Click(object sender, System.Windows.RoutedEventArgs e)
{
if (!string.IsNullOrEmpty(WebMapTextBox.Text))
{
Document webMap = new Document();
webMap.GetMapCompleted += (s, a) =>
{
if (a.Error != null)
MessageBox.Show(string.Format("Unable to load webmap. {0}", a.Error.Message));
else
{
MyMap.Extent = a.Map.Extent;
LayerCollection layerCollection = new LayerCollection();
foreach (Layer layer in a.Map.Layers)
layerCollection.Add(layer);
a.Map.Layers.Clear();
MyMap.Layers = layerCollection;
WebMapPropertiesTextBox.DataContext = a.ItemInfo;
}
};
webMap.GetMapAsync(WebMapTextBox.Text);
}
}
示例4: WebMapFeatureServicePopups
public WebMapFeatureServicePopups()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("921e9016d2a5423da8bd08eb306e4e0e");
}
示例5: WebMapTiledServicePopups
public WebMapTiledServicePopups()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("0e8aa0cc8dcb47d3b9a46e3c6c7c0f8f");
}
示例6: WebMapDynamicServicePopups
public WebMapDynamicServicePopups()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("fd7fb514579f4422ab2698f47a7d4a46");
}
示例7: WebMapMobileContentServer
public WebMapMobileContentServer()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.ServerBaseUrl = "http://arcgismobile.esri.com/arcgis/mobile/content";
webMap.GetMapAsync("00ab0becb052428485a8d25e62afb86d");
}
示例8: WebMapCSV
public WebMapCSV()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("e64c82296b5a48acb0a7f18e3f556607");
}
示例9: WebMapKML
public WebMapKML()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.ProxyUrl = "http://servicesbeta3.esri.com/SilverlightDemos/ProxyPage/proxy.ashx";
webMap.GetMapAsync("d2cb7cac8b1947c7b57ed8edd6b045bb");
}
示例10: WebMapNotesPopups
public WebMapNotesPopups()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("2ccf901c5b414e5c98a346edb75e3c13");
}
示例11: WebMapWMS
public WebMapWMS()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.ProxyUrl = "http://serverapps102.esri.com/resourceproxy/net/proxy.ashx";
webMap.GetMapAsync("b3e11e1d7aac4d6a98fde6b864d3a2b7");
}
示例12: WebMapWMS
public WebMapWMS()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("b3e11e1d7aac4d6a98fde6b864d3a2b7");
}
示例13: WebMapCharts
public WebMapCharts()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("3fafddcb23ee41cf9c597054f0da6bd6");
}
示例14: LoadWebMap
public LoadWebMap()
{
InitializeComponent();
Document webMap = new Document();
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("00e5e70929e14055ab686df16c842ec1");
}
示例15: LoadWebMapWithProxy
public LoadWebMapWithProxy()
{
InitializeComponent();
Document webMap = new Document();
webMap.ProxyUrl = "http://serverapps102.esri.com/resourceproxy/net/proxy.ashx";
webMap.GetMapCompleted += webMap_GetMapCompleted;
webMap.GetMapAsync("07cbed6b51474885b420cd5ed4c3e082");
}