我在自定义主题中使用MapPress Easy Google Map和以下代码:
<?php
$mymap = new Mappress_Map(array("width" => 600,"height" => 300));
$mypoi_1 = new Mappress_Poi(array("title" => "DC", "body" => "Beautiful Washington, DC", "point" => array("lat" => 38.90279, "lng" => -77.037849)));
$mypoi_2 = new Mappress_Poi(array("address" => "500 chestnut st, phildelphia"));
$mypoi_2->geocode();
$mymap->pois = array($mypoi_1, $mypoi_2);
echo $mymap->display(array("directions"=>"none"));
?>
如果我把这段代码放在主题的任何地方,它会根据需要显示地图。我正在使用jquery选项卡脚本:
jQuery("#property-info .tab_content").hide(); //Hide all content
jQuery("#property-info ul.tabs li:first").addClass("active").show(); //Activate first tab
jQuery("#property-info .tab_content:first").show(); //Show first tab content
//On Click Event
jQuery("#property-info ul.tabs li").click(function() {
jQuery("#property-info ul.tabs li").removeClass("active"); //Remove any "active" class
jQuery(this).addClass("active"); //Add "active" class to selected tab
jQuery("#property-info .tab_content").hide(); //Hide all tab content
var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
jQuery(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
地图的选项卡是第二个。当我点击它时,下面的地图输出如图所示。问题是什么?我需要它尽快。提前感谢您的指导。