private void MySceneView_LayerLoaded(object sender, Esri.ArcGISRuntime.Controls.LayerLoadedEventArgs e) { if (e.LoadError == null && e.Layer.ID == "AGOLayer") { MySceneView.SetViewAsync(new Camera(new MapPoint(-106.57, 39.01, 14614.24), 281.66, 74.47), new TimeSpan(0, 0, 3), true); AddGraphics(); } }
private void MySceneView_LayerLoaded(object sender, Esri.ArcGISRuntime.Controls.LayerLoadedEventArgs e) { if (e.LoadError == null) { if (e.Layer.ID == "AGOLayer") { MySceneView.SetView(new Camera(new MapPoint(-106.882128302391, 38.7658957449754, 12994.1727461051), 358.607816178049, 70.0562968167998)); } } }
private void mapView1_LayerLoaded(object sender, Esri.ArcGISRuntime.Controls.LayerLoadedEventArgs e) { if (e.Layer.ID == "MyImageLayer") { ArcGISImageServiceLayer imageLayer = e.Layer as ArcGISImageServiceLayer; if (e.LoadError == null) { RasterFunctionsComboBox.ItemsSource = imageLayer.ServiceInfo.RasterFunctionInfos; RasterFunctionsComboBox.SelectedIndex = 0; } } }
private async void MySceneView_LayerLoaded(object sender, Esri.ArcGISRuntime.Controls.LayerLoadedEventArgs e) { if (e.LoadError == null && e.Layer.ID == "AGOLayer") { var camera = new Esri.ArcGISRuntime.Controls.Camera(new MapPoint(2.2950, 48.8738, 3000000), 0, 0); MySceneView.SetViewAsync(camera); // Find the overlay element from the MapView using its name var triompheTip = this.MySceneView.FindName("triompheOverlay") as FrameworkElement; // If the overlay element is found, set its position and make it visible if (triompheTip != null) { var overlayLocation = new MapPoint(2.2950, 48.8738, SpatialReferences.Wgs84); MapView.SetViewOverlayAnchor(triompheTip, overlayLocation); triompheTip.Visibility = Visibility.Visible; } } }
private async void MyMapView_LayerLoaded(object sender, Esri.ArcGISRuntime.Controls.LayerLoadedEventArgs e) { try { //Add kml layer to the treeView if (e.Layer is KmlLayer) { ObservableCollection <KmlFeature> kmlFeatureList = new ObservableCollection <KmlFeature>(); kmlFeatureList.Add((e.Layer as KmlLayer).RootFeature); treeView.ItemsSource = kmlFeatureList; await MyMapView.SetViewAsync(new MapPoint(570546.04, 6867036.46), 1000000); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Sample Error"); } }
private async void mapView1_LayerLoaded(object sender, Esri.ArcGISRuntime.Controls.LayerLoadedEventArgs e) { if (e.Layer.ID == "ParcelsGraphicsLayer") { if (parcelGraphicsLayer != null && parcelGraphicsLayer.Graphics.Count == 0) { QueryTask queryTask = new QueryTask(new Uri("http://services.arcgis.com/8DAUcrpQcpyLMznu/arcgis/rest/services/Manzanas/FeatureServer/0")); //Create a geometry to use as the extent within which parcels will be returned var contractRatio = mapView1.Extent.Width / 6; var extentGeometry = new Envelope(605145.655397665, 10515511.3400704, 605887.368366165, 10516337.1944652, SpatialReference.Create(32718)); Query query = new Query(extentGeometry); query.ReturnGeometry = true; query.OutSpatialReference = mapView1.SpatialReference; try { var results = await queryTask.ExecuteAsync(query, CancellationToken.None); foreach (Graphic g in results.FeatureSet.Features) { parcelGraphicsLayer.Graphics.Add(g); } LoadingParcelsIndicator.IsActive = false; LoadingParcelsContainer.Visibility = Windows.UI.Xaml.Visibility.Collapsed; ControlsContainer.Visibility = Visibility.Visible; } catch (Exception ex) { var dlg = new Windows.UI.Popups.MessageDialog(ex.Message); var _ = dlg.ShowAsync(); } } await SelectParcelForOffset(); } }
private async void mapView1_LayerLoaded(object sender, Esri.ArcGISRuntime.Controls.LayerLoadedEventArgs e) { if (e.Layer.ID == "ParcelsGraphicsLayer") { if (parcelGraphicsLayer != null && parcelGraphicsLayer.Graphics.Count == 0) { QueryTask queryTask = new QueryTask(new Uri("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsParcelCharacteristics/MapServer/1")); //Create a geometry to use as the extent within which parcels will be returned var contractRatio = mapView1.Extent.Width / 6; var extentGeometry = new Envelope(-83.3188395774275, 42.61428312652851, -83.31295664068958, 42.61670913269855, SpatialReferences.Wgs84); Query query = new Query(extentGeometry); query.ReturnGeometry = true; query.OutSpatialReference = mapView1.SpatialReference; try { var results = await queryTask.ExecuteAsync(query, CancellationToken.None); foreach (Graphic g in results.FeatureSet.Features) { parcelGraphicsLayer.Graphics.Add(g); } LoadingParcelsIndicator.IsActive = false; LoadingParcelsContainer.Visibility = Windows.UI.Xaml.Visibility.Collapsed; ControlsContainer.Visibility = Visibility.Visible; } catch (Exception ex) { var dlg = new Windows.UI.Popups.MessageDialog(ex.Message); var _ = dlg.ShowAsync(); } } await SelectParcelForOffset(); } }