百度地图覆盖物是可以加载SVG图片信息的,加载的方式如下:
引入百度api
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=你的ak"></script>
创建容器
<div id="allmap"></div>
加载地图
var map = new BMap.Map("allmap"); var point = new BMap.Point(116.591915, 37.333892); map.centerAndZoom(point, 16); map.enableScrollWheelZoom(true);
加载svg(设置marker图标)
var vectorPeoplePath = new BMap.Marker(point, { icon: new BMap.Symbol(place, { rotation: 0,//顺时针旋转40度 fillColor: 'green', fillOpacity: 0.8, strokeColor: '#555', strokeWeight: 3//线宽 }) }); map.addOverlay(vectorPeoplePath);
LOCKDATAV DONE!