Google Maps Questions (v6.0.2)

3 replies · opened Jun 17, 2020

PpardthemonsterJun 17, 2020
  1. With respect to Google Cloud Platform and API requests, can you clarify if the API requests are every time functions.js is loaded, or only when Google Maps HTML page/map is loaded?

  2. Version 6.0.2 change log noted this:
    Added `` at the bottom of the Page before the js/functions.js JS Linking

Where is now the correct place to put YOUR-API-KEY? functions.js? Every Google Maps HTML page in code above? Both?

SSemicolon WebSTAFFJun 17, 2020

Hello,

  1. The Google Maps API Requests are loaded only when there are Google Maps available on the Page.

  2. If you are planning to use the js/plugins.min.js File in the HTML File, you will need to add the Google Maps API Key along with the `` on the Page. However, if you are using just the js/jquery.js and js/functions.js Files, then you will simply need to add your API Key in the js/functions.js File. Please read more about Javascripts here: http://docs.semicolonweb.com/docs/getting-started/javascript/ .

Hope this Helps!

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

PpardthemonsterJun 18, 2020

I request a little more clarification after reviewing the new Javascript page. At v6.0.1, my bottom code (maps.html for example) only had this:

Now, v6.0.2 defaults to this:

Reading the Javascript page leaves me with more questions. If I want to leverage my Google Maps API in functions.js, my footer must look like this (including removal of js/plugins.min.js), otherwise it won't work:

So why was js/plugins.min.js added to all pages as everything worked under v.6.0.1 without it or did reference to it change?

SSemicolon WebSTAFFJun 18, 2020

Hello,

Until v6.0.1, there were 2 Options to include the JavaScripts. However, in the Last Week, we heavily tested some of the JS Codes and after receiving some User Feedback, we had decided that AJAX Loading of the JS Plugins were not for everybody, especially for beginners. Additionally, some of Our users also wanted to include the JS using Webpack/Gulp, so the AJAX Loading was not a very viable option for them.

Also, there were some caveats of using AJAX Lazy Loading for the JS Files, as they didn't load properly when the Website was loading using iFrames, this was the issue we detected in our Live Previews when loading directly from the Item Page: https://themeforest.net/item/canvas-the-multipurpose-html5-template/9228123 along with some Caching Issues. So we decided, it was best to include the JS completely on the Page using the js/plugins.js File (as in the Previous Versions < v5.x of Canvas). But this is optional. The JS Files can still be included using AJAX or individually (for Advanced Users) by simply removing the js/plugins.min.js File and then leave it to the js/functions.js File to do all the Processing Work or simply include the js/plugins.*.js manually. So the users have the Option to choose between these 3 options without running into issues with any of them.

You can still continue to use the Old AJAX Style Loading for the JS Files without worrying about anything. So, if you plan to load the JS Files using AJAX, simply remove the following from your Page:

and then add your API Key in the js/functions.js File.

Hope this Helps!

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

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
Google Maps Questions (v6.0.2) · Canvas Template Support