1. Missing API These API were existing in MS 2.x … does not seem to exist in 3.x or I cannot find the right name. scaleLineAdornmentLayer.KMLabel = “km”; scaleLineAdornmentLayer.MetersLabel = “m”;
for your info, “KM” & “M” are in lower case in the internal measure system; so you need to use lowercase or reintroduce the API that allows us to do it.
2. exception: if I add this code, which was working in 2.x
scaleLineAdornmentLayer.HasMask = true; scaleLineAdornmentLayer.MaskBrush = new GeoSolidBrush(GeoColor.FromArgb(150, GeoColor.StandardColors.White)); scaleLineAdornmentLayer.MaskContour = new GeoPen(GeoColor.StandardColors.Transparent);
then I get the following exception: L’exception System.ArgumentOutOfRangeException n’a pas été gérée Message=“The input double value is out of range.\r\nNom du paramètre : maxX” Source=“MapSuiteCore” ParamName=“maxX” StackTrace: à ThinkGeo.MapSuite.Core.x6d719af406ea4c2c.x12e7df23649722cf(Double x86d4512e4c7d8814, String x34decc57f0820440, Double xaee3bf422e2fd725, x1acec04cd58c1af5 xa798986acdb65a29, Double xe21f77686f8b957e, x1acec04cd58c1af5 x495f4164830ffad5) à ThinkGeo.MapSuite.Core.x6d719af406ea4c2c.xb86d8097d383be05(Double x86d4512e4c7d8814, String x34decc57f0820440, Double xaee3bf422e2fd725, x1acec04cd58c1af5 xa798986acdb65a29) à ThinkGeo.MapSuite.Core.RectangleShape…ctor(Double minX, Double maxY, Double maxX, Double minY) à ThinkGeo.MapSuite.Core.ScaleBarAdornmentLayer.x4662498f6b40b0fd(Single x528f4e59760a8425, String xd6e117874cd3ad18, Collection`1 xd9289f16bf954c77) à ThinkGeo.MapSuite.Core.ScaleBarAdornmentLayer.x9ac8c50f434f4b39(GeoCanvas x31c084515ae9393f) à ThinkGeo.MapSuite.Core.ScaleBarAdornmentLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers) à ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers) à ThinkGeo.MapSuite.DesktopEdition.AdornmentOverlay.DrawCore(GeoCanvas canvas) à ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xe6f5d5d0c25c9bd5(Graphics x783a718028818269, RectangleShape xb35a33b423b17f65, Overlay x99251f66cdabc2ad) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x8d24c2babbc69053(Overlay x32c2370c791132c5) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x9ac8c50f434f4b39(Int32 xb565f4681f05557a) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.Refresh()
I think we already provided some ways to do this in the ScaleLineAdormentLayer, just try the codes below, but seems we did not provides similar functionality in ScaleBarAdormentLayer, I will figure out soon.