POST
|
No luck using an array. Set up the variable with the statistics and fields but got an execute error when testing in the code in the Python window. Getting error code 000369 which is invalid input field(s). Ran just the dissolve with two fields for statistics and was still throwing the same error with the array. This is the same error that I get when hard coding the the two fields with the statistics function as well as using an array with one field and stats function. I went back and tried my original code in the Python window and it throws the same error to. I also check all my fields and the spelling is correct, wondering if the issue is concatenating two or more fields for the stats function.
... View more
12-20-2013
06:46 AM
|
0
|
0
|
379
|
POST
|
Hey People, I have been working on trying to perform a large dissolve analysis using statistics within my script. I can get a simple dissolve to work with with doing statistics for one field but not multiple fields. The resource center doesn't have any examples of using statistics for the dissolve (data management). I need to do the dissolve a few different times but it would be a chore to manually setup 39 fields for statistics. I am looking for a little help on syntax of my code snippet. See the code below: arcpy.Dissolve_management("DAT_263_49_13_wD", "A:/Projects/Location-Allocation/Final_Output/District49.shp", "N_Dist_ID", "'ORG_NO_ID COUNT';
'HIO_Total SUM';'MIO_Total SUM';'MIC_HAR SUM';'MIC_Industry SUM';'SWR_RY1 SUM';'SWR_RY2 SUM';'SWR_RY3 SUM';'Used_total SUM';'AA SUM';'AA_50k SUM';
'Core SUM';'Core_50k SUM';'Hispanic SUM';'Hispanic_50k SUM';'Women SUM';'Women_50k SUM';'Young_Adult SUM';'Young_Adult_50k SUM';'Asian SUM';
'Asian_50k SUM';'Nat_Amer SUM';'Nat_Amer_50k SUM';'Unknown SUM';'Sum SUM';'S_BMW SUM';'S_CanAM SUM';'S_Ducati SUM';'S_Honda SUM';
'S_Indian SUM';'S_Kawasaki SUM';'S_KTM SUM';'S_PGroup SUM';'S_PVictory SUM';'S_Suzuki SUM';'S_Triumph SUM';'S_Yamaha SUM';'S_T_CompDlrs SUM';'PnA_Total SUM';'GM_Total SUM'","MULTI_PART","DISSOLVE_LINES") (added spaces for the sake of reading the code) I have also tried just using double quote instead of single quotes and no quotes inside of the a pair of double quotes. Let me know if this makes since and I can provide more info if needed. Any help would be greatly appreciated, and I would be very thankful. Chris
... View more
12-20-2013
05:50 AM
|
0
|
3
|
1377
|
POST
|
Hey People, I am working on an application that contains a building directory. I'm using a data grid inside a tabbed content plane. I have the complete building directory displayed in the data grid, but the zoom to button doesn't work for all items. My feature class is a multi-part polygons with five classification. Currently the zoom too only works with things that are classified buildings. [ATTACH=CONFIG]16882[/ATTACH] I used code from the data grid example: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm If you can let me know if this doesn't work with a different classifications that would be great. Also is it possible to link the Zoom button with an info window and how would one do that? Thanks in advance Chris!
... View more
08-13-2012
07:11 AM
|
0
|
0
|
355
|
POST
|
Thanks for help that seems to be working. The issue with the items that don't get zoomed too are they are too small to be zoomed too and they are also not represented on the map. By chance do you have any idea to link my info Windows to the click event in the data grid? Thanks again this has been a big help. Chris
... View more
05-09-2012
01:31 PM
|
0
|
0
|
385
|
POST
|
Thanks And what you said is exactly what I've been doing here are three aspects of my code. Test is the data grid with an esri base working. The one with _working in the title is the application with out the data grid and the other is the attempt on combining. If you can give me any tips on cleaning up my code and suggestions would be appreciated. Thanks for the example.
... View more
05-09-2012
11:47 AM
|
0
|
0
|
385
|
POST
|
Hey I'm having some issues in trying to figure out what I need to do to be able to get images and hyperlinks to show up in the following code block. I want to be able to populate the attribute table of the feature class with the all the paths for the images and with the hyperlinks information and pull that info so it shows in the infowindow. Please help and thanks.
function showFeature(feature,evt)
{
map.graphics.clear();
//set symbol for highlighting
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.5]));
feature.setSymbol(symbol);
var attr = feature.attributes;
var title = attr.NAME;
var content = "Address : " + attr.Address
+ "<br />Abbreviation : " + attr.Abbreviati
+ "<br />Building Number : " + attr.BUILD_NUM
+ "<br />" + attr.Hyperlink
+ "<br />" + attr.Image_;
//construct infowindow title and content
map.graphics.add(feature);
map.infoWindow.setTitle(title);
map.infoWindow.setContent(content);
(evt) ? map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)) : null;
}
... View more
05-09-2012
11:04 AM
|
0
|
1
|
611
|
POST
|
//add the building Directory files
buildingLayer = new esri.layers.FeatureLayer("http://webgis.uwm.edu/ArcGISUWM/rest/services/CampusJava/MapServer/0",{
mode:esri.layers.FeatureLayer.MODE_SELECTION,
maxAllowableOffset:maxOffset(map,1),
outFields:["NAME","Abbreviati","OBJECTID"]
});
//define a selection symbol
// var highlightSymbol = new esri.symbol.SimpleFillSymbol().setColor( new dojo.Color([50,205,50,.25]));
//buildingLayer.setSelectionSymbol(highlightSymbol);
dojo.connect(buildingLayer,'onLoad',function(layer){
var query = new esri.tasks.Query();
query.where = "1=1";
layer.queryFeatures(query,function(featureSet){
var items = dojo.map(featureSet.features,function(feature){
return feature.attributes;
});
var data = {
identifier:"NAME",
items:items};
store = new dojo.data.ItemFileReadStore({data:data});
grid.setStore(store);
grid.setSortIndex(1,"true"); //sort on the state name
});
});
//modify the grid so only the Building_NAME field is sortable
grid.canSort = function(col){ if(Math.abs(col) == 2) { return true; } else { return false; } };
}
function makeZoomButton(id){
var zBtn = "<div dojoType='dijit.form.Button'><img src='images/zoom2.png'";
zBtn = zBtn + " width='20' height='20'";
zBtn = zBtn + " onClick=\"zoomRow('"+id+"')\"></div>";
return zBtn;
}
function zoomRow(id){
buildingLayer.clearSelection();
var query = new esri.tasks.Query();
query.objectIds = [id];
buildingLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW,function(features){
//zoom to the selected feature
var buildingExtent = features[0].geometry.getExtent().expand(5.0);
map.setExtent(buildingExtent);
});
<div dojotype="dijit.layout.ContentPane" title="Building<br />Directory" selected="false">
<table dojotype="dojox.grid.DataGrid" jsid="grid" id="grid" selectionMode="none">
<thead>
<tr>
<th field="OBJECTID" formatter="makeZoomButton" width="25px">
<img alt="+" src="images/zoom2.png"/>
</th>
<th field="NAME" width="135px">Building</th>
<th field="Abbreviati" width="53px">Abb.</th>
</tr>
</thead>
</table>
</div>
... View more
05-09-2012
10:18 AM
|
0
|
0
|
879
|
POST
|
//add the building Directory files buildingLayer = new esri.layers.FeatureLayer("http://webgis.uwm.edu/ArcGISUWM/rest/services/CampusJava/MapServer/0",{ mode:esri.layers.FeatureLayer.MODE_SELECTION, maxAllowableOffset:maxOffset(map,1), outFields:["NAME","Abbreviati","OBJECTID"] }); //define a selection symbol // var highlightSymbol = new esri.symbol.SimpleFillSymbol().setColor( new dojo.Color([50,205,50,.25])); //buildingLayer.setSelectionSymbol(highlightSymbol); dojo.connect(buildingLayer,'onLoad',function(layer){ var query = new esri.tasks.Query(); query.where = "1=1"; layer.queryFeatures(query,function(featureSet){ var items = dojo.map(featureSet.features,function(feature){ return feature.attributes; }); var data = { identifier:"NAME", items:items}; store = new dojo.data.ItemFileReadStore({data:data}); grid.setStore(store); grid.setSortIndex(1,"true"); //sort on the state name }); }); //modify the grid so only the Building_NAME field is sortable grid.canSort = function(col){ if(Math.abs(col) == 2) { return true; } else { return false; } }; } function makeZoomButton(id){ var zBtn = "<div dojoType='dijit.form.Button'><img src='images/zoom2.png'"; zBtn = zBtn + " width='20' height='20'"; zBtn = zBtn + " onClick=\"zoomRow('"+id+"')\"></div>"; return zBtn; } function zoomRow(id){ buildingLayer.clearSelection(); var query = new esri.tasks.Query(); query.objectIds = [id]; buildingLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW,function(features){ //zoom to the selected feature var buildingExtent = features[0].geometry.getExtent().expand(5.0); map.setExtent(buildingExtent); }); <div dojotype="dijit.layout.ContentPane" title="Building<br />Directory" selected="false"> <table dojotype="dojox.grid.DataGrid" jsid="grid" id="grid" selectionMode="none"> <thead> <tr> <th field="OBJECTID" formatter="makeZoomButton" width="25px"> <img alt="+" src="images/zoom2.png"/> </th> <th field="NAME" width="135px">Building</th> <th field="Abbreviati" width="53px">Abb.</th> </tr> </thead> </table> </div>
... View more
05-09-2012
10:06 AM
|
0
|
0
|
879
|
POST
|
What is the best way to insert code into these messages? Also is there a way to attach text files to these post?
... View more
05-07-2012
12:15 PM
|
0
|
0
|
879
|
POST
|
Thanks for the input. Chris, the first link you posted is the application that I referenced to add the Google basemap. I didn't mention it in the first post is that if I'm using a esri basemap the zoom function works fine and I used the wkid = 102100. I referenced this app for the zoom functionality. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm If there is something that I missed let me know. Thanks again Chris
... View more
05-07-2012
10:22 AM
|
0
|
0
|
879
|
POST
|
Hey I'm new at JavaScript coding and I've gotten stuck in a project that I'm working on. I working on using a Google basemap with some operational feature layers. There is supposed to be a zoom to feature from a list, but it isn't working all that well. When I click some items it works, but others are taking me to the middle of Africa rather than where it should be in Milwaukee. It recently came to my attention that I may need to change my spatial reference. I'm wondering if someone might be able to tell me what spatial reference "wkid" code to use with a Google basemap. thanks
... View more
05-07-2012
08:41 AM
|
0
|
14
|
3553
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|