POST
|
Well in my case, if I comment the line async: true, the print dijit just crash...So I need it to make it work. If you want my opinion, the print dijit is just....well not really a good dijit...ESRI should re-code/ redevelop it.
... View more
09-19-2014
05:26 AM
|
0
|
1
|
356
|
POST
|
Hey guys, I found that when using esri.geometry.Circle, the print dijit just fail to execute the task... When using esri.geometry.Circle in a map graphic in this code : var pt = new esri.geometry.Point(outputpoint[0].x,outputpoint[0].y,new esri.SpatialReference({ 'wkid': 4326 })); var sms = new esri.symbol.SimpleMarkerSymbol(); sms.setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_PATH); sms.setPath("M25.083,18.895l-8.428-2.259l2.258,8.428l1.838-1.837l7.053,7.053l2.476-2.476l-7.053-7.053L25.083,18.895zM5.542,11.731l8.428,2.258l-2.258-8.428L9.874,7.398L3.196,0.72L0.72,3.196l6.678,6.678L5.542,11.731zM7.589,20.935l-6.87,6.869l2.476,2.476l6.869-6.869l1.858,1.857l2.258-8.428l-8.428,2.258L7.589,20.935zM23.412,10.064l6.867-6.87l-2.476-2.476l-6.868,6.869l-1.856-1.856l-2.258,8.428l8.428-2.259L23.412,10.064z"); sms.setColor(new esri.Color([255,0,0])); sms.setSize(32); var symbol = new esri.symbol.SimpleFillSymbol().setColor(null).outline.setColor([255,0,0]); var circle = new esri.geometry.Circle({ center: pt, geodesic: true, radius: 450 }); // WORKAROUND TO MAKE THE PRINT DIJIT WORK /*var symbol = new esri.symbol.SimpleMarkerSymbol(); symbol.setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE); symbol.setColor(null); symbol.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new esri.Color([255,0,0]), 1)); symbol.setSize(320);*/ var arXY = esri.geometry.lngLatToXY(pt.x,pt.y); oMap.graphics.add(new esri.Graphic(pt,sms)); oMap.graphics.add(new esri.Graphic(circle,symbol)); And if you print a map with a circle graphic, the print dijit just fail to execute and there is no way (I haven't found any) to capture the failed execution. Here is the creation of the print dijit and all the event attached to it. var printer = new esri.dijit.Print({ "map": oMap, "templates": templates, "async":true, url : oParamApp.urlArcServer+"ExportWebMap/GPServer/Export%20Web%20Map" }, dojo.byId("print_button")); printer.startup(); console.clear(); console.log(printer); printer.on('print-complete',function(){ console.log('L\'impression est complétée.'); }); printer.on('error',function(){ console.log('PRINT TIME-OUT ERROR'); alert('Une erreur est survenue lors de l\'impression. \n\nVeuillez recommencer en désactivant des couches ou en redémarrant votre fureteur. \n\nSi le problème persiste, veuillez contacter la firme Jean-Pierre Cadrin & Ass. Inc.'); }); printer.on('print-start',function(){ console.log('L\'impression a débuté.'); }); // NOT WORKING BUT EXIST IN THE DOM?!?!? printer.on('fail',function(){ alert('execution failed'); }); As you can see, this is my FireBug console... Is there a way to capture that kind of error/failure from the dijit? Or is there a way to correct the API so we can print graphic esri.geometry.Circle? For now, I'm using a workaround using a point... Thanks for your help.
... View more
09-18-2014
10:37 AM
|
0
|
3
|
2531
|
POST
|
With RHEL and ArcServer, there is a temp folder in the install directory of ArcServer ( /arcserver/server/temp/ ). Can we empty that folder or it will cause ArcServer to crash?
... View more
08-04-2014
06:38 AM
|
0
|
0
|
721
|
POST
|
Hey folks, I don't know why, in my web app with the JS API 3.9, all my WMS Layer are not loading only in Google Chrome. Under I.E. 11 and Firefox 28, all my WMS Layer are loading. layer = new esri.layers.WMSLayer(http://www.cptaq.gouv.qc.ca/mapserver/cgi-bin/cptaq/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap, {
format: "png",
visibleLayers: [0,1,2,3,4,5],
id:"cptaq"
}); How could I solve this? Thank you.
... View more
04-25-2014
08:15 AM
|
0
|
1
|
2759
|
POST
|
Hello folks, I had this error a few times with my ArcGIS 10.1.1 and now I'm getting again this error on my ArcGIS 10.2.1 In ArcCatalog, I'm trying to publish a Definition File. The publication is starting well, I can see the bytes are transfering, but sometimes, for no apparent reason, the process crash and I receive this error: ERROR 999999: Error executing function. Cannot connect to this server. Failed to execute (UploadServeDefinition). My ArcGIS Server 10.2.1 is on a RHEL machine and I'm always connected and working on this. So it's impossible that the connection was lost between my computer and my RHEL server. I can publish / overwrite 20 service in a row, then, BAM, I can't publish anymore. I need to wait a few minutes/hours before I can republish again. It appear that this problem happen more when it's a service with raster images in it (MrSID or JP2000). How could I solve this? Thanks!
... View more
03-27-2014
04:56 AM
|
0
|
0
|
1990
|
POST
|
These are all the require declaration I use: Note taht the esri.layers.agsdynamic and agstiled are the new "way" to call them in 3.8 with the Legacy Module dojo.require("esri.map");
dojo.require("esri.layers.agsdynamic");
dojo.require("esri.layers.agstiled");
dojo.require("esri.layers.ImageParameters");
dojo.require("esri.dijit.Scalebar");
dojo.require("esri.dijit.Print");
dojo.require("esri.dijit.Measurement");
dojo.require("esri.dijit.Legend");
dojo.require("esri.dijit.OverviewMap");
dojo.require("esri.toolbars.navigation");
dojo.require("esri.toolbars.draw");
dojo.require("esri.tasks.query");
dojo.require("esri.tasks.find");
dojo.require("esri.layers.osm");
... View more
03-20-2014
04:56 AM
|
0
|
0
|
802
|
POST
|
imgParams is declared and modified this way: var imgParams = new esri.layers.ImageParameters(); imgParams.format = "png32"; oParamUser.config.layer contain an id like "this_is_my_layer"
... View more
03-19-2014
01:20 PM
|
0
|
0
|
802
|
POST
|
oParamUser.config.layer and imgParams are not null and i'm using the Legacy Module Require and it doesn't seem to need a specific "require" except the dojo.require("esri.map");
... View more
03-19-2014
01:04 PM
|
0
|
0
|
802
|
POST
|
with some debugging, I've managed to find where the error occur
layer = new esri.layers.ArcGISDynamicMapServiceLayer(url+"/MapServer", {id:oParamUser.config.layer, imageParameters: imgParams});
This line seems fine....I don't know what's wrong...
... View more
03-19-2014
12:50 PM
|
0
|
0
|
802
|
POST
|
Hello guys, first, thanks for helping. Here is my problem. In firebug, with the JS API 3.8 I've started receiving some weird error...but my script is still working. How can I make these errors disappear Here are the errors from Firebug:
dojo.io.script error /3.8/ (line 1416)
Error
.cache["esri/request"]/</s/e.load()/3.8/ (ligne 784)
.cache["dojo/_base/xhr"]/</b._ioSetArgs/<()/3.8/ (ligne 186)
c()/3.8/ (ligne 74)
d()/3.8/ (ligne 74)
.cache["dojo/_base/Deferred"]/</b.Deferred/this.callback()/3.8/ (ligne 75)
c()/3.8/ (ligne 74)
d()/3.8/ (ligne 74)
.cache["dojo/_base/Deferred"]/</b.Deferred/this.callback()/3.8/ (ligne 75)
.cache["dojo/io/script"]/</c.get/<()/3.8/ (ligne 1414)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
.cache["dojo/Deferred"]/</a()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
.cache["dojo/Deferred"]/</a()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
.cache["dojo/Deferred"]/</a()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
u()/3.8/ (ligne 1044)
.cache["dojo/request/script"]/</n/w[g.id]()/3.8/ (ligne 1045)
.cache["dojo/io/script"]/</c._jsonpCallback()/3.8/ (ligne 1418)
()MapSer...allback (ligne 1)
Reload the page to get source for: http://js.arcgis.com/3.8/
... View more
03-19-2014
10:38 AM
|
0
|
7
|
3535
|
POST
|
I had this problem with Firefox 23, but now it seems to be Okay (i'm with ArcServer 10.1). When an old print showed up, I just had to force refresh the print output (CTRL+F5) and the browser was forced to get the good print output. Like schlot said, adding a timestamp at the end of the file name could be a good idea.
... View more
11-14-2013
03:24 AM
|
0
|
0
|
585
|
POST
|
If my understanding of your problem is right, you might be able to use jQuery to edit the action/style of the hyperlink of the print dijit. Here is my function that create my print dijit. function createPrintDijit(printTitle)
{
var map = getMap();
var layoutTemplate, templateNames, mapOnlyIndex, templates;
// create an array of objects that will be used to create print templates
var layouts = [
{
"name": "print_layout_cadrin_letter_us",
"label": "8.5x11 portrait (PDF)",
"format": "pdf",
"options": {
"legendLayers": [], // empty array means no legend
"titleText": ""
}
}];
// create the print templates, could also use dojo.map
var templates = [];
dojo.forEach(layouts, function(lo)
{
var t = new esri.tasks.PrintTemplate();
t.layout = lo.name;
t.label = lo.label;
t.format = lo.format;
t.layoutOptions = lo.options;
templates.push(t);
});
printer = new esri.dijit.Print({
"map": map,
"templates": templates,
url : "http://"+cartotest+"/arcgis/rest/services/ExportWebMap/GPServer/Export%20Web%20Map"
}, dojo.byId("print_button"));
printer.startup();
printer.on('print-complete',function(evt){
console.log('Job completed'); // Here you can try to edit the hyperlink or add a new action with jQuery
});
printer.on('error',function(){
console.log('PRINT TIME-OUT ERROR');
});
printer.on('print-start',function(){
console.log('The job is starting.');
});
}
... View more
11-11-2013
11:23 AM
|
0
|
0
|
324
|
POST
|
If you guys are interested, I've developped mine. It's using a few functionnality of jQuery and jQueryUI. http://www.jpcadrin.ca/Carto/?id_mun=42025 here is the link you can try it. If you want a copy of the code, send me a message at madion@jpcadrin.ca and I'll explain how it works.
... View more
11-04-2013
05:30 AM
|
0
|
0
|
268
|
POST
|
This workaround (with the setTimeout) seems to work. Thanks!
... View more
04-17-2013
11:26 AM
|
0
|
0
|
904
|
Online Status |
Offline
|
Date Last Visited |
11-27-2023
11:30 AM
|