Hello,
I am having some trouble with the Draw/eDraw widgets. I added some custom images (rough details below):
Everything works perfectly in the WAB. Once I export this app from the WAB, toss it into wwwroot, and register it in portal, the Draw/eDraw widget reverts back to esri defaults...
All of my apps and customizations (including Draw/eDraw) are there and work correctly. But when I click on "point" within the Draw/eDraw widget, the drop-down contains all the esri default items.
Has anyone experienced this or have a solution?
Solved! Go to Solution.
I've been able to get this working. Disclaimer: Likely not the most elegant solution.
After some testing, the problem was clearly that once published, the Draw app was pulling the list for points from an outside source. I had hoped that setting isOnline to false would work, but it had no effect.
What I ended up doing was commenting out a block of code in the SymbolChooser.js that was calling this outside list. See below:
if(!this._symbolTypes){
// // fetch symbol types from portal
// this._initPortal()
//Added this line:
this._offLineGetSymbols(fileName);
// .then(lang.hitch(this, this._fetchSymbolTypes))
// .then(lang.hitch(this, function(types){
// if(!this.domNode){
// return;
// }
// // create options
// this._clearOptions();
// this._createOptions(types);
// // fetch symbols from portal
// this._handleGetPointSymbols(lang.hitch(this, this._getPortalSymbolsByType), fileName);
// }), lang.hitch(this, function(err){
// if(!this.domNode){
// return;
// }
// if(window.isXT){
// this._offLineGetSymbols(fileName);
// }else{
// this.loadingShelter.hide();
// console.error('Fetching symbols failed', err);
// }
// }));
}else{
// // fetch symbols from portal
this._handleGetPointSymbols(lang.hitch(this, this._getPortalSymbolsByType), fileName);
}
},
I've been able to get this working. Disclaimer: Likely not the most elegant solution.
After some testing, the problem was clearly that once published, the Draw app was pulling the list for points from an outside source. I had hoped that setting isOnline to false would work, but it had no effect.
What I ended up doing was commenting out a block of code in the SymbolChooser.js that was calling this outside list. See below:
if(!this._symbolTypes){
// // fetch symbol types from portal
// this._initPortal()
//Added this line:
this._offLineGetSymbols(fileName);
// .then(lang.hitch(this, this._fetchSymbolTypes))
// .then(lang.hitch(this, function(types){
// if(!this.domNode){
// return;
// }
// // create options
// this._clearOptions();
// this._createOptions(types);
// // fetch symbols from portal
// this._handleGetPointSymbols(lang.hitch(this, this._getPortalSymbolsByType), fileName);
// }), lang.hitch(this, function(err){
// if(!this.domNode){
// return;
// }
// if(window.isXT){
// this._offLineGetSymbols(fileName);
// }else{
// this.loadingShelter.hide();
// console.error('Fetching symbols failed', err);
// }
// }));
}else{
// // fetch symbols from portal
this._handleGetPointSymbols(lang.hitch(this, this._getPortalSymbolsByType), fileName);
}
},