如何在ios 6.0及以上版本中获取Google地图

时间:2013-08-26 06:09:17

标签: ios

Apple已经从ios 6.0版开始从谷歌地图中取出。苹果使用MkMapView并不像谷歌地图那么清楚..我使用GoogleMapOverlay它在MkMapView中显示谷歌地图.GoogleMapOverlay显示我要移动的世界地图使用纬度和经度的特定情况...如果我在GoogleMapOverlay示例中指定纬度和经度位置我在后面的矩形形状覆盖中单独获取该特定位置我可以看到我的mkmapview ...可以任何人请指导我解决这个...谢谢你

2 个答案:

答案 0 :(得分:1)

您可以在iOS 6上添加UIWebView并在其上添加地图来使用Google地图。

答案 1 :(得分:1)

您可以将google地图sdk用于> = ios6

https://developers.google.com/maps/documentation/ios/

here is sample code from google sdk ios

#import "YourViewController.h"
#import <GoogleMaps/GoogleMaps.h>

@implementation YourViewController {
  GMSMapView *mapView_;
}

// You don't need to modify the default initWithNibName:bundle: method.

- (void)loadView {
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:24.451794 longitude:54.391412 zoom:12];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position=CLLocationCoordinate2DMake(24.451794,54.391412);
marker.snippet = @"Abu Dhabi";
marker.title = @"Al Jazira Sports and Cultural Club";
marker.map = mapView_;
}


@end
output:

enter image description here