I cant seem to get my google map to display in my modal. The code is as follows. Does anyone see anything.
I just trying to get map to model window, no luck!
var mapOptions = {
zoom: 4,
center: centered,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('maparea'), mapOptions;
var marker = new google.maps.Marker({
position: loc,
map: map,
title: $json.PDMOVE[x].SCNAME
});
google.maps.event.addListener(marker, 'click', function () {
infowindow.open(map, marker);
});
});
$("#maparea").dialog({
autoOpen:true,
modal: false,
title:'Empties',
height: 550,
width: 700,
buttons: {
Close: function() {
$( this ).dialog( "close" );
}
}
});
Make sure that your target div is visible before map was init
is the modal you use have a success function ? so you can init map and i pretty sure it will work or you delay map init function by set timeout.