laptop and a wrench

Erro

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

Última Publicação: August 25, 2014 No Product Found
Número de ID do Erro NIM006613
EnviadoFebruary 6, 2007
Última ModificaçãoJune 5, 2024
Aplica-se àNo Product Found
Versão encontrada9.2
Idioma do programaVBA
StatusWill Not Be Addressed

Informações Adicionais

No Public Explanation

Solução Provisória

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);

Etapas para Reproduzir

ID do Erro: NIM006613

Software:

  • No Product Found

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download