iPhone MapKit hatası

oy
1

Sadece Mapkit Framework kullanımını başlattı. Ben bir örnek kod var burada .

Ben kodu oluştururken Ama şu hata verir.

/SourceCache/GoogleMobileMaps/GoogleMobileMaps-201/googlenav/mac/Loader.mm:195 server returned error: 407

Bu haritayı gösterir etmez.

Ben kodu bir hata olup olmadığı karıştı veya Google hizmetleriyle bazı hata var.

Oluştur 08/12/2009 saat 10:08
kaynak kullanıcı
Diğer dillerde...                            


2 cevaplar

oy
2

Bir çözüm bulduk, biz burada benim kodudur kullanıcının anahtarlığa Kimlik eklemem gerekiyor

NSURLCredentialStorage * credentialStorage=[NSURLCredentialStorage sharedCredentialStorage]; //(1)
NSURLCredential * newCredential;
newCredential=[NSURLCredential credentialWithUser:@"myUserName" password:@"myPWD" persistence:NSURLCredentialPersistencePermanent]; //(2)
NSURLProtectionSpace * mySpaceHTTP=[[NSURLProtectionSpace alloc] initWithProxyHost:@"ipProxy" port:port type:NSURLProtectionSpaceHTTPProxy realm:nil authenticationMethod:nil]; //(3)
NSURLProtectionSpace * mySpaceHTTPS=[[NSURLProtectionSpace alloc] initWithProxyHost:@"ipProxy" port:port type:NSURLProtectionSpaceHTTPSProxy realm:nil authenticationMethod:nil]; //(4)
[credentialStorage setCredential:newCredential forProtectionSpace:mySpaceHTTP]; //(5)
[credentialStorage setCredential:newCredential forProtectionSpace:mySpaceHTTPS]; //(6)

İlk kurtarıldı sharedCredentialStorage (1), sonra ben yeni NSURLCredential (2) kullanmak için kullanıcı adımı, parolasını ve kalıcılık türünü içeren yarattı. Bundan sonra, iki NSURLProtectionSpace hazırlandı (3) (4): HTTPS Connexion® için bir tane ve HTTP Connexion® için bir

Ve son olarak, bu ProtectionSpaces için NSURLCredential sharedCredentialStorage eklendi (5) (6)

Bu kod size yardımcı olabilir umuyoruz

Cevap 01/06/2010 saat 19:48
kaynak kullanıcı

oy
0

Evet biz Mapkit framework.After viewDidLoad hata tam bir fikir hangi temsilci yöntemi bu hatayı veriyor yoksa, geliyor dahil ettik

Cevap 08/12/2009 saat 11:23
kaynak kullanıcı

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more