在viewController上显示Yandex mapView

时间:2015-10-23 12:23:19

标签: ios objective-c mapkit yandex-maps

我已经拥有了yandex的API密钥。我已经从https://github.com/yandexmobile/yandexmapkit-ios下载并运行了该项目。我在项目中创建了Settings.h / Settings.m文件,并使用此代码显示mapView。

[[Settings sharedSettings] setApiKey: @"My API Key"];
self.mapView = [YMKMapView new];
[self.mapView setFrame: self.view.frame];
[self.mapView setTracksUserLocation: YES];
[self.mapView setShowsUserLocation: YES];
[self.mapView setShowTraffic: NO];
[self.view addSubview: self.mapView];

但似乎setApiKey不起作用。有什么建议?

0 个答案:

没有答案