3

I need to integrate in my iOS app Yandex Map. Do you have a good examples? I use https://github.com/yandexmobile/yandexmapkit-ios, but it doesn't help me. How can I init YMKMapView? Please help me. Thank you

someone
  • 61
  • 1
  • 10

2 Answers2

5

Have you looked at the sample project YandexMapKitSample provided there? It shows pretty much everything you need.

I also hope you did request a key from Yandex to use the iOS Kit - I've been waiting for mine for about a week or so. You need to put it here: -[YMKConfiguration setApiKey:]

Sergey Grischyov
  • 11,995
  • 20
  • 81
  • 120
  • I use this samples and in result, I have error "YandexMapKitSample[3911:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key delegate" - I set the key, which i get from yandex in [[NSUserDefaults standardUserDefaults] setValue:apiKey forKey:kYandexMapKitApiKey]; – someone Mar 20 '13 at 11:43
  • @someone Why use NSUserDefaults when you can set the key where it is written in the docs? And also, I think, you should use something like `[[NSUserDefaults standardUserDefaults] setValue:apiKey forKey:@"yandexKey"]` – Sergey Grischyov Mar 20 '13 at 11:45
  • Thank you, now I have a problems with displaying mapView "Unknown class YMKMapView in Interface Builder file.". Do you have a tutorial? Could you help me, thank you. – someone Mar 20 '13 at 16:29
  • Thank you, all for helps, if someone have problems with Yandex Map: 1.https://github.com/yandexmobile/yandexmapkit-ios/wiki/%D0%94%D0%BE%D0%B1%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5-Yandex-Map-Kit-%D0%B2-%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82 2. [[Settings sharedSettings] setApiKey: @"Your api key"]; _mapView = [YMKMapView new]; [_mapView setFrame: self.view.frame]; [_mapView setTracksUserLocation: YES]; [_mapView setShowsUserLocation: YES]; [_mapView setShowTraffic: NO]; [self.view addSubview: _mapView]; – someone Mar 21 '13 at 09:18
  • @someone Please mark the answer as accepted if I was able to help you in any way! Good luck! – Sergey Grischyov Mar 21 '13 at 09:27
0

Are you sure that you have added flag "-all_load" to Other Linker Flags in project settings?