$sql1="select supplier_id,supplier_name,wx_latitude,wx_longitude from ".$GLOBALS['yp']->table('supplier');
$supplier_compare=$GLOBALS['db']->getAll($sql1);
$smarty->assign('supplier_compare',$supplier_compare);
<script type="text/javascript">
var points =[{
id: 1,
lng: 118.096525,
lat: 24.462602,
title: "厦门中山公园",
content: ["地址:北京市新建宫门路19号", "电话:010-62881144"]
},
{
id: 2,
lng: 118.095231,
lat: 24.461615,
title: "厦门实验小学",
content: ["地址:北京市后花园风景区", "电话:010-69768087"]
}, {
id: 3,
lng: 118.092644,
lat: 24.468522,
title: "厦门光明大厦",
content: ["地址:北京市东城区景山前街4号", "电话:010-65131892"]
}, {
id: 4,
lng: 118.106586,
lat: 24.467207,
title: "厦门将军祠",
content: ["地址:北京市东城区天坛东里甲1号", "电话:010-67013036"]
}, {
id: 5,
lng: 118.108526,
lat: 24.474245,
title: "厦门古龙商城",
content: ["地址:北京市西城区文津街1号(故宫北)", "电话:010-64040610"]
}];
new BaiduMap({
id: "container1",
level: 16,
titleClass: "title",
contentClass: "content",
centerPoint: { // 地图中心点经纬度
lng: 118.106586,
lat: 24.467207
},
index: -1,
points: points,
showLabel: true
});
new BaiduMap({
id: "container2",
level: 16,
type: ["地图", "卫星"],
width: 320,
height: 120,
titleClass: "title",
contentClass: "content",
showMarkPanorama: true,
mapStyle: "light",
icon: {
url: "images/marker.png",
width: 25,
height: 96
},
centerPoint: { // 地图中心点经纬度
lng: 118.106586,
lat: 24.467207
},
index: 0,
points: points
});