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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:31:51+00:00 2026-05-24T00:31:51+00:00

I am completely new in map scripting so my question may be stupid, but

  • 0

I am completely new in map scripting so my question may be stupid, but i would love if you can answer this. The following is the code which i took from google map tutorials. When run the example, it works fine. but when I used it in my code, no map is visible.
here is the code :

<!DOCTYPE html">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PGet</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

<script type="text/javascript" >

function invokeMap()
{


      var latlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
      zoom: 8,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    //document.getElementById('form_container').innerHTML="";
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);


}

</script>

</head>
<body id="main_body" onload = "invokeMap()" >


 <div id="map_canvas" style="width: 500px; height: 400px; position: relative; background-color: rgb(229, 227, 223); overflow: hidden;"></div>

<img id="bottom" src="bottom.png" alt="">
</body>

  • 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-05-24T00:31:52+00:00Added an answer on May 24, 2026 at 12:31 am
    <body onload="invokeMap()" >
    

    Make sure you remember to call the initialization function.

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

Sidebar

Related Questions

Completely new to most of this stuff, but basically Im playing around with the
Strange Question i guess but i have this bit of code in my page...
I'm completely new to ArcGIS and ArcMap, but someone suggested this program to me
I'm completely new to javascript, but I'm trying to create a beta form for
I'm working on a piece of JavaScript. I'm completely new to JS, But I
I'm new to jQuery Thickbox. I've implemented the following code: HTML: <a class=thickbox href=javascript:void(0);
I'm developing this tourist app and I would like to have an offline map
I'm completely new to both javascript and the googlemaps api but have had some
Completely new to asp.net mvc... completely new to web apps so bear with me...
Completely new to java and I have been playing around with regex in a

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.