|
POST
|
You could try hosting the datagrid CSS styling file on your network and then modify the appropriate tag. This is what I'm doing for my datagrid implementation. The CSS file used for styling the datagrids is named "grid.CSS" Use the Firebug add-in for Firefox to make your local copy of the CSS file as well as determine which entity provides the styling for the cell color (with my version it appears to be ".dojoxGrid td"). Modify the color reference in the CSS file and you should be good to go. (I'm still using v2.8 btw)..
... View more
08-17-2012
12:46 PM
|
0
|
0
|
1022
|
|
POST
|
On the page I've been developing, I've been populating a datagrid with attributes from a feature layer. A few of the attributes are date fields. I found out the hard way about the the format of date values returned through the API so I looked for a function to properly format my dates and times back into xx/xx/xxxx and xx:xx ampm formats. I settled on the following functions which use dojo: function formatDate(value){
var inputDate = new Date(value);
return dojo.date.locale.format(inputDate, {
selector: 'date',
datePattern: 'MM/dd/yyyy'
});
}
function formatTime(value){
var inputTime = new Date(value);
return dojo.date.locale.format(inputTime, {
selector: 'date',
datePattern: 'K:mm a'
});
} The routines are used in a formatter() function for one of my columns in the datagrid like this: var rowdata = this.grid.getItem(rowIndex);
var theClosureDate = rowdata.dateCl;
alert(formatDate(theClosureDate)); Here's where it gets weird- I've been doing my development and debugging with Firefox and the dates displayed are correct. I just loaded the page in Chrome and IE-8 and the dates displayed are "NaN". Does anyone have a conversion function they can share which works across all browsers? It would be especially great if it also handled the UTC/local time difference. I realized that these routines don't. Thank you! Steve
... View more
08-17-2012
10:28 AM
|
0
|
4
|
2333
|
|
POST
|
Hi Anthony, I hadn't thought of trying that but I just did and the results are the same. I'm using Version 10 SP-5 for my desktop environment..
... View more
08-08-2012
02:59 PM
|
0
|
0
|
1233
|
|
POST
|
I originally posted this in the ArcGIS Server 10.0 forum but I haven't received any responses. Trying my luck in this forum- We're developing basemaps (in ArcGIS Server 10.0) and I'm now working on road annotation for one of the services. I used Maplex to create the initial labels, and then did some additional clean up. The annotation layer is currently in a File Geodatabase and included in a MXD which has (for the time being) been served up as a dynamic map service based on an MSD file. In the screenshot I've attached, the MXD view is displayed on the left, and the javascript viewer of the map service is on the right side. What I've noticed is that my anno text is getting "condensed" in the map service (right side) but displays fine in Arcmap (left side). For example, the label for "Paradise Lake Rd" in the right center of each display. The "e" and "L" have collapsed on top of each other. What would cause this and what can I do about it? Thank you! Steve
... View more
08-08-2012
01:49 PM
|
0
|
2
|
1371
|
|
POST
|
FYI- I just came across my notes from the ESRI UC workshop I mentioned in my original post. Their slide says to look at Knowledge Base 30494 for the US Streets example. I just searched on that number and nothing was returned..
... View more
08-08-2012
01:28 PM
|
0
|
0
|
3238
|
|
POST
|
Awesome! Thanks, Elliott. Your file imported just fine..
... View more
08-03-2012
01:51 PM
|
0
|
0
|
3238
|
|
POST
|
At the conference in the workshop about using Maplex, the presenters mentioned that there was a USPS abbreviation dictionary available but I can't seem to find it on any of the ESRI pages (or desktop help). Am I just missing the link?
... View more
07-31-2012
08:16 AM
|
0
|
7
|
8372
|
|
POST
|
Not sure what the best way to accomplish this via the API. Let's say I have a routed layer of roads or stream network. I want to return the milepost location (or River Mile) at the map location that the user clicks on. Can I extract this information using the Identify task or do I need to use the esri.tasks.RouteTask option? The code snippits and examples seem more focused on connecting two locations together on a network rather than identifying a single location. Thanks! Steve
... View more
07-05-2012
01:30 PM
|
0
|
2
|
1234
|
|
POST
|
Thanks again, Derek. Look forward to this feature getting implemented..
... View more
06-26-2012
11:01 AM
|
0
|
0
|
1507
|
|
POST
|
Excellent, thanks Derek. I'll look into the Print Task.
... View more
06-26-2012
10:51 AM
|
0
|
0
|
974
|
|
POST
|
One more question- I'd like to add an overview map to my map but in all of the samples using overview maps that I've seen, the overview map pans and zooms (albeit at the specification ratio compared to the main map). I don't want this behavior. Is it possible to "lock" the background of the overview map to a specified extent and have just the main map's map extent move around? I want my overview map to show the full extent of my county and just have the representation of the main map's map extent move around. Thanks! Steve
... View more
06-26-2012
09:11 AM
|
0
|
3
|
1903
|
|
POST
|
Is is possible to "print" without having a user initiate the process by clicking a button? From my review of the API documentation, it appears to me that it is required to have a dijit button on your web map to set up some of the printing parameters and then the click event of the button is what triggers the actual print event. I'm hoping I can trigger a print event in another fashion such as a when my page has been idle for a certain amount of time or perhaps loses focus. Under the current structure of the API, I don't think this is possible. These circumstances seem odd but I have a reason for doing it this way. Thanks! Steve
... View more
06-26-2012
09:04 AM
|
0
|
2
|
1379
|
|
POST
|
GENIUS! I feel so dumb. Thanks- that was the problem!
... View more
05-21-2012
12:55 PM
|
0
|
0
|
1121
|
|
POST
|
I'm building a small app that has a basemap and one featureLayer that has an infoWindow associated with it. When the user clicks on one of those features, I also need to retrieve the coordinates of the feature that the user clicked on. My understanding is that you can use the OnClick event with dojo.connect to do this: dojo.connect(map,"onClick",function(evt){ var query = new esri.tasks.Query(); query.geometry = pointToExtent(map,evt.mapPoint,10); var deferred = theFeatureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW); map.infoWindow.setFeatures([deferred]); map.infoWindow.show(evt.mapPoint); alert('Made it here!'); var pt = new esri.geometry.Point(evt.mapPoint.y,evt.mapPoint.x, new esri.SpatialReference({wkid:3857})); var MercPt = esri.geometry.webMercatorToGeographic(evt.mapPoint); var theLong = MercPt.x; var theLat = MercPt.y; var didSucceed = window.clipboardData.setData('Text', '@Coord:' + theLong.toString() + ',' + theLat.toString() ); }); If a user clicks on the map where there isn't a feature, the OnClick event captures it and I'm able to access the click point's coordinates. If they click on a feature, it seems to bypass the OnClick code (hence my small alert line in the code above). What's the best way to capture the coordinates of a clicked feature?? Thanks! Steve
... View more
05-21-2012
12:34 PM
|
0
|
2
|
1554
|
|
POST
|
Thanks, Neil. You were correct in all of your points. Sometimes the ESRI Help Docs are more confusing than helpful and that OpenFromFile for FileGeodatabases was one of those times for me. While waiting for replies in my thread, I found another thread on an unrelated topic but it helped me debug my problem. Here's my revised code which I have tested and works: Public Sub addPhotoToGeoDatabase(ByVal theGTagInfo As geoTaggedInfo)
Try
Dim ptable As ITable
Dim dbPath As String = "G:\PublicWk\geoTagging\pwPhotoDatabaseTest.gdb"
' Create a file geodatabase workspace factory.
Dim factoryType As Type = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactory")
Dim WorkspaceFactory As IWorkspaceFactory = New ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactory
Dim Workspace As IFeatureWorkspace = CType(WorkspaceFactory.OpenFromFile(dbPath, 0), IFeatureWorkspace)
' Cast the workspace to the IWorkspaceEdit2 interface.
Dim workspaceEdit As IWorkspaceEdit = CType(workspace, IWorkspaceEdit)
' Start an edit session. An undo/redo stack isn't necessary in this case.
workspaceEdit.StartEditing(False)
' Start an edit operation.
workspaceEdit.StartEditOperation()
ptable = workspace.OpenTable("tblGeotaggedPhotos")
' Create a row. The row's attribute values should be set here and if
' a feature is being created, the shape should be set as well.
Dim row As IRow = ptable.CreateRow()
row.Value(ptable.FindField("Latitude")) = theGTagInfo.latitude
row.Value(ptable.FindField("Longitude")) = theGTagInfo.longitude
row.Value(ptable.FindField("Descrip")) = theGTagInfo.description
row.Value(ptable.FindField("Keywords")) = theGTagInfo.keywords
row.Value(ptable.FindField("gTagByUser")) = theGTagInfo.taggedByUserName
row.Value(ptable.FindField("gTagByFullName")) = theGTagInfo.tageedByFullName
row.Value(ptable.FindField("gTagDate")) = theGTagInfo.dateTagged
row.Value(ptable.FindField("FileName")) = theGTagInfo.filename
row.Value(ptable.FindField("FullPath")) = theGTagInfo.fullpath
row.Store()
' Save the edit operation. To cancel an edit operation, the AbortEditOperation
' method can be used.
workspaceEdit.StopEditOperation()
' Stop the edit session. The saveEdits parameter indicates the edit session
' will be committed.
workspaceEdit.StopEditing(True)
Catch ex As Exception
globalErrorHandler(ex)
End Try
End Sub Thanks also for the tip about setting variables to NOTHING. I'm coming from a lengthy time in VBA (Access & Arcobjects) so that's almost second nature to me. Great to know I no longer need to do that! Steve
... View more
04-26-2012
02:05 PM
|
0
|
0
|
1239
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 4 weeks ago | |
| 1 | 03-12-2026 01:43 PM | |
| 1 | 03-12-2026 08:41 AM | |
| 2 | 03-10-2026 10:10 AM | |
| 1 | 02-18-2026 09:20 AM |