【问题标题】:Select a marker method with Google Maps iOS SDK使用 Google Maps iOS SDK 选择标记方法
【发布时间】:2016-02-11 10:22:26
【问题描述】:

我有一个应用程序,每次用户接近GMSMapView 上的地图时都会发送通知。

我希望当用户打开通知 (UILocalNotification) 时,标记已经被选中并且其信息窗口将可见。

我已经在委托中搜索了执行此操作的方法(selectAMarker:/selectAMarkerInPosition: 或类似的东西),但我没有找到类似的东西。

任何人都知道这样做的方法/知道我该怎么做?

有可能吗?

非常感谢!

【问题讨论】:

    标签: ios objective-c iphone cocoa-touch google-maps-sdk-ios


    【解决方案1】:

    我觉得你喜欢这种方法

    -(BOOL) mapView:(GMSMapView *) mapView didTapMarker:(GMSMarker *)marker
    {
    NSLog(@"try");
    return YES;
    }
    

    别忘了给委托人打电话

    @interface ViewController : UIViewController <GMSMapViewDelegate>
    

    yourmapView_.delegate = self;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多