Adding Custom Components under the Parent Components - Spectrum_Spatial_Analyst - 23.1

Spectrum Spatial Analyst Extensibility Guide

Product type
Software
Portfolio
Locate
Product family
Spectrum
Product
Spectrum > Spatial > Spectrum Spatial Analyst
Version
23.1
Language
English
Product name
Spectrum Spatial Analyst
Title
Spectrum Spatial Analyst Extensibility Guide
Topic type
Reference
Overview
Tips
How Do I
Configuration
First publish date
2007

While injecting custom components, the extensibility developers can:

  • add new injection points on the left and right panels
  • apecify the order of the custom component inside parent component
Note: Along with the new enhancements, the existing injection points and approach will continue to work in the same manner as it has been.

Explore new locations - add new injection points on the left and right panels

To explore new injection points, load the Spectrum Spatial Analyst in browser and inspect the parent element under which you want to insert the custom component by right clicking on that element and choosing inspect option. It opens the developer tool bar in the browser, then we need to copy the id of the element and put it as parentComponentName inside CustomAnalystModuleConfig.json file. Apart from this approach of providing the id of the parent element, you can also use class of the parent element or can even directly supply CSS selector for the parent element.

Note: It is recommended to use the id or CSS selector approach as class approach can lead to insertion of custom component at multiple places because class is not unique.

Specify the order of the custom component inside parent component

As explained above, specifying parent component in either of the approach always inserts a custom component as the last child of the parent component. But now, you can specify the position of custom component among the child elements of the parent component. For that we have introduced a new option called “childPosition” just below the “parentComponentName” option inside the CustomAnalystModuleConfig.json file.

	{
	"parentComponentName": "LegendContainer",
	“childPosition” : 1 
	}			

In the above childPosition is 1 which means the custom component when injected inside Spectrum Spatial Analyst, will be positioned as the first child element of LegendContainer. Similarly, if specified as 2, it will be positioned as the second child element and so on.

Spectrum Spatial Analyst allows you to add custom components. You can develop your extensions as custom components and add them where they are needed in the application. To do so, you need to register your extensions in the CustomAnalystModuleConfig.json file. You can find this file at: <Analyst_install_directory>\Program Files\Precisely\SpectrumSpatialAnalyst \customerconfigurations\analyst\CustomAnalystModuleConfig.json. After registering your custom components, when Spectrum Spatial Analyst reloads, it will load the extensible components as per the configurations in the json file.

In the CustomAnalystModuleConfig.json file, you need to specify the following information:

  • path of the extensions
  • the map project to which you want to associate your extension with, and
  • the injection point such as add panel, left panel, or Legend where you want to insert the component

This feature enables you to add the component anywhere. Moreover, this feature will not disrupt any existing custom component because it is backward compatible. Therefore, any existing custom component will continue to work as expected.

For a list of parent components, see Extension points.