开发者

Objective C: (NSSet *)annotationsInMapRect:(MKMapRect) mapRect method returns null value

I am trying to implement the following method in my application

NSSet *nearbySet = [self.mapView annotationsInMapRect:self.mapView.visibleMapRect];

I see in my mapView there ar开发者_运维问答e 4 annotations, however, the method returns me 0 values in the set.

Can anyone advise if I have missed out on anything here?

Thanks in advance.

Zhen


Three quick things to check as a "sanity check":

  1. What is the value of self.mapView? Make sure it isn't nil.
  2. What does self.mapView.annotations contain?
  3. What is the value of self.mapView.visibleMapRect?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜