delphi-maps icon indicating copy to clipboard operation
delphi-maps copied to clipboard

I am compiling and using DelphiMaps on XE2

Open GoogleCodeExporter opened this issue 10 years ago • 0 comments

I have all of the Demo projects compiling in Delphi XE2.  I am attaching a zip 
file with the corrected files.  Here are the steps and code changes I had to 
make to get it all to work.

1. Install the DelphiMapsDesignTime2011.bpl package.
2. In the source\DelphiMaps.WMS.Client.pas file on line 503, change

SL.Add('BBOX=' + BoundingBox.ToWmsBBox);

to

SL.Add('BBOX=' + BoundingBox.ToString);


3. In the source\DelphiMaps.Browser.pas file, make these changes: 

procedure WebBrowserDocumentComplete(ASender: TObject; const pDisp: IDispatch; 
var URL: OleVariant);

to 

    procedure WebBrowserDocumentComplete(ASender: TObject; const pDisp: IDispatch; const URL: OleVariant);

and 

procedure TBrowserControl.WebBrowserDocumentComplete(ASender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);

to

procedure TBrowserControl.WebBrowserDocumentComplete(ASender: TObject;
  const pDisp: IDispatch; const URL: OleVariant);


4. In the source\DelphiMaps.GoogleMaps.pas file, make these changes: 

procedure WebBrowserDocumentComplete(ASender: TObject; const pDisp: IDispatch; 
var URL: OleVariant);

to 

    procedure WebBrowserDocumentComplete(ASender: TObject; const pDisp: IDispatch; const URL: OleVariant);

and 

procedure TGoogleMaps.WebBrowserDocumentComplete(ASender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);

to

procedure TGoogleMaps.WebBrowserDocumentComplete(ASender: TObject;
  const pDisp: IDispatch; const URL: OleVariant);


5. Add the Bin and source directory to the Demo projects' search paths.   


6. To get the DemoGoogleMaps unit to compile, change 
demos\DemoGoogleMaps\uFrmMain.pas unit on line 128:

  ShowMessage(GoogleMaps1.Browser.Eval('map.getCenter().lat()'));

to 

  ShowMessage(GoogleMaps1.Browser.Eval('map.getCenter().lat()', False));




Original issue reported on code.google.com by [email protected] on 11 Feb 2013 at 4:46

Attachments:

GoogleCodeExporter avatar Mar 25 '15 00:03 GoogleCodeExporter