The closing of one infowindow should not prevent the opening of
another.  I created a simple page that does:
        google.maps.event.addListener(map, 'click', function(e) {
          var iw = new google.maps.InfoWindow({content: 'hi'});
          var marker = new google.maps.Marker({position: e.latLng,
map: map, draggable: true});
          iw.open(map, marker);
        });
It places a marker+infowindow on every map click, even after an
InfoWindow is closed.

Can you post a link to your page?  Or even better, a minimal page that
shows the problem.

Thanks,
Susannah

On Nov 13, 12:13 am, jan <[email protected]> wrote:
> Hi!
>
> does this 'closeclick' event support preventDefault? I tried but did
> not work at all as no arguments are passed to the callback...
>
> Im trying to ad a marker+infowindow everytime a user clicks anywhere
> on the map..The problem: If he x's out on the infowindow, the next
> infowindow will no longer show or open (my infowindow by the way is
> based on an HTML element for its content). Perhaps, i need to override
> this closeclick event but i have no clue how to do this. or some other
> better way is there?
>
> im adding a marker+infowindow this way:
>
> placeMarker = function(ids, latlng){
>         var infowin = new google.maps.InfoWindow({content:
> document.getElementById('infowin'), position:latlng});
>         var marker = new google.maps.Marker({position: latlng,
> map:map,draggable:true});
>
>         infowin.open(map, marker);
>         map.infowindows[ids] = infowin;
>
> }
>
> somewhere inside the dom ready function of jquery that function above
> gets called when the map is clicked. but close the infowindow and the
> next map click will no longer produce an infowindow...

--

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=.


Reply via email to