laptop and a wrench

Bug

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

Zuletzt veröffentlicht: August 25, 2014 ArcGIS Runtime for Windows Mobile
Bug-ID-Nummer NIM071210
EingereichtAugust 2, 2011
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS Runtime for Windows Mobile
Gefunden in Version10.0
ProgrammspracheAll
StatusWill Not Be Addressed

Zusätzliche Informationen

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

Schritte zur Reproduzierung

Bug-ID: NIM071210

Software:

  • ArcGIS Runtime for Windows Mobile

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln