Can  you give me example how you solved the problem ?

On Tuesday, April 3, 2018 at 5:13:05 AM UTC+5:30, Mike Saeger wrote:
>
> I've looked all over the net and this solution was the easiest for me to 
> implement -- AND IT WORKED! Thanks!
>
> On Monday, June 20, 2011 at 7:27:38 AM UTC-7, Gary B wrote:
>>
>> I've done something similar to keep just one infoWindow open. 
>> I initialize a var like this 
>> var currentInfoWindow = null; 
>>
>> then on every marker click event I do something like this: 
>>
>> var infowindow = new google.maps.InfoWindow({ 
>>     content: "your content here" 
>> }); 
>> google.maps.event.addListener(marker, 'click', function() { 
>>     if (currentInfoWindow != null) { 
>>         currentInfoWindow.close(); 
>>     } 
>>     infowindow.open(map, marker); 
>>     currentInfoWindow = infowindow; 
>> }); 
>>
>> On Jun 18, 11:24 am, "geocode...@gmail.com" <geocode...@gmail.com> 
>> wrote: 
>> > On Jun 18, 8:02 am, Andy Newby <andy.ne...@gmail.com> wrote: 
>> > 
>> > > Hi, 
>> > 
>> > > I've almost finished converting our map from the v2 API to v3: 
>> > 
>> > >http://www.chambresdhotesfrancedev.com/Europe/ 
>> > 
>> > > I have 1 last thing I need to do, which I can't seem to work out. 
>> When you 
>> > > click on an info window at the moment, it will stay open when you 
>> move the 
>> > > map (and when an InfoWindow is open and you move the map around, it 
>> will 
>> > > auto-center again on that marker) 
>> > 
>> > I don't see that behavior in Chrome. 
>> > 
>> > 
>> > 
>> > > Is there a way to make it so the window is auto-closed when you move 
>> the 
>> > > map? 
>> > 
>> > You can write code to close it on the center_changed or bounds_changed 
>> > events. 
>> > 
>> >   -- Larry 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > > TIA 
>> > 
>> > > Andy
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-maps-js-api-v3+unsubscr...@googlegroups.com.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
Visit this group at https://groups.google.com/group/google-maps-js-api-v3.
For more options, visit https://groups.google.com/d/optout.

Reply via email to