|
POST
|
Hi Gabriel, Take a look at a similar sample here. Instead of using a definition query, this sample uses the Query Task. The Query Task has an onComplete event, which returns a featureSet. You can set the extent to the featureSet using the esri.graphicsExtent method: var featureExtent = esri.graphicsExtent(featureSet.features);
map.setExtent(featureExtent); Also, to answer your second questions, you can use an integer value with the Query Task or setdefenitionexpression
... View more
04-29-2013
08:07 AM
|
0
|
0
|
1381
|
|
POST
|
Hi Mike, I believe the problem is with your 'out_name' variable. You are setting this to a full path, i.e "C:\Temp\XY.shp". The tool requires that you simply specify the Feature Class/Shapefile Name, i.e. "XY.shp". Try setting the out_name variable to the following: out_name = outputFile.split("\\")[-1][:-4] + ".shp"
... View more
04-29-2013
05:19 AM
|
0
|
0
|
688
|
|
POST
|
How did you create the buffer? Did you use the Buffer tool in ArcToolbox? You should be able to just remove the buffered layer from the table of contents.
... View more
04-29-2013
05:02 AM
|
0
|
0
|
2800
|
|
POST
|
Hi Miro, Within the geoprocessing service properties, set the Message Level to 'Info'. This will report more information when the GP service is executed. [ATTACH=CONFIG]23824[/ATTACH]
... View more
04-29-2013
04:36 AM
|
0
|
0
|
2558
|
|
POST
|
Hi Miro, Within the geoprocessing service properties, set the Message Level to 'Info'. This will report more information when the GP service is executed. [ATTACH=CONFIG]23823[/ATTACH]
... View more
04-29-2013
04:35 AM
|
0
|
0
|
2558
|
|
POST
|
I'm not sure it goes into a loop with an "if/else" statement. Infinite loops are usually created from "while" statements. I would recommend adding some more arcpy.AddMessage commands to see exactly what is going on.
... View more
04-26-2013
06:17 AM
|
0
|
0
|
2136
|
|
POST
|
Hi Scott, You can check whether a variable is an integer using 'isinstance'. Try writing the if/else loop as: if isinstance(maxKmInterstate, (float, int)) and maxKmInterstate > 0:
<code>
else:
<code> Also, when posting your code your have your closing tag wrong [\CODE]. It should be . An easy approach is select your code and click the # symbol in the header and the CODE tags will automatically be added to the selected text.
... View more
04-24-2013
05:40 AM
|
0
|
0
|
2136
|
|
POST
|
At what point is this failing (i.e. creating the database, creating the repository), and what is the error you are receiving?
... View more
04-24-2013
03:10 AM
|
0
|
0
|
772
|
|
POST
|
If your map's spatial reference is Web Mercator or Geographic, you can use the geographicGeometry property of the onDrawComplete event. This will return the XY coordinates in lat/long. console.log(geometry.geographicGeometry.rings); When creating a triangle you should get 4 points. The 4th point will be a duplicate of the first point. When you digitizing, double-click the 3rd point and the triangle will auto-complete. If you are trying to close the triangle yourself by double-clicking on the 4th point, it will create a 5th point unless you are exactly clicking on the starting point.
... View more
04-24-2013
02:39 AM
|
0
|
0
|
841
|
|
POST
|
Hi Richard, You could use the onDrawComplete event to do this. Ex: dojo.connect(tb, "onDrawComplete", function(geometry){
console.log(geometry.geometry.rings);
});
... View more
04-23-2013
11:47 AM
|
0
|
0
|
841
|
|
POST
|
Hi Michael, After a quick test, I was not able to reproduce this. 1. What version of ArcGIS (including service packs) are you running? 2. What version is the file geodatabase? 3. Can you reproduce this on other file geodatabases?
... View more
04-23-2013
10:17 AM
|
0
|
0
|
4097
|
|
POST
|
You can do this using the Append tool. Here is an example: arcpy.Append_management("C:/Temp/Python/Test.gdb/Centerlines", "C:/Temp/Python/Test.gdb/Streets", "NO_TEST", """NAME, #, #, C:/Temp/Python/Test.gdb/Centerlines, StreetName;\
Address, #, #, C:/Temp/Python/Test.gdb/Centerlines, Addr""") In the above example, the field "NAME" in the Streets feature class is being populated by the field "StreetName" from the Centerlines feature class. Also, "Address" is being populated by "Addr".
... View more
04-23-2013
03:37 AM
|
0
|
0
|
947
|
|
POST
|
Hi Jim, You can do this using the "onEditsComplete" event along with the "onDrawEnd" event. Here is an example: dojo.connect(operationsPointLayer, "onEditsComplete", function(){
var tb = new esri.toolbars.Draw(map);
tb.activate(esri.toolbars.Draw.POINT);
dojo.connect(tb, "onDrawEnd", function(geometry){
console.log("X: " + geometry.x + ", Y: " + geometry.y);
});
tb.deactivate();
}
... View more
04-23-2013
02:48 AM
|
0
|
0
|
1227
|
|
POST
|
Hi Andrsez, For your feature service, you can control which editing operations are allowed. Right-click on the feature service in the catalog window > Service Properties > Feature Access. Uncheck 'Update' and 'Delete'. Ex: [ATTACH=CONFIG]23708[/ATTACH]
... View more
04-22-2013
08:10 AM
|
0
|
0
|
807
|
|
POST
|
Hi Damon, This is usually an indication that the layer does not exist within the MXD. Try using a wildcard: lyr = arcpy.mapping.ListLayers(mxd,"Burg*",df)[0]
... View more
04-22-2013
04:39 AM
|
0
|
0
|
3458
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Online
|
| Date Last Visited |
7 hours ago
|