2014-06-04 32 views
1

平移時改變,因爲在Xcode如下我增加了一個RMPolylineAnnotation我rmMapView:RMPolylineAnnotation外觀上MapBox

RMPolylineAnnotation *polylineAnnotation = [[RMPolylineAnnotation alloc] initWithMapView:rmMapView points:aPoints]; 
[polylineAnnotation setLineWidth:5.0f]; 
[polylineAnnotation setLineColor:[UIColor orangeColor]]; 
[polylineAnnotation setTitle:@"route"]; 

[rmMapView addAnnotation:polylineAnnotation]; 

這是成功繪製時我打開了我的地圖:

enter image description here

但是,如果我平移直到路線離開屏幕,然後再次平移它重新畫線,而不用我設置的參數:

enter image description here

正如你可以看到我已經嘗試過的名字爲「路線」,這樣我可以在- (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMAnnotation *)annotation識別,但該層是從來沒有重繪,圓圈是,雖然即使它們以完全相同的方式添加。有誰知道我可以如何阻止這種情況發生?

回答

1

櫃面您正在尋找的答案,這一點,我習慣了這裏的做法:

iOS MapBox RMShape

添加對象作爲RMShape而是停在我的圖紙問題。

+0

謝謝,這個作品!令人難以置信的是,在一年之後,SDK中還存在多少這些錯誤。 – Thermometer