CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Script error

by assapan » 24 Mar 2014 09:01

Hi,
I use a GMap3 to show the meteo for pilots , the name of the airfields are displayed using the data field of markers .
Code: Select all
 
  GoogleMap.JQGMapV3Options.InfoWindow.Close;
  GoogleMap.JQGMapV3Options.InfoWindow.Options.ContentFunc.Script := GoogleMap.CurrEventParamsJs[2] + '.data';
  GoogleMap.JQGMapV3Options.InfoWindow.Anchor.Script := GoogleMap.CurrEventParamsJs[0];
  GoogleMap.JQGMapV3Options.InfoWindow.ApplyProps;
  AfficheTafMetar(True);

This works fine , but i have a button to force the refresh ( reload of database data and re-creation of the markers ) , when i click it i got this message Script Error "$(...)[0].currEventParams is undefined" in Render Async! Processing Full Submit...

can you help please ?

you can see the problem on : http://meteoaero.assapan.fr
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 Jorge Sousa » 24 Mar 2014 16:34

Hi

It would help us a lot if you could set ServerController.JavaScriptOptions (true,true), just for tests, to help tracking the javascript error.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 24 Mar 2014 16:58

Hi,
When i do ServerController.JavaScriptOptions (true,true) i don't error anymore but the map desappear !
I have in the onclick
Code: Select all
procedure TFrm_Meteo.MarkerClick(Sender: TObject; AParams: TStringList);
begin
  AfficheTafMetar(True);
  GoogleMap.JQGMapV3Options.InfoWindow.Close;
  GoogleMap.JQGMapV3Options.InfoWindow.Options.ContentFunc.Script := GoogleMap.CurrEventParamsJs[2] + '.data';
  GoogleMap.JQGMapV3Options.InfoWindow.Anchor.Script := GoogleMap.CurrEventParamsJs[0];
  GoogleMap.JQGMapV3Options.InfoWindow.ApplyProps;

end;

If I suppress the Infowindow lines ( set in comment ) everything works fine ( but i don't have an indicator for the selected airfield )

I have uploaded the modified version so you can try http://meteoaero.assapan.fr
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 Jorge Sousa » 24 Mar 2014 18:27

Hi

What's AfficheTafMetar(True); does ajaxrerender?

For the script you better edit in design-time to see how it looks, because it's missing the 'function (arguments) { } part...
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 24 Mar 2014 19:01

Hi,
Please see attached file
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 Alexander Bulei » 24 Mar 2014 19:38

Hi assapan,

I think, i found the problem, will try fix it asap.

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 » 24 Mar 2014 19:41

Ok Thank you very much let me know when ready
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 Jorge Sousa » 25 Mar 2014 18:21

2.0.0.3443

JQMapV3
- Fixed: javascript error after refreshing/rerender the google maps.
- Changed: The method CurrEventParamsJs.

Tomorrow should be avaialable for download.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 25 Mar 2014 20:07

Thank you very much , i am very impressed by your reactivity :o :o
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 Jorge Sousa » 25 Mar 2014 20:39

Hi

Thank you very much , i am very impressed by your reactivity


Thank you for the feedback, about the reactivity, it's just a matter of not lefting anything behind, the work is the same :)
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

Next

Return to JQGMap

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.