Page 2 of 2

Re: Info window diplaying one above another

Posted: 20 Oct 2011, 01:41
by sd12013
FWIW, I found this in the Google Maps API but I don't know the proper syntax or where to implement it (I think the phocomapsmap.php file around line 382?):
If you only want one info window to display at a time (as is the behavior on Google Maps), you need only create one info window, which you can reassign to different locations or markers upon map events (such as user clicks).
Create one InfoWindow object just after you initialize your map, and then handle the click event handler as follows:

Code: Select all

google.maps.event.addListener(curMarker, 'click', function() {
   infowindow.setContent(contentString);
   infowindow.open(map, curMarker);
});

Re: Info window diplaying one above another

Posted: 27 Oct 2011, 20:34
by Jan
Ok, thank you for the info.


Jan

Re: Info window diplaying one above another

Posted: 09 Mar 2012, 19:21
by goalexa
I have the same problem. I have Joomla1.5.25, phoca Maps v.1.1.2, plugin v.1.1.0 and I want that first marker was closed at the opening of the second. How can I do it? Unfortunately the problem is still relevant :/

Thank You

Re: Info window diplaying one above another

Posted: 22 Mar 2012, 18:33
by olivJpc
sd12013 wrote:FWIW, I found this in the Google Maps API but I don't know the proper syntax or where to implement it (I think the phocomapsmap.php file around line 382?):
If you only want one info window to display at a time (as is the behavior on Google Maps), you need only create one info window, which you can reassign to different locations or markers upon map events (such as user clicks).
Create one InfoWindow object just after you initialize your map, and then handle the click event handler as follows:

Code: Select all

google.maps.event.addListener(curMarker, 'click', function() {
   infowindow.setContent(contentString);
   infowindow.open(map, curMarker);
});
I've got the same problem.
I'm a newbie but I can try for everybody this code if someone tell me in wich file we can put this code.
I don't have phocamapsmaps.php file. Maybe it's because I'm using the last phocamaps version in Joomla 1.5.25?
Thanks to all, we'll do it!

Re: Info window diplaying one above another

Posted: 07 May 2012, 14:48
by StreamAlex
Any solution to this yet?

I have been digging in geoxl3.js file in com_phocamaps/assets/js. On line 305 you have

Code: Select all

google.maps.event.addListener(marker, 'click', function() {
So it must be the place where to put the code. But I cant figure out how to make it work.

Re: Info window diplaying one above another

Posted: 07 May 2012, 15:10
by StreamAlex
Maybe this could be a help to anyone? http://stackoverflow.com/questions/2946 ... infowindow