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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:52:22+00:00 2026-06-02T18:52:22+00:00

How can I control the Zoom Level of my Google Map with hyperlinks? For

  • 0

How can I control the Zoom Level of my Google Map with hyperlinks? For instance I want three defined levels (Location in UK, UK in Europe, Europe in the World). Clicking on these links will display the map with a different zoom level.

I’m using Google Maps API v3

  • 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-02T18:52:23+00:00Added an answer on June 2, 2026 at 6:52 pm

    That shouldn’t be too difficult to do.

    When you create the map, you get a reference to the map object, e.g.

    var mapOptions = {mapTypeId: google.maps.MapTypeId.TERRAIN};
    var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
    

    Once you have the object, you can zoom to a specific level like this:

    function zoomToLevel() {
        map.setZoom(8);
    }
    

    So you’d just need to set the click event of your hyperlink to run the javascript function:

    <a href="#" onclick="zoomToLevel(); return false;">Zoom to level 8</a>
    

    For what you’re doing though, it might be better to get the map to select it’s own zoom level based on the area. This function is actually zooming to show the Pyrenees, but the idea could be used for any area, as long as your points are at diagonally opposite corners:

    function zoomPyrenees() {
        var startPoint;
        var endPoint;
        var boundsPyrenees;
    
        startPoint = new google.maps.LatLng(43.373403, -1.774107);
        endPoint = new google.maps.LatLng(42.482463, 3.129875);
        boundsPyrenees = new google.maps.LatLngBounds();
        boundsPyrenees.extend(startPoint);
        boundsPyrenees.extend(endPoint);
    
        map.fitBounds(boundsPyrenees);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I zoom the Microsoft.Phone.Controls.Maps.Map control to the correct zoom level on Windows
I'm inserting a very basic Google map into my page and the zoom control
Can I apply zoom control in imageview
Is there a way I can set a minimum zooM level for my MapView?.
I want to create a custom control for a image regarding the dynamic zoom
Hello i have some problems with the Bing Map control. If i zoom to
How can I apply zoom control in an ImageView dynamically? My minimum SDK version
I want to put a number of (transparent) circles on a Bing Map Control
I still have not found the answer: How can I implement a zoom control
I want to control the zoom in OpenLayers. When the zoom is 3 I

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.