将百度地图引入到自己的网页中

  1. 打开百度地图生成器:http://api.map.baidu.com/lbsapi/creatmap/index.html
  2. 将生成的代码保存为html文件.
    <iframe src="map.html" width="600" height="300" frameborder="0" scrolling="no"></iframe>

在将自动生成的代码插入网页后,标注图标不显示,解决方案:改变代码中标注图标的图片路径

var icon = new BMap.Icon("http://map.baidu.com/image/us_mk_icon.png",)

猜你喜欢

转载自blog.csdn.net/wsln_123456/article/details/85259662