|
[BUG]
bmap的drawRoute 按照官方给出的示例运行无效果
[复制链接]
我在开发的过程中使用到了bmap的路径查询和在地图上显示指定路线功能,但是按照官方给出的示例运行后无效果,没有画出想要的路径效果。是否是SDK的bug?
var map = api.require('bMap');
map.searchRoute({ type: 'drive', policy: 'ecar_fee_first', start: { lon: 116.403838, lat: 39.914437 }, end: { lon: 116.384852, lat: 39.989576 }}, function(ret, err){ if(ret.status){ map.drawRoute({ id: 1, index: 0, styles: { start: { icon: 'widget://image/bmap_start.png' }, end: { icon: 'widget://image/bmap_end.png' } } }, function(ret){ api.alert({msg:JSON.stringify(ret)}); }); } else { api.alert({msg:JSON.stringify(err)}); }});
|
|