显示spiderfy leaflet注解MKMapView

在这里输入图像说明 我想在相同的经度长度上使用MKMapView显示100个地图点。 请看链接 。

同样的事情,我想在iPhone。

如果你想使用100的注释,那么下面的教程将帮助你。

http://www.raywenderlich.com/21365/introduction-to-mapkit-in-ios-6-tutorial

在本教程中,如果您检查下面的方法,它将解决您的问题。

(void)plotCrimePositions:(NSData *)responseData { for (id<MKAnnotation> annotation in _mapView.annotations) { [_mapView removeAnnotation:annotation]; } NSDictionary *root = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:nil]; NSArray *data = [root objectForKey:@"data"]; for (NSArray *row in data) { NSNumber * latitude = [[row objectAtIndex:22]objectAtIndex:1]; NSNumber * longitude = [[row objectAtIndex:22]objectAtIndex:2]; NSString * crimeDescription = [row objectAtIndex:18]; NSString * address = [row objectAtIndex:14]; CLLocationCoordinate2D coordinate; coordinate.latitude = latitude.doubleValue; coordinate.longitude = longitude.doubleValue; MyLocation *annotation = [[MyLocation alloc] initWithName:crimeDescription address:address coordinate:coordinate] ; [_mapView addAnnotation:annotation]; } }