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

  • Home
  • SEARCH
  • 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 8815067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:16:58+00:00 2026-06-14T04:16:58+00:00

I am having a problem with using the Google Maps API. One page load

  • 0

I am having a problem with using the Google Maps API.

One page load is get the error window.handleApiReady is not a function, where it most certainly is. Looking at the code below you can see I use it as a callback function:

    /**
    * Load GoogleMaps API
    */
    $(function(){
        script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = 'http://maps.google.com/maps/api/js?sensor=false&callback=handleApiReady';
        document.body.appendChild(script);
    });

    /**
         * Show map once GoogleMaps API is ready
         */
    function handleApiReady() {     
        if ( $("#map_canvas").length > 0 ) {                
            var latlng = $("#store_lat_long").html();
            var details = latlng.split(',');
            initialize(Number(details[0]), Number(details[1]), 'map_canvas');
        }
    }

Sticking an alert or console.log out on the first line of handleApiReady shows that it doesn’t seem to find the function. Why would that be?

  • 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-14T04:17:00+00:00Added an answer on June 14, 2026 at 4:17 am

    The problem was caused with the code I provided being located in a document.ready. Moving it outside of the document.ready solved the problem.

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

Sidebar

Related Questions

im using google maps api and im having this problem with showing the info
I'm using the Google Maps javascript V3 API and I'm having problems with setting
I'm having a problem using the Google Prediction API. I don't know what information
I'm using the Google Maps API to get driving distances from multiple routes. Each
I'm trying to create dynamic markers using google maps api and am having problems
I'm having a problem with getting my Google Maps API key to work. I
I'm using Google Maps V3 and it's not only having trouble getting exact geolocations,
I'm having a problem with using this in js. I have a function that
I'm using the Google maps API (v2) to display a country overlay over a
I'm having a problem with the realloc function. I'm using C only (so no

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.