Mapview custom pin

Hi !


I tried several ways to set a custom bitmap to show on the
map as pin, but i keep getting the default pin.

Any chance someone can provide me with sample code how
to set a custom bitmap as pin when adding an annotation ?

Thanks !

Cheers,

Paul

With the following code, the annotation should show with a custom pin:


var
  loc: TTMSFMXNativeMKMapLocation;
  ann: TTMSFMXNativeMKAnnotation;
begin
  TMSFMXNativeMKMapView1.BeginUpdate;
  loc := TMSFMXNativeMKMapView1.XYToCoordinate(TMSFMXNativeMKMapView1.Width / 2, TMSFMXNativeMKMapView1.Height / 2);
  ann := TMSFMXNativeMKMapView1.AddAnnotation(loc, 'Hello', 'World');
  ann.Bitmap.LoadFromFile(ExtractFilePath(ParamStr(0))+'pin.png');
  TMSFMXNativeMKMapView1.EndUpdate;

Thanks Pieter !


Works :)

Cheers,

Paul