POST
|
I am working on an Silverlight arcserver application that transfers SQL data table over to a geodatabase to be used for symbology/labels. I manage to get part of the information moved over but not all of it. Field_Name, and the Field_ID works fine but the other three will not transfer over to the feature class table. The process is complete after a polygon is placed on the map. What am I doing wrong? graphic.Attributes.Add("Field_Name", tbxFieldNum.Text); featurelayer.Graphics.Add(graphic); graphic.Attributes.Add("Field_ID", RunTime._FieldID); featurelayer.Graphics.Add(graphic); graphic.Attributes.Add("HabitatType", RunTime._FieldPlannedHabitatTypeCode); featurelayer.Graphics.Add(graphic); graphic.Attributes.Add("Tract_ID", RunTime._TractID); featurelayer.Graphics.Add(graphic); graphic.Attributes.Add("TractName", RunTime._TractName); featurelayer.Graphics.Add(graphic); Chad
... View more
01-30-2015
02:07 PM
|
0
|
0
|
3916
|
POST
|
All I am having issues with the editorwidget, I need to recalulate the area of a polygon when the editor widget edits the graphic. I am using the area and parimeter example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AreasAndLengths and this thread: http://forums.arcgis.com/threads/25902-How-to-update-Acreage-field-after-edit-the-polygon-s-geometry?highlight=acres When I edit a graphic the AreasAndLength geometry service does not fire, how is it done? And yes I am new at the programing side. Privatevoid Editor_EditCompleted(object sender, Editor.EditEventArgs e) { if (e.Action == Editor.EditAction.EditVertices) { foreach (var edit in e.Edits) { ESRI.ArcGIS.Client.Geometry.Polygon polygon = e.Edits as ESRI.ArcGIS.Client.Geometry.Polygon; polygon.SpatialReference = map1.SpatialReference; Graphic graphic = newGraphic(); GeometryService geometryService = newGeometryService("http://geoservices.dnr.illinois.gov/ArcGIS/rest/services/Geometry/GeometryServer"); geometryService.AreasAndLengthsCompleted += GeometryService_AreasAndLengthsCompleted; geometryService.Failed += GeometryService_Failed; GraphicsLayer graphicsLayer = map1.Layers["Field Edit"] asGraphicsLayer; graphicsLayer.Graphics.Add(graphic); List<Graphic> graphicList = newList<Graphic>(); graphicList.Add(graphic); geometryService.AreasAndLengthsAsync(graphicList); // GeometryService.AreasAndLengths returns distances and areas in the units of the spatial reference. } } } Any help is greatly appreciated. Chad
... View more
11-09-2012
09:56 AM
|
0
|
0
|
582
|
POST
|
dbroux I was working with the older version, but I am now having issues with loading v5. This project was built using SL 4.0 will that cause a problem? Thanks Chad
... View more
10-12-2012
07:36 AM
|
0
|
0
|
201
|
POST
|
All I am having a problem with the print dialog. I can print the basic or default map, but when I select the map with legend or overview map I receive an error, unhandled win32 exception iexplore.exe 4400. has anyone else had this error? V/r Chad
... View more
10-11-2012
12:51 PM
|
0
|
3
|
560
|
POST
|
All I have a issue, I am trying to recalculate acreage after an edit event from the editor widget. It needs to save the "ACRES" attribute after teh edit. Here is what I have so far: private void EditorWidget1_EditCompleted(object sender, ESRI.ArcGIS.Client.Editor.EditEventArgs e) { if (e.Action == Editor.EditAction.EditVertices) { foreach (var edit in e.Edits) { Graphic graphic = new Graphic(); geometryService.AreasAndLengthsAsync(new List<Graphic>() { edit.Graphic }); graphic.Attributes.Add("ACRES", (Int32)(decimal.Truncate(System.Convert.ToDecimal(tbxAcres.Text)))); featurelayer.Graphics.Add(graphic); break; } } } Any help is goog help, Thanks. Chad
... View more
10-05-2012
06:10 AM
|
0
|
0
|
509
|
POST
|
Hello, I am new to development and I am attempting to utilize the Identify Task and am running in to problem. The code was obtained at the following url: http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Identify_task/01660000001m000000/ When I debug I receive the following error: NullReferenceException was handeled by user code. Object reference not set to an instance of an object. private void MyMap_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs args) { GraphicsLayer graphicsLayer = MyMap.Layers["IdentifyIconGraphicsLayer"] as GraphicsLayer; graphicsLayer.ClearGraphics(); ESRI.ArcGIS.Client.Graphic graphic = new ESRI.ArcGIS.Client.Graphic() { Geometry = args.MapPoint, Symbol = LayoutRoot.Resources["IdentifyLocationSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol }; graphicsLayer.Graphics.Add(graphic); IdentifyTask identifyTask = new IdentifyTask("http://geoservices.dnr.illinois.gov/ArcGIS/rest/services" + "WHPTS/MapServer"); identifyTask.ExecuteCompleted += IdentifyTask_ExecuteCompleted; identifyTask.Failed += IdentifyTask_Failed; IdentifyParameters identifyParameters = new IdentifyParameters(); identifyParameters.LayerOption = LayerOption.all; identifyParameters.MapExtent = MyMap.Extent; identifyParameters.Width = (int)MyMap.ActualWidth; identifyParameters.Height = (int)MyMap.ActualHeight; identifyParameters.Geometry = args.MapPoint; identifyTask.ExecuteAsync(identifyParameters); } private void IdentifyTask_ExecuteCompleted(object sender, IdentifyEventArgs args) { IdentifyComboBox.Items.Clear(); if (args.IdentifyResults.Count > 0) What am I doing that is wrong? Thanks
... View more
03-05-2012
10:13 AM
|
0
|
1
|
507
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|