|
POST
|
Try this, this actually a query request to an ESRI hosted ArcGIS Server. Polygon: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/2/query?text=… Line: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/1/query?text=… Point: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0/query?text=…
... View more
08-13-2014
03:25 AM
|
1
|
0
|
519
|
|
POST
|
Hi Chole, Are you trying to create a TIN surface ArcGIS Help 10.1? If so you'll need 3D Analyst extension for that ArcGIS Help 10.1.
... View more
08-13-2014
12:06 AM
|
0
|
1
|
1954
|
|
POST
|
Hi Bryan, No doubt, you can modify the main.js to work with your feature service. Good luck, do post you code back in the forum, sure there are others who'll be interested in that. Regards Riyas
... View more
08-12-2014
10:27 PM
|
0
|
0
|
945
|
|
POST
|
Hi Bryan, You have got a point feature layer added in your web map. But the web map used in the sample has a csv or shape file added to the web map. Refer to short list tutorial Shortlist Tutorial | Story Maps | Story Maps step 4, i suspect you have not done that for your web map. I managed to get the map visible by adding if else block around line 639 to 660 in app\main.js. Digging the code further, it's looking for a layer added through step 4 in the tutorial.
... View more
08-12-2014
09:35 PM
|
1
|
2
|
945
|
|
POST
|
1. Set defintion query on your zip code layer using [Population Field] > 10000 2. Set defintion query on your traffic data using [Traffic Field] > 2000 3. Create a buffer on traffic data layer using buffer distance 3 miles ArcGIS Help 10.1 4. Perform spatial intersection between your zip code layer (step 1) and buffer feature class created in step 3 ArcGIS Help 10.1 5. Any point on the resulting feature class is the point you are interested in.
... View more
08-12-2014
07:08 PM
|
0
|
0
|
490
|
|
POST
|
Hi Mike, Below function lets you calculate the shortest distance between start and end point of a line as an attribute column in arcmap. def CalculateDistance(shape): startPoint = shape.firstPoint endPoint = shape.lastPoint return math.sqrt( math.pow( startPoint.X - endPoint.X, 2 ) + math.pow( startPoint.Y - endPoint.Y, 2 ))
... View more
08-12-2014
06:25 PM
|
1
|
3
|
4764
|
|
POST
|
If you have the coordinates of the points (P1, P2) then. d = Math.sqrt(Math.Pow(P1.x - p2.X, 2) + Math.Pow(P1.y - P2.y, 2))
... View more
08-12-2014
04:57 PM
|
0
|
7
|
4764
|
|
POST
|
The string you have got is WKT representation of a polygon. Apparently ESRI does not provide any ArcObjects interface for WKT string to Geometry. I myself spent quality time recently searching for one. If creating a shape file is what you want then possibly take this approach. Create a python script using arcpy.FromWKT to create geometry. Utilizing 'fromWKT' function in python in version 10.1 Then call this python script from your application. .net - run a python script from c# - Stack Overflow Hope this helps!
... View more
08-12-2014
07:22 AM
|
1
|
1
|
934
|
|
POST
|
for some reason formatting was completely off in my previous post.
function showIdentifyResults(r, tasks) {
var results = [];
var taskUrls = [];
r = dojo.filter(r, function (result) {
return r[0];
});
for (i = 0; i < r.length; i++) {
results = results.concat(r);
for (j = 0; j < r.length; j++) {
taskUrls = taskUrls.concat(tasks.url);
}
}
//combine content -------------------
var content = parcels = buildings ="";
var parcelFeatures = [];
dojo.forEach(results, function(result) {
var feature = result.feature;
var atts = feature.attributes;
feature.attributes.layerName = result.layerName;
if(result.layerName === 'Tax Parcels'){
parcels += atts["Postal Address"] + "<br />";
parcelFeatures[parcelFeatures.length] = result.feature;
}
else if (result.layerName === 'Building Footprints'){
buildings += "Building/Parcel ID: " + atts.PARCELID + "<br />";
}
});
if ( parcels ) {
content += "<b>Parcels</b><br />" + parcels;
}
if ( buildings ) {
content += "<b>Buildings</b><br />" + buildings;
}
console.log("content: ", content);
map.infoWindow.setTitle("Parcel Information");
map.infoWindow.setContent(content);
//map.infoWindow.show(idPoint);
if (results.length === 0) {
map.infoWindow.clearFeatures();
} else {
map.infoWindow.setFeatures(parcelFeatures);
map.infoWindow.setContent(content);
}
map.infoWindow.show(idPoint);
return results;
}
... View more
08-12-2014
06:29 AM
|
0
|
1
|
1000
|
|
POST
|
Hi Jeff, If below is the result you are looking for combined info result with zoom to. Below is your modified showIdentifyResults (inserted lines 17, 24, 47)
function showIdentifyResults(r, tasks) {
var results = [];
var taskUrls = [];
r = dojo.filter(r, function (result) {
return r[0];
});
for (i = 0; i < r.length; i++) {
results = results.concat(r);
for (j = 0; j < r.length; j++) {
taskUrls = taskUrls.concat(tasks.url);
}
}
//combine content -------------------
var content = parcels = buildings ="";
var parcelFeatures = [];
dojo.forEach(results, function(result) {
var feature = result.feature;
var atts = feature.attributes;
feature.attributes.layerName = result.layerName;
if(result.layerName === 'Tax Parcels'){
parcels += atts["Postal Address"] + "<br />";
parcelFeatures[parcelFeatures.length] = result.feature;
}
else if (result.layerName === 'Building Footprints'){
buildings += "Building/Parcel ID: " + atts.PARCELID + "<br />";
}
});
if ( parcels ) {
content += "<b>Parcels</b><br />" + parcels;
}
if ( buildings ) {
content += "<b>Buildings</b><br />" + buildings;
}
console.log("content: ", content);
map.infoWindow.setTitle("Parcel Information");
map.infoWindow.setContent(content);
//map.infoWindow.show(idPoint);
if (results.length === 0) {
map.infoWindow.clearFeatures();
} else {
map.infoWindow.setFeatures(parcelFeatures);
map.infoWindow.setContent(content);
}
map.infoWindow.show(idPoint);
return results;
}
... View more
08-12-2014
06:26 AM
|
0
|
2
|
1000
|
|
POST
|
Did you try using setDefinitionExpression(expression) on the feature layer? featurelayer | API Reference | ArcGIS API for JavaScript
... View more
08-11-2014
07:09 PM
|
1
|
0
|
1578
|
|
POST
|
You can use Clip tool in ArcToolbox to clip your feature class. ArcGIS Desktop
... View more
08-09-2014
04:21 AM
|
0
|
1
|
923
|
|
POST
|
Have a look at below article. 32962 - Run a model as a Windows scheduled task
... View more
08-08-2014
05:43 AM
|
0
|
0
|
873
|
|
POST
|
If your feature class is stored in a database then, possibly you can create a spatial view representing your date as integer. (Year * 10000) + (Month * 100) + date E.g. 08/08/2014 will become, 20140808. You can then use this integer representation of your date to define your symbology.
... View more
08-08-2014
05:17 AM
|
2
|
0
|
4169
|
|
POST
|
Looks like you want to execute identify on multiple map services. What you need here is dojo.deferredList Below extracts from one of my old project where i have used deferred list for wiring multiple selection operation. You should be able to build up on this.
// 1. Populate your deferred array
var deferredQuery = this._queryTask.execute(args.spatialQuery);
this._deferredQueryArray[this._deferredQueryArray.length] = deferredQuery;
// 2. Hook up your deferred list then action
if (this._deferredQueryArray.length > 0) {
this._deferredQueryList = new dojo.DeferredList(this._deferredQueryArray);
this._deferredQueryList.then(
dojo.hitch(this, this.handleDeferredResults, extent, businessData, queryLayerMap),
dojo.hitch(this, function (err) {
alert(err);
}));
}
// 3. Handle your deferred
handleDeferredResults: function (extent, businessData, queryLayerFieldMaps, results) {
console.log("Entered Method: " + arguments.callee.nom);
if (results.length != queryLayerFieldMaps.length) {
alert("Somethings not right, contact application support. Business data and spatial results don't match");
}
this.removeFiredFromDeferred(this._deferredQueryArray);
// Do whatever you would normally do with your identify result.
}
// 4. Clear Your fired deferred from your deferred list
removeFiredFromDeferred: function (deferredArray) {
for (var idx = deferredArray.length -1; idx >= 0; idx--) {
if (deferredArray[idx].fired > -1) {
deferredArray.splice(idx, 1);
}
}
}
... View more
08-05-2014
11:04 PM
|
1
|
1
|
1329
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-31-2014 06:04 AM | |
| 1 | 09-25-2014 06:03 PM | |
| 1 | 09-16-2014 06:15 PM | |
| 1 | 10-08-2014 03:50 AM | |
| 1 | 08-25-2014 08:33 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|