百度地图标记输入框

栏目变量调用代码

//$.map改为你的栏目变量名
{$mappos=explode(\,,$.map)}
{if count($mappos)!=3}
未标记
{else}
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=MeFu3gZv7wcBC2RWUL19BgOG"></script>
<div id="map" style="width:400px;height:400px"></div>
<script type="text/javascript">
    var map = new BMap.Map("map");
    var point = new BMap.Point({$mappos.0},{$mappos.1});
    map.centerAndZoom(point,{$mappos.2});
    var marker = new BMap.Marker(point);
    map.addOverlay(marker);
    map.enableScrollWheelZoom(true); 
</script>
{/if}