CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

GMap3 Controls don't show

by Omega8 » 12 Dec 2017 16:24

Hello,

I have the following code. The controls in the maps are not showing but the map shows along with marker.

with IWCGJQGMap3EX1.JQGMap3EXOptions do
begin
Map.Options.Zoom:= 14;
Map.Options.Center.Latitude:= ALat;
Map.Options.Center.Longitude:= ALon;
Map.Options.Draggable:= TRUE;
Map.Options.ClickableIcons:=TRUE;
Map.Options.FullscreenControl:=TRUE;
Map.Options.FullscreenControlOptions.Position:='TOP_RIGHT';
Map.Options.MapTypeControl:=TRUE;
Map.Options.MapTypeId:='ROADMAP';
Map.Options.MapTypeControlOptions.Position:='TOP_LEFT';
Map.Options.ScrollWheel:=TRUE;
Map.Options.StreetViewControl:=TRUE;
Map.Options.ZoomControl:=TRUE;
end;
with IWCGJQGMap3EX1.JQGMap3EXOptions do
begin
Markers.Items.Clear;
with Markers.Items.Add do
begin
Position.Latitude:= ALat;
Position.Longitude:= ALon;
MarkerLabel.Text:=ATitle;
end;
end;
end;

procedure TGoogleMapsDialog.IWFrameRegionJQDialogOptionsOpen(Sender: TObject; AParams:TStringList);

begin
inherited;
IWCGJQGMap3EX1.AjaxReRender(TRUE,FALSE);
end;

What am I doing wrong?

Thanks
Omega8
 
Posts: 87
Joined: 18 Mar 2016 22:42

by Jorge Sousa » 12 Dec 2017 16:41

Hi

Please put that code in a test case demo, and ill let you know
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Omega8 » 12 Dec 2017 18:09

Ok I have put in rar. You need to put an api key.

Eventhough Googleloader is assigned, I still get 'google not defined error'

Thanks
You do not have the required permissions to view the files attached to this post.
Omega8
 
Posts: 87
Joined: 18 Mar 2016 22:42

by Jorge Sousa » 12 Dec 2017 18:22

Hi

Thanks

First of all, about

Eventhough Googleloader is assigned, I still get 'google not defined error'


and without even checking in detail your test case

You have to put GoogleLoader in a TIWAppForm, see our demo
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Omega8 » 12 Dec 2017 18:40

ok. thanks. That fixed everything.
Omega8
 
Posts: 87
Joined: 18 Mar 2016 22:42

by Omega8 » 12 Dec 2017 19:35

I have the libloader in IWForm and pass it to a dialog with Gmaps3ex. The controls still dont show. If I put the gmaps3x on a form than it works.

For multiple gmaps, should I use multiple loaders or one loader for all?

Thx
You do not have the required permissions to view the files attached to this post.
Omega8
 
Posts: 87
Joined: 18 Mar 2016 22:42

by Jorge Sousa » 13 Dec 2017 11:18

Hi

Your demo works fine for me

about

for multiple gmaps, should I use multiple loaders or one loader for all?


you only need one.

there is an optimization in your demo that i cannot avoid referring, which is the following:

Code: Select all
uses
  IWCGJQCommon;

procedure TIWForm1.IWCGJQButton1JQEventsClick(Sender: TObject;AParams: TStringList);
begin
  // Disabling unnecessary javascript generation since we are using AjaxReRender
  CGCallBackDisableAjaxResponse;
  try
    FGoogleMapsDialog:=TFlexiFlyGoogleMapsDialog.Create(Self);
    FGoogleMapsDialog.IWCGJQGMap3Ex1.GoogleLibLoader:=IWCGGoogleLibLoader1;
    FGoogleMapsDialog.Parent:= IWCGJQRegion1;
    FGoogleMapsDialog.InitilizeGoogleMapsEx(46.794544, 11.930016,'Bruneck');
    FGoogleMapsDialog.Visible:=TRUE;
  finally
     CGCallBackEnableAjaxResponse;
  end;

  IWCGJQRegion1.AjaxReRender;
 // IWCGGoogleLibLoader1.AjaxReRender;  Nothing has changed on Loader to justify this }
end;
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Omega8 » 13 Dec 2017 16:45

Hello Jorge

I've done the changes and the controls still dont show. You can see here http://www.wingover-automation.ch:1234
The map shows but not the controls in it like zoom in, zoom out etc. I set all relevent options to true.

Thank you
Can
You do not have the required permissions to view the files attached to this post.
Omega8
 
Posts: 87
Joined: 18 Mar 2016 22:42

by Jorge Sousa » 13 Dec 2017 17:32

Hi

I wouldn't never guessed what you meant by controls, now i know that are the zoom in and zoom out elements

Ok ill continue checking
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 14 Dec 2017 12:54

Hi

Yes, in fact there is an error when ServerController.JavaScriptOptions.Debug = False (default value)

Can you please and set Debug = True to see how it goes? tia
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 JQGMap3

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.