laptop and a wrench

Bug

MapView::RelativeScale property returns null for ArcMapImage services.

Zuletzt veröffentlicht: August 25, 2014 No Product Found
Bug-ID-Nummer NIM010497
EingereichtJuly 24, 2007
Zuletzt geändertJune 5, 2024
Gilt fürNo Product Found
Gefunden in Version9.2
StatusDuplicate

Zusätzliche Informationen

NIM009856

Workaround

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 }

Schritte zur Reproduzierung

Bug-ID: NIM010497

Software:

  • No Product Found

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln