ThinkGeo.com    |     Documentation    |     Premium Support

New exception (3.0.357) with rectangleshape.scaleto

RectangleShape r = xxx

r.ScaleTo (2); is raising a new exception with 3.0.357


L'exception System.InvalidCastException n'a pas été gérée

  Message="Impossible d'effectuer un cast d'un objet de type 'ThinkGeo.MapSuite.Core.RectangleShape' en type 'ThinkGeo.MapSuite.Core.PolygonShape'."

  Source="MapSuiteCore"

  StackTrace:

       à ThinkGeo.MapSuite.Core.BaseShape.ScaleToCore(Double scale)

       à ThinkGeo.MapSuite.Core.BaseShape.ScaleTo(Double scale)

       à ArpentGIS.MapControler.zoomToFullExtent() dans D:\ToBackup\D3E\ArpentGIS\MapControler.cs:ligne 794

       à ArpentGIS.frmMain.CmZoomFullExtend_ItemClick(Object sender, ItemClickEventArgs e) dans



Patrick,


Thanks for your post. This is a bug since this API is added, we have fixed it, it will be aviable in next release.
 
Now if you want, you could use ScaleUp or ScaleDown to replace this API, sorry for the inconvinience now.

RectangleShape rect1 = new RectangleShape(0, 100, 100, 0);
rect1.ScaleUp(100);

 
Any more qeusitons just feel free to let me know.
 
Thanks.
 
Yale