POST
|
Robert, I added 'jimu/dijit/Message' to the splash widget's define and Message to the argument list. Where/How do I override the empty message string in Message.js? William
... View more
06-17-2016
01:09 PM
|
0
|
0
|
1121
|
POST
|
Hi Robert, Would I include this in the define section of my widget? Is there any more documentation on this other than what is in the Message.js file itself? Also, can an off-panel widget be added to the headerController, and if not, where? Thanks, William
... View more
06-17-2016
12:23 PM
|
0
|
2
|
1121
|
POST
|
I would like to show additional information after the user agrees to the terms & conditions on the splash screen. What ESRI or DOJO class (a dijit/Dialog perhaps?) should I use to display this information as an off-panel widget and how would I have it display automatically upon the close of the splash screen? Any help is much appreciated.
... View more
06-17-2016
10:45 AM
|
0
|
22
|
6315
|
POST
|
Hi Robert, In the current release of Web App Builder 2.0.1, is it possible to do away with the ArcGIS Online pass-through? William
... View more
06-08-2016
11:46 AM
|
0
|
1
|
656
|
POST
|
Tim, I guess I didn't need to add the following to postCreate. domClass.add(this.scaleInfo, "coordinate-background");
this.own(on(this.map, "extent-change", lang.hitch(this, this.onExtentChange))); What CSS class do I reference for styling? Before I had used ".jimu-widget-header-controller .coordinate-scale jimu-float-leading". Thanks for your help. William
... View more
06-07-2016
09:00 AM
|
0
|
2
|
664
|
POST
|
Hi Tim, I'm using Microsoft Visual Studio 2010 as my main text editor. When I add a breakpoint and debug, I get a directory list for the project. I know Visual Studio isn't ideal for javascript, but that's what I have right now. Are there any free applications you recommend for working with Web AppBuilder? I'm also trying to debug in different browsers (IE, Firefox & Chrome). Right now I'm getting a few errors, but none of them seem related to the HeaderController Widget.js. William
... View more
06-07-2016
08:01 AM
|
0
|
11
|
664
|
POST
|
Hi Tim, I don't get any error messages. How and where would I call the extent-change? Would I use something like this this.onExtentChange.startup(); in postCreate or startup? Thanks, William
... View more
06-07-2016
06:14 AM
|
0
|
13
|
664
|
POST
|
Hi Tim, I have the scale in the header-controller widget, but it does not change with the map. It gets the initial scale of 1:180,000, but is static after startup. Below is what the postCreate and startup functions look like: postCreate: function() {
this.inherited(arguments);
this._processGroupSetting();
this.switchableElements.title = this.titleNode;
this.switchableElements.links = this.linksNode;
this.switchableElements.subtitle = this.subtitleNode;
domClass.add(this.scaleInfo, "coordinate-background"); //I'm not sure what to reference here
this.own(on(this.map, "extent-change", lang.hitch(this, this.onExtentChange)));//added for scale
if (this.position && this.position.height) {
this.height = this.position.height;
}
// if (!this.appConfig.portalUrl) {
html.setStyle(this.signInSectionNode, 'display', 'none');
// } else {
// html.setStyle(this.signInSectionNode, 'display', '');
// }
if (this.appConfig && this.appConfig.logo) {
this.logoNode.src = this.appConfig.logo;
html.removeClass(this.logoNode, 'hide-logo');
} else {
this.logoNode.src = "";
html.addClass(this.logoNode, 'hide-logo');
}
this.switchableElements.title.innerHTML =
utils.sanitizeHTML(this.appConfig.title ? this.appConfig.title : '');
this.switchableElements.subtitle.innerHTML =
utils.sanitizeHTML(this.appConfig.subtitle ? this.appConfig.subtitle : '');
this._createDynamicLinks(this.appConfig.links);
this._setElementsSize();
this.own(on(this.domNode, mouse.enter, lang.hitch(this, function() {
var title = '';
var portalUrl = this.appConfig && this.appConfig.portalUrl || '';
var server = portalUrlUtils.getServerByUrl(portalUrl);
if (portalUrlUtils.isArcGIScom(server)) {
server = 'ArcGIS.com';
}
if (server) {
title = this.nls.signInTo + ' ' + server;
}
this.signinLinkNode.title = title;
})));
},
startup: function() {
this.inherited(arguments);
var MyMap = this.map; //start of addition for scale
var MyScaleWindow = this.scaleInfo.innerHTML;
var MyScaleTest = this.scaleInfo;
var scale = esri.geometry.getScale(MyMap);
var myNumber = dojoNumber.format(scale, {
places: 0
});
htmlSet.set(MyScaleTest, "Scale: 1 : " + myNumber);
this.map.on("extent-change", getmyscale);
function getmyscale() {
var scale = esri.geometry.getScale(MyMap);
var myNumber = dojoNumber.format(scale, {
places: 0
});
htmlSet.set(MyScaleTest, ", Scale: 1 : " + myNumber);
console.log("Got it");
}; //end of addition for scale
this.resize();
// this.timeoutHandle = setTimeout(lang.hitch(this, this.resize), 100);
}, Any help would be appreciated, even if it's to tell me the scale cannot go in the header-controller widget. Thanks. William
... View more
06-02-2016
06:18 AM
|
0
|
15
|
664
|
POST
|
Hi Tim, Is there a way to add the scale to the HeaderController bar/widget? Not the coordinates, just the scale (Scale: 1:180,000). I think I found most of the code you added to the coordinate widget (below), but I'm not quite sure how to implement it, or if it will work from the HeaderController widget. HTML <div data-dojo-attach-point="scaleInfo" class="coordinate-scale jimu-float-leading"> Your scale </div> CSS .jimu-widget-coordinate #scaleInfo{
display: inline;
}
/*needed*/
.jimu-widget-coordinate .coordinate-background{
line-height: 17px;
overflow: hidden;
font-size: 10px;
color: #fff;
background-color: rgb(0,0,0);/*for ie8*/
background-color: rgba(0,0,0,0.5);
} JavaScript //added to define
"dojo/html",
'dojo/number',
//added to function
htmlSet,
dojoNumber,
//added to startup
var MyMap = this.map;
var MyScaleWindow = this.scaleInfo.innerHTML;
var MyScaleTest = this.scaleInfo;
var scale = esri.geometry.getScale(MyMap);
var myNumber = dojoNumber.format(scale, {
places: 0});
htmlSet.set(MyScaleTest, ", Scale: 1 : " + myNumber);
this.map.on("extent-change", getmyscale);
function getmyscale(){
var scale = esri.geometry.getScale(MyMap);
var myNumber = dojoNumber.format(scale, {
places: 0});
htmlSet.set(MyScaleTest, ", Scale: 1 : " + myNumber);
console.log("Got it");
}; If I were to add the above code to the HeaderController widget, it looks like I'd need to also include the following CSS .jimu-widget-coordinate .coordinate-background{
line-height: 17px;
overflow: hidden;
font-size: 10px;
color: #fff;
background-color: rgb(0,0,0);/*for ie8*/
background-color: rgba(0,0,0,0.5);
} JavaScript //needed for define
"dojo/dom-class",
//needed for function
domClass,
//needed for postCreate
domClass.add(this.coordinateBackground, "coordinate-background"); //I'm not sure what to reference here
this.own(on(this.map, "extent-change", lang.hitch(this, this.onExtentChange))); Thanks for any help you can provide. William
... View more
06-01-2016
08:34 AM
|
0
|
0
|
1213
|
POST
|
Hi Seth, I found the following thread with the same problem, and a reply with code to fix it. https://community.esri.com/thread/175043#comment-607459 It worked for me. Thanks for your help. Bill
... View more
05-27-2016
12:58 PM
|
1
|
0
|
1164
|
POST
|
Thank you Robert. How do I create a new array? Would this work:
selectedAttrs = new array(aliasAttrs[2],aliasAttrs[10],aliasAttrs[13],aliasAttrs[14],aliasAttrs[15],aliasAttrs[21],aliasAttrs[24],aliasAttrs[38],aliasAttrs[39]);
... View more
05-25-2016
12:32 PM
|
0
|
0
|
900
|
POST
|
I tried using the following code to create an array with only specific fields. var selectedAttrs = {}; selectedAttrs.push(selectedAttrs[2]); selectedAttrs.push(selectedAttrs[10]); selectedAttrs.push(selectedAttrs[13]); ... I also replaced this (lines 396-403): for (var p in aliasAttrs) { if (aliasAttrs.hasOwnProperty(p)) { content += '<tr valign="top">' + '<td class="attrName">' + p + '</td>' + '<td class="attrValue">' + aliasAttrs + '</td>' + '</tr>'; } } with this: for (var p in selectedAttrs) { if (selectedAttrs.hasOwnProperty(p)) { content += '<tr valign="top">' + '<td class="attrName">' + p + '</td>' + '<td class="attrValue">' + selectedAttrs + '</td>' + '</tr>'; } } It did not work. Any thoughts? Also, how do you format code to look like code?
... View more
05-25-2016
11:55 AM
|
0
|
2
|
2871
|
POST
|
Hi Robert, Would it be possible to code which fields are displayed in the pop-up by creating a separate array from the aliasAttrs array that contains the aliasAttrs indexes of the fields you want to include? (widgets/Search/Widget.js, _formatContent, line 378) Thanks for any help you can provide. William
... View more
05-25-2016
11:03 AM
|
0
|
4
|
2871
|
Title | Kudos | Posted |
---|---|---|
1 | 11-08-2016 10:16 AM | |
1 | 12-08-2016 08:44 AM | |
1 | 12-28-2016 08:09 AM | |
1 | 12-29-2016 12:38 PM | |
1 | 11-28-2016 08:34 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|