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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:09:17+00:00 2026-06-12T13:09:17+00:00

I began to use Google Map API recently and I tried the hello world

  • 0

I began to use Google Map API recently and I tried the hello world sample in my own webpage. The only difference of my code from the original one is I display the map element in javascript code like this:

    function showMap () {
        container = document.getElementById("id_container");
        container.innerHTML = "<div id=\"map_canvas\"><\/div>";
        var mapOptions = {
            center: new google.maps.LatLng(-34.397, 150.644),
            zoom: 8,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
    }

And in the external css file, I defined the width and height by fixed values for #map_canvas.

But I didn’t get the expected result. The map showed for about 1 second and became all white (see the image below). When I zoom the map, I can see it flashing. I have searched on Google but I didn’t get any solution and I don’t even know what the problem is. Has anyone encountered the same problem before?

  • 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-12T13:09:18+00:00Added an answer on June 12, 2026 at 1:09 pm

    After several days’ trying, I know what’s happening —

    I set the background attribute of all divs to be white. Though I reset the background of the map div to be “none”, it doesn’t work. The only solution is to avoid any definitions that would possibly give it a not “none” background, like “div {background-color: white;}”.

    However, feel free to set the background color of its parent tags.

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

Sidebar

Related Questions

I am trying to use the Bluetooth Chat sample API app that google provides
Ever since ereg became depreciated, I began to use preg_match. Unfortunately in my code,
When drawing an editable Polygon on a map using Google's V3 API, is there
I use the google map tool from primefaces . I want my user to
I tried to use this code in my program in delphi 2007 function ExtractText(const
I've recently began learning the SFML API for learning purposes but it seems to
I'm trying to use m2eclipse api to import projects by archetype. my code is
Using com.google.appengine.api.memcache.MemcacheService for caching in App Engine, I'm creating the memcacheservice instance using a
I use this code in the JSF page <h:outputText value=#{writeBean.t} /> (and I have
I have a form which is built dynamically using this jQuery plugin http://code.google.com/p/jquery-dynamic-form/ When

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.