private void BgOSM_OnClick(object sender, RoutedEventArgs e) { WpfMap.BackgroundLayer = new SharpMap.Layers.TileAsyncLayer(BruTile.Predefined.KnownTileSources.Create(), "OSM"); foreach (var menuItem in Menu.Items.OfType <MenuItem>()) { menuItem.IsChecked = false; } BgOsm.IsChecked = true; WpfMap.ZoomToExtents(); e.Handled = true; }
private void BgMapQuest_Click(object sender, RoutedEventArgs e) { WpfMap.BackgroundLayer = new SharpMap.Layers.TileAsyncLayer( KnownTileSources.Create(KnownTileSource.MapQuestAerial), "MapQuest"); foreach (var menuItem in Menu.Items.OfType <MenuItem>()) { menuItem.IsChecked = false; } BgMapQuest.IsChecked = true; WpfMap.ZoomToExtents(); e.Handled = true; }