private void InitializeOverlaySwitcher()
        {
            Collection <Overlay> baseOverlays = new Collection <Overlay>();

            baseOverlays.Add(map.Overlays[Resources.WorldMapKitRoadOverlay]);
            baseOverlays.Add(map.Overlays[Resources.WorldMapKitAerialOverlay]);
            baseOverlays.Add(map.Overlays[Resources.WorldMapKitAerialWithLabelsOverlay]);

            baseOverlays.Add(map.Overlays[Resources.OpenStreetMapKey]);
            baseOverlays.Add(map.Overlays[Resources.BingMapsAerial]);
            baseOverlays.Add(map.Overlays[Resources.BingMapsRoad]);

            switcher          = new OverlaySwitcher(baseOverlays, map);
            switcher.Anchor   = AnchorStyles.Right | AnchorStyles.Top;
            switcher.Location = new Point(Width - 243, 65);
            switcher.Size     = new Size(220, 125);
            Controls.Add(switcher);
            switcher.BringToFront();
            switcher.Refresh();
            switcher.OverlayChanged += OverlaySwitcher_OverlayChanged;

            PictureBox overlayPictureBox = new PictureBox();

            overlayPictureBox.Anchor   = AnchorStyles.Right | AnchorStyles.Top;
            overlayPictureBox.Image    = Resources.switcher_minimize;
            overlayPictureBox.SizeMode = PictureBoxSizeMode.AutoSize;
            overlayPictureBox.Location = new Point(switcher.Location.X + switcher.Width - overlayPictureBox.Width - 8, switcher.Location.Y + 5);
            overlayPictureBox.Click   += OverlaySwitcherPictureBox_Click;
            Controls.Add(overlayPictureBox);
            overlayPictureBox.BringToFront();
        }
        private void InitializeMap()
        {
            mapControl.MapUnit                                      = GeographyUnit.Meter;
            mapControl.CurrentExtent                                = defaultExtent;
            mapControl.MapTools.Logo.IsEnabled                      = false;
            mapControl.MapTools.MouseCoordinate.IsEnabled           = true;
            mapControl.MapTools.MouseCoordinate.MouseCoordinateType = MouseCoordinateType.Custom;
            mapControl.MapTools.MouseCoordinate.Visibility          = Visibility.Hidden;
            mapControl.MapTools.PanZoomBar.GlobeButtonClick        += (s, e) => e.NewExtent = defaultExtent;

            OverlaySwitcher overlaySwitcher = new OverlaySwitcher();

            overlaySwitcher.Initialize(mapControl);
            overlaySwitcher.OverlayChanged += OverlaySwitcherOverlayChanged;
            mapControl.MapTools.Add(overlaySwitcher);

            InitializeOverlays();
        }
        private void InitializeMap()
        {
            mapControl.MapUnit = GeographyUnit.Meter;
            mapControl.CurrentExtent = defaultExtent;
            mapControl.MapTools.Logo.IsEnabled = false;
            mapControl.MapTools.MouseCoordinate.IsEnabled = true;
            mapControl.MapTools.MouseCoordinate.MouseCoordinateType = MouseCoordinateType.Custom;
            mapControl.MapTools.MouseCoordinate.Visibility = Visibility.Hidden;
            mapControl.MapTools.PanZoomBar.GlobeButtonClick += (s, e) => e.NewExtent = defaultExtent;

            OverlaySwitcher overlaySwitcher = new OverlaySwitcher();
            overlaySwitcher.Initialize(mapControl);
            overlaySwitcher.OverlayChanged += OverlaySwitcherOverlayChanged;
            mapControl.MapTools.Add(overlaySwitcher);

            InitializeOverlays();
        }