WebMercator and NAD27 - WGS-84 issue

1901
6
Jump to solution
10-11-2012 10:55 AM
LuisGarcia2
Occasional Contributor II
I have several graphics that I add on a Graphic Layer. This is how I add them to the layer:
WebMercator wm = new WebMercator();          ESRI.ArcGIS.Client.Graphic g =  new  ESRI.ArcGIS.Client.Graphic(); MapPoint p = new MapPoint(myLongitud, myLatitude, null);  SimpleMarkerSymbol mark = new SimpleMarkerSymbol(); mark.Color = myColor;   g.Geometry = WM.FromGeographic(p); g.Symbol = mark; g.SetZIndex(0);  GraphicsLayer.Add(g);

Now, all the data we have in our database that is fill in with those two variables in the MapPoint object (myLongitud and myLatitude) is in NAD27. We are displaying in that same Silverlight control map some services that are in WGS-84 and we notice there is a little difference in the position of the graphics with respect to the objects shown from the service. Do I need to make a conversion to project my graphics? How do I do that?
Thanks!
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
The ProjectAsync method accepts a list of graphics as input argument and project all the graphics in one request to the server.
Is it what you are looking for?

View solution in original post

0 Kudos
6 Replies
JenniferNery
Esri Regular Contributor
You can set GraphicsLayer.ProjectionService as seen in this SDK sample (see XAML-code): Auto-Project. WebMercator can only be used for  converting geometries between Bing Maps WebMercator projection (SRID=3857) and WGS84 Geographic coordinate system (SRID=4326).
0 Kudos
LuisGarcia2
Occasional Contributor II
Thanks for your response. I see several spatial references HERE and in the example I see they use 4326. So, for my my spatial ference what should I use?

MapPoint p = new MapPoint(myLongitude, myLatitude, new SpatialReference(4326));


Or should I use the Spatial reference in which they are? NAD27? In which case I guess I would have to find it in that list?

thanks again and excuse my ignorance on this, it is pretty new to me.
0 Kudos
JenniferNery
Esri Regular Contributor
According to this: Geographic Coordinate Systems listing , it is WKID=4267
0 Kudos
LuisGarcia2
Occasional Contributor II
Jennifer,
Thanks! That was it!.
0 Kudos
LuisGarcia2
Occasional Contributor II
One more question on this, now regarding the service itself. We need to transform a large number of geographic locations at a time. I may need to do 600 or so, sometimes more at a time. Is there a way to send a batch to the service? If not, we were using an Object WebMercator as explained before. This was faster compared to using Geometry Server, is there something similar to WebMercator for the projections I need to make?
Thanks!
0 Kudos
DominiqueBroux
Esri Frequent Contributor
The ProjectAsync method accepts a list of graphics as input argument and project all the graphics in one request to the server.
Is it what you are looking for?
0 Kudos