|
POST
|
I was able to move the delete button to the top of the page using position:absolute !important;top:20% !important;margin-left:30% !important; I would now like to modify the delete icon since it has a strange bubble underneath it. I've been trying to use the atiDeleteIcon but not having much success. I've tried it a few different ways such as .esriAttributeInspector .atiDeleteIcon{ but nothing seems to change. Has anyone else changed an icon yet of either the previous, next, or last icon? Also has anyone been able to change the screen that shows up after you click the delete button? I'd like to add some information on that page but all it displays is the geocoded address and "No Features Selected". I have set up icon for the save button like the following:
.esriAttributeInspector .atiLayerName {display:none;}
.saveButton {
margin:0px;
width:16px;
height:16px;
background-image:url('save.png')!important;
background-repeat:no-repeat;
}
....
var saveButton = new dijit.form.Button({"iconClass":"saveButton"});
... View more
10-06-2011
09:23 AM
|
0
|
0
|
2677
|
|
POST
|
Do you have a code sample that you would care to share? Thanks! It's a ArcObjects code written in Java. I am not sure if it is appropriate to post here. Here is the code snippets (i appologize if someone feels offended).
while(feature !=null)
{
/*
* reproject feature to web mercator
*/
feature.project(webMercator); // webMercator is a SR defined as class property
if (getGeometryType()=="esriGeometryPoint") geometryStr=ServerUtilities.getJSONFromPoint((Point)feature.getShape()).toString();
else if (getGeometryType()=="esriGeometryMultipoint")
geometryStr=ServerUtilities.getJSONFromMultipoint((Multipoint)feature.getShape()).toString();
else if (getGeometryType()=="esriGeometryPolyline")
{
polyline=(Polyline)feature.getShape();
polyline.generalize(1);
geometryStr=ServerUtilities.getJSONFromPolyline(polyline).toString();
}
else if (getGeometryType()=="esriGeometryPolygon")
{
polygon =(Polygon)feature.getShape();
polygon.generalize(1); geometryStr=ServerUtilities.getJSONFromPolygon(polygon).toString();
}
else
geometryStr =JSONObject.NULL.toString();
attributesStr ="{";
/*
* create a JSON text of feature attributes
*/
for (int i=0; i<fldCount; i++)
{
field = fields.getField(i);
//SHAPE.LENGTH and SHPAE.AREA
if (field.getType()!=esriFieldType.esriFieldTypeGeometry &&
field.getType()!=esriFieldType.esriFieldTypeRaster &&
field.getType()!=esriFieldType.esriFieldTypeBlob && field.getName().indexOf("SHAPE.")==-1)
{
if (feature.getValue(i)==null)
attributesStr +="\""+field.getName()+"\":"+ JSONObject.NULL.toString()+",";
else if (field.getType()==esriFieldType.esriFieldTypeString ||field.getType()==esriFieldType.esriFieldTypeDate)
attributesStr +="\""+field.getName()+"\":\""+ feature.getValue(i).toString()+"\",";
else
attributesStr +="\""+field.getName()+"\":"+ feature.getValue(i).toString()+",";
}
}
/*
* add change type to the attributes
*/
attributesStr +="\"changeType\":"+ changeType +"}";
/*
* put geometry and attribute key/value pair together
* and form a JSON representation of feature
*/
featureJSON =new JSONObject();
featureJSON.put("attributes", new JSONObject(attributesStr));
featureJSON.put("geometry", new JSONObject(geometryStr));
//featuresArray is a JSONArray
featuresArray.put(featureJSON);
feature =(Feature)pCursor.nextFeature();
}
... View more
10-06-2011
05:28 AM
|
0
|
0
|
1858
|
|
POST
|
maxAllowableOffset isn't specific to feature layers, query and identify tasks can also use it. It's a best practice to use it and I'm pretty sure it'll stop this error from appearing. Just want to share with developers what i have learned on maxAllowableOffset. I recently have a project where I need write an ArcObject routine to retrieve a collection of features from a polyline feature class. And then convert them into a featurecollection JSON text (layerdefinition, featureSet etc) so that I can create a feature layer dynamically using this featurecollection. Initially it took around 315 seconds to converting 8 polylines to JSON text. So I added the method Polyline.generalize(double maxAllowableOffset) before the conversion. Now it only takes 18 seconds to convert (5.7% of the previous time!). I am not 100% sure whether the method is what Javascript API maxAllowableOffset internally implemented. However it is amazing how geometry generalization make a huge difference. The method uses widely accepted Douglas-Poiker algorithm for linear simplification. It basically treat the two points within maxAllowableOffset as the same, thus dramatically reduce the number of points in a polyline�??s pointcollection. In my case it reduced the lenght of featurecollection JSON text from 630,681 to 13, 161 and still well preserve the integrity of geometry shape. So I strongly recommend using maxAllowableOffset whenever you can.
... View more
10-04-2011
07:33 AM
|
0
|
0
|
1858
|
|
POST
|
Thanks for the quick response. I was originally using a composite locator and could not bind it and assumed my data grid was structured wrong. However, once I used a single locator, I could bind. I guess the composite returns a different array structure. Thanks again. IN your locator REST entry, you could find Candidate Fields and/or Intersection Candidate Fields. Those fields are the ones you could choose to bind.
... View more
10-03-2011
09:07 AM
|
0
|
0
|
2105
|
|
POST
|
I'm using the Google Maps Layer for ArcGIS JavaScript API- <script type="text/javascript" src="http://gmaps-utility-gis.googlecode.com/svn/tags/gmapslayer/1.0/src/gmapslayer_compiled.js" ></script> var gMapLayer = new gmaps.GoogleMapsLayer({visible:false, id:'googlemaps'}); map.addLayer(gMapLayer); I'm also using a feature layer which seems to work but when panning around the map my featurelayer pans farther then the google maps layer. Is there something I can change to correct this? Here's a sample of what is happening-just pan around and notice the feature points don't move with the google map: http://gis.manchesterct.gov/JavaScriptAPI/Google.html Try this: var map = new esri.Map("map", {displayGraphicsOnPan:false});
... View more
09-29-2011
01:22 PM
|
0
|
0
|
1682
|
|
POST
|
What would the datagrid headings look like? I get an error when trying to bind the datastore to the following datagrid: <table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="AddressGrid" id="AddressGrid" data-dojo-props="rowSelector:''" style="width: 325px; height: 350px; margin: 0; overflow: scroll"> <thead> <tr> <th field="Match_addr"> Match_addr </th> <th field="Score"> Score </th> <th field="Ref_ID"> Ref_ID </th> </tr> </thead> </table> You can create a grid structure layout in your init by the following:
...
var layout = {
cells: [
{ field: "Match_addr", name: "Match Address", width: 'auto' },
{ field: "Score", name: "Scores", width: '125px' },
{ field: "Ref_ID", name: "Reference ID", width: '125px' }
]
};
var grid = dijit.byId("AddressGriD");
grid.attr("structure", layout);
...
... View more
09-29-2011
11:12 AM
|
0
|
0
|
2105
|
|
POST
|
Were you able to get the code you posted to work? The script runs successfully but no parcel is selected so the map does not zoom to the selected parcel. I copied your code exactly as you posted it and I'm still not successful. I also tried including the "parse first paramter to numeric" suggestion as mentioned on 8/16/2011 but then I get an error that that it cannot concatenate 'str' and 'int' objects. Sorry for late reply. Yes i indeed got results. You can test it on a .mxd using the script as as layer.
... View more
08-29-2011
01:41 PM
|
0
|
0
|
2424
|
|
POST
|
Thanks hzhu The following changes the font of the dropdown's "header" but not the "elements" in the dropdown. #measurementPane .unitDropDown{ font-size: smaller; } Try this: .unitDropDown { font-size: smaller !important; } It worked on me.
... View more
08-19-2011
09:14 AM
|
0
|
0
|
994
|
|
POST
|
OS: Windows 7, 64-bit IDE: PyScripter ArcGIS: 10.0 - Concurrent Use license accessed remotely Hi, I am receiving the following error when trying to run a basic while-loop over feature class rows: 'function' object has no attribute "getValue". My code is: import arcpy from arcpy import env env.workspace = "C:/***/TestScripts_UsingNHL" env.overwriteOutput = True inTable = "C:/***/Bbuffers.shp" inField = "CITY_TOWN" rows = arcpy.SearchCursor(inTable) row = rows.next while row: City = row.getValue(inField) #Error thrown here row = rows.next() print "Finished!" The field "CITY_TOWN" does exist, and it is spelled correctly. I get the same error even if I try to print instead of getValue: print row.CITY_TOWN. This seems basic, but I cannot find a fix. Any help/suggestions would be appreciated. Thanks! City =row.CITY_TOWN
... View more
08-19-2011
07:04 AM
|
0
|
0
|
1256
|
|
POST
|
I'm trying to set the font of the units in the measurement tool (see below) via css. Any suggestions. Measurement Widget has a unitDropDown css class used to define the font used by the unit drop down list. Overwrite it with the font choose.
... View more
08-19-2011
06:16 AM
|
0
|
0
|
994
|
|
POST
|
Thank you both for your help they work great! Just want to share with your guys what i have learned. zipfile.ZipFile(newZipFN,'w') only zip a file whose size is less than 2 GB. To zip a larger file (large raster etc), you need use its overload function like this: zipfile.ZipFile(outZipFile, mode="w", compression=zipfile.ZIP_DEFLATED, allowZip64=True)
... View more
08-18-2011
09:24 AM
|
0
|
0
|
6528
|
|
POST
|
Sorry, but no this isn't what we are looking for. In this example the zoom extent (gray rectangle) is a fixed size and the map is zoomed in just like the main map. We are looking for a fixed map layer and an extent that resizes depending on the zoom level of the main map. The idea on this thread might help you: http://forums.arcgis.com/threads/34623-Multiple-layers-in-Overvew-Map-dijit?highlight=overview. you could create second small map as your overview map by adding a feature layer(from the map service on your first map) as you fixed map layer. Those two maps can essily be synchronized by first map's onExtentChange event.
... View more
08-18-2011
07:18 AM
|
0
|
0
|
857
|
|
POST
|
Just to add to this - using Upper() in the query seems to slow it down dramatically. I found it much faster to convert the values to uppercase in the geodatabase (in an edit session within ArcMap), and simply use:
query.where ="STATE_NAME like '%" + stateName.toUpperCase() +"'%";
Steve Of cause. Basically you eleminate an extra SQL function UPPER().
... View more
08-18-2011
05:40 AM
|
0
|
0
|
2144
|
|
POST
|
Thanks your reply. These is exist! Please see the attachment. I mentioned before, I converted this file to raster using ArcTool box. Your code specified you shape file in "K:/STATE_MUKEY/AREA.gdb", which is obviously wrong. You should specify the full path of your shape file (wherever that is). like this
inFeature = "K:/STATE_MUKEY/soilmu_in.shp"
... View more
08-17-2011
10:11 AM
|
0
|
0
|
4863
|
|
POST
|
Attached is a zip file containing a portion of the parcel shapefile. Here is the code I was using to just try to test the Select by Attributes function: #Select by Attributes arcpy.env.workspace ="C:\PreApp Maps" arcpy.MakeFeatureLayer_management("Parcels.shp", "parcels_lyr") whereClause = "\"ADDRNO\" = 2 AND \"ADDRSTREET\" = 'PONDEROSA' AND \"ADDRSUFFIX\" = 'LANE'" arcpy.SelectLayerByAttribute_management ("parcels_lyr", "NEW_SELECTION", whereClause) Ideally, I would like to use 3 user defined parameters to get the parcel selected which I have been using this script that doesn't work: # Script arguments PAR1 = arcpy.GetParameterAsText(0) PAR2 = arcpy.GetParameterAsText(1) PAR3 = arcpy.GetParameterAsText(2) #Parse first parameter to numeric PAR1_int =int(PAR1) #Select by Attributes arcpy.env.workspace ="C:\PreApp Maps" arcpy.MakeFeatureLayer_management("Parcels.shp", "parcels_lyr") whereClause = "ADDRNO = PAR1_int AND ADDRSTREET = PAR2 AND ADDRSUFFIX = PAR3" arcpy.SelectLayerByAttribute_management ("parcels_lyr", "NEW_SELECTION", whereClause) Molly, I tested your code, i made a little adjustment. It should worked by the following:
PAR1 = arcpy.GetParameterAsText(0)
PAR2 = arcpy.GetParameterAsText(1)
PAR3 = arcpy.GetParameterAsText(2)
#Select by Attributes
arcpy.env.workspace ="C:\PreApp Maps"
arcpy.MakeFeatureLayer_management("Parcels.shp", "parcels_lyr")
whereClause = "ADDRNO =" + PAR1 +" AND ADDRSTREET = '"+ PAR2+"' AND ADDRSUFFIX ='" + PAR3 +"'"
arcpy.SelectLayerByAttribute_management ("parcels_lyr", "NEW_SELECTION", whereClause)
... View more
08-17-2011
10:02 AM
|
0
|
0
|
2424
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-11-2011 12:16 PM | |
| 1 | 05-25-2017 08:26 AM | |
| 1 | 06-02-2017 07:37 AM | |
| 1 | 06-28-2011 07:02 AM | |
| 1 | 06-12-2017 10:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-01-2024
09:57 PM
|