laptop and a wrench

Error

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

Última publicación: August 25, 2014 ArcGIS Runtime for Windows Mobile
Número de ID del error NIM071210
EnviadoAugust 2, 2011
Última modificaciónJune 5, 2024
Relacionado conArcGIS Runtime for Windows Mobile
Versión encontrada10.0
Lenguaje del programaAll
EstadoWill Not Be Addressed

Información adicional

Coordinates should be used with a CoordinateCollection object

Solución alternativa

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]; }

Pasos para reproducir

ID del error: NIM071210

Software:

  • ArcGIS Runtime for Windows Mobile

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga