POST
|
Neither bug report has been resolved. I worked around it by putting the widget pool widget I wanted to open at startup as the first widget in the widget pool. Later, I stopped using the openAtStart config parameter in favor of a widget I wrote that is an onScreen widget and can open as may widgets at startup as I want.
... View more
02-19-2015
07:13 AM
|
0
|
2
|
2838
|
POST
|
AJ, If I remember correctly, to start an inPanel widget, you only need to start the panel. See my _GetPanel function. More details on exactly what you are trying to do and what is going wrong would be helpful. Larry
... View more
02-06-2015
11:02 AM
|
0
|
0
|
1554
|
POST
|
I have a batch file that checks port 3344 to see if all of the listeners have been released. Sometimes it takes a minute or two after you stop node.js. The batch file has one line: cmd /K "netstat -aon | findstr "3344"" Larry
... View more
01-23-2015
08:43 AM
|
0
|
0
|
1089
|
POST
|
Last time I tried the publishData and fetchData functions, they didn't work. You can use the Dojo topic.publish and topic.subscribe classes instead, I've had no problem using them for inter-widget communications. Larry
... View more
01-22-2015
03:06 PM
|
1
|
5
|
1425
|
POST
|
I make my app and then edit the code in the <web app builder>\server\apps\<app name> folder. All I need to do to see edits is refresh the browser. Once I'm happy with my changes, I shut down the node.js server and copy the widget and/or other files to the <web app builder>\client\stemapp folder. There may be some good reason to do it another way, but I've been doing it this way since Beta 1 last April, and have never had a problem with it. Larry
... View more
01-22-2015
03:01 PM
|
4
|
3
|
3761
|
POST
|
Mark, You might want to look at my response in this thread: https://community.esri.com/thread/114900 Larry
... View more
01-22-2015
02:54 PM
|
0
|
0
|
654
|
POST
|
Here are some functions I have written to programatically open widgets: // For widgets not in a panel that are not loaded at startup, load and return the widget.
_getWidget: function(widgetCfg, start) {
var def = new Deferred();
var widget;
if (widgetCfg) {
// Try getting the widget
widget = registry.byId(widgetCfg.id);
if (widget) {
def.resolve(widget);
} else {
this.widgetManager.loadWidget(widgetCfg).then(function(widget) {
if (start) {
widget.startup();
}
def.resolve(widget);
});
}
} else {
def.resolve(undefined);
}
return def;
}, _getWidget(widgetCfg, start) will return a widget for widgets not in panels. An example of widgetCfg is WidgetManager.getInstance().appConfig.widgetOnScreen.widgets[4]. If start is true, the widget will be started. // For in panel widgets that are not loaded at startup, load and return the widget.
_getPanel: function(widgetCfg, start) {
var def = new Deferred();
var panel;
if (widgetCfg) {
// Try getting the panel for this widget
panel = registry.byId(widgetCfg.id + '_panel');
if (panel) {
def.resolve(panel);
} else {
this.panelManager.showPanel(widgetCfg).then(function(panel) {
if (start) {
panel.startup();
}
def.resolve(panel);
});
}
} else {
def.resolve(undefined);
}
return def;
}, _getPanel(widgetCfg, start) will return a panel (which contains the widget) for widgets in panels. An example of widgetCfg is WidgetManager.getInstance().appConfig.widgetOnScreen.widgets[4]. If start is true, the widget will be started. // For widgets that are loaded at startup, return the widget when it is available.
// Recursive Deferred from http://developer.the-hideout.de/?p=125
_getWidgetWhenLoaded: function(id, wait, count) {
var def = new Deferred();
var widget = registry.byId(id);
if (widget || count === 0) {
def.resolve(widget);
return def.promise;
}
setTimeout(lang.hitch(this, function() {
this._getWidgetWhenLoaded(id, wait, count - 1).then(function(widget) {
def.resolve(widget);
});
}), wait);
return def;
}, __getWidgetWhenLoaded(id, wait, count) will return a widget that is autoloaded as soon as it is available. id is the widget id (e.g. WidgetManager.getInstance().appConfig.widgetOnScreen.widgets[4].id), wait is the milliseconds to wait between each attempt, and count is the number of times to try. If wait is 100 and count is 10, it will try to get the widget every 100 milliseconds for a maximum of 1 second. I am using these functions to retrieve and/or start the Attribute Table, Basemap Gallery, Coordinate, Geocoder, LayerList, and Scalebar widgets along with a couple of custom widgets I have written. Larry
... View more
01-22-2015
02:50 PM
|
0
|
0
|
1554
|
POST
|
You must have a WebMap defined in Portal or AGOL, but you don't need to move or copy the data that is on your own server. This app uses that model: http://gis.hamiltoncounty.in.gov/mapviewer/index.html. I have developed a way to intercept the WebMap definition and remove layers that are inaccessible to the user (on a non-public server) or that are secured on a public server. Larry
... View more
01-16-2015
10:20 AM
|
1
|
10
|
740
|
POST
|
Alex, In Beta 3, this file was in this path: <beta3 folder>\client\stemapp\sample-configs. It seems to have disappeared in Version 1.1. You should be able to use a copy of the config.json file: <version 1.1 folder>\client\stemapp\config.json. Larry
... View more
01-16-2015
09:59 AM
|
1
|
0
|
944
|
POST
|
Simon, I've been building custom widgets starting with Beta 1 in April. I have been moving the widgets over to the Beta 2, Beta 3, and 1.1 versions without much difficulty. For several widgets, it took about a week to port from Beta 1 to Beta 2, about 3 weeks from Beta 2 to Beta 3, and about one day from Beta 3 to Version 1.1. The only reason it took so long to port from Beta 2 to Beta 3 was that in Beta 2 I wasn't using a Web Map and in Beta 3, Esri commented out the code I was depending on. Now I'm using a Web Map, but it seems so silly to point to Esri's server just so I can point to all of the services that are published on my server. Oh well. Hope this helps. Larry
... View more
01-16-2015
09:45 AM
|
0
|
0
|
344
|
POST
|
There is a configurable JavaScript Viewer here: https://github.com/cmv/cmv-app It has lots of contributors and is seeing quite a bit of activity. Larry
... View more
11-25-2014
12:13 PM
|
1
|
0
|
1047
|
POST
|
It looks like Esri has commented out the code that read the basemap and operational layers from the main config.json file in Beta 3. The BasemapGallery Widget will still take basemaps defined in its config.json file, but I'm thinking that will surely change soon. I guess we'll have to get used to using AGOL or Portal for our web map definitions.
... View more
10-31-2014
06:56 AM
|
1
|
7
|
817
|
POST
|
It's buried, but openAtStart is documented in two places in Beta2: <beta 2 folder>\client\stemapp\config-readme.text file:///<beta2 folder>/docs/index.html#/Open_a_widget_at_app_start/03w300000003000000/
... View more
10-09-2014
11:07 AM
|
1
|
0
|
637
|
POST
|
For widgets in the Widget Pool, there is a bug with the openAtStart behavior. I logged it as WebApp-001095 and a few hours ago someone else logged it as WebApp-001126. You can see them here.
... View more
10-02-2014
10:53 AM
|
0
|
4
|
2838
|
POST
|
I answered my own question, but Robert gets all the credit. Here is the config file I am using for the BasemapGallery Widget: { "basemapGallery": { "showArcGISBasemaps": false, "basemaps": [{ "layers": [{ "url": "http://ags1.hamiltoncounty.in.gov/arcgis/rest/services/Street_Base/MapServer" }], "title": "Streets", "thumbnailUrl": "images/streets.jpg" }, { "layers": [{ "url": "http://ags1.hamiltoncounty.in.gov/arcgis/rest/services/ImageServices/Hamilton_2014/ImageServer" }], "title": "2014 Orthos", "thumbnailUrl": "images/imagery.jpg" }, { "layers": [{ "url": "http://ags1.hamiltoncounty.in.gov/arcgis/rest/services/ImageServices/Hamilton_2013/ImageServer" }], "title": "2013 Orthos", "thumbnailUrl": "images/imagery.jpg" }] } } And here is the "map" section of the main config.json for the application: "map": { "3D": false, "2D": true, "position": { "left": 0, "top": 40, "right": 0, "bottom": 0 }, "mapOptions": {}, "id": "map", "basemaps": [{ "label": "Streets", "url": "http://ags1.hamiltoncounty.in.gov/arcgis/rest/services/Street_Base/MapServer", "type": "tiled", "visible":true, "alpha":"1", "icon":"images/app-logo.png" }], "operationallayers": [{ "label": "Parcels (REST)", "url": "http://ags1.hamiltoncounty.in.gov/arcgis/rest/services/Parcels/MapServer/0", "type": "feature", "visible":true, "alpha":"1", "icon":"images/app-logo.png" } , { "label": "Buildings (REST)", "url": "http://ags1.hamiltoncounty.in.gov/arcgis/rest/services/Buildings/MapServer", "type": "tiled", "visible":true, "alpha":"1", "icon":"images/app-logo.png" }] }, All is well in Hamilton County now.
... View more
08-18-2014
01:50 PM
|
0
|
0
|
156
|
Title | Kudos | Posted |
---|---|---|
1 | 08-03-2015 07:45 AM | |
1 | 08-06-2015 05:32 PM | |
1 | 08-11-2015 06:08 PM | |
1 | 06-09-2015 06:58 PM | |
1 | 01-22-2015 03:06 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|