laptop and a wrench

漏洞

MapView::RelativeScale property returns null for ArcMapImage services.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM010497
已提交July 24, 2007
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
状态Duplicate

附加信息

NIM009856

解决办法

Code like this can be used to calculate the current relative scale of the map: private double getMapScale() { int dpi = 96; //number of pixels per inch; default is 96 if ((_map.GetFunctionality(0).GetType()) == typeof(ESRI.ArcGIS.ADF.Web.DataSources.IMS.MapFunctionality)) { ESRI.ArcGIS.ADF.Web.DataSources.IMS.MapFunctionality funcMap = (ESRI.ArcGIS.ADF.Web.DataSources.IMS.MapFunctionality) _map.GetFunctionality(0); MapView viewMap = funcMap.MapView; dpi = viewMap.ImageDescriptor.Dpi; } int inchesPerDD = 4371840; //number of inches in one degree latitude (approx) double mapW = _map.Extent.Width; //width of the map in decimal degrees int imgW = (int) _map.Width.Value; //width of the map image in pixels double inchesMap = mapW * inchesPerDD; //width of the map in inches double inchesImg = imgW / dpi; //width of the map image in inches return (inchesMap / inchesImg); //number of ground inches per inch of the image }

重现步骤

漏洞 ID: NIM010497

软件:

  • No Product Found

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项