本文整理汇总了C#中FeatureLayer.RetryLoadAsync方法的典型用法代码示例。如果您正苦于以下问题:C# FeatureLayer.RetryLoadAsync方法的具体用法?C# FeatureLayer.RetryLoadAsync怎么用?C# FeatureLayer.RetryLoadAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FeatureLayer
的用法示例。
在下文中一共展示了FeatureLayer.RetryLoadAsync方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
private async void Initialize()
{
// Create new Map with basemap
Map myMap = new Map(Basemap.CreateTopographic());
// Create a MapPoint the map should zoom to
MapPoint mapPoint = new MapPoint(
-13630484, 4545415, SpatialReferences.WebMercator);
// Set the initial viewpoint for map
myMap.InitialViewpoint = new Viewpoint(mapPoint, 90000);
// Provide used Map to the MapView
MyMapView.Map = myMap;
// Create the uri for the feature service
Uri featureServiceUri = new Uri(
"https://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/0");
// Initialize feature table using a url to feature server url
ServiceFeatureTable featureTable = new ServiceFeatureTable(featureServiceUri);
// Initialize a new feature layer based on the feature table
_featureLayer = new FeatureLayer(featureTable);
//Add the feature layer to the map
myMap.OperationalLayers.Add(_featureLayer);
// TODO: https://github.com/Esri/arcgis-runtime-samples-xamarin/issues/96
if (Device.OS == TargetPlatform.iOS || Device.OS == TargetPlatform.Other)
{
await _featureLayer.RetryLoadAsync();
}
}