I am using google maps plugin .But problem is When i open the maps Tab in the page map is not visible and it becomes visible as soon as i scroll or move the map position .Can some one please help me out??
here is my code:
function initMap()
{
var uluru = {lat: {{$activity->latitude}}, lng: {{$activity->longitude}}};
map = new google.maps.Map(document.getElementById('map'), {
zoom: 7,
center: uluru
});
var marker = new google.maps.Marker({
position: uluru,
map: map
});
console.log("Loaded map");
map.setZoom( this.map.getZoom() - 1 );
map.setZoom( this.map.getZoom() + 1 );
// google.maps.event.trigger(map, 'resize');
}
HTML:
<div class="tab-pane fade in" id="tabMap">
<div id="mapWrapper" style="height:500px; width:100%;">
<div id="map" style="height:100%;"></div>
</div>
</div>