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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:59:50+00:00 2026-05-26T05:59:50+00:00

I am trying to load google map on the anchor click. Below are the

  • 0

I am trying to load google map on the anchor click. Below are the details.

I have index.aspx page where I have got one anchor tag and a div “divLoadMap”

<a class="loadMap" href="map.aspx">Load Map</a>
<div id="divLoadMap">
</div>

And I have map.aspx which have maps details. Below is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="_LANGUAGE" xml:lang="_LANGUAGE">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Simple Jquery CSS Tabs and V3 Google Maps</title>

     <script type="text/javascript" src="/common/js/jquery-1.5.2.min.js"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

    <script type="text/javascript" language="javascript">

    $(document).ready(function() {

      function initialize() 
        {     
            var latlng = new google.maps.LatLng(25.294371, 55.332642);     
            var myOptions = {       zoom: 8,       center: latlng,       mapTypeId: google.maps.MapTypeId.ROADMAP     };     
            var map = new google.maps.Map(document.getElementById("map_canvas"),         myOptions);


            var marker = new google.maps.Marker({
                position: latlng,
                map: map,
                title: 'Dubai'
            });
            var contentString = 'Dubai';

            var infowindow = new google.maps.InfoWindow({
                content: contentString,
                maxWidth: 50
            });
            google.maps.event.addListener(marker, 'click', function() {
              infowindow.open(map,marker);
            });

        }  

     initialize(); 

    });

    </script>

</head>
<body>
   <form id="mapform" >
   <div id="map_canvas" style="width: 500px; height: 500px">
   </div>
   </form> 
</body>
</html>

Now I want load this map on the click of anchor tag which is present on index.aspx.

Please suggest!! would appreciate if can get code sample for above problem.

  • 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-26T05:59:51+00:00Added an answer on May 26, 2026 at 5:59 am

    I thought below approach.

    1. Declare a div with id = ‘GoogleMapContainer’
    2. Make it by default display: none.
    3. inside this div, declare iframe and assign src property of this iframe to index.aspx page.
    4. Now onclick of anchor tag call a javascript function, which internally will call query modal dialog for above declared div.
    5. this will result into a popup window which contain google map.

    7.

    <div id="GoogleMapContainer" title="Google Map Container" style="display: none;">
            <iframe id="frameGoogleMapContainer" height="100%" width="100%" src="index.aspx"
                frameborder="0" scrolling="auto"></iframe>
    </div>
    
    1. Call javascript function on click of anchor tag. and in that javascript function write this code:

      $jq (“#GoogleMapContainer”).dialog({
      modal: true,
      width: 750,
      title: ‘Google Map’,
      resizable: false,
      open: function(type, data) {
      $jq(this).parent().appendTo(“form”);
      }
      });

    Please suggest whether is it right approach or I need to do some modifications!!

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

Sidebar

Related Questions

I have been trying with no luck to load a google map over a
I am trying to make a google map appear on my web page without
I am trying to load google map to uiwebview after performing a query using
I'm trying to load a google map with dynamic markers and dynamic infoWindows to
I am trying to load a google web toolkit application with django, but the
I have a problem with out of memory when I'm trying load a few
I'm trying to load a page that is basically an edit form inside a
I m trying to display the google map in a pop up. I m
I'm trying to center a google map on a single marker pulled from a
I'm trying to show a small static google map in my app. I'm wondering

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.