EditAddField bug

I use MapWinGis v4.9.6.1. Today update to new version MapWinGIS-only-v5.1.0-Win32-VS2015. And found what EditAddField func dont work with double type. Other types work fine, but double return -1;
fldIndPntLat = ShpForPnts.EditAddField(“Lat”, FieldType.DOUBLE_FIELD, 12, 12);

Hello @zontick

I think it’s because the Precision has to be at least 2 less than the Width to allow for decimal point and sign. You can check for the last error to see why it’s unhappy. If you get the -1 return, try something like



1 Like

Thank you, you’re right. In the new version, the field is not created precisely because of this. This error is in the example https://www.mapwindow.org/documentation/mapwingis4.8/_calculate_area_8cs-example.html#a11

Thanks for that, @zontick.

I will change that example in the documentation.