|
POST
|
The preferred solution would be to get the API and host it yourself if possible and then make those tweaks...see the bottom of: Get the ArcGIS API for JavaScript | Guide | ArcGIS API for JavaScript If that's not an option, a less elegant solution would be to add "esri/dijit/Legend" to your require list. Then, right before your line: var llWidget = new LayerList( you could put Legend.prototype._legendRequestServer = function(a) { //all the same code as the original _legendRequestServer function //except with the tweaks mentioned in the other thread } and also Legend.prototype._buildRow_Tools = function(a, b, c, d, e) { //all the same code as the original _buildRow_Tools function //except with the tweaks mentioned in the other thread } You can get the original code for the legend class by downloading https://js.arcgis.com/3.16/esri/dijit/Legend.js
... View more
05-23-2016
05:57 AM
|
1
|
8
|
2183
|
|
POST
|
The Legend dijit is known to hiccup on layers having ?token= in their URL under some circumstances. If you use your browser's developer tools to monitor the network traffic, particularly for the legend request, and notice that "?token=" appears twice in the URL, there is a known workaround. If you have a locally hosted version of the API, you can tweak the esri/dijit/legend.js file to get around this issue. I discussed this in a separate thread at: https://community.esri.com/thread/122680#comment-463137 Note that I wrote that up for version 3.12...if you have a different version of the API, the variable names could be different.
... View more
05-20-2016
10:02 AM
|
1
|
10
|
2183
|
|
POST
|
No, I would only do that if there was no way around a bug. More than once, I have reported bugs to ESRI the official way, along with how to fix them, but in vain. I'm not willing to do that anymore. My purpose here is to keep other developers who run into these problems informed that (1) the problems do exist, (2) it's not their fault, and (3) there are known workarounds.
... View more
04-08-2016
08:30 AM
|
2
|
0
|
2097
|
|
POST
|
ESRI did not fix this bug in version 3.16 of the ArcGIS API for JavaScript.
... View more
04-08-2016
08:00 AM
|
0
|
4
|
1292
|
|
POST
|
ESRI did not fix this bug in version 3.16 of the ArcGIS API for JavaScript.
... View more
04-08-2016
07:59 AM
|
0
|
2
|
2097
|
|
POST
|
ESRI did not fix this bug in version 3.16 of the ArcGIS API for JavaScript.
... View more
04-08-2016
07:58 AM
|
1
|
0
|
2640
|
|
POST
|
What you are doing (aside from the aforementioned typo) is correct...so it may be a problem with the ID value you're passing. If you're using ASP.NET or something similar, an ID you assign can be transformed with an added prefix. In place of the line you have, try this below. It'll let know what the actual ID is if this is the case. If you get the "element not found" alert, then it couldn't find the checkbox at all, which is a different problem altogether... var inputs = document.getElementsByTagName("INPUT");
var found = false;
var input;
for (var x = 0; x < inputs.length; x++) {
input = inputs ;
if ((input.type) && (input.type.toLowerCase() == "check") && (input.id.indexOf("slrbxC") >= 0)) {
input.checked = false;
alert("Set...id = [" + input.id + "]");
found = true;
break;
}
}
if (!found)
alert("element not found...");
... View more
02-17-2016
10:28 AM
|
1
|
0
|
10088
|
|
POST
|
Just for posterity, this was fixed in 3.13. ESRI made no mention of it that I know of.
... View more
01-22-2016
11:35 AM
|
0
|
0
|
635
|
|
POST
|
This is still a problem in 3.15, although the scope has probably never been as wide as I initially reported (i.e. "any instances"). The problem only manifests if supplying "resourceInfo" to the constructor, and the "serviceMode" is "RESTful" (which is the default value if not specified). The fix is nonetheless the same...the instantiation of _formatDictionary should be moved higher up in the constructor...it could even be the first line if desired. This is because the call stack of the constructor can reach the _getTileUrlTemplate function (by way of _parseResourceInfo), where the _formatDictionary is referenced, which in turn throws an error about using an undefined reference.
... View more
01-22-2016
10:23 AM
|
0
|
5
|
1292
|
|
POST
|
This is because you're pushing strings into your array, and not your layers as desired. Instead of orthoArray.push('swipeLayerOrthos2015', 'swipeLayerOrthos2014', 'swipeLayerOrthos2014RB'); you should use orthoArray.push(swipeLayerOrthos2015, swipeLayerOrthos2014, swipeLayerOrthos2014RB);
... View more
01-20-2016
11:33 AM
|
1
|
1
|
1192
|
|
POST
|
This was fixed in 3.15, eliminating the need for a workaround. In their "What's new in Version 3.15" document, notice the entry: BUG-000088231: Fixed an issue when using map.setExtent's fit option did not work as expected. Although the link below will probably only work as long as 3.15 is the current version, see also: What's new in Version 3.15 | Guide | ArcGIS API for JavaScript
... View more
01-14-2016
10:58 AM
|
0
|
0
|
1054
|
|
POST
|
This still hasn't been fixed in 3.15. I've attached a document illustrating what's happening. It is this line in the _coremap module that's causing the problem: if (!b || Math.abs(c.origin[0] - b.origin.x) > c.dx) this.wrapAround180 = !1; The comparison between origin values of WGS 84 and Web Mercator results in wrapAround180 being forced to false.
... View more
01-14-2016
10:03 AM
|
0
|
3
|
2097
|
|
POST
|
The stack trace is hard to interpret, but it could possibly show the call to hide being in the same call stack as the call to show. It may be necessary to show some of the additional code involving this dialog, so we can see its full life cycle. Since the dialog cannot be closed by the user, it appears that it must be closed automatically. What triggers the dialog to close (e.g. a window.setTimeout, etc)? If the call to open and hide are too close together (i.e. the call to hide finishes before the call to show finishes), there may be a synchronization issue going on.
... View more
01-07-2016
10:38 AM
|
1
|
0
|
1920
|
|
POST
|
I too have had the same issue, which has been occurring since geometryEngine's introduction in 3.13. I hadn't noticed (and therefore can't verify) the try/catch issue since my code doesn't have any of those clauses around this operation. My code executes the combine operation inside of a callback from a QueryTask, so there's probably a try/catch somewhere up the call stack in the JavaScript API. Since I'm not the only person this is happening to, I was emboldened to look into this further. Unfortunately, the code for geometryEngine is much too obfuscated to readily understand what's going on, but here's the function where things foul up: b.prototype.iL=function(a){
for(var d=[],c=[],h=this.sn,l=b.bc(h),g=0;g<l.length;g++){
var m=l ,n=h ;
if(this.Fc||1E4<n.hq&&1<n.Ci.length){
this.bp-=n.Ci.length;
for(this.Qo-=n.Ci.length;0<n.Ci.length;)
d.push(n.Cv().hw),n.OQ();
c.push(m)
}
}
for(g=0;g<c.length;g++)
delete h[c ];
return d
}; The error is thrown when comparing if 1E4 is less than n.hq, and occurs because n is undefined. If we look further up, we see n was set to the value of h ...that is, an element of some array. In my case, h was an array with a length of 4, but elements with index 0, 1, and 2 were undefined. However, this code wrongly assumes all the elements in the array it references are defined...hence the error. I use a locally hosted version of the API, and so I tweaked it a little to check for a valid value of n before proceeding. Therefore, the original code (which you can ctrl-f to find): if(this.Fc||1E4<n.hq&&1<n.Ci.length) became if((n)&&(this.Fc||1E4<n.hq&&1<n.Ci.length)) This appears to have fixed the problem, although I haven't performed any rigorous testing...as such, if you try this, proceed with caution. Also, if you do, you'll probably need to delete temporary internet files before reloading your app to ensure you get the updated version.
... View more
12-29-2015
07:35 AM
|
2
|
3
|
2640
|
|
POST
|
It's been awhile since you posted this, and you may have already figured it out. For posterity, though, I believe the problem here is that IE only supports custom cursors in .cur and .ani format (not .png). See also: cursor property (Internet Explorer)
... View more
09-24-2015
10:31 AM
|
1
|
1
|
1258
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-09-2025 09:35 AM | |
| 2 | 12-09-2025 09:06 AM | |
| 1 | 11-26-2025 12:29 PM | |
| 3 | 11-26-2025 09:11 AM | |
| 1 | 10-02-2025 01:14 PM |