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 8507375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:51:14+00:00 2026-06-11T02:51:14+00:00

When I use google maps, I am interested in its implemention, so I use

  • 0

When I use google maps, I am interested in its implemention, so I use the firebug to inspect.

Then I found that its javascript loading strategy is rather interesting. Take this page for example:

The overlay example

Then when I open this page first time, the following js are loaded:

https://maps.googleapis.com/maps/api/js?sensor=false
https://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/13b/main.js
https://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/9/13b/%7Bcommon,map,util,poly%7D.js
https://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/9/13b/%7Bonion,geometry%7D.js

But if I refresh the page(use the ctrl+f5), the following js are loaded:

https://maps.googleapis.com/maps/api/js?sensor=false
https://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/13b/main.js

However the page still works, the overlay is drawn in the map. But where is the poly.js and etc?

Also, can anyone tell me how to load the js by components? For exmaple the common util poly in the example.

What should I know when I write the different components?

  • 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-11T02:51:16+00:00Added an answer on June 11, 2026 at 2:51 am

    1. When poly.js loads, it passes a string to google.maps.__gjsload___.

    Here’s an excerpt:

    google.maps.__gjsload__('common', '\'use strict\';var Ai=isNa...

    The rest of the file is just the contents of that string.

    My hunch is this function probably stores this string in localStorage or sessionStorage so that it only has to be retrieved once.

    2. Also, if you want to learn about loading js files as-needed, look into AMD and/or CommonJS:Modules.

    A good imlementation of AMD (my preference) is RequireJS.

    Update

    I did some poking around, and localStorage and sessionStorage do not appear to be being used on this page. I also can’t duplicate your results. In Firebug, poly.js always loads for me. There may be some magic happening somewhere, but I don’t see it.

    However, it’s entirely possible to store a string in localStorage and sessionStorage for retrieval without having to make an extra js call.

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

Sidebar

Related Questions

I was wondering if its possible to use the Google maps IFRAME code to
How to use Google Maps JavaScript API v3 in any Android Application. Please some
I am running several apps that use Google Maps. On Android and Windows Phone
I have a program that I want to use google maps for. The problem
To use Google Maps API you fetch their api js file with: <script type=text/javascript
how to use google-maps on API2 to get navigation to specified place i've add
I create application where I use google maps. I get error: 06-20 15:23:51.262: W/System.err(28660):
i have tryed to make my own app and to use google maps. I
Borrowing this code from several different tutorials on how to use Google maps on
I want to use the google maps hand cursor in Python but I don't

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.