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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:22:19+00:00 2026-06-12T12:22:19+00:00

I have a Google maps API which gives the Google map address.Here is the

  • 0

I have a Google maps API which gives the Google map address.Here is the code to get the Google map API:

<input name="add" type="text" id="address" class="required" style="width: 500px;">
            <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=places&language=en-AU"></script>
            <script>
                var autocomplete = new google.maps.places.Autocomplete($("#address")[0], {});

                google.maps.event.addListener(autocomplete, 'place_changed', function() {
                var place = autocomplete.getPlace();
                console.log(place.address_components);
                });
            </script>
        <!--code for Google address API-->

Now i also want the longitude And Latitude of entered address.any one have idea about this how can i get The values of longitude & Latitude of the entered address.

  • 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-12T12:22:21+00:00Added an answer on June 12, 2026 at 12:22 pm

    I got the answer :

            <script>
    
            function cordinate()
            {
                geocoder = new google.maps.Geocoder(); // creating a new geocode object
                // getting the address value
                address1 = document.getElementById("address").value;
                //alert(address1);
                    if (geocoder)
                {
                geocoder.geocode( { 'address': address1}, function(results, status)
                {
                if (status == google.maps.GeocoderStatus.OK)
                {
                //location of address (latitude + longitude)
                var location1 = results[0].geometry.location;
                document.getElementById("cor").value = location1;
    
                //alert(location1);
                } else
                {
                alert("Geocode was not successful for the following reason: " + status);
                }
                });
    
                }//end of If
    
            }
            </script>
            <!--code for google address cordinates-->
            <input type="hidden" name="cor" id="cor">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small Python program, which uses a Google Maps API secret key.
I have made my own map using the google maps api. It is a
I have a dynamic map in Google Maps (API v2) I want to overlay
I've been working with Google Maps API v3 and created a map which allows
I am using google maps API and I have some code that tries to
I have a google maps api v3, which uses The Di Lab's plugin for
I have an application which is currently using the google map API. I like
We have an existing website which currently uses v2 of the google maps api
Using Google Maps API v3 I have a map with the countries coloured using
I have a google maps directions link shown in XML: http://maps.googleapis.com/maps/api/directions/xml?origin=111%20Davisville%20Avenue,Toronto,ON&destination=469%20King%20Street%20West,%20Toronto,%20ON&sensor=false&dirflg=r Even though it

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.