/// <summary> /// Handles display footprints event /// </summary> /// <param name="sender">Event sender</param> /// <param name="e">Event arguments</param> private void displayFootPrintTSBtn_Click(object sender, EventArgs e) { CswRecord record = (CswRecord)lstSearchResults.SelectedItem; try { AGXM.Graphic pointGraphic = makeFootPrintGraphic(record); //Create a new Note to hold the graphic AGXM.Note newNote = new AGXM.Note(record.Title, pointGraphic.Geometry, pointGraphic.Symbol); AGXM.MapDisplay md = AGX.Application.ActiveMapDisplay; //Add the Result to the map md.Map.ChildItems.Add(newNote); } catch (Exception ex) { string msg = ex.Message; } }
/// <summary> /// Displays all footprints in map /// </summary> /// <param name="sender">Event sender</param> /// <param name="e">Event arguments</param> private void showAllFootPrintTSBtn_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; AGXM.MapDisplay md = AGX.Application.ActiveMapDisplay; if (showAll) { showAll = false; showAllFootPrintTSBtn.ToolTipText = "Hide All Footprints"; showAllFootPrintTSBtn.Image = (Image)this.resourceManager.GetObject("hideAll"); foreach (Object obj in lstSearchResults.Items) { CswRecord record = (CswRecord)obj; if (record.BoundingBox.Maxx != NONEXSISTANTNUMBER) { AGXM.Graphic pointGraphic = makeFootPrintGraphic(record); //Create a new Note to hold the graphic AGXM.Note newNote = new AGXM.Note(record.Title, pointGraphic.Geometry, pointGraphic.Symbol); //Add the Result to the map md.Map.ChildItems.Add(newNote); } } } else { // md.Map.ChildItems.Clear(); clearFootprints(); } } catch (Exception ex) { ShowErrorMessageBox(ex.Message); } finally { Cursor.Current = Cursors.Default; } }