If the new data is going to fit inside the existing info window without
changing its size, then you could put your content inside a <div> and
update that by id.

Caution: Opening the infowindow is asynchronous. In particular, the
first time you open the infowindow, there's a delay while the infowindow
code module is fetched, so you can't do this:

  marker.openInfoWindowHtml('<div id="content"></div>');
  document.getElementById("content").inerHTML = "initial text";

Also, you need to keep track of whether the user has closed the
infowindow. If it is closed call:

  marker.openInfoWindowHtml('<div id="content">' + $("#new_text").val()
     + '</div>');

If it is open you can call

  document.getElementById("content").inerHTML = $("#new_text").val();

I can't think of any easy way to check whether the data is going to fit
inside the existing infowindow.

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
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