|
POST
|
Thank you for the reply, Robert. I followed the suggestion and now I get the error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs. Do I need to use escape characters for the slashes? My url was: queryBufferTask.url= "http://xxx.xxx.xx.xxx/DotNetProxy/proxy.ashx?https://xxx.xxx.xxx.xxx/arcgis/rest/services/Project_PAD/PAD/MapServer/0"; Thanks.
... View more
09-02-2014
11:25 PM
|
0
|
4
|
1149
|
|
POST
|
Hello. I have to use proxy for the querytask in the actionscript (not in the xml widget config). What is equivalent to <useproxy>true</useproxy> to actionscript? Is there a property that I can use with the query? I couldn'r find one. Thanks. var queryBuffer:Query = new Query(); queryBuffer.spatialRelationship = querySpatialRel; queryBuffer.geometry = geom; queryBuffer.returnGeometry = true; queryBufferTask.url=layerConfig.url; queryBuffer.outSpatialReference = map.spatialReference; queryBuffer.outFields = layerConfig.outfields;
... View more
09-02-2014
06:20 PM
|
0
|
6
|
2463
|
|
POST
|
Ok. I will just ignore the warning and move on. Thank you Robert.
... View more
08-29-2014
08:30 AM
|
0
|
0
|
941
|
|
POST
|
Thank you Robert. My first reaction when I encountered that error was to enter the import in the index.html but it didn't prevent the error. Then, I implemented your suggestions, but I still get the error. I am using Flash Builder 4.6. If I ignore this error, will actually result to serious memory leaks?
... View more
08-28-2014
04:48 PM
|
0
|
2
|
941
|
|
POST
|
I created my own widget to be used in flexviewer but I get the message "To resolve the leak, define com.esri.ags.geometry.WebMercatorMapPoint in the top-level application." I already saw a recommendation to resolve this issue is to import com.esri.ags.geometry.MapPoint; in your main mxml. The widget has aleady this import, so in flexviewer the top-level application is considered to be what? Thanks.
... View more
08-27-2014
03:39 PM
|
0
|
4
|
1707
|
|
POST
|
So, Luke, in my case why the addlayer is undefined?
... View more
08-07-2014
06:04 PM
|
0
|
1
|
1650
|
|
POST
|
Sorry I am novice in Python. How do you declare a variable that if no layers are defined yet? Can I a declare without point at a layer?
... View more
08-06-2014
03:30 PM
|
0
|
0
|
2942
|
|
POST
|
Ok, I modified my code....but I still getting an error. What I am trying to do is to loop through the layers of the current map and if a specific layer is found, then it will be copied onto a new map and then print the pdf of the new map. Does it make sense? import arcpy thisMap = arcpy.mapping.MapDocument("CURRENT") myDF = arcpy.mapping.ListDataFrames(thisMap)[0] arcpy.CreateFolder_management(r"D:\GIS_data", "test") newmap = arcpy.mapping.MapDocument(r"D:\GIS_data\test\new.mxd") newdf = arcpy.mapping.ListDataFrames(newmap)[0] myLayers = arcpy.mapping.ListLayers(myDF) for lyr in myLayers: if lyr.name == "CNNDB": addlayer = arcpy.mapping.Layer(lyr) arcpy.mapping.AddLayer(newdf,addlayer,"AUTO ARRANGE") arcpy.RefreshTOC arcpy.RefreshActiveView arcpy.mapping.ExportToPDF(newmap, r"D:\GIS_data\test\Project.pdf",300,"BEST",layers_attributes="LAYERS_AND_ATTRIBUTES")
... View more
08-06-2014
02:41 PM
|
0
|
4
|
2943
|
|
POST
|
I am new in python but this script should be easy to process. Instead I get: arcpy.mapping.AddLayer(myDF,addlayer) NameError: name 'addlayer' is not defined Here is the script: import arcpy thisMap = arcpy.mapping.MapDocument("CURRENT") myDF = arcpy.mapping.ListDataFrames(thisMap)[0] myLayers = arcpy.mapping.ListLayers(myDF) for lyr in myLayers: if lyr.name == "CNNDB": addlayer = arcpy.mapping.Layer(lyr) print "got it" arcpy.mapping.AddLayer(myDF,addlayer,"AUTO ARRANGE") arcpy.CreateFolder_management(r"D:\GIS_data", "test") arcpy.mapping.ExportToPDF(thisMap, r"D:\GIS_data\test\Project.pdf",300,"BEST",layers_attributes="LAYERS_AND_ATTRIBUTES") #Do you see any errors? Thank you.
... View more
08-06-2014
01:58 PM
|
0
|
22
|
11030
|
|
POST
|
That's correct, the print widget handles the printing of graphics layers that are visible on the map. Can you print a specific graphicslayer and not all of the visible layers? To elaborate, in a more complex situation if you perform a buffer analysis on several layers, the result is several graphicslayers and I would like to print each layers in a multi page pdf. It is obviously a loop situation. The print task just gets the current map (and what ever layers are visible) and perform the task. I need to change the input for the print task gp service to a specific graphics layer. Is that possible? Or, do I need to modify the python script as it is shown in ArcGIS Help 10.1
... View more
08-01-2014
09:11 AM
|
0
|
1
|
802
|
|
POST
|
I have read the example for the advanced printing and how to use the arcpy.mapping to print to pdf. However, I'm trying to figure out how to use the results of a buffer query in a flex app that creates a graphicslayer to be the input for the geoprocessing service to print just the results of the query to the pdf. Ideas?
... View more
07-31-2014
10:38 PM
|
0
|
3
|
1350
|
|
POST
|
Huh... I knew it was something simple.. has to get used to Python since it is so different that other languages. Thank you.
... View more
07-25-2014
10:06 AM
|
0
|
0
|
916
|
|
POST
|
I am novice in python and I am trying to run a function in the field calculator and I get this error. It drives me nuts. What is wrong? Thank you. Error: error 000539: syntaxerror: invalid syntax (<expression>, line 1) Pre-Logic Script Code: def fnfindstation(addstation): if addstation == "151" or addstation == "551": formataddress ="Oleander Station 1 - Shift B" elif addstation == "152" or addstation == "552": formataddress ="Oleander Station 2 - Shift B" else: formataddress = "Outside Station" return formataddress Station = fnfindstation=( !district!)
... View more
07-25-2014
09:56 AM
|
0
|
2
|
1149
|
|
POST
|
here is some code for just printing a table public function generatePDF2():void
{
var myCoreFont1:IFont = new CoreFont ( FontFamily.ARIAL );
myPDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.TABLOID);
myPDF.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE );
myPDF.addPage();
myPDF.setFont(myCoreFont1, 12);
myPDF.addText('List of Development Services Projects - Status', 11, 10);
myPDF.setFont(myCoreFont1, 8);
myPDF.addText('Printed:' + dateFormatter.format(now.toLocaleDateString()), 180, 10);
var gridColumnOwner1:GridColumn = new GridColumn("Project Name", "Name", 90, Align.LEFT, Align.LEFT);
var gridColumnOwner2:GridColumn = new GridColumn("Condition", "Color", 18, Align.LEFT, Align.LEFT);
var gridColumnAddress:GridColumn = new GridColumn("Status", "Status", 20, Align.LEFT, Align.LEFT);
var gridColumnMailCity:GridColumn = new GridColumn("Next Step", "Cur_Status", 20, Align.LEFT, Align.LEFT);
var gridColumnMailStat:GridColumn = new GridColumn("Department", "DS_Department", 35, Align.LEFT, Align.LEFT);
var gridColumnManager:GridColumn = new GridColumn("Project Manager", "Manager", 35, Align.LEFT, Align.LEFT);
var gridColumnCost:GridColumn = new GridColumn("Project Assistant", "Assistant", 35, Align.LEFT, Align.LEFT);
myPDF.setFont(myCoreFont1, 8);
myPDF.textStyle ( new RGBColor ( 0x000000 ), 1 );
//resultsGrid is the name of the datagrid
var grid:Grid = new Grid (resultsGrid.dataProvider.toArray(), 0, 0, new RGBColor (0xC0C0C0),
new RGBColor (0xCCCCCC), true , new RGBColor(0x000000), 1, Joint.ROUND);
var columns:Array = new Array (gridColumnOwner1,gridColumnOwner2, gridColumnAddress, gridColumnMailCity, gridColumnMailStat, gridColumnManager, gridColumnCost);
grid.columns = columns;
myPDF.addGrid(grid, 1, 6);
//export to pdf web service
myPDF.save(Method.REMOTE, "name of server",Download.INLINE,"myPDF.pdf");
} Thank you. I got a bit of work to do. The layers and the attributes are pre-selected by the user before the datagrids are printed out.
... View more
05-08-2014
01:44 PM
|
0
|
0
|
1875
|
|
POST
|
attached is the code I used in my application. Any questions let me know Aaron, thank you for posting the code for printing the display features in a pdf. For the report.pdf, I assume that you used a spark datagrid. Could you please post the code for printing to pdf the datagrid as displayed in the report.pdf? Thanks.
... View more
05-07-2014
05:08 PM
|
0
|
0
|
1875
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-19-2025 10:13 PM | |
| 3 | 02-06-2026 10:44 AM | |
| 1 | 01-08-2026 12:50 PM | |
| 1 | 01-05-2026 01:35 PM | |
| 1 | 12-30-2025 10:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|