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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:05:21+00:00 2026-05-29T21:05:21+00:00

I am using the jquery-ui-map plugin (http://code.google.com/p/jquery-ui-map/). I have successfully created a map using

  • 0

I am using the jquery-ui-map plugin (http://code.google.com/p/jquery-ui-map/). I have successfully created a map using the following code:

var home = new google.maps.LatLng(39.909736, -97.382813);
$('#myMap').gmap({ 'center': home, 'zoom': 3 });

However, after a user clicks a button, I want to update the “center” and “zoom” properties. For the life of me, I can’t seem to figure it out. I think its because I don’t fully understand JavaScript coding syntax. It just seems like this should be an easy thing, but its alluding me.

How do I update the center and zoom properies of a gmap?

Thank you!

  • 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-29T21:05:23+00:00Added an answer on May 29, 2026 at 9:05 pm

    With basic google.map plugin

    To set the center

    map.setCenter(new google.maps.LatLng(yourLatitude,yourLongitude));
    

    To set the zoom

    map.setZoom(yourZoomLevel);
    

    With jQuery.UI

    The same, but

    map = $(‘#myMap’).gmap(‘get’, ‘map’);

    Or something like that :

    // html
    <input type="text" id="zoomInput" value="10"/>
    <input type="text" id="latInput" value="39.909736"/>
    <input type="text" id="lngInput" value="-97.382813"/>
    <input type="button" id="yourButton"/>
    
    // JS document.ready
    $('#yourButton').click(function(){
      $('#myMap').gmap('option', 'zoom', $('#zoomInput').val());
      var newCoords = new google.maps.LatLng($('#latInput').val(), $('#lngInput').val());
      $('#myMap').gmap({'center': newCoords });
    });
    

    Don’t hesitate to provide me all your javascript code, then I could integrate this.

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

Sidebar

Related Questions

I am using http://code.google.com/p/jquery-ui-map/wiki/jquery_ui_map_v_3_tutorial The documentation is pretty poor when it comes to overlays.
Hi I am using http://code.google.com/apis/chart/docs/gallery/googleometer_chart.html I have: <img src=http://chart.apis.google.com/chart?cht=bvg&chs=250x150&chd=s:egbdf&chxt=x,y&chxs=0,ff0000,12,0,lt|1,0000ff,10,1,lt&chm=o,000000,0,-1,10|V,000000,0,-1,1:15,,:4:10|H,000000,0,-1,3:9,,:8:17&chxl=0:|E|G|B|D|F usemap =#chart /> <map name='chart'>
Demo: http://www.simpsoncrazy.com/characters/poster2 (Using Map Hilight plugin: http://plugins.jquery.com/project/maphilight ) When you click a quadrant of
I'm showing some map tiles with google maps api v3 and jquery-ui-map (http://code.google.com/p/jquery-ui-map/) And
wondering if you could shed light for me please! I'm using http://jquery-ui-map.googlecode.com/svn/trunk/demos/google-maps-jquery-filtering.html and I
I am trying to display google map as a tooltip using qTip jquery plugin.
1) I have a site, using jQuery and the gMap Google Maps plugin. This
I'm using the gMap plugin for jQuery. On my map I have several markers.
I'm using the jQuery maphighlight plugin with a map of the U.S. I have
I'm thinking about using jquery-ui-map , which is a google map plugin. Are there

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.