CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Infowindow

by assapan » 18 Oct 2016 20:40

Hi,
When i start my application i always have an empty infowindow on top left of the screen
Image

So far i was calling the following code to hide it
Code: Select all
GoogleMap.JQGMapV3Options.InfoWindow.ResetProps;


but now i use some script in the onDomReady event of the infowindow in order to customize it
Image

unfortunatly when i call resetprops it also clears the script !!!

Image

can anyone help ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by assapan » 19 Oct 2016 07:40

Hi,
I discover the parameter AEvents for the resetprops procedure :oops: :mrgreen:
but....
if i do in onCreate event the infowindow is still displayed.
Code: Select all
 
  GoogleMap.JQGMapV3Options.InfoWindow.Close;
  GoogleMap.JQGMapV3Options.InfoWindow.ResetProps(False)


but if i do the infowindow disappear but my event script is cleared
Code: Select all
 
  GoogleMap.JQGMapV3Options.InfoWindow.Close;
  GoogleMap.JQGMapV3Options.InfoWindow.ResetProps(True)
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by assapan » 19 Oct 2016 07:52

So , it tried to init script by code , it seems that as soon as some data are set in infowindow it is displayed
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 19 Oct 2016 16:57

Hi assapan,

Due to the complexity of your project, I suggest you, to use the premium support ticket, otherwise you can create the simple testcase of that problem, but I checked here and works as expected:

Code: Select all
procedure TFORMTEST.IWAppFormCreate(Sender: TObject);
begin
  IWCGJQGMap31.JQGMapV3Options.Map.Address:= 'Paris, France';
  IWCGJQGMap31.JQGMapV3Options.Map.Options.Zoom:= 10;
  IWCGJQGMap31.JQGMapV3Options.InfoWindow.Address:= 'Paris, France';
  IWCGJQGMap31.JQGMapV3Options.InfoWindow.Options.Content:= 'Works fine...';
end;

procedure TFORMTEST.IWCGJQButton1JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
begin
  IWCGJQGMap31.JQGMapV3Options.InfoWindow.ResetProps(False);
  IWCGJQGMap31.AjaxReRender(True,False);
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: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 20 Oct 2016 09:34

Hi,
here is a test software , to check , in Infowindow.OnDomReady.script i have just set
Code: Select all
function (){
  // just comment
}


If i remove it , infowindow disappear
You do not have the required permissions to view the files attached to this post.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by assapan » 21 Oct 2016 08:13

Ok so with Alexander's help we found a solution , do not fill event script in design mode , fill it when infowindow is required like this

Code: Select all
  GoogleMap.JQGMapV3Options.InfoWindow.Options.Position.Latitude := Lat;
  GoogleMap.JQGMapV3Options.InfoWindow.Options.Position.Longitude := Lng;
  GoogleMap.JQGMapV3Options.InfoWindow.Options.Content := DonneesMeteo;
  GoogleMap.JQGMapV3Options.InfoWindow.Events.OnDomReady.Script := Infowindowjs;
  GoogleMap.JQGMapV3Options.InfoWindow.ApplyProps;


Thanks Alexander Image
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France


Return to JQGMap3

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.