|
POST
|
Girish, That was the problem. I can't believe I missed that!! Thank you so much for all your help! I couldn't have figured it out without you. Tom
... View more
01-11-2016
04:56 PM
|
0
|
0
|
908
|
|
POST
|
I tried to follow Girish's example and I kept the code example as simple as possible (See below). However, the map extent in the print layout doesn't get affected by the zoombuffer function. I've tried everything, but I can't get it to work. I must be missing something!! onTest: function () { //This executes both but doesn't zoom to the same extent this.zoombufferTest() .then(lang.hitch(this, this.sendToPrinter_Test())); }, zoombufferTest: function () { var bufferExt = this.map.extent.expand(4.0); return this.map.setExtent(bufferExt); }, sendToPrinter_Test: function () { var sTitle = "Test"; var sLayout = "WRC_Landscape"; var sFormat = "PDF"; //Get the user settings from the form this.printTask = new PrintTask(this.printTaskURL, this.printParams); var template = new PrintTemplate(); template.label = sTitle; template.layout = sLayout; template.format = sFormat; template.preserveScale = false; this.printParams.map = this.map; this.printParams.template = template; return this.printTask.execute(this.printParams, this.printComplete, this.printError); }, Map before running code: Print layout (note zoom not reflected): Map after running code (zoomed out 4x)
... View more
01-11-2016
12:04 PM
|
0
|
5
|
1859
|
|
POST
|
Girish, OK almost there. Nothing is erroring out, but I've got a couple odd things that happen. On the positive, all of the functions get executed and 2 reports get printed entitled "Title 1" and Title 2" as specified. On the negative, the map extent in the printout remains unchanged. It is not affected by zoomselected or zoombuffer. It doesn't seem like the map completely refreshes itself before it creates the print task. Any thoughts? Here's my code. this.zoomselected() .then(lang.hitch(this, this.sendToPrinter_SoilErosion("Title 1",sLayout,sFormat,sMessage))) .then(lang.hitch(this, this.zoombuffer)) .then(lang.hitch(this, this.sendToPrinter_SoilErosion("Title 2",sLayout,sFormat,sMessage))); Thanks for your help! Tom
... View more
01-08-2016
01:42 PM
|
0
|
0
|
1859
|
|
POST
|
Girish, That was super helpful and I think I'm getting close. However, when I run zoombuffer first, it zooms to the buffer but when it tries to run the zoomselected function, it thinks that this.selValueShapeFeatures is undefined. When I reverse the order, then zoomselected zooms to the selected feature, but when it tries to run the zoombuffer, it thinks that this.graphicsLayerBuffer is undefined. What am I missing? Here's the simple code: onTest: function () { this.zoombuffer() .then(this.zoomselected) .then(this.zoombuffer); }, zoomselected: function () { if (this.selValueShapeFeatures) { var features = this.selValueShapeFeatures; if (features.length != 0) { var graphics = features; var gExt = graphicsUtils.graphicsExtent(graphics); var selectedExt = gExt.expand(1.1); return this.map.setExtent(gExt.expand(1.1)); } else { return null; } } }, zoombuffer: function () { if (this.graphicsLayerBuffer) { if (this.graphicsLayerBuffer.graphics.length > 0) { var graphics = this.graphicsLayerBuffer.graphics; var gExt = graphicsUtils.graphicsExtent(graphics); var bufferExt = gExt.expand(1.1); return this.map.setExtent(bufferExt); } } else { return null; } }, Thanks. Tom
... View more
01-08-2016
11:00 AM
|
0
|
8
|
1859
|
|
POST
|
Girish and Chris, I reviewed the samples using dojo deferred, but I'm still not sure how to make this work. I'm not very experienced in dojo, so I'm looking for a simple example using the ArcGIS JavaScript api. I'm trying to execute the following two functions which work fine if I stop each of them using alert. this.zoomselected(); this.sendToPrinter_SoilErosion(sTitle,sLayout,sFormat); I tried all kinds of deferred statements like the following, but nothing seems to work. var def = new Deferred(); def = this.zoomselected(); def.then(function() { this.sendToPrinter_SoilErosion(sTitle,sLayout,sFormat); }); Does anyone have any similar examples I can look at? Thanks. Tom
... View more
01-07-2016
12:17 PM
|
0
|
12
|
1859
|
|
POST
|
Girish, Thanks for your quick reply. That makes a lot of sense. I'll let you know how it goes. Tom
... View more
01-05-2016
12:32 PM
|
0
|
0
|
1859
|
|
POST
|
What I'm trying to do is zoom to the selected feature and then send the map to the printer. Then zoom to the buffer and again print the resulting map to the printer. Each of the following steps works by themselves. However, I'm having a problem figuring out how to sequence the statements and use timeouts to ensure that each step is completed before the next process starts? Here's my code: //Zoom to Parcel setTimeout(lang.hitch(this, function () { this.zoomselected(); }), 3000); setTimeout(lang.hitch(this, function () { html.setStyle(this.PrintMessage, 'display', 'block'); }), 5000); //Zoom to Buffer setTimeout(lang.hitch(this, function () { this.zoombuffer(); }), 3000); setTimeout(lang.hitch(this, function () { html.setStyle(this.PrintMessage, 'display', 'block'); this.sendToPrinter_SoilErosion(sTitle,sLayout,sFormat,sMessage); }), 5000);
... View more
01-05-2016
11:43 AM
|
0
|
16
|
5566
|
|
POST
|
I kind of figured that but thought I'd ask. Thanks for your quick reply and all of your help!!
... View more
12-16-2015
08:34 AM
|
0
|
0
|
572
|
|
POST
|
In the eSearch widget, I am trying to select a group of TaxParcel features. TaxParcel has approximately 15 fields configured in the configuration file. When I select all of the parcels in a rectangle encompassing an entire township (approximately 16,000 parcels) I get a "Search Failed" error. If I narrow the search area to 1/16 or the township (approximately 2,000 parcels), it runs through fine. If I change the configuration to 1 field, the search completes, but the Results tab totally bogs down. The parcel service is configured with a 10 minute timeout and 50,000 records. Is there any other setting which can be made to avoid this problem?
... View more
12-16-2015
07:46 AM
|
0
|
2
|
1920
|
|
POST
|
Is there any way I can add the graphics from the standard Draw widget to an array in the eSearch widget? I'd like to be able to use the advanced drawing options in the Draw widget and use the graphics created to select or buffer in the eSearch widget. Is this possible.
... View more
12-15-2015
10:04 AM
|
0
|
2
|
2788
|
|
POST
|
Robert, OK. Thought I might be missing something. At least I know it's not a configuration item. Tom
... View more
12-11-2015
11:51 AM
|
0
|
0
|
712
|
|
POST
|
Is there way to reorder the fields for the AttributeTable? I would like PIN to be first, followed by CVTTAXCODE. In the eSearch widget, the fields are configured as follows: "field": [ { "name": "PIN", "alias": "PIN", "includeresults": true }, { "name": "CVTTAXCODE", "alias": "CVTTAXCODE", "includeresults": false }, And the OrderByFields is configured as follows: "orderByFields": [ "PIN" ,"CVTTAXCODE" ,"CVTTAXDESCRIPTION" ,"TAXABLESTATUS" ,"USECODE" ,"USEDESCRIPTION" ,"CLASSCODE" ,"CLASSDESCRIPTION" ], In the AttributeTable widget, the fields are configured as: { "show": true, "name": "PIN", "alias": "PIN" }, { "show": true, "name": "CVTTAXCODE", "alias": "CVTTAXCODE" }, { "show": true, "name": "CVTTAXDESCRIPTION", "alias": "CVTTAXDESCRIPTION" },
... View more
12-11-2015
11:36 AM
|
0
|
2
|
3080
|
|
POST
|
Robert, Thanks! That did it. I had tried changing that setting once before, but it still didn't appear. After you confirmed that it was necessary to change the "Addtolegend" setting to true, I noticed that I had some old code in the open and close functions and I needed to update them to show/hide the graphicsbufferlayer. Thanks for the widgets you've created. They're fantastic! Tom
... View more
12-11-2015
10:57 AM
|
0
|
1
|
729
|
|
POST
|
Didn't mean to post in the Flex API. Yes I mean the WAB version of eSearch
... View more
12-11-2015
08:32 AM
|
0
|
0
|
729
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-10-2016 08:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|