 
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=PjLEeOGY5nppDwlkg2rlZxGxdQG7Aqet"></script>
 

 
<?php

//http://api.map.baidu.com/lbsapi/createmap/index.html  创建sample

//".LANG." must be cn.
$sql = "SELECT arr_map from ".TABLE_LANG."  where lang='".LANG."'  order by id limit 1";
//echo $sql;
$row22 = getrow($sql);
 //pre($row22);
$arr_can=$row22['arr_map'];

$map_w='100%';
$map_h="350px";



$bscntarr = explode('==#==',$arr_can); 
     if(count($bscntarr)>1){  // pre($bscntarr);
          foreach ($bscntarr as   $bsvalue) {
           
             if(strpos($bsvalue, ':##')){
               $bsvaluearr = explode(':##',$bsvalue);
               $bsccc = $bsvaluearr[0];
               $$bsccc=$bsvaluearr[1];
             }
          }
      }



?>

 
   
    <!--百度地图容器-->
     <div style="width:<?php echo $map_w?>;height:<?php echo $map_h?>;border:#ccc solid 1px;" class="baidumap" id="baidumapwrap"></div>
   
<script type="text/javascript">
   
   var map = new BMap.Map("baidumapwrap"); 
   
   var point = new BMap.Point(<?php echo $map_x_wei?>, <?php echo $map_y_jing?>); 
   map.centerAndZoom(point, 15); 
   
 //  map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放

var opts1 = { offset: new BMap.Size(100, 5) }
//var opts2 = { offset: new BMap.Size(260, 100) }
map.addControl(new BMap.NavigationControl());
map.addControl(new BMap.ScaleControl(opts1));
map.addControl(new BMap.GeolocationControl());

  var marker = new BMap.Marker(point,{offset: new BMap.Size(0,0)}); // 创建标注    

 map.addOverlay(marker);    // 将标注添加到地图中 

 var companyName = {
　　width: 80,     // 信息窗口宽度    
　　height: 30,     // 信息窗口高度    
enableMessage:true,
　　title: "<?php echo $map_title?>"  // 信息窗口标题   
}
var infoWindow = new BMap.InfoWindow("<?php echo $map_desp?>",companyName);  // 创建信息窗口对象    


 map.openInfoWindow(infoWindow, map.getCenter());      // 打开信息窗口

 var label = new BMap.Label('<?php echo $map_title?>',{offset: new BMap.Size(0,30)});
 marker.setLabel(label);
 
marker.addEventListener("click", function(){          
        map.openInfoWindow(infoWindow,point); //开启信息窗口
      });
label.addEventListener("click", function(){          
        map.openInfoWindow(infoWindow,point); //开启信息窗口
      });

   //---------------------
   
   
 

</script>