|
POST
|
I am trying to assign a title to a tab from the nls.strings, however I get this error. The only way is to assign the title is by using the widget.js? Thanks. HTML: <div data-dojo-type="dijit/layout/TabContainer" style=" height: 700px; width: 630px; " > <div data-dojo-type="dijit/layout/ContentPane" title=${nls.subjectA} > nls.strings.js define({
root: ({
subjectA: "Subject A",
-------
--------
... View more
05-10-2017
02:47 PM
|
0
|
16
|
4513
|
|
DOC
|
I could swear that that I searched for them before I coded them in. Thank you.
... View more
04-20-2017
12:58 PM
|
0
|
0
|
16507
|
|
DOC
|
Great Widget. I am trying to perform some tasks when it closes, so I use the onClose function. However, the function is not called when I close the widget. I am using the foldable theme. Ideas? Thanks.
... View more
04-19-2017
08:16 PM
|
0
|
0
|
16507
|
|
POST
|
According to the "Controller widget" post posted at Controller widget—Web AppBuilder for ArcGIS | ArcGIS, developers cannot define custom group widget icons. "Tip: If you want to change a group widget name, go back to the group widget and click the samll edit icon to change it. The group widget icon however cannot be changed currently." However, this is not accurate. There are two ways to define your own icon for a group widget. I tried both ways in the Lauchpad and foldable themes with success. The easier way is to edit the app config and simply define the image to be used for the group widget. Just add line 4 below. "groups": [
{
"label": "Layers Info",
"icon":"images/tools.png",
"widgets": [
{
"uri": "widgets/Legend/Widget",
"version": "2.4",
"id": "widgets_Legend_Widget_17",
"name": "Legend",
"index": 2
}, Or you can modify the ConfigManager.js that resides under app#\jimu.js and add the else conditions at line 19 for as many group icons you may want to use. _addDefaultOfWidgetGroup: function(config){
//group/widget labe, icon
jimuUtils.visitElement(config, lang.hitch(this, function(e, info){
e.isOnScreen = info.isOnScreen;
if(e.widgets){
//it's group
e.gid = e.id;
if(e.widgets.length === 1){
if(!e.label){
e.label = e.widgets[0].label? e.widgets[0].label: 'Group';
}
if(!e.icon){
if(e.widgets[0].uri){
e.icon = this._getDefaultIconFromUri(e.widgets[0].uri);
}else{
e.icon = 'jimu.js/images/group_icon.png';
}
}
}else{
if (e.label === "my group"){
e.icon = 'jimu.js/images/mylogo.png';
} else if (e.label === "my group1") {
e.icon = 'jimu.js/images/mylogo1.png';
}
//add as many custom groups icons you wish....
else {
e.icon = e.icon? e.icon: 'jimu.js/images/group_icon.png';
e.label = e.label? e.label: 'Group_' + info.index;
}
}
}else{
e.gid = info.groupId;
}
}));
},
... View more
04-18-2017
03:46 PM
|
1
|
0
|
750
|
|
POST
|
Robert, I am trying to accomplish similar task with the foldable theme. Move the header 50px so I can place a div above it. However what ever I tried, including a fixed div, the header is not moving. thanks.
... View more
04-11-2017
02:46 PM
|
0
|
2
|
717
|
|
POST
|
You can change the icon of groups by adding the code after line 20. _addDefaultOfWidgetGroup: function(config){
//group/widget labe, icon
jimuUtils.visitElement(config, lang.hitch(this, function(e, info){
e.isOnScreen = info.isOnScreen;
if(e.widgets){
//it's group
e.gid = e.id;
if(e.widgets.length === 1){
if(!e.label){
e.label = e.widgets[0].label? e.widgets[0].label: 'Group';
}
if(!e.icon){
if(e.widgets[0].uri){
e.icon = this._getDefaultIconFromUri(e.widgets[0].uri);
}else{
e.icon = 'jimu.js/images/group_icon.png';
}
}
}else{
if (e.label === "my group"){
e.icon = 'jimu.js/images/mylogo.png';
} else if (e.label === "my group1") {
e.icon = 'jimu.js/images/mylogo1.png';
}
//add as many custom groups icons you wish....
else {
e.icon = e.icon? e.icon: 'jimu.js/images/group_icon.png';
e.label = e.label? e.label: 'Group_' + info.index;
}
}
}else{
e.gid = info.groupId;
}
}));
},
... View more
04-06-2017
09:49 AM
|
2
|
0
|
1950
|
|
DOC
|
When you add a layer, the layerlist is updated but it post the layer name with its parent directory in the map service. The widget LocalLayer widget has a similar issue that it can be resolved with a modification in the LayerInfos.js. The same solution does not resolve the issue in Add Layer. Thanks. UPDATE: For those of you who would like to show just the name of the layer without the service name, in the folder: (app)\jimu.js\LayerInfos\LayerInfos.js under the _getLayerTitle function: comment out line 2 and add line 3. if (title) {
//title = serviceName + " - " + title;
title=title;
} else {
title = serviceName;
}
... View more
03-23-2017
03:55 PM
|
2
|
0
|
9786
|
|
POST
|
The drawn buffers on the map are graphicslayers. Just in the onclose() function remove them like any other layers map.removeLayer(GraphicsLayer)
... View more
03-22-2017
07:46 PM
|
2
|
1
|
1537
|
|
POST
|
Thanks. Yes you are right, I was clearly confused. I tried your latest recommendation and still didn't work. However, I found this response by you to another question. https://community.esri.com/thread/175677 In widget B, I placed the map event listener for layers additions/removals and refresh the array for the select dropdown. It does work. Thank you.
... View more
03-22-2017
11:02 AM
|
0
|
0
|
1266
|
|
POST
|
Are there any info on the LayerInfos.getInstanceSync for its use? ESRI documentation is very vague. I tried as you suggested but I get layerInfos(...).then is not a function var layerInfos = LayerInfos.getInstanceSync(); l ayerInfos(this.map, ....
... View more
03-22-2017
09:55 AM
|
0
|
2
|
1266
|
|
POST
|
I have a widget A that adds layers on the map. Then, it calls widget B which opens with: getallLAyers:function(){
LayerInfos.getInstance(this.map, this.map.itemInfo).then(lang.hitch(this, function (layerInfosObject) {
layerInfosObject.getLayerInfoArray().forEach(lang.hitch(this, function(layerInfo,index){
if (layerInfo.getUrl() != null){
option = {
value: index,
label: layerInfo.title,
myurl: layerInfo.getUrl()
};
console.log(option.myurl);
this.resultLayers.push(option);
}
}));
}));
}, and the resultLayers array populates a select dropdown. If widget A adds another layer on the map, even if widget A closes and reopens widget B, the widget B does not update the entries of the select with the new layers. Ideas? Thank you.
... View more
03-21-2017
08:55 PM
|
0
|
4
|
1644
|
|
POST
|
Thank you. Sometimes the answer is staring at you... I got a bizarre behavior. Instead of closing the widget, it empties the content of all UI components!! ???
... View more
03-21-2017
07:51 PM
|
0
|
0
|
2329
|
|
POST
|
Robert I am trying to use this script to check if a widget is open and it is then to close it. But I run into problems. The error is: Uncaught TypeError: Cannot read property 'style' of null I don't know why I get this since I trying to close the widget only if it is open. AM I missing something? Also, the script check if it is visible. Is that means just visible on the screen or open? Thank you. var isActive = false;
array.some(this.appConfig.widgetOnScreen.widgets, function(wc){
if(wc.name === 'BufferSelection'){
if(wc.visible){
isActive = true;
WidgetManager.getInstance().closeWidget([0])
}
return true;
}
});
... View more
03-21-2017
05:52 PM
|
0
|
2
|
2329
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-09-2026 12:44 PM | |
| 1 | 06-08-2026 12:12 PM | |
| 1 | 06-19-2025 10:13 PM | |
| 3 | 02-06-2026 10:44 AM | |
| 1 | 01-08-2026 12:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|