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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:34:13+00:00 2026-05-29T23:34:13+00:00

I have a Google map with markers which link through to other pages. If

  • 0

I have a Google map with markers which link through to other pages. If I click one of these markers, then decide to go back to the map page, the map position, zoom level, etc. is reset. Is there a simple way to restore the map to the state it was left at?

  • 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-29T23:34:14+00:00Added an answer on May 29, 2026 at 11:34 pm

    The easiest and safest way to do this is to take the state you care about preserving (such as zoom, map centre, map type) and storing it somewhere semi-permanent in the browser. Depending on what browsers you want to support, your options are:

    • Cookies (JS access via document.cookie)
    • HTML5 local storage (modern browsers)
    • URL hash tags (add #zoom=4&... to the end of the page, kinda ugly, not really suitable)
    • HTML5 history API (probably not suited either)

    Cookies are probably the best way forward, maybe combined with local storage.

    Note that it’s probably the browser unload event causing this issue. However, it looks like the API itself is registering this event at the moment – so you can’t really avoid it.

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

Sidebar

Related Questions

On this page I have a link to a google map which opens in
I have an async method which puts markers on a Google Map View. In
I have a Google V3 map which uses steetView and some map markers. The
I have an App which launches the google Map App. The code is: UIApplication
I have a view containing a UIWebView which is loading a google map (so
I have google analytics on my site. One page has a button which when
I have a Google Map on our site that has a list of markers
Im making an map with different markers which should have different info windows. But
I currently have a Google map that geocodes multiple markers on the fly but
I am using Primefaces google map component. I have some markers and info windows

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.