laptop and a wrench

Bogue

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

Dernière publication: August 25, 2014 ArcGIS Runtime for Windows Mobile
Numéro d’ID de bogue NIM071210
EnvoiAugust 2, 2011
Dernière modificationJune 5, 2024
S’applique àArcGIS Runtime for Windows Mobile
Version trouvée10.0
Langue du programmeAll
StatutWill Not Be Addressed

Informations supplémentaires

Coordinates should be used with a CoordinateCollection object

Solution de contournement

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

Étapes pour reproduire

ID de bogue: NIM071210

Logiciel:

  • ArcGIS Runtime for Windows Mobile

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement