laptop and a wrench

漏洞

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

上次发布: August 25, 2014 ArcGIS Runtime for Windows Mobile
漏洞 ID 编号 NIM071210
已提交August 2, 2011
上次修改时间June 5, 2024
适用范围ArcGIS Runtime for Windows Mobile
找到的版本10.0
编程语言All
状态Will Not Be Addressed

附加信息

Coordinates should be used with a CoordinateCollection object

解决办法

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

重现步骤

漏洞 ID: NIM071210

软件:

  • ArcGIS Runtime for Windows Mobile

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项