I am working on a page where I have a google-powered map (just like the one you find on maps.google.com. It works just fine in chrome and FireFox (of course), but in IE not.
only happens in IE (<9). the map is within a tab.
This is the code I use to generate the map:
<!-- Estilos para el contenedor del mapa -->
<style type="text/css">
#datosMap
{
width: 20%;
}
#datosMap, #map
{
display: inline-block;
vertical-align: top;
}
#map{
height: 500px;
width: 70%;
}
#subtabMapa
{
margin: 16px;
}
</style>
$(document).ready(function(){
//Funcion para cargar el mapa
function cagarMapa(latitud,longitud,zoom){
//Se carga el mapa
var latlng = new google.maps.LatLng(latitud, longitud);
var myOptions = {
zoom: zoom,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
var map = new google.maps.Map(document.getElementById("map"),myOptions);
var marker = new google.maps.Marker({
position: latlng,
map: map
});
google.maps.event.trigger(map, 'resize');
}//Fin funcion cargar
//------------------------------------
//latitud y longitud de colombia
var latitud = 4.214495;
var longitud = -74.341861;
var zoom = 5;
cagarMapa(latitud,longitud,zoom);//Se carga el mapa en las coordenadas y el zoom indicados
});//Fin ready
<div id="map"><!--MAP HERE--></div> <div id="datosMap"><!-- here is a form --></div>
looks like this: https://i.stack.imgur.com/uSLQR.png
anyone can give me a hand