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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:52:11+00:00 2026-05-23T17:52:11+00:00

I am using Google Maps V3 API and using its Geocoder to do reverse

  • 0

I am using Google Maps V3 API and using its Geocoder to do reverse geocoding of the point on the map where the user clicks on.

Load the geocoding function when DOM is fully loaded

$(function() {
reverse_geocode(40.714224,-73.961452);

});

Function that does the reverse geocoding:

function reverse_geocode(lat,lng) {

    var geocoder = new google.maps.Geocoder();
    var latlng = new google.maps.LatLng(10,-10);
    geocoder.geocode({'latLng': latlng}, function(results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
            alert('asdasd');
        } else {
             alert("Geocoder failed due to: " + status);
        }
    }); 

}

If I call the reverse_geocode function when the page first loads, everything works fine and the alert() is called.

However, if I call reverse_geocode() only when triggered by a rightclick on the map followed by a mouseclick on a div, using the code below, nothing happens! Any idea what went wrong?

google.maps.event.addListener(map, "rightclick", function(event) {
                //some code not shown
                $("#info_rightclick_top").click(function(e) {

                    info_ok_handleclick();
                });
            });


function info_ok_handleclick() {
            $("#info_ok").click(function(e) {
                var lat = marker_search_location.getPosition().lat();
                var lng = marker_search_location.getPosition().lng();
                var latlng = lat + "_" + lng;



                reverse_geocode(10,-10);

                // some code hidden
            });
  • 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-23T17:52:11+00:00Added an answer on May 23, 2026 at 5:52 pm

    Using this bellow code you can search a location by keywords.

            <?php
             include_once("include/GoogleMap.php");
             include_once("include/JSMin.php");
             $mapcity="India";
             $mapdesc="description about this map";
             $MAP_OBJECT = new GoogleMapAPI(); 
             $MAP_OBJECT->_minify_js = isset($_REQUEST["min"])?FALSE:TRUE;
    
             $MAP_OBJECT->addMarkerByAddress($mapcity,"Map name", $mapdesc);
             $MAP_OBJECT->enableStreetViewControls();
            ?>
            <html>
            <head>
            <?=$MAP_OBJECT->getHeaderJS();?>
            <?=$MAP_OBJECT->getMapJS();?>
            </head>
            <body>
            <?=$MAP_OBJECT->printOnLoad();?>
            <?=$MAP_OBJECT->setMapType(ROADMAP);?>
            <?=$MAP_OBJECT->printMap();?>
            <?=$MAP_OBJECT->printSidebar();?>
            </body>
            </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing some geocoding using the google maps API. The user fill a form
I am using google maps Api V3 and using reverse geocoding to find the
Is it possible to do a google map lookup using the google maps API
I'm using the Google Maps API to plot several points on a map. However,
I am using Google Maps API to display a map on a certain page.
I am working on Google map application using Google Maps JavaScript API V2 .
I am using a google map with the full maps api on my website.
I am using google maps api to place markers on a map. The gps
I want to access google map api for reverse geocoding. I access the url
I'm using the Google Maps API v2 and I'd like to be able to

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.