public MapsViewerWin(IBaseWindow baseWin) { InitializeComponent(); fMapBrowser = new GKMapBrowser(); Panel1.Content = fMapBrowser; fController = new MapsViewerWinController(this, baseWin.GetContentList(GDMRecordType.rtIndividual)); fController.Init(baseWin); radTotal.Checked = true; SetLang(); }
public MapsViewerWin(IBaseWindow baseWin) { InitializeComponent(); fMapBrowser = new GKMapBrowser(); fMapBrowser.Dock = DockStyle.Fill; Panel1.Controls.Add(fMapBrowser); fController = new MapsViewerWinController(this, baseWin.GetContentList(GDMRecordType.rtIndividual)); fController.Init(baseWin); radTotal.Checked = true; radTotal_Click(null, null); SetLang(); }
public MapsViewerWin(IBaseWindow baseWin) { InitializeComponent(); fMapBrowser = new GKMapBrowser(); fMapBrowser.Dock = DockStyle.Fill; panClient.Controls.Add(this.fMapBrowser, 0, 0); fController = new MapsViewerWinController(this, baseWin.GetContentList(GDMRecordType.rtIndividual)); fController.Init(baseWin); radTotal.Checked = true; radTotal_Click(null, null); PopulateContextMenus(); SetLocale(); if (!GMapControl.IsDesignerHosted) { fMapBrowser.MapControl.OnMapTypeChanged += MainMap_OnMapTypeChanged; fMapBrowser.MapControl.OnMapZoomChanged += MainMap_OnMapZoomChanged; // get zoom trkZoom.Minimum = fMapBrowser.MapControl.MinZoom * 100; trkZoom.Maximum = fMapBrowser.MapControl.MaxZoom * 100; trkZoom.TickFrequency = 100; if (fMapBrowser.MapControl.Zoom >= fMapBrowser.MapControl.MinZoom && fMapBrowser.MapControl.Zoom <= fMapBrowser.MapControl.MaxZoom) { trkZoom.Value = (int)fMapBrowser.MapControl.Zoom * 100; } // get position txtLat.Text = fMapBrowser.MapControl.Position.Lat.ToString(CultureInfo.InvariantCulture); txtLng.Text = fMapBrowser.MapControl.Position.Lng.ToString(CultureInfo.InvariantCulture); } }