I have function that is called after full loading of page. This function create Google Map object:
function initMap() {
var map = new google.maps.Map(mapDiv, {
center: {lat: 0, lng: 0},
zoom: 5,
mapTypeId: 'roadmap'
});
}
Below this function there is method click:
$(function() {
$( ".click" ).click(function() {
// How to get instance map here?
});
});
How I can get access to object var map in $( ".click" )