CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Get Lat Lng on Map.Events.OnClick

by FredT » 15 May 2019 15:29

Hi,

I want to add a marker when the user clicks on GMap3.
Looking at the available settings (through the Developer Console browser & debugger command), I do not find how to retrieve Lat Lng coordinates from the OnClick Params.

Which are the params to add ?

with IWCGJQGMap3.JQGMapV3Options.Map.Events.OnClick.BrowserParams.Add do
begin
ServerName := ???
BrowserScript := ???
end;
IWCGJQGMap3.JQGMapV3Options.Map.Events.OnClick.OnEvent := MapEventsClick;

Thank.
FredT
 
Posts: 28
Joined: 28 Jan 2019 15:10

by Alexander Bulei » 31 May 2019 12:39

Hi FredT,

Sorry for the delay...

Here you have the code:

delphi code
with IWCGJQGMap3.JQGMapV3Options.Map.Events.OnClick.BrowserParams.Add do
begin
ServerName := 'lat';
BrowserScript := 'arguments[1].latLng.lat()';
end;
with IWCGJQGMap3.JQGMapV3Options.Map.Events.OnClick.BrowserParams.Add do
begin
ServerName := 'lng';
BrowserScript := 'arguments[1].latLng.lng()';
end;


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3506
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQGMap

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.