I have two maps on one page, I am using slideToggle and slideUp to display let only one map view at a time. map_fix and map_movement are the divs that contain the maps.
#mapa_fixo
{
display:none;
}
#mapa_movimento
{
display:none;
}
function verifica_categoria_carrega_mapa(id)
{
var id_categoria = id;
if(id==1)
{
if($("#mapa_fixo").is(":visible") == true)
{
}
else
{
$("#mapa_fixo").slideToggle();
$("#mapa_movimento").slideUp();
return false;
}
}
else if(id==2)
{
if($("#mapa_movimento").is(":visible") == true)
{
}
else
{
$("#mapa_fixo").slideUp();
$("#mapa_movimento").slideToggle();
gmaps.refresh()
return false;
}
}
}
It's working, but the maps are not being displayed properly, due to jquery components one of the maps is loaded into one .js file and the other directly to the page.
If you are loading maps normally, without displaying: none, maps will load normally.
MotionMap