I have create an html page containing google map and some text boxes.
I have also created another page in which I have included this page using the include function in php.
<div id="map">
<?php include 'myMap.html'; ?>
</div>
When the page is loaded the map and the other items are correctly loaded and displayed.
Now I have created a button to toggle the visibility of the <div>
within which the map has been included. Initially the map is hidden using the hide() function in jQuery.
When I click in the button, the <div>
should be visible again. to achieve this, I have called the show() method in jQuery.
But when the button is clicked, everything is shown on the page, but the map is not showing up.
This part of the page in a different html page. When it is included it is displayed correctly but once hidden and button is clicked for it to show up again, the map becomes like in the picture. I tried a different approach and I have noticed that calling the function that loads the map at the time the button is called can help. Can I call that function found in another html file into the one in which it is included ?