laptop and a wrench

Erro

Map::SetExtent does not work consistently when the aspect ratio of the new extent differs from the map display's aspect ratio.

Última Publicação: August 25, 2014 ArcGIS Runtime for Windows Mobile
Número de ID do Erro NIM038935
EnviadoOctober 1, 2008
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS Runtime for Windows Mobile
Versão encontrada9.3
Sistema OperacionalWindows OS
Versão do Sistema OperacionalXP
Versão FixaN/A
StatusFixed

Solução Provisória

For code to work in all aspect ratios try the following code- // Assign the new envelope to be the map's envelopedouble dWHAspect = Convert.ToDouble(theMap.Width) / Convert.ToDouble(theMap.Height);double dWHExtent = envelope.Width / envelope.Height;if (dWHAspect > dWHExtent){ // make width wider double dCenterX = envelope.MinX + (envelope.MaxX - envelope.MinX) / 2; double dCenterY = envelope.MinY + (envelope.MaxY - envelope.MinY) / 2; double dHeight = envelope.MaxY - envelope.MinY; double dWidth = dHeight * dWHAspect; envelope = new Envelope(new Coordinate(dCenterX, dCenterY), dWidth, dHeight);}else{ // make height wider double dCenterX = envelope.MinX + (envelope.MaxX - envelope.MinX)/2; double dCenterY = envelope.MinY + (envelope.MaxY - envelope.MinY) / 2; double dWidth = envelope.MaxX - envelope.MinX; double dHeight = dWidth / dWHAspect; envelope = new Envelope(new Coordinate(dCenterX, dCenterY), dWidth, dHeight);}envelope.Resize(1.5);theMap.SetExtent(envelope);theMap.Invalidate();

Etapas para Reproduzir

ID do Erro: NIM038935

Software:

  • ArcGIS Runtime for Windows Mobile

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