Получается ошибка Access violation at address DF27FD26, acessing adress 00000000.
Что я делаю не так ?
procedure TTabbedForm.BTramClick(Sender: TObject);
var
Line:TmapPolylineDescriptor;
LineDestroy:TmapPolyline;
Points:TArray<TMapCoordinate>;
begin
if BTram.IsPressed
then
Begin
// Створюємо та малюємо лінію
SetLength(Points, 2);
Points[0]:=TmapCoordinate.Create(49.901493, 28.587838);
Points[1]:=TmapCoordinate.Create(49.897793, 28.585026);
Line:=TmapPolylineDescriptor.Create(Points);
Line.Geodesic:=True;
Line.StrokeColor:=TAlphaColorRec.Red;
LineDestroy:=MapView.AddPolyline(Line);
End
else
Begin
LineDestroy.Remove;
End;
end;