Audience: Developers, System integrators
This topic provides an overview of the extension points NextGen Geo exposes to the code a partner deploys alongside it.
Available starting from NextGen Geo 5.0.0
Understand extension points
NextGen Geo is extended without modifying the standard product. Custom code is loaded alongside the application and communicates with it through events: it listens for what the application announces, and it announces back what it wants the application to display or to do. Because the core is never modified, an upgrade does not require re-applying custom changes.
Every event is fired and listened to on the single application instance, GeoWeb.instance:
// listen to what the application announces
GeoWeb.instance.on('fieldExecution->workOrderSelected', function (moduleName, workOrderCode) {
// ...
});
// tell the application what to display
GeoWeb.instance.fireEvent('fieldExecution->registerButtons', config);
Events are named after the area they belong to, with the area and the event separated by an arrow, for example fieldExecution->workOrderSelected.
Note: A configuration event is consumed when it is fired, so the custom code has to fire it while the target module is open — typically in response to the event that announces the module or the record has been opened.
Note: Every configuration event accepts an optional moduleName. When it carries one, the configuration is applied only to the module instance of that name; when it is left out, it is applied to every instance of that module type.
What's next
-
To add buttons, tabs, and custom behaviour to the Field Execution module, see Extend the Field Execution module.
-
To add spatial operations and layers to GeoSmartOperation, see Extend GeoSmartOperation.