Hi, I've created a geoprocessing service that takes a few string inputs and creates a random point feature class (well, it's a little more complex than that, but that is basically what it does). It works fine inside of arcmap.
I then created a test page using the new beta version of the ArcGIS Viewer for Silverlight, adding the tool. It also works perfectly and displays the results exactly where they should be.
Now I'm creating a custom silverlight page for the tool. I followed all the example code I've seen and while it correctly makes the points (as I can see in the arcgisjobs folder), it displays them all around 0,0 (off of Africa). So it seems the projection is off. The app uses the regular web_mercator_aux, but my geoprocessing script uses a geographic coordinate system (and I need to keep it as such, gcs_north_american_1983).
I've tried setting the task's "OutputSpatialReference" and "ProcessSpatialReference" to mymap.SpatialReference as well setting the graphics' geometry.SpatialReference to the same thing, all with no luck.
So, 2 questions. One, since the viewer displays them correctly, any chance we could get at the outputted source code?? And two, more realistically, any idea how I can convert the points to the correct system?
Thanks
private void GeoprocessorTask_GetResultDataCompleted(object sender, GPParameterEventArgs e)
{
GraphicsLayer graphicsLayer = MyMap.Layers["StationLayer"] as GraphicsLayer;
GPFeatureRecordSetLayer gpLayer = e.Parameter as GPFeatureRecordSetLayer;
foreach (Graphic graphic in gpLayer.FeatureSet.Features)
{
graphic.Symbol = LayoutRoot.Resources["RedMarkerSymbol"] as Symbol;
graphicsLayer.Graphics.Add(graphic);
}
}