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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:57:14+00:00 2026-05-27T08:57:14+00:00

Hi I am trying to use a dropdown menu containing a list of countries

  • 0

Hi I am trying to use a dropdown menu containing a list of countries – once selected it should automatically update a googlemap and zoom into that location.

e.g. if user selects ‘Brazil’ from the dropdown then the map should zoom into Brazil – any ideas on how to go about this – or any simple tutorials that explain this.

    geocoder = new google.maps.Geocoder();
    console.log(geocoder);        
    geocoder.getLatLng(
        'Brazil',
        function(point) {
            if (point !== null) {
                console.log(point);
                centre = point;
            }
        }
    );
  • 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-27T08:57:15+00:00Added an answer on May 27, 2026 at 8:57 am

    You need a dropdown menu with geocoordinate value. if the dropdown change, it will call google map function.

    <form>  
        <select class="target">     
            <option value="2,3" selected="selected">Brazil</option>
            <option value="4,3">China</option>   
        </select>
    </form>
    

    Jquery

    $('.target').change(function() {   
        var coordinate = $('select option:selected').val();
        google_map(coordinate);
    });
    
    
    function google_map(coordinate) {
        var latlng = new google.maps.LatLng(coordinate);
        var myOptions = {
          zoom: 8,
          center: latlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map_canvas"),
            myOptions);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Twitter Bootstrap's dropdown menu in its top nav bar. You
I'm new to jquery and i'm trying to make a dropdown menu list like
I'm trying to use dropkick.js to build a dropdown menu in a web app.
Trying to use Twitter Bootstrap's (2.0) Dropdown menu. But somewhy it adds additional empty
I am trying to do a vertical dropdown menu. This is my code .menu
I am trying to create a dropdown menu and i need to detect the
I am trying to populate my dynamic dropdown menu using CI: My issue is
I am trying to remove text from a dropdown menu using a Jquery plugin
I'm trying to use JQuery to show/hide div tags based on the selected index
I am trying to use a function only once instead of writing it for

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.