egeloen / ivory-google-map

Google Map API v3 integration for PHP 5.6+.
MIT License
325 stars 185 forks source link

z-index problem with info window #268

Open juergenweb opened 6 years ago

juergenweb commented 6 years ago

Hello,

I am using the google map in a modal window.

screenshot

If I am clicking on the close button of the info window the modal window closes. This is the usual behavior of the modal - so far so good. To prevent this I have tried to add a very high z-index to the info window with this command:

$infoWindow->setOption('zIndex', 1000000000000000);

Unfortunately the z-index will not be added to the div container of the info-window, but it will be added to the Javascript.

Excerpt from the JS:

contact_map_modal_container.overlays.info_windows.infowindow5a66e988393fd706437518 = infowindow5a66e988393fd706437518 = new google.maps.InfoWindow({ "content": "<address><b>Welser Messe<\/b><br \/>Messeplatz 1<br \/>4600 Wels<br \/>Ober\u00f6sterreich<br \/>\u00d6sterreich<\/address><div><a href=\"http:\/\/www.google.at\" rel=\"nofollow\" target=\"_blank\" title=\"Opens the homepage in an external window\" data-uk-tooltip=\"pos: top\"><span data-uk-icon='icon: arrow-right'><\/span>To the homepage<\/a><\/div>", "zIndex": 1000000000000000 });

As you can see the z-index is present in the JS Part, but if I am looking at the container of the info window there is no z-index added.

This is the complete code part of my info window:

$infowindowcontent ='Here goes my content'; 
$infoWindow = new InfoWindow('content');
$infoWindow->setOption('zIndex', 1000000000000000);
$infoWindow->setContent($infowindowcontent);
$infoWindow->setAutoOpen(true);

$marker->setInfoWindow($infoWindow);

So is there something I am missing to get it work?

Best regards