|
map.searchRoute({
type: 'drive',
policy: 'ecar_fee_first',
start: {
lon: content.longitude,
lat: content.latitude
},
end: {
lon: lon,
lat: lat
}
}, function(ret, err) {
if (ret.status) {
api.alert({ msg: JSON.stringify(ret) });
map.drawRoute({
id: 1,
autoresizing: false,
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) });
}
});
|
|