I am using recent version of TMSFNCMaps with Delphi 13 and keep getting a range check error when trying to implement colouring and opacity for polygons loaded from a GeoJSON file. Current code is:
try
TMSFNCMaps1.BeginUpdate;
TMSFNCMaps1.Polygons.Clear;
TMSFNCMaps1.Clear;
TMSFNCMaps1.LoadGeoJSONFromFile(JSONfileName,true,false);
for iPoly := 1 to TMSFNCMaps1.Polygons.Count do
begin
PPoly := TMSFNCMaps1.Polygons[iPoly-1];
PPoly.StrokeColor := claBlueViolet;
PPoly.StrokeOpacity := 0.3;
PPoly.StrokeWidth := 2;
PPoly.FillColor := claWhite;
PPoly.FillOpacity := 0.0;
end;
finally
TMSFNCMaps1.EndUpdate;
end;
PPoly is defined to be of type TTMSFNCMapsPolygon.
If I omit the for loop, the polygon dataset loads and plots with opaque white fill and black outlines. The for loop will execute as long as I comment out all the PPoly.something statements.
Am I missing some command? The range check is not related to the iPoly value from anything I have tried.
Any suggestions would be much appreciated.
Bruce