1

I am using loadfromdataset function of TGMMarker object in GMLib, but I can't get the IconField to work. I have a BLOB field with a png image to use as a Icon. I load the very same image file directly from the folder with no problems, but when I try to do it with the IconField argument it gives error.

Here's the code

  inherited;

  GMMap1.Active := True;
  GMMarker1.LoadFromDataSet(Dscameras.DataSet,'Latitude','Longitude',
                        'Descrição','Distintivo');

Gives this error :"Erro de Script" "Constante de cadeia não finalizada"

Willer Bononi
  • 31
  • 1
  • 4

1 Answers1

0

The minimum code is:

procedure TForm1.FormCreate(Sender: TObject);
begin
  ClientDataSet1.LoadFromFile('markers.xml');
  GMMap1.Active := True;
end;

procedure TForm1.GMMap1AfterPageLoaded(Sender: TObject; First: Boolean);
begin
  if First then
  begin
    GMMap1.DoMap;
    GMMarker1.LoadFromDataSet(ClientDataSet1, 'lat', 'lng', 'title');
    GMMarker1.ZoomToPoints;
  end;
end;
cadetill
  • 1,552
  • 16
  • 24