Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }