タイル画像の上に kml オーバーレイを使用してタイル画像を表示しようとしています (以下のコード)。次のエラーが表示されます。
'NSInvalidArgumentException'、理由: '-[MKPolyline tilesInMapRect:zoomScale:]: 認識されないセレクターがインスタンスに送信されました
複数のオーバーレイに正しくアプローチしているかどうか、またはこのエラーが発生する理由について誰か提案がありますか?
前もって感謝します!
(void)viewDidLoad
{
    [super viewDidLoad];
    // Initialize the map overlay with tiles in the app's bundle.
    NSString *tileDirectory = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Tiles"];
    MapOverlay *overlay1 = [[MapOverlay alloc] initWithDirectory:tileDirectory];
    // Locate the path to the route.kml file in the application's bundle
    // and parse it with the KMLParser.
    NSString *path = [[NSBundle mainBundle] pathForResource:@"route" ofType:@"kml"];
    NSURL *url = [NSURL fileURLWithPath:path];
    kmlParser = [[KMLParser alloc] initWithURL:url];
    [kmlParser parseKML];
    // Add all of the MKOverlay objects parsed from the KML file to the map.
    NSArray *overlay2 = [kmlParser overlays];
    [map addOverlay:overlay1];
    [map addOverlays:overlay2];
    // Set the starting location.
    CLLocationCoordinate2D startingLocation;
    startingLocation.latitude = 0.00;
    startingLocation.longitude =-0.00;
    map.region = MKCoordinateRegionMakeWithDistance(startingLocation, 4600, 4600);
    [map setCenterCoordinate:startingLocation];       
}
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay1
{
    MapOverlayView *view = [[MapOverlayView alloc] initWithOverlay:overlay1];
    view.overlayAlpha = 1.0;
    return view;
}
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay2:(id <MKOverlay>)overlay2
{
    return [kmlParser viewForOverlay:overlay2];
}
@end