maps api key

9 replies · opened Jan 11, 2024

Llayer0Jan 11, 2024

Hello, i have this error:
Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance.

Is it possible to make the map work without updating the theme to version 7?

version 6.5.4 is currently in use

I tried copying just the files:

  • function.js
  • plugins.gmap.js
    but the site gets corrupted on several pages

Thank you

SSemicolon WebSTAFFJan 12, 2024

Hello,

Consider finding the following code in the js/functions.js File:
[ch_pre type="js"]file: 'https://maps.google.com/maps/api/js?key=' + googleMapsAPI,[/ch_pre]

and replace it with:
[ch_pre type="js"]file: 'https://maps.google.com/maps/api/js?key=' + googleMapsAPI + '&callback=SEMICOLON_gmapInit',[/ch_pre]

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Llayer0Jan 12, 2024

thanks for the quick support. Unfortunately now I have this error:
Google Maps API could not be loaded
functions.js:208 plugins.gmap.js: Plugin could not be loaded

in function.js i have this lines:
//file: 'https://maps.google.com/maps/api/js?key=' + googleMapsAPI,
file: 'https://maps.google.com/maps/api/js?key=' + googleMapsAPI + '&callback=SEMICOLON_gmapInit',

Do I need this script in the footer that I used before?
it is now commented
<script src="https://maps.google.com/maps/api/js?key=AIzaSyBPOtb3N_8g4qcnMEKHWY2d_Xb_dktQ1Zg"></script>

thank you

SSemicolon WebSTAFFJan 12, 2024

Hello,

Thanks for your Patience!

Consider changing: SEMICOLON_gmapInit to SEMICOLON.widget.gmap and please check if this works.

Additionally, no you won't need to add the JS Script manually in the Footer.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Llayer0Jan 12, 2024

Hi, sorry but I'm getting the same error.

what can I try?

SSemicolon WebSTAFFJan 15, 2024

Hello,

Apologies for the Inconveniences caused!

The Codes look fine but it appears there is some issue with the JS Setup. Would it be possible for you to provide us with FTP Credentials in a private reply, so that we can check this for you and fix it? Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Llayer0Jan 15, 2024

sure, here is the required FTP data.

host:
itm13.siteground.biz

username:
semicolonweb@dreamlakecomo.it

psw:
{14g^&$Pv1*2

Thank you

SSemicolon WebSTAFFJan 16, 2024

Hello,

We have fixed this issue for you by adding the Google Maps API Script in the footer.php. You will now just need to add your Website URL in the Google Console in the Referrers List to enable showing the Google Maps on your Website.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Llayer0Jan 16, 2024

ok now it works perfectly.
thank you for your precious support

SSemicolon WebSTAFFJan 16, 2024

Very Happy to Help! :)

Please do let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard