Let me assume you want the visual area of your web page to be occupied
sometimes by the map, and sometimes by something else.

I would NOT put both contents in the same low level division.  The
Google API thinks it owns its division, and it's slow enough as it is
to load all the tiles, controls, etc. so that I would not want to load
it, and then reload it. Setting the map center as suggested might get
something back, but I'm not sure your controls, titles, etc. would get
reloaded.

I would have one high level div which occupies the space on your web
page. Then the map div would go inside this, and the other stuff would
use another div occupying the same space.  You can use the display
attributes (displav=none, display=block, etc.) to display one and then
switch to the other.  (Note it's tricky if you initially load you map
into it's low level div while it's hidden, but that's easy to fix).
You could also use the zindex attribute instead of the display
attribute.

The advantage is that when you switch back to the map, boom it's
there, and then switch back to your other stuff, boom it's there.

When occasionally I do what you're asking, I would stick the map div
in an iframe, and then just set the src attribute to reload the API
code (which in that case would be in a separate file) in to the
iframe.  But I do not recommend doing this.

IMHO you don't want to reload anything once it's loaded, whether it
comes from your server via Ajax or Google's server visa the API.

Here's a simple example

http://members.bellatlantic.net/~vze2h6gy/papabear/Day2006_Oct_NH_Border.html

The web page is a report of some sight-seeing in NH.  When it comes up
there should be a picture at the top.  Under that are some links to
other pictures and to a map.  Click on the map and it pops up where
the picture was.  Click on the picture (or another picture) and that
pops up.  Then click the map again and it's still there.  It's only
loaded once.  It's all simple html with a bit of javascript stuck in.
The map is another file, entirely of script.



On Jul 18, 2:29 pm, Bob <[email protected]> wrote:
> It seems I have been misunderstood;
>
> - My AJAX routine is NOT destroying the map div,
> it's repopulating the div because it's asked to.
>
> - My map is NOT malfunctioning, it works just fine.
>
> I simply want to know how to reload the map. That's all.
>
> On Jul 18, 9:04 pm, "Maps.Huge.Info (Maps API Guru)"
>
> <[email protected]> wrote:
> > I think you're looking at this the wrong way. If you have a problem
> > with your AJAX routine destroying the map div, then that's where you
> > should concentrate your efforts. A link to your malfunctioning map
> > would be useful as well. I suggest you read and follow the posting
> > guidelines for future posts to this group.
>
> > -John Coryat
>
> >http://maps.huge.info
>
> >http://www.usnaviguide.com
>
> >http://www.zipmap.net
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to