0
我使用GMS创建了一个简单的IOS应用程序。我在特定位置添加了一些标记。我只是想在用户点击标记时需要我的应用程序应该在用户位置和点击标记之间绘制一条线。我没有发现标记没有窃听的方法。Google Maps SDK for IOS Directions
- (void)viewDidLoad {
[super viewDidLoad];
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868
longitude:151.2086
zoom:12];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.settings.compassButton = YES;
mapView_.settings.myLocationButton = YES;
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
GMSMarker *marker1 = [[GMSMarker alloc] init];
marker1.position = CLLocationCoordinate2DMake(40.992735,28.789164);
marker1.title = @"ASD";
marker1.map = mapView_;
我的应用程序正在使用LocationServices在当前位置打开。我只是想在用户和用户点击标记之间取得方向。我怎样才能做到这一点 ?
谢谢! 祝大家度过愉快的一天。