Using TerraExplorer Fusion API

In addition to TerraExplorer API, TerraExplorer Fusion provides a limited set of Fusion-specific APIs that can be used to add and activate custom analysis and navigation tools. TerraExplorer Fusion API has two main objects: analysis and navigate. These objects are documented below. 

analysis

The analysis object is composed of methods relating to analysis in a project. The only methods documented here relate to adding an analysis tool to TerraExplorer Fusion’s analysis panel and opening the custom tool. 

The following methods are available:

§  addAnalysisTool

§  openAnalysisToolURL

§  openPopupDialogURL 

 

Methods

addAnalysisTool

addAnalysisTool(id,name,title,icon,action)

 

Adds an analysis tool to the Analysis Tools panel.

 

Parameters:

Name

Type

Description

id

String

Tool’s ID.

name

String

Tool’s heading.

title

String

Tool’s tooltip.

icon

String

Path to icon to display for tool in Tools panel. The icon must be saved in the same domain as the one from which you are running TerraExplorer Fusion.

action

Enum

Action to take when tool is activated:

§  openAnalysisToolURL

§  openPopupDialogURL

 

Example:

analysis.addAnalysisTool({
     id:'myToolBtnID1',
     name:'My Tool',
     title:'My analysis tool',
     icon:'./custom/tools/MyAnalysisTool/myTool.png',
     action:'analysis.openAnalysisToolURL('./custom/tools/MyAnalysisTool/MyTool.html','My tool',true)'
});

 

openAnalysisToolURL

openAnalysisToolURL(path,name,backbutton)

 

Opens an analysis tool in TEF’s analysis panel.

 

Parameters:

Name

Type

Description

Name

path

String

Path to HTML tool.

path

name

String

Title for HTML tool.

name

backbutton

Boolean

Boolean that determines whether a back button is displayed.

backbutton

 

Example:

navigate.openAnalysisToolURL(
   './custom/tools/MyAnalysisTool/MyTool.html',
   'My tool',
   true
);

 

openPopupDialogURL

openPopupDialogURL(path,name,position)

 

Opens an analysis tool in a popup window. Note that popup tools will be discontinued in the next version of TerraExplorer Fusion.

 

Parameters:

Name

Type

Description

path

String

Tool’s ID.

name

String

Tool’s heading.

position

Integer

X,Y screen coordinates of popup window. Pass -1 to keep tool open.

 

Example:

navigate.openPopupDialogURL(
    './custom/tools/MyAnalysisTool/MyTool.html',
    'My tool',
     500,500,-1
);

 

navigate

The navigate object is composed of methods relating to navigation in a project. The only methods documented here relate to adding a navigation tool to TerraExplorer Fusion’s navigation panel and opening the custom tool.

The following methods are available:

§  addNavigateTool

§  openNavigateToolURL

§  openPopupDialogURL 

 

Methods

addNavigateTool

addNavigateTool(id,name,title,icon,action)

 

Adds a navigation tool to the Navigation Tools panel.

 

Parameters:

Name

Type

Description

id

String

Tool’s ID.

name

String

Tool’s heading.

title

String

Tool’s tooltip.

icon

String

Path to icon to display for tool in Tools panel. The icon must be saved in the same domain as the one from which you are running TerraExplorer Fusion.

action

Enum

Action to take when tool is activated:

§  openNavigateToolURL

§  openPopupDialogURL 

 

Example:

navigate.addNavigateTool({
     id:'myToolBtnID1',
     name:'My Tool',
     title:'My navigation tool',
     icon:'./custom/tools/MyNavigationTool/myTool.png',
     action:'navigate.openNavigateToolURL('./custom/tools/MyNavigationTool/MyTool.html','My tool',true)'
});

 

openNavigateToolURL

openNavigateToolURL(path,name,backbutton)

 

Opens a navigation tool in TEF’s navigation panel.

 

Parameters:

Name

Type

Description

path

String

Path to HTML tool.

name

String

Title for HTML tool.

backbutton

Boolean

Boolean that determines whether a back button is displayed.

 

Example:

navigate.openNavigateToolURL(
    './custom/tools/MyNavigationTool/MyTool.html',
    'My tool',
    true
);

   

openPopupDialogURL

openPopupDialogURL(path,name,position)

 

Opens a navigation tool in a popup window. Note that popup tools will be discontinued in the next version of TerraExplorer Fusion.

 

Parameters:

Name

Type

Description

path

String

Tool’s ID.

name

String

Tool’s heading.

position

Integer

X,Y screen coordinates of popup window. Pass -1 to keep tool open.

 

Example:

navigate.openPopupDialogURL(
    './custom/tools/MyNavigationTool/MyTool.html',
    'My tool',
     500,500,-1
);