protected void AddGeoMapLayer(GeoTileImageryMapLayer mapLayer) { mapLayer.PropertyChanged += OnMapLayerChanged; //mapLayer.ImageryViewModel.PropertyChanged += OnImageryMapLayerChanged; //mapLayer.SeriesView.ItemsSource = dataSource.View; //WorldCountries.View; //var windowRect = this.Map.GetZoomFromGeographic(GeoRect.WorldRect.ToRect()); //this.Map.WindowRect = windowRect; this.Map.Series.Add(mapLayer.SeriesView); }
private void OnAddImageryLayerButtonClick(object sender, RoutedEventArgs e) { AddImageryLayerButton.IsEnabled = false; var mapLayer = new GeoTileImageryMapLayer(); mapLayer.ImageryViewModel = GeoImageryViews.Esri.WorldOceansMap; mapLayer.Opacity = 1; mapLayer.Title = AppStrings.MapLayer_MapImageryOverlay; this.ViewModel.MapLayers.Insert(0, mapLayer); this.MapSeriesEditor.UpdateSelection(); }
private void OnLoadMapConfigurationCompleted(object sender, ResultEventArgs e) { var mapLayer = new GeoTileImageryMapLayer { ImageryViewModel = GeoMapImagryProvider.GetGeographicMapImageryView(), Title = AppStrings.MapBaseLayer }; this.ViewModel.MapLayers.Add(mapLayer); if (!this.ViewModel.IsMapInitialized) { this.ViewModel.InitializeMap(this.GeoMap); } }