Picture your map loading with all settings - map center, zoom level and map type - all to your default map loaded state.
You map script now needs to check for the existence of your cookie. If it finds a cookie it needs to extract enough information from it to restore the map view. And then process that information and restore the map state. If you store map center, zoom level and map type in the cookie then those three properties can be restored. If you want to restore the infowindow IF it is open then you need another cookie saved, and when the map is reloaded if this cookie is set then trigger the click required on a marker to re-open the infowindow. The cookie if present can be read by javascript once the page has loaded or by the server when the page is requested, so you could: 1) Wait til the map has loaded, check for the cookie in javascript and restore any map state found. OR 2) Use PHP to check for the cookie when the page is requested - if found it'll dynamically generate a map that is set to the restored state. I'm working on exactly this now with my map at: http://searchwestnorfolk.org.uk/map/map.php?cat_id=3 Pan the map, change the map type, change the zoom and even open an infowindow. Navigate to another page and come back to that same link and the view will (hopefully) be restored. Currently the map updates the cookie on each moveend, zoomend maptypechanged etc. But looking at Mike's example i think i'll change that and just call a setCookie() method when the page fires it's onunload event. Martin. On 7 Nov, 17:16, Peter <[EMAIL PROTECTED]> wrote: > On Nov 8, 5:19 am, Mike Williams <[EMAIL PROTECTED]> wrote: > > > Wasn't it Peter who wrote: > > > >I have one more question i'm afraid. How to get the 'href' that is > > >attached to the thumbnail, write the cookie AND call the image_display > > >page? > > > That is all explained in the link I gave you > > http://econym.org.uk/gmap/cookies.htm > > Well no it's not, not the essence of my question; > > > > > --http://econym.org.uk/gmap > > The Blackpool Community Church Javascript Team > > Peter also wrote > "How do i call a php page from a Javascript function I guess is the > question? " > > Peter.www.pictures-of-paradise.com > p.s. incase you don't wish to answer this question, thanks for your > invaluable help, you have made making my map page possible with all > your tutorials and advice to others, it is much appreciated! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
