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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:27:40+00:00 2026-05-26T02:27:40+00:00

I want to map a location, fill it’s adress into an input field and

  • 0

I want to map a location, fill it’s adress into an input field and add a marker.

Currently I have this, which works:

var home = new google.maps.LatLng(49.93547768118736, 11.2954580783844);
$('#map_canvas_1').gmap({'center': home, 'zoom':17 });
$('#map_canvas_1').gmap('addMarker', { 'position': home, 'animation' : google.maps.Animation.DROP } );
$('#map_canvas_1').gmap('search', { 'location': home }, function (results, status) {
    $('#to').val(results[0].formatted_address);
    });

What I’m wondering is why I cannot use a callback function to fill the input field like so:

$('#map_canvas_1').gmap({'center': home, 'zoom':17, 'callback': function() {
    $('#map_canvas_1').gmap('search', { 'location': home }, function (results, status) {
        $('#to').val(results[0].formatted_address);
   });
} });

As a matter of fact, not even this works:

$('#map_canvas_1').gmap({'center': home, 'zoom':17, 'callback': function() {
    alert ("callback"); 
} });

Can somebody tell me what I’m doing wrong?

  • 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-26T02:27:41+00:00Added an answer on May 26, 2026 at 2:27 am

    There is no property 'callback' in MapOptions, so you cannot set it.

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

Sidebar

Related Questions

I want to point to a Google map location using overlay. For this purpose
I have got a little problem. I have data which I want to map
I want to map DbConnection to an un-opened SqlConnection using Ninject . This is
I have a situation where I want to map a pair of objects to
I have one very general object that I want to map to a destination
I want to read my current location using Map view in my iPhone application.
In my iphone application i have integrated Google Map.I want to show the country
By default when you click on a marker the map pans to that location.
I am new to android.I want to make application which displays the map when
I want to create an application where users can mark on map location of

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.