laptop and a wrench

Bug

Casting errors with coordinate or geometry types to IList in the ArcGIS Mobile API.

Last Published: August 25, 2014 ArcGIS Runtime for Windows Mobile
Bug ID Number NIM071210
SubmittedAugust 2, 2011
Last ModifiedJune 5, 2024
Applies toArcGIS Runtime for Windows Mobile
Version found10.0
Program languageAll
StatusWill Not Be Addressed

Additional Information

Coordinates should be used with a CoordinateCollection object

Workaround

private void map1_MouseDoubleClick(object sender, MapMouseEventArgs e) { ESRI.ArcGIS.Mobile.Geometries.Point pointA = new ESRI.ArcGIS.Mobile.Geometries.Point(e.MapCoordinate.X, e.MapCoordinate.Y); //IList<Coordinate> coordList = new IList<Coordinate>(); //throws error cannot create instance of abstract class or interface // Workaround /////// Type baseListType = typeof(List<>); Type listType = baseListType.MakeGenericType(typeof(Coordinate)); var list = (IList<Coordinate>)Activator.CreateInstance(listType); list.Add(pointA.Coordinate); IList<string> spatialCoordList = map1.SpatialReference.ToDecimalDegree(5, list); string coordStr = spatialCoordList[0]; }

Steps to Reproduce

Bug ID: NIM071210

Software:

  • ArcGIS Runtime for Windows Mobile

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options