Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:56:03+00:00 2026-06-10T08:56:03+00:00

I have create a script in WordPress that load all of my JavaScript files,

  • 0

I have create a script in WordPress that load all of my JavaScript files, combine and compress them. Among my JavaScript files I have use and the folloign JavaScript file :

http://maps.googleapis.com/maps/api/js?sensor=false

While my script working good, the Google Maps loaded JavaScript file looks like is not running in order to load all the external JavaScript files from Google.

The Google Map file is in the very top of my produced JavaScript file after the combination and the compression, and the content of it are the following :

window.google = window.google||{};
google.maps = google.maps||{};
(
    function()
    {
        function getScript(src)
        {
            document.write('<'+'script src="'+src+'"'+' type="text/javascript"><'+'/script>');
        }

        var modules = google.maps.modules = {};
        google.maps.__gjsload__ = function(name, text)   
        {
            modules[name]=text;
        };

        google.maps.Load = function(apiLoad)
        {
            delete google.maps.Load;
            apiLoad(
            [
                null,
                [
                    [
                        [
                            "http://mt0.googleapis.com/vt?lyrs=m@183000000\u0026src=api\u0026hl=en-US\u0026",
                            "http://mt1.googleapis.com/vt?lyrs=m@183000000\u0026src=api\u0026hl=en-US\u0026"],
                        ...
                        DATA
                        ...
                null,
                null,
                0,
                "http://khm.googleapis.com/mz?v=115\u0026",
                null,
                "https://earthbuilder.google.com",
                "https://earthbuilder.googleapis.com"
            ],
            loadScriptTime
        );
    };

    var loadScriptTime = (new Date).getTime();
    getScript(
        "http://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/13b/main.js"
    );
}
)();

The above content is the same with the one I have if I go to URL http://maps.googleapis.com/maps/api/js?sensor=false directly by my web browser.

The broblem now is, that while I get that data corectly, the google mas object I get in my console is as follow:

console.log(google);
Object
    maps: Object
    Load: function (apiLoad)
    {
        delete google.maps.Load;
        ...
        data
        ...
    }
    __gjsload__: function(name, text)
    {
        modules[name] = text;
    }
    modules: Object
        __proto__: Object
        __proto__: Object

and for the following I am getting :

console.log(google.maps.LatLng);
undefined
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:56:05+00:00Added an answer on June 10, 2026 at 8:56 am

    The Google Maps API Team has specific code that disallows you from copying the main script locally. In particular, that code “expires” every so many hours. You cannot combine the Google Maps API scripts in with your other scripts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to create a script that takes a mySQL table, and exports it
I have a script that create a new div element. Then, I want to
I have a script that parse the database and create php classes to work
I'm learning SPARC assembly and I have to create a script that extracts a
I have a plugin.js that combine all my plugins for my responsive build. This
I have a WordPress install and I'm trying to use jQuery to create a
So I have a script that creates a WXR(Wordpress eXtended RSS)/XML file from a
Say I have written a Create Table script in a query window and run
I want to create script to edit photos in galery. I have there textbox
I have to create a PNG / JPEG image from PHP script .. Briefly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.