Thanks, I understand your explanation and it makes sense to me, but
after implementing the change, still no dice.
I moved
var infoWindow = new google.maps.InfoWindow;
var infowindowAdd = new google.maps.InfoWindow({
content: htmlAdd});
outside of load() entirely. But submitting a new entry by clicking
"save & close" does not close the infowindowAdd.
On Dec 14, 1:21 pm, Rossko <[email protected]> wrote:
> > I think
> > I'm having a hard time with the underlying idea behind instantiating
> > an infowwindow object. Might the issue be that I have left
> > infowindowAdd andinfoWindowseparate?
>
> I think you have two different purposes for these ; one is a
> regularinfowindowgiving info on downloaded markers, the other is to gather
> data on a newly placed marker. Two different things, makes sense.
>
> But look into the scope of your 'infowindowAdd' variable. Remember,
> your saveData() function runs in global scope from a button click.
> Variables that were previously defined with var= inside some other
> function (like 'infowindowAdd' inside load() ) won't be available to
> your code. So you can'tclosethe infowindowAdd, because you can't
> get hold of it.
>
> Make this global scope and you will be able tocloseit in the usual
> way within saveData()
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.