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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:25:02+00:00 2026-06-03T08:25:02+00:00

I have a relatively simple web app, that allows the user to enter two

  • 0

I have a relatively simple web app, that allows the user to enter two waypoints (from and to locations), then click a button to get the directions itinerary and a map with the route path plotted on the map.

The app was laid out so that the form, the itinerary and the map where in separate “tabs” and the layers could be shown and hidden based on the tab selection.

Oddly, the map would always be zoomed right out to the minimum zoom (entire world view) although the pushpins (waypoints) and route path were correctly plotted, the map bounds were not being honored. If the map was visible, then those route path bounds were honored and the map functioned as expected.

An example of this is here: http://jsfiddle.net/junto/DMR2T/

Click on ‘Get Directions’ when the map is visible, and the map is zoomed to the correct bounds. Then toggle the map and click ‘Get Directions’ again. Toggle the map back to visible. You’ll see the map has the incorrect zoom level and bounds.

Lastest build of Google Chrome, Safari, Firefox all display this issue. Internet Explorer does not.

Is this a bug?

  • 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-03T08:25:03+00:00Added an answer on June 3, 2026 at 8:25 am

    My guess is that in order to properly compute zooming and bounds, the map needs to know its display size. In order for the map to know that, it needs to be visible. So a workaround would be to move the map off screen rather than hiding it.

    See my updated example here: http://jsfiddle.net/ZWzjC/

    In my example I simply set a negative left margin, I’m sure there are more clever ways to move something off the screen while maintaining its visibility. I tried using visibility:hidden but that doesn’t seem to hide the map correctly. display:none won’t work since that causes the map to have 0 dimensions, and that’s what .toggle() probably uses internally anyway.

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

Sidebar

Related Questions

I have a relatively simple algorithm that walks an std::vector looking for two neighbouring
I have a relatively simple ASP.net MVC 2 app that is using SubSonic. Everything
I have a relatively simple query joining two tables. The Where criteria can be
I have a relatively simple question that I cannot seem to find the answer
I have this relatively simple regex for usernames // Enforce that username has to
I have a computational geometry problem that I feel should have a relatively simple
I'm building a relatively simple web-app where the main servlet implements the ServletContextListener interface
I have a relatively simple site that I'm working up for an intranet environment.
The question seems relatively simple, what I want is that when the user goes
I have a relatively simple service that takes in a Message contract for uploading

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.