POST
|
For FeatureLayer, I think it will be null unless you define it at client side. You can consider using ArcGISDynamicMapServiceLayer and it's DynamicLayerInfos which can return the current rendering information.
... View more
03-11-2015
02:48 PM
|
0
|
0
|
409
|
POST
|
In that case you can simply apply the render for your layer. It's there in the sample that you are using. var markerSym = new SimpleMarkerSymbol().setPath("M14.5,29 23.5,0 14.5,9 5.5,0z");
markerSym.setOutline(new SimpleLineSymbol().setWidth(0.5));
markerSym.setColor(new Color("red"));
var renderer = new SimpleRenderer(markerSym);
renderer.setRotationInfo({
field:"WIND_DIRECT",
type:"geographic"
});
renderer.setSizeInfo({
field:"WIND_SPEED",
minSize:3,
maxSize:20,
minDataValue:5,
maxDataValue:50
});
layer.setRenderer(renderer);
... View more
03-11-2015
01:44 PM
|
0
|
0
|
409
|
POST
|
You can think of using IdentifyTask to get the feature and read it's attribute to formulate the required json. For example if we take sample ArcGIS API for JavaScript Sandbox It can be modified to get the attribute information as json. function executeIdentifyTask (event) {
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = map.extent;
var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response) {
//get the attributes json - will require mdofication to handle multiple feature at a point
var attributeJson = response[0].feature.attributes;
});
} HTH
... View more
03-11-2015
01:32 PM
|
0
|
0
|
735
|
POST
|
I have attached a sample to rotate graphics point feature based on a field.
... View more
03-11-2015
12:25 PM
|
0
|
2
|
409
|
POST
|
You probably need to add spatial reference information in aux files. Please refer Auxiliary files
... View more
03-11-2015
08:31 AM
|
0
|
0
|
1619
|
POST
|
I am not sure if you are using world files or not. Please refer ArcGIS Help 10.1 and World file - Wikipedia, the free encyclopedia If you are using them then these are just text files which can be easily manipulated by hand or through scripting. But it will require understanding of the adjustment that needs to be made to correct a particular file. For example Line 5 and Line 6 of world file represent coordinates of the top left corner. You can change these values to find out if this resolves the shift. Off course there are other factors in the world files which impacts the complete translation and it requires their understanding. I am sure the links above could give you the required direction in case you are using world files. Thanks, Mahtab
... View more
03-11-2015
07:18 AM
|
0
|
1
|
530
|
POST
|
Please remove the single quotes within your expression around field name. Change your expression to something like this: "!PG!*12425"
... View more
03-10-2015
08:51 AM
|
0
|
1
|
1150
|
POST
|
It seems your value is crossing the limit that short int can handle which is -32,768 to 32,767. You should change it to long. HTH
... View more
03-10-2015
08:21 AM
|
2
|
3
|
1150
|
POST
|
My thoughts were correcting the world files in case the shift/discrepancy has a contstant factor or even a recognizable pattern. In case you are observing irregular shifts then probably you have to georeference them again.
... View more
03-10-2015
08:05 AM
|
0
|
3
|
530
|
POST
|
Execute your code inside try/except/finally and see if this gives some hint: Arcpy exception handling import arcpy
import sys
import traceback
mxd = arcpy.mapping.MapDocument(r"C:\Users\Abrar ahmad\Documents\ArcGIS\New_Rwp_Cencus(12-17-2014).mxd")
try:
df = arcpy.mapping.ListDataFrames(mxd)[0]
for lyr in arcpy.mapping.ListLayers(mxd, "",df):
if lyr.name == "New_Districts_5_without_limit":
arcpy.mapping.ExportReport(lyr,r"C:\Users\Abrar ahmad\Documents\ArcGIS\test.rlf",r"C:\Users\Abrar ahmad\Documents\ArcGIS\ProjectReport2.pdf","USE_RLF")
except arcpy.ExecuteError:
# Get the tool error messages
msgs = arcpy.GetMessages(2)
# Return tool error messages for use with a script tool
arcpy.AddError(msgs)
# Print tool error messages for use in Python/PythonWin
print msgs
except:
# Get the traceback object
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
# Concatenate information together concerning the error into a message string
pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
# Return python error messages for use in script tool or Python Window
arcpy.AddError(pymsg)
arcpy.AddError(msgs)
# Print Python error messages for use in Python / Python Window
print pymsg + "\n"
print msgs
finally:
del mxd
... View more
03-06-2015
02:04 PM
|
2
|
1
|
731
|
POST
|
Please share details about the inputs to help you. In case you are having georefencing information stored in world files ( ArcGIS Help 10.1 ) then you can easily manipulate them with using python. Thanks, Mahtab
... View more
03-06-2015
01:22 PM
|
0
|
5
|
530
|
POST
|
Looks like you want a field user friendly button. In this case I would go with a custom button. Please look at Creating a python add-in button
... View more
02-05-2015
07:26 AM
|
1
|
0
|
920
|
POST
|
It will require a code block which is nothing but a python function. Please refer Calculate Field Examples So all you need is something like def cal( valA): if(valA.startswith('CST') or valA.startswith('AFF')): return 11 else: return and call it as cal(!Field_A!) Hope that helps.
... View more
02-05-2015
07:12 AM
|
2
|
3
|
467
|
POST
|
You can run your script from ArcMap's Python window. First you need to import the toolbox or python toolbox. arcpy.ImportToolbox(r'C:\MyToolbox.pyt') Now if you have a tool in toolbox defined as MyTool with a single parameter you can call it as: arcpy.MyTool('Hello') Hope that helps.
... View more
02-04-2015
11:46 AM
|
0
|
0
|
920
|
POST
|
It doesn't look to be complete script. Are you seeing the gp services log messages when you are calling append ? I do have experience in uploading data that will be used in gp service. Following is a blog that helped me in understanding. Uploading client data to perform thematic mapping on the server | ArcGIS Blog Basically you need to zip your shapefile and upload it then do whatever you want to do with it.
... View more
02-03-2015
06:21 AM
|
1
|
0
|
182
|
Title | Kudos | Posted |
---|---|---|
1 | 01-21-2015 03:06 PM | |
1 | 09-16-2015 12:55 PM | |
1 | 09-15-2015 08:33 AM | |
2 | 09-15-2015 07:53 AM | |
1 | 09-16-2015 06:33 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|