TMapView.AddPolyline crashes the app

381 views Asked by At

Hello i am trying to create an application to test the map capabilities of the TMapView component. So I am trying this code to add some polylines on the map surface:

TArray__1<TMapCoordinate> mapCoords;
mapCoords.Length = 2;
mapCoords[0].Latitude = 0.1;
mapCoords[0].Longitude = 0.1;
mapCoords[1].Latitude = 0.5;
mapCoords[1].Longitude = 0.5;
TMapPolylineDescriptor mapDesc = TMapPolylineDescriptor::Create(mapCoords);
MapView1->AddPolyline(mapDesc);
MapView1->Location = mapCoords[0];

I have no idea why the code crashes the app. I can't debug the app because I am working on a virtual machine(I am not allowed to install 3rd party apps on the specific laptop) and the virtual machine doesn't recognize my phone. Please help me out.

0

There are 0 answers