3

I'm building a page which loads a google map, with street view on another div on the side and I would like to save that data so if the user closes his browser window and then comes back that it will bring it up again without the need to call the Google Map API again.

I've tried saving the div contents and replace it with the current one incase the user visited already. I tried with cookies but couldn't save much information due for size limit of 4kb and I've tried localStorage (HTML5) but it didn't work as expected.

Any ideas? Thanks

4
  • 1
    I believe what you're proposing is against the terms of service: developers.google.com/maps/terms - specifically section 10.1.3.
    – andresf
    May 15, 2012 at 17:51
  • @andresf, No, I have no inention doing something which is prohibited, I just wanted to know if it's possible to decrease loading time of a page which displays a map between location a to location b if the same user visits the page. If it's not allowed and I must call the API on any case, then that should be it.
    – Alon
    May 16, 2012 at 12:45
  • This would appear to fall into the exception granted to 10.1.3(b)(i) though. However, localStorage is basically a large cookie store, so all you could realistically do is save centre, zoom, map type, marker data and the like, and re-construct the map when the page is next visited. May 16, 2012 at 14:27
  • My interpretation is based on the following in Alon's post: "comes back that it will bring it up again without the need to call the Google Map API again."
    – andresf
    May 16, 2012 at 17:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.