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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:55:43+00:00 2026-05-17T23:55:43+00:00

I want to implement the google map in my page. In my page there

  • 0

I want to implement the google map in my page. In my page there is one textbox and one button. User need to enter the location for which he want to have the map. Then on clicking of the button the map should appear in a div.

Could anyone provide me the steos to do so?

Thanks in advance.

  • 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-17T23:55:44+00:00Added an answer on May 17, 2026 at 11:55 pm

    This is quite easy if you use the google api js file. As a reference you can use this link:
    http://code.google.com/apis/maps/documentation/javascript/reference.html

    1. Add the jQuery and GoogleMaps API library in the HEAD section:

      <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
      <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
      
    2. Add new tag to create the google maps object in the div:

      var geocoder;
      var map;
      $(document).ready(function() {
          /* Create the geocoder */
          geocoder = new google.maps.Geocoder();
          /* Some initial data for the map */
          mapOptions = {
              zoom: 10,
              center: new google.maps.LatLng(48.13, 13.58),
              mapTypeId: google.maps.MapTypeId.TERRAIN
          };
          map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
      };
      
    3. Add on click handler for the button:

      $('#idMyButton').click(function() {
          if (geocoder) {
              var address = $('#idMyTextbox').val();
              geocoder.geocode( { 'address': address}, function(results, status) {
                  if (status == google.maps.GeocoderStatus.OK) {
                      /* Position the map */
                      map.panTo(results[0].geometry.location);
                      /* Put a marker */
                      new google.maps.Marker({
                          map: map,
                          position: results[0].geometry.location,
                          title: address,
                  });
              }
              else
                  alert('Address not found');
              };
          }
      });
      

    I hope this will help.

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

Sidebar

Related Questions

I want to implement a Google Map on my .NET page. I used the
I want to implement in my webpage something similar to google search page. The
I want to implement an application which will work as a parser. User will
I want to implement serial-number notification for google checkout as I do not have
i want to implement a google map based on its api. i want to
I have a google map component in my application that allows the user to
In my application i need to implement pre-cached functionality like native Google map application
I have a map activity which displays the map, I want to add a
I read both iPhone and Google Map for iPhone EULA and want to implement
i am develop map application in which i have display Google map and overlay-item

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.