|
POST
|
Hi Tim, You can use the setInfoTemplate method to set the infoTemplate to null when the button is clicked. Ex: on(dom.byId('button'), 'click', function(){ cities.setInfoTemplate(null); })
... View more
04-30-2014
06:48 AM
|
0
|
0
|
895
|
|
POST
|
The fields in the Processors service are all capitalized. So, you will need to create another template: var template2 = new InfoTemplate();
template2.setTitle("<b>${ORG_NAME} - ${ADDRESS}</b>");
template2.setContent("${ORG_NAME} is in ${STATE}"); Set the infoTemplate to this new template, and reference the fields as all caps in the 'outfields' parameter: var Distributors = new FeatureLayer("http://ummgis.umm.maine.edu:6080/arcgis/rest/services/testing/ProcessorsGIS428/MapServer/0", {
mode: FeatureLayer.MODE_ONDEMAND,
infoTemplate:template2,
outFields: ["ORG_NAME" , "ADDRESS" , "STATE"]
});
... View more
04-30-2014
06:44 AM
|
0
|
0
|
2325
|
|
POST
|
Also, when using map.addLayers you need to pass an array: map.addLayers([SpecialtyFoodProducers]);
... View more
04-30-2014
03:47 AM
|
0
|
0
|
2325
|
|
POST
|
Hi Arowana, Here is an example of using a Toggle button to turn on/off a feature layer: http://jsfiddle.net/YNA9A/
... View more
04-30-2014
02:52 AM
|
0
|
0
|
1775
|
|
POST
|
Hi Matthew, Try the following: table = 'assets_unprocessed' assetIDList = [] rows = arcpy.SearchCursor(table) for row in rows: assetIDList.append(row.Asset_ID) del row, rows table2 = 'assets' for ID in assetIDList: rows = arcpy.UpdateCursor(table2) for row in rows: if row.Asset_ID == ID: row.Processed = 'Y' rows.updateRow(row) del row, rows print 'finished'
... View more
04-30-2014
02:24 AM
|
0
|
0
|
3507
|
|
POST
|
Can you post your entire code? Be sure to wrap it in the appropriate tags.
... View more
04-30-2014
02:15 AM
|
0
|
0
|
2025
|
|
POST
|
Where is the data coming from, i.e. SQL Server, File Geodatabase, etc? The following link may be helpful: http://resources.arcgis.com/en/help/main/10.2/index.html#//00s500000033000000
... View more
04-29-2014
09:16 AM
|
0
|
0
|
1097
|
|
POST
|
Greg, Thanks for the input, I see how that could resolve my issue. I tried running that SearchCursor section of code you supplied, but an error was returned: Runtime error <type 'exceptions.AttributeError'>: 'Cursor' object has no attribute '__exit__' I am unfamiliar with the with...as statement so I'm not sure what is missing or needed here. I understand the process of building a list of Asset_ID's from Assets_Unprocessed then searching for records in Assets with those Asset_ID's, but it seems I'm having difficulty in first building that list with the SearchCursor and the use of the with...as statement. Can you upload a small sample of each dataset in a zipped File Geodatabase?
... View more
04-29-2014
09:06 AM
|
0
|
0
|
3507
|
|
POST
|
I believe so. Querying a REST service worked for either method: Date = date '05/16/2014' or: Date = date '2014-05-16'
... View more
04-29-2014
09:01 AM
|
0
|
0
|
2494
|
|
POST
|
Try this: if(startDate) {
query.push("time > date'"+this.esriDate(startDate)+"'");
}
if(endDate) {
query.push("time < date'"+this.esriDat(endDate)+"'");
}
... View more
04-29-2014
07:37 AM
|
0
|
0
|
2494
|
|
POST
|
For some reason that I'm not sure of the first raster list was coming out empty. So, I made sure to only execute the composite when the length of the rasterList was greater than 0. I was able to get the following to work: import arcpy, sys, os
from arcpy import env
arcpy.env.overwriteOutput = True
path_images = "C:/temp/python/raster"
rasterList = []
x = 1
for root, dirs, files in os.walk(path_images):
for name in files:
bands = os.path.join(root,name)
if bands.endswith(".TIF") or bands.endswith(".tif"):
rasterList.append(bands)
if len(rasterList) > 0:
out_raster = path_images + "/" + 'raster' + str(x) + ".img"
arcpy.CompositeBands_management(rasterList, out_raster)
rasterList = []
x += 1
... View more
04-29-2014
07:06 AM
|
1
|
1
|
3460
|
|
POST
|
Hi Ashley, I would check your TIFF files. Do they end with '.TIF' or '.tif'? I would try changing the following line: if f.endswith(".TIF"): to: if f.endswith(".TIF") or f.endswith(".tif"):
... View more
04-29-2014
06:27 AM
|
0
|
0
|
3460
|
|
POST
|
Hi Jim, Try the following: var date = "2014-04-29";
date = new Date(date);
date = (date.getMonth()+1) + "/" + (date.getDate()+1) + "/" + date.getFullYear();
//returns '4/29/2014'
query.where = "EnteredDate = date '" + date + "'";
... View more
04-29-2014
06:01 AM
|
0
|
0
|
2494
|
|
POST
|
Hi Matthew, Are you joining the 'Asset_Unprocessed' table to the 'Assets' table?
... View more
04-29-2014
03:02 AM
|
0
|
0
|
3507
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 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 |
Offline
|
| Date Last Visited |
yesterday
|