Wednesday, February 11, 2009

Source code to add Notes with Gaia Extender API

Recently folks on The Carbon Portal Gaia Forum asked, "Is it possible to add a note (or just a marker) to a map using the Gaia Extender API?" We responded with a way to externally add notes using the Extenders API, and an initial .NET code sample - then got to thinking about providing source code for our NoteEditor to help people with their Gaia Extenders development. Here's some code snippet from the example, the rest is on The Carbon Portal -

public class ExtenderImplementer
{
...
// Get Gaia's Note Container
NotesContainer notesContainer = null;
public void SetNotesContainer
(NotesContainer notesContainer)
{
this.notesContainer = notesContainer;
}

...
// Add note to notes container and map
private void AddNoteEntity(ItemNote note,
NotesContainer container,
ContextMenuStrip contextMenu, bool
showCheckBox)
{
NoteEntityControl entity =
container.AddNote(note, note.Text, null, true);
entity.ShowCheckBox = showCheckBox;

----
- Jeff

1 Comments:

At 2/11/2009 10:24:00 AM, Anonymous Anonymous said...

To clarify the 'open-source' aspect: We continuously open more and more of the CarbonTools PRO code. We already opened the Microsoft and Yahoo tiles handling to our customers, as well as the complete project and code of Gaia. The thought is to open more code such as the Note Editor, Symbols Editor and so on in future releases.

-Nuke

 

Post a Comment

<< Home