zoukankan      html  css  js  c++  java
  • 百度地图 infoBox的用法


    var myIcon = new BMap.Icon("image/red.gif", new BMap.Size(23, 25), { offset: new BMap.Size(0, 0)});
    var marker = new BMap.Marker(point,{icon:myIcon});
    map.addOverlay(marker);
    var label = new BMap.Label("公司名称:"+di.name,{offset:new BMap.Size(5,-40)});
    label.setStyle({
    paddingLeft:"12px",  //给label设置样式,任意的CSS都是可以的
    fontSize:"12px", //字号
    border:"0", //边
    height:"50px", //高度
    "280px", //宽
    textAlign:"top", //文字水平居中显示
    lineHeight:"30px", //行高,文字垂直居中显示
    background:"url(image/showbox.png) no-repeat", //背景图片
    cursor:"pointer"
    });
    marker.setLabel(label);

  • 相关阅读:
    Python staticmethod() 函数
    Python open() 函数
    Python input() 函数
    Python divmod() 函数
    Python abs() 函数
    instanceof和类型转换
    多态
    方法重写
    this
    Super详解
  • 原文地址:https://www.cnblogs.com/IT-shen/p/4193475.html
Copyright © 2011-2022 走看看