.infoBoxContent{font-size:12px;}
.infoBoxContent .title{background:url(title.jpg) no-repeat;height:42px;width:272px;}
.infoBoxContent .title strong{font-size:14px;line-height:42px;padding:0 10px 0 5px;}
.infoBoxContent .title .price{color:#FFFF00;}
.infoBoxContent .list{width:268px;border:solid 1px #4FA5FC;border-top:none;background:#fff;height:260px;}
.infoBoxContent .list ul{margin:0;padding:5px;list-style:none;}
.infoBoxContent .list ul li {float:left;width:255px;border-bottom:solid 1px #4FA5FC;padding:2px 0;}
.infoBoxContent .list ul .last{border:none;}
.infoBoxContent .list ul img{width:53px;height:42px;margin-right:5px;}
.infoBoxContent .list ul p{padding:0;margin:0;}
.infoBoxContent .left{float:left;}
.infoBoxContent .rmb{float:right;color:#EB6100;font-size:14px;font-weight:bold;}
.infoBoxContent a{color:#0041D9;text-decoration:none;}
-->
Creating and Using an InfoBox-
中海雅园南北通透四居室
4室2厅,205.00平米,3层
760万 -
中海雅园四居室还带保姆间
2室1厅,112.00平米,16层
300万 -
《有钥匙 随时看》花园水系
3室2厅,241.00平米,16层
400万 -
富力城D区正规楼王大三居
3室3厅,241.00平米,17层
600万 -
富力城豪,身份人士的象征
4室2厅,213.90平米,25层
700万
close
open
show
hide
enableAutoPan
disableAutoPan
var map = new BMap.Map('map_canvas');
var poi = new BMap.Point(116.307852,40.057031);
map.centerAndZoom(poi, 16);
var html =
'
'
'
'X'+
'
'
'
'
'
'
'
'
'
'
'
'
'
'
''+
'
'
'
'学校信息'+
'学校地图'+
'
'
'
var infoBox = new BMapLib.InfoBox(map,html,{
boxStyle:{
background:"url('tipbox.gif') no-repeat center top"
,width: "270px"
,height: "300px"
}
,closeIconMargin: "1px 1px 0 0"
,enableAutoPan: true
,align: INFOBOX_AT_TOP
});
var marker = new BMap.Marker(poi);
map.addOverlay(marker);
//infoBox.open(marker);
marker.enableDragging();
$("close").onclick = function(){
infoBox.close();
}
$("open").onclick = function(){
infoBox.open(marker);
}
$("show").onclick = function(){
infoBox.show();
}
$("hide").onclick = function(){
infoBox.hide();
}
$("enableAutoPan").onclick = function(){
infoBox.enableAutoPan();
}
$("disableAutoPan").onclick = function(){
infoBox.disableAutoPan();
}
function $(id){
return document.getElementById(id);
}
一键复制
编辑
Web IDE
原始数据
按行查看
历史