Clone wiki

Terramenta / plugins

Plugin development FAQ

Can I use the Terramenta iconsets within my plugin?
Yep. You can reference any of the images provided by the core Terramenta modules for use in your plugin.

//image from the terramenta-core module
//image from the terramenta-globe module

All Terramenta icons are also available via the Themes and Artwork project. This project contains the default Terramenta illustrator project as well as an extras section containing extended use graphics. The downloads section includes pre-cut, packaged releases of iconsets for general use (i.e., &

How do I gain access to the core Globe component's WorldWindow instance?
You will need access to the WorldWindManager to add custom layers or control the globe.

private static final WorldWindManager wwm = Lookup.getDefault().lookup(WorldWindManager.class);

visit for information on World Wind

How do I get get my Renderable to be visible based on the display date?
Take a look at TerramentaPlacemark and the DateBasedVisibilitySupport utilitly as an example:

setValue("DISPLAY_DATE", date);
public void preRender(DrawContext dc) {
    boolean isVisible = DateBasedVisibilitySupport.determineVisibility(dc, this);

public static boolean determineVisibility(DrawContext dc, AVList avlist) {
    if (dc != null && avlist != null && avlist.hasKey("DISPLAY_DATE") && dc.hasKey("DISPLAY_DATEINTERVAL")) {
        Date displayDate = (Date) avlist.getValue("DISPLAY_DATE");
        DateInterval displayDateInterval = (DateInterval) dc.getValue("DISPLAY_DATEINTERVAL");

        if (displayDate != null && displayDateInterval != null) {
            //does this displayDate exist within the displayDateInterval?
            long displayDateMillis = displayDate.getTime();
            return (displayDateMillis >= displayDateInterval.getStartMillis() && displayDateMillis <= displayDateInterval.getEndMillis());

    //if we have no date restrictions then its always visible
    return true;

How do I implement the Globes DnD for Renderables?
The abstract RenderableProvider class takes care of all the Transferable stuff, just extend it.

public class DropMe extends RenderableProvider{

    public String getLayerName() {
        return "DropMe Layer";

    public Renderable getRenderable(Position pos) {
        if (pos == null) {
            return null;

        return new PointPlacemark(pos);