laptop and a wrench

漏洞

IMapArea::Extent throws "Unspecified Error" (E_FAIL / 0x80004005) when accessed from CenterAndScale class.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM006613
已提交February 6, 2007
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
编程语言VBA
状态Will Not Be Addressed

附加信息

No Public Explanation

解决办法

Once you set the MapArea property of the MapDescription using centerAndScale, you still have to calculate the map extent. You can calculate the map extent by either exporting the map image or the layout. This will ensure that the map extent is calculated on the server and map extent will be valid. Please take a look at the modifications that we made in your code. Please feel free to contact me if you have additional questions related to this incident. pMapDesc.MapArea = centerAndScale as IMapArea; //Now you specified the scale and the center of your map... Map Extent has not been computed on the server //You need to export the map image or the layout in order to calculate the map extent. IImageDescription imageDesc = mServerContext.CreateObject("esriCarto.ImageDescription") as IImageDescription; IImageType imageType = mServerContext.CreateObject("esriCarto.ImageType") as IImageType; imageType.ReturnType= esriImageReturnType.esriImageReturnURL; imageType.Format= esriImageFormat.esriImagePNG; imageDesc.Type = imageType; IImageDisplay imageDisplay = mServerContext.CreateObject("esriCarto.ImageDisplay") as IImageDisplay; imageDisplay.Height = 300; imageDisplay.Width = 300; imageDesc.Display = imageDisplay; //ExportMapImage will calculate the map extent on the server IMapImage mapImage = pMapServer.ExportMapImage(pMapDesc, imageDesc); Debug.Print(mapImage.URL); IMapServerLayout pMSLayout = pMapServer as IMapServerLayout; IPageDescription pPageDesc = pMSLayout.DefaultPageDescription; imageDisplay.Height = 0; imageDisplay.Width = 0; imageDisplay.DeviceResolution=96; imageDesc.Display = imageDisplay; pPageDesc.MapFrames.get_Element(0).MapDescription = pMapDesc; //ExportLayout does also calculate the map extent on the server. ILayoutImage pLayoutImage = pMSLayout.ExportLayout(pPageDesc, imageDesc); Debug.Print(pLayoutImage.URL);

重现步骤

漏洞 ID: NIM006613

软件:

  • No Product Found

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项