|
POST
|
Yes Neil, it could/should sit outside. I put it inside just for demo purposes. The main thing is to show the iteration over the polygon part vertices.
... View more
08-16-2016
03:41 AM
|
0
|
1
|
8550
|
|
POST
|
What MODE (FeatureLayer | API Reference | ArcGIS API for JavaScript 3.17 ) are you using to display the layer?
... View more
08-16-2016
02:34 AM
|
0
|
2
|
1597
|
|
POST
|
I would use a boolean variable to "manage" the visibility of the layer and just toggle the boolean value each time the button is clicked. Then based on the boolean value set the visibility of the layer within the onclick function. var layerIsOn = false;
var eventHandle = dojo.connect(node, "onclick", function addMapLayer1(e) {
layerIsOn = !layerIsOn;
if (layerIsOn) {
// switch layer on
} else {
// switch layer off
}
});
... View more
08-16-2016
02:27 AM
|
0
|
0
|
1446
|
|
POST
|
If your page numbering and ordering field is of type String (which I assume it is) it will sort like it does. You could add another field of type Integer, calculate the new field using the current numbering field as value and use the integer field rather as ordering field for your DDP.
... View more
08-16-2016
01:00 AM
|
1
|
1
|
1284
|
|
POST
|
With Python you can iterate the polygon part vertices and write them to a new table. You can change the field names and outputs as required. Select a single polygon segment to only write one table and run the script from the ArcMap Python console. import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = mxd.activeDataFrame
layers = arcpy.mapping.ListLayers(df)
layer = layers[0]
with arcpy.da.SearchCursor(layer, ["SHAPE@", "OBJECTID"]) as lcursor:
for lrow in lcursor:
polygon = lrow[0]
objId = lrow[1]
# create table for selected feature
arcpy.CreateTable_management(arcpy.env.scratchWorkspace, "pntTable_" + str(objId))
table = arcpy.env.scratchWorkspace + "\\pntTable_" + str(objId)
# add fields or use a template
arcpy.AddField_management(table, "X", "DOUBLE")
arcpy.AddField_management(table, "Y", "DOUBLE")
icursor = arcpy.da.InsertCursor(table, ["X", "Y"])
# iterate through polygon parts
part = polygon.getPart(0) # assuming a single part polygon
# list polygon part points
for pnt in part:
print "X: " + str(pnt.X) + " Y: " + str(pnt.Y)
# add to table
icursor.insertRow([pnt.X, pnt.Y])
del icursor
del lcursor
... View more
08-15-2016
11:56 PM
|
1
|
3
|
8550
|
|
POST
|
The Directional Distribution tool (Directional Distribution (Standard Deviational Ellipse)—Help | ArcGIS for Desktop ) might help eliminate the outliers. It also provides the centroid coordinates of the ellipse indicating the distribution.
... View more
08-15-2016
01:09 AM
|
1
|
1
|
5731
|
|
POST
|
You can pass any geometry in the FeatureLayer query (FeatureLayer | API Reference | ArcGIS API for JavaScript 3.17 ). var query = new Query();
query.outFields = [ "*" ];
query.geometry = myCostumExtentPolygonGeometry;
featureLayer.queryFeatures(query, function(featureSet) {
// process results
});
... View more
08-14-2016
11:09 PM
|
1
|
0
|
680
|
|
POST
|
If you convert the KMZ back to KML (in Google Earth), you can open the KML with a text editor (e.g. Notepad) and will see that the polygon geometry is written in exactly the format you require. Then you can just copy and paste the geometry to a new XSLT file.
... View more
08-12-2016
06:02 AM
|
0
|
0
|
1641
|
|
POST
|
You can try this script. I'm not familiar with the ET-Geotools version, but I think it does more or less the same. It adds the split parts to the existing polygon layer, but you can change it to write to a new feature class. import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = mxd.activeDataFrame
layers = arcpy.mapping.ListLayers(df)
# select layer - my known polygon layer with only one polygon
poly = layers[2]
# split steps
splits = [20, 30, 50]
# get polygon and extent properties
with arcpy.da.SearchCursor(poly, ["SHAPE@"]) as pcursor:
for prow in pcursor:
polygon = prow[0] # polygon to cut
e = polygon.extent # bounding extent of polygon
print e.XMin,e.YMin,e.XMax,e.YMax
del pcursor
# geometric cut test iteration step size - modify value to get better accuracy
stepsize = 0.001
# set parameters to move from left to right over the polygon
leftXstart = e.XMin
leftX = e.XMin + stepsize
ymax = e.YMax
ymin = e.YMin
cutpoly = polygon
icursor = arcpy.da.InsertCursor(poly, ["SHAPE@"])
# iterate cut percentage list
for i in splits[:2]:
print i
tol = 0
while tol < i:
# construct NS line
pntarray = arcpy.Array()
pntarray.add(arcpy.Point(leftX, ymax))
pntarray.add(arcpy.Point(leftX, ymin))
pline = arcpy.Polyline(pntarray,arcpy.SpatialReference(4326))
# cut polygon and get split-parts
cutlist = cutpoly.cut(pline)
tol = 100 * cutlist[1].area / polygon.area
leftX += stepsize
#print str(leftX) + ":" + str(tol)
cutpoly = cutlist[0]
# part 0 is on the right side and part 1 is on the left side of the cut
icursor.insertRow([cutlist[1]])
# insert last cut remainder
icursor.insertRow([cutlist[0]])
del icursor This is the result for cutting the polygon into 20%, 30% and 50%
... View more
08-12-2016
04:21 AM
|
3
|
7
|
8349
|
|
POST
|
Are you referring to doing a identify/query on a layer at a specific location? Query (Operation) You can run the query operation directly from the REST endpoint for the specific layer at the bottom of the page. Then just specify the input/output values
... View more
08-12-2016
01:49 AM
|
2
|
2
|
1193
|
|
POST
|
You could add all the result features in a bigger array and then add them all at once: var queryTask = new QueryTask({
url: "http://*******/arcgis/rest/services/Test/MapServer/1"
});
var time = 0;
function querydata() {
var allFeatures = []; // array for all resulting features
for (var i = 0; i < 8; i++) {
var query = new Query();
query.returnGeometry = true;
//query.outFields = ["OBJECTID", "RELHEI", "name"];
query.outFields = ["*"];
var start = 0 + i * 1000
var end = start + 1000
query.where = "OBJECTID > " + start + " AND OBJECTID < " + end;
queryTask.execute(query)
.then(function(results) {
time++;
var l = results.features;
//collection.addMany(results.features);
allFeatures.push(results.features);
if (i == 8) {
// add when final result set has been retrieved
collection.addMany(allFeatures);
querylayer.source = collection;
myMap.add(querylayer);
}
})
.otherwise(function(error) {
console.log(error);
})
}
}
... View more
08-12-2016
12:48 AM
|
0
|
0
|
810
|
|
POST
|
Have a look at the answer provided by Joel Bennett in this post: https://community.esri.com/message/525576#comment-525576
... View more
08-11-2016
11:22 PM
|
1
|
1
|
1287
|
|
POST
|
Hi Mark, have you looked at the example on this page: UniqueValueRenderer | API Reference | ArcGIS API for JavaScript 4.0 You need to define the renderer first, then apply it to the FeatureLayer.
... View more
08-11-2016
02:25 AM
|
0
|
0
|
696
|
|
POST
|
Once you have set up your DDP, you can use the Page Definition of the layer's Definition Queryto filter the features you want to display. Using Page Definition Queries—Help | ArcGIS for Desktop So make a copy of the Stops layer and apply the Page Definition Query to match the stop number, also activating the labels for the copied layer.
... View more
08-11-2016
12:54 AM
|
0
|
0
|
981
|
|
POST
|
From the log statistics, could you determine if any other processes were running at the same time? And do you have enought instances assigned to the cached service?
... View more
08-10-2016
10:55 PM
|
1
|
0
|
1948
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-22-2024 12:37 AM | |
| 1 | 10-02-2025 10:28 AM | |
| 1 | 09-17-2024 12:29 AM | |
| 1 | 03-15-2024 11:33 AM | |
| 1 | 03-13-2024 11:20 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-02-2026
12:31 AM
|