iPhone MapKit त्रुटि

वोट
1

मैं सिर्फ MapKit फ्रेमवर्क का उपयोग शुरू कर दिया। मैं से एक नमूना कोड मिला है यहाँ

लेकिन जब मैं कोड का निर्माण यह निम्नलिखित त्रुटि देता है।

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

यह नक्शा चलता नहीं है।

मैं कोड में कोई त्रुटि है कि क्या उलझन में हूँ या वहाँ गूगल सेवाओं के साथ कुछ त्रुटि है।

08/12/2009 को 10:08
का स्रोत उपयोगकर्ता
अन्य भाषाओं में...                            


2 जवाब

वोट
2

मैं एक समाधान पाया है, हम उपयोगकर्ता के कीचेन के लिए साख जोड़ने के लिए यहाँ मेरी कोड है जरूरत

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)

मैं पहली बार बरामद sharedCredentialStorage (1), तो मैं नया NSURLCredential (2) का उपयोग करने के लिए अपने उपयोगकर्ता नाम, पासवर्ड, और दृढ़ता के प्रकार युक्त बनाया। उसके बाद मैं दो NSURLProtectionSpace बनाया (3) (4): HTTPS कनेक्शन के लिए एक, और HTTP कनेक्शन के लिए एक

और अंत में, मैं NSURLCredential sharedCredentialStorage इन ProtectionSpaces के लिए जोड़ा (5) (6)

मुझे आशा है कि इस कोड को आपकी मदद कर सकता

01/06/2010 को 19:48
का स्रोत उपयोगकर्ता

वोट
0

हाँ हम शामिल किया है MapKit framework.After viewDidLoad त्रुटि, आ रहा है सही विचार है जहाँ से प्रतिनिधि विधि इस त्रुटि दे रहा है की जरूरत नहीं है

08/12/2009 को 11:23
का स्रोत उपयोगकर्ता

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