百度地圖路線規(guī)劃的官方demo里并沒(méi)有節(jié)點(diǎn)瀏覽,實(shí)現(xiàn)按鈕點(diǎn)擊遍歷節(jié)點(diǎn)信息可以通過(guò)開(kāi)一個(gè)數(shù)組裝RouteAnnotation,
然后通過(guò)百度API中的這個(gè)方法實(shí)現(xiàn)
/**
*選中指定的標(biāo)注,本版暫不支持animate效果
*@param annotation 指定的標(biāo)注
*@param animated 本版暫不支持
*/
- (void)selectAnnotation:(id <BMKAnnotation>)annotation animated:(BOOL)animated;
具體:
- (IBAction)clickRightArrowBtn:(id)sender {
_currentAnnotaionIndex++;
if (_currentAnnotaionIndex < _currentAnnotationList.count){
RouteAnnotation * annotation = (RouteAnnotation *)_currentAnnotationList[_currentAnnotaionIndex];
[_mapView selectAnnotation:annotation animated:NO];
_mapView.centerCoordinate = annotation.coordinate;
}else{
_currentAnnotaionIndex --;
}
}