Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

Problems with TMapView and Markers

$
0
0

I wrote this short code in order to center a TMapView and put a Marker in the same location :

 

void __fastcall TForm1::FormCreate(TObject *Sender)

{

TMapCoordinate Coor = TMapCoordinate::Create(19.057959, -98.230856);

TMapMarkerDescriptor myMarker = TMapMarkerDescriptor::Create(Coor,"Test");

MapView1->Location = Coor;

MapView1->Zoom = 18;

myMarker->Visible = true;

MapView1->AddMarker(myMarker);

}

 

There is a problem with the last line, becasuse cause an exception notification:

"exception EAccessViolation" with message 'Access violation at Addresss A192FD0E, accessing address 00000000'

 

Does somebody knows how to fix this issue?


Viewing all articles
Browse latest Browse all 3212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>