AnsweredAssumed Answered

How to convert esri Units ?

Question asked by tkoka3 on Feb 5, 2018
Latest reply on Feb 6, 2018 by Dan_Patterson


We have line drawing Map tool using offset method (ex: wgs 1984 World Mercator spatialReference). But when we draw line in GeographicCoordinateSystem offset draws very huge (ex: TUREF spatialReference). How can we convert esri units for (when is Map in GeographicCoordinateSystem) draw small line ?


Here is ArcObjects code below:


 IUnitConverter unitConverter = new UnitConverterClass();

private double offsetDistance ;


 if (map.SpatialReference is IGeographicCoordinateSystem)
offsetDistance = unitConverter.ConvertUnits(WriteScalableDistanceTool.OffsetDistance, map.DistanceUnits, map.MapUnits);

offsetDistance = WriteScalableDistanceTool.OffsetDistance;