The Web AppBuilder is a pure dojo, and Node.js application to build webmap applications by analyst that are not developers. However there is also a developer version where you can extend or build your own custom widgets.
In the Esri example: https://developers.arcgis.com/web-appbuilder/guide/create-a-feature-action-in-your-widget.htm they provide a code snippet but I'm a bit discombabulated. I can see dojo/_base/declare
in the define module, but the jimu/BaseFeatureAction
,
jimu/WidgetManager
, what js library it is? What is jimu.js
and where can I find more information on it?
define([
'dojo/_base/declare',
'jimu/BaseFeatureAction',
'jimu/WidgetManager'
], function(declare, BaseFeatureAction, WidgetManager){
var clazz = declare(BaseFeatureAction, {
iconFormat: 'png',
isFeatureSupported: function(featureSet){
return featureSet.features.length > 0 && featureSet.features[0].geometry.type !== 'point';
},
onExecute: function(featureSet){
WidgetManager.getInstance().triggerWidgetOpen(this.widgetId)
.then(function(myWidget) {
var vertexCount = 0;
featureSet.features.forEach(function(f){
f.geometry.rings.forEach(function(r){
vertexCount += r.length;
});
});
myWidget.showVertexCount(vertexCount);
});
}
});
return clazz;
});