POST
|
I am running JSAPI 3.7 and get this error in Chrome as well. It seems to occur when I perform a queryTask while the infoWindow is visible. What happens is the map will briefly zoom to the extent of the queried feature (after map.setExtent is called) but then it "snaps" back to the previous extent and throws the onAnimate error about a dozen times. The infoWindow is anchored in the new location of the queried feature, but the map is back at the old location. This is the full error shown in the console: exception in animation handler for: onAnimate [VM] init.js (20729):44
e.extend._fire [VM] init.js (20729):44
e.extend._cycle [VM] init.js (20729):48
(anonymous function) [VM] init.js (20729):171
h.(anonymous function).g [VM] init.js (20729):236
(anonymous function) [VM] init.js (20729):171
TypeError {} [VM] init.js (20729):45
e.extend._fire [VM] init.js (20729):45
e.extend._cycle [VM] init.js (20729):48
(anonymous function) [VM] init.js (20729):171
h.(anonymous function).g [VM] init.js (20729):236
(anonymous function) This may be different than what you guys are experiencing, but I thought I would throw it out there since I haven't seen many posts that reference this error.
... View more
10-07-2013
03:49 PM
|
0
|
0
|
536
|
POST
|
Thank you for the clarification, Derek. So it sounds like what is happening in my apps is option B described above. If services.arcgisonline.com was upgraded to 10.1 and CORS enabled then I would not get this error, right? And if I am reading you right, the danger with setting "esri.config.defaults.io.corsDetection = false" in my apps is that I am now not checking ANY server I connect to with CORS, and with the big idea that everybody should be enabling CORS on their servers, this is not a good thing. I'm sure it is out of your control, but if my second assumption is true, then Esri really should be upgrading services.arcgisonline.com, especially with it now two versions out of date. But I don't blame you guys, the upgrade from 10.0 to 10.1 is really a pain. Next time we get asked by our rep why we are not on 10.2 (or why it took over a year to get to 10.1), I will point them to services.arcgisonline.com 😉
... View more
10-07-2013
03:16 PM
|
0
|
0
|
1397
|
POST
|
I've been ignoring the "Origin is not allowed by Access-Control-Allow-Origin" errors (aka the CORS error) in my apps for many months now, like a good ArcGIS JS API developer. I haven't paid much attention to CORS, but finally decided to devote a little time to researching it. I get the error because I package some Esri services onto my map. If I understand the error correctly, it is getting thrown because I am using web services in my app from an external server that either: a) Doesn't like that my server is connecting to it because my server has not been whitelisted by CORS or b) My server doesn't like that I am connecting to the Esri server because it hasn't been whitelisted by CORS I'm not sure exactly which scenario is correct, but nonetheless I get the error. In reading, I stumbled across Kelly Hutchins's post from June 2012 here: http://forums.arcgis.com/threads/59988-Issue-Upgrading-to-version-3.0?p=207055&viewfull=1#post207055 I've probably read that post a half dozen times over the last 10 months, but I stopped to actually understand what it was telling me. There is a parameter called "esri.config.defaults.io.corsDetection", that has apparently existed since JSAPI 3.0, that can be set to "false". So I went ahead and added this line to my Init function and *poof!*, no more CORS error. So why don't I see this as a solution in the various CORS related posts on these forums? Instead I see Esri staff saying "just ignore the error". Is it bad to disable the CORS detection? Is it doing something that I don't want? I understand the idea behind CORS, that it is to provide more secure access between dynamic data services, etc., but it seems to be slow to adoption, so why wouldn't I just disable it for now? Has everybody else known about this solution and I am just now figuring it out?
... View more
10-07-2013
01:28 PM
|
0
|
3
|
5903
|
POST
|
I just read the fine print in the API reference: If the URL for the Export Web Map task is from the same domain as the application the print page will be displayed in a new browser window or tab when the print button is clicked. If the URL is from a different domain, a hyperlink to the print page appears in place of the print button. This is kind of a bummer. I would prefer the hyperlink because it seems to behave better with the popup blockers.
... View more
09-27-2013
03:22 PM
|
0
|
0
|
193
|
POST
|
This is hopefully an easy question... I've been hacking away at the print dijit and finally have it working in my app. Along the way, I did something that caused me to lose the "Printout" link that gets generated when the printout is ready to be viewed. Instead my print button automatically opens the finished PDF as a popup. This would be fine, except I know most folks are going to have popup blockers in their browsers and I will probably get a thousand phone calls from people who can't see the printout popup because it gets blocked. How do I get the "Printout" link back? I've boiled my print dijit startup down to one function. Perhaps I boiled it down too much. I will paste below in case there is something that sticks out. function startupPrinter() {
var printDisclaimer = "DISCLAIMER";
var printCopyright = "Contact Info";
var printer = new esri.dijit.Print({
map: map,
templates: [
{
format: "PDF",
label: "8.5x11",
layout: "Letter ANSI A Landscape",
layoutOptions: {
authorText: printDisclaimer,
copyrightText: printCopyright
}
},
{
format: "PDF",
label: "11x17",
layout: "Tabloid ANSI B Landscape",
layoutOptions: {
authorText: printDisclaimer,
copyrightText: printCopyright
}
}
],
url: "http://" + hostName + "/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
}, dojo.dom.byId("printButton"));
printer.startup();
};
... View more
09-27-2013
02:44 PM
|
0
|
1
|
720
|
POST
|
Has anybody experimented with inserting markup into the titleText, authorText, or copyrightText values? I have a lengthy disclaimer I would like to add as the copyrightText, so I need to include a few line breaks, otherwise it runs off the page. However, the template doesn't seem to acknowledge any HTML break tags. Has anyone discovered another system of escape characters that might allow line breaks or maybe even bold or italic text?
... View more
09-26-2013
10:54 AM
|
0
|
0
|
480
|
POST
|
I am such a freakin' bonehead! I am hosting the app on my internal dev server and pointing to my internal dev map services, not accessible to the outside. So of course the Esri Export service can't see my map! Duh! I switched my code to point to my live map services and everything works fine. John, thanks for your help!
... View more
09-25-2013
09:44 AM
|
0
|
0
|
397
|
POST
|
John, hosting the Esri sample is a brilliant idea. I grabbed the code and put in on my server. It worked just fine, just like the Esri hosted sample. I modified the print URL to point to my export service and I got a different error (a timeout). So it does appear that there is some issue with my local print service. Anyway, I went back to my app code and changed it to the Esri hosted export service, like in the sample code, but I still get the "Error code:400". I pointed the Esri sample code to my proxy, and the sample still works, so I assume my proxy is not the problem? I checked the network traffic and my app does show an execute request (GET) to the Esri export service with a wait time of 643ms and a response of 200ms. The working sample code shows a similar request with a wait time of 2.49s and a response time of 200ms. So it looks like there is communication, but maybe there is a parameter in my map that the export service doesn't like? I can't find anything that appears out of sorts. I changed the sample code to point to JSAPI 3.4, like my app, and the sample still works. I've gradually been fiddling with each code set to get them to look as similar as possible, but the result is still that the sample works just fine and my app keeps throwing the error. This probably means I am missing some little inconsistency in my app code. The main difference I can see in my app is that it is still using the "legacy" module requires and the sample is using the AMD module requires. I guess maybe I need to take the leap and just update all of my code to use the AMD style. Any additional guidance is much appreciated.
... View more
09-25-2013
09:35 AM
|
0
|
0
|
397
|
POST
|
I've searched the forums for a problem similar to mine, but haven't been able to find an applicable thread. I have a fairly complex JavaScript API application I have been developing since version 1.4. I am currently on JSAPI version 3.4 and am running my services on ArcGIS Server 10.1. I am finally getting around to setting up the Print dijit in my app, but keep running into errors. Since the latest 3.6 documentation uses the AMD referencing method, I have found it difficult to find examples that make sense in my application, but here is what I have basically added to my code to get a print button on my app: esri.config.defaults.io.proxyUrl = "http://" + hostName + "/proxy/proxy.ashx"; var printer = new esri.dijit.Print({ map: map, url: "http://" + hostName + "/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" }, dojo.dom.byId("printButton")); printer.startup(); I also added the necessary Require statements for the Print dijit and the Dojo DOM. I set up the proxy code per the ASP.NET download and instructions. I have added a "printButton" DIV to my HTML. The application loads fine, no errors, and the print button is visible. However, when I click on the print button I get a few seconds of wait time and then the following error in Chrome: Error {code: 400, message: "Unable to complete operation.", details: Array[1], log: undefined} init.js:15 _49d init.js:15 (anonymous function) init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 (anonymous function) init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _4c8 init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _4c8 init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _4c8 init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _3e6 init.js:15 _3f2 My "Export Web Map Task" is running on my local ArcGIS Server 10.1 deployment. I also tried referencing the ESRI hosted task, but I get the same error. The button seems like it is trying to do something, but I just don't get the response, instead just the error. I'm pretty lost here. Am I missing a parameter? Am I not initializing the tool properly in my code? Is my proxy not configured correctly (how would I test that)? Is it an issue with the Export service? Any help and direction would be greatly appreciated.
... View more
09-25-2013
08:34 AM
|
0
|
5
|
1256
|
POST
|
We have moved our REST services behind a reverse proxy for additional security. However, any SQL where clause passed to our REST services that contain LIKE statements with percent (%) wildcards are getting blocked by the reverse proxy. Apparently this is a side-effect of the URL normalization that is performed in the reverse proxy to validate that malicious queries are not being passed. It is described under #5 here: http://technet.microsoft.com/en-us/library/bb794802.aspx I am using the queryTask in the JavaScript API to construct the queries, but this problem also appears if I try to directly query the REST service. Our system administrators are reluctant to remove the Verify normalization setting in the reverse proxy. Has anyone else encountered this problem and discovered a workaround?
... View more
08-22-2013
10:08 AM
|
0
|
0
|
2334
|
POST
|
I was getting the same error messages after installing ArcGIS Server 10.1 on a new Windows Server 2008 R2 64-bit install, but the messages I received were followed by a SQL client connection error as well. Loading the SQL Server 2008 R2 client fixed it for me. See KB article 37287: http://support.esri.com/es/knowledgebase/techarticles/detail/37287 The SQL Client for 2008 R2 64-bit is available here: http://go.microsoft.com/fwlink/?LinkID=188401&clcid=0x409
... View more
07-24-2013
12:55 PM
|
0
|
0
|
1778
|
POST
|
I'm getting the same issue. For me it occurs after I call measurement.clearResult(); or if I call map.graphics.clear(); Something gets screwed up with the graphics of the area tool and it appears to be one click behind if either of the above functions is called. However, I noticed if I click the area tool icon (instead of the two functions above) then it resets correctly. Obviously it is doing something different or better. Unfortunately it seems like the documentation for the measurement dijit is rather minimal. There aren't even any properties documented for checking the currently selected tool. If there were, then I could identify when the area tool was selected and then reset it instead of clearing graphics or clearing the measurement results. If anybody has discovered some hidden properties that exist in the measurement tool, especially identifying the currently active tool, then I would be much appreciative for sharing them.
... View more
06-19-2013
02:46 PM
|
0
|
0
|
216
|
POST
|
Nevermind, I had another error that was stepping on this one. So the AMD style apparently had no effect. I still have this error.
... View more
03-21-2013
10:39 AM
|
0
|
0
|
866
|
POST
|
Changing over to the AMD reference style seemed to work for me, but only if I use my local server copy of JS API 3.2. Here is how I am declaring my modules now: Old way: dojo.require("esri.map");
dojo.require("esri.tasks.query");
dojo.require("esri.tasks.identify");
dojo.addOnLoad(Init); New way: require(["esri/map", "esri/tasks/query", "esri/tasks/identify"], Init()); I'm now running ArcGIS JS API 3.2, jQuery 1.9.1, and jQuery Mobile 1.3.0. The odd thing is that it will not work if I reference the 3.2 or 3.3 API on the Esri servers. It only works if I point to my local version.
... View more
03-21-2013
10:02 AM
|
0
|
0
|
866
|
POST
|
As for #1 and #3, I think things are firing before other things are getting loaded. Sorry, I can't be more specific than that, but here is evidence to support it. Replace this call (line 140): toggleStreets(); With this: dojo.connect(LAYER_TRANSPORT, "onLoad", toggleStreets);
dojo.disconnect(LAYER_TRANSPORT, "onLoad", toggleStreets); This is a total hack, but it works. It shows that if you wait until LAYER_TRANSPORT is loaded then everything is cool. I hope this helps.
... View more
03-21-2013
09:14 AM
|
0
|
0
|
536
|
Title | Kudos | Posted |
---|---|---|
1 | 05-04-2011 03:08 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|