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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:07:10+00:00 2026-06-10T05:07:10+00:00

I am teaching myself asp .net mvc 3. I read this tutorial: http://www.codeproject.com/Articles/148949/ASP-NET-MVC-3-the-Razor-View-Engine-and-Google-Map and

  • 0

I am teaching myself asp .net mvc 3. I read this tutorial: http://www.codeproject.com/Articles/148949/ASP-NET-MVC-3-the-Razor-View-Engine-and-Google-Map and several other such posts. However, I have not been able to get google map running on my application. what am I doing wrong?

View:

    @section Scripts_head {
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> 
    }

    <script type="text/javascript">
        function initialize() {
            var latlng = new google.maps.LatLng(40.716948, -74.003563);
            var options = { zoom: 14, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP };
            var map = new google.maps.Map(document.getElementById("map"), options);
        }

        $(function () {
            initialize();
        });
    </script>
<div id="map" style="width:80%; height:80%"></div>

I have also tried putting the div over the script tag.

Layout Page:

<head>
    ...
    @RenderSection("Scripts_head", false)
</head>

Controller:

public class MapController : Controller
{
    //
    // GET: /Map/

    public ActionResult Index()
    {
        return View();
    }

}
  • 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-10T05:07:11+00:00Added an answer on June 10, 2026 at 5:07 am

    If you dont have errors, then its probably sizing of your div “map”. Here is your code extracted and working in JsFiddle:
    http://jsfiddle.net/GNwU8/3/

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

Sidebar

Related Questions

I'm teaching myself ASP.NET MVC, and am trying to figure out where best to
I am teaching myself Asp .net MVC 3. I have reached a stage where
I have recently started teaching myself C# and Asp.net. I am trying to build
I am teaching myself asp .net mvc3. I want to create a user account
I am teaching myself asp .net mvc3. I have researched a lot but the
I am teaching myself asp .net mvc3. I have a partial view which uses
I'm teaching myself about structures in C, and am having trouble compiling this code:
I am teaching myself PowerShell by writing a simple parser. I use the .Net
I am teaching myself jquery it seems while working on this project. I assumed
I'm teaching myself some Django tonight using the local dev package at instantdjango.com I

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.