Hi Azrin,
thank you very much! Unfortunately I have only Delphi and not
RAD Studio, so I could test it yet. If there are problems again, please tell about it!
Hi Thom,
I mange to port 2 of your samples int C++ Builder. Now I'm trying to port one of Events sample - the DOMListener sample. Unfortunately, I stuck
here is the code in Delphi (from your sample)
Delphi-Quellcode:
{$IFDEF USE_ANONYMOUS_METHODS}
Google.Maps.Event.AddDomListener(Map.Container,'click',NewFunction(
procedure(Sender: TObject)
var
Event: TJScriptObject;
begin
//'Sender' is the TJScriptObject that was created with 'NewFunction()'
//The 'click' event has one parameter - a object with the x and y
//position of the click.
Event:=TJScriptObject(CreateObjectWrapper(Script,TJScriptObject,
TJScriptFunction(Sender).Arguments[0]));
ShowMessage('DIV clicked'+', ('+
'x: '+IntToStr(Event.Properties['x'])+', '+
'y: '+IntToStr(Event.Properties['y'])+')');
end));
{$ELSE}
Google.Maps.Event.AddDomListener(Map.Container,'click',NewFunction(DIVClick));
{$ENDIF}
I also attached here are the C++ codes that I manage to port and compile and is working