Google Maps iOS SDK, Getting Current Location of user

前端 未结 7 2408
渐次进展
渐次进展 2020-12-01 04:49

For my iOS app (building in iOS7),i need to show user\'s current location when the app load.I am using Google Maps iOS SDK. I am follo

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 05:20

    Is delegate method didTapMyLocationButton is not way?

    https://developers.google.com/maps/documentation/ios/reference/protocol_g_m_s_map_view_delegate-p#ac0e0171b811e839d9021800ca9fd33f4

    - (BOOL)didTapMyLocationButtonForMapView:(GMSMapView *)mapView {
        return YES;
    }
    

    And you can get location by

    (lldb) po mapView.myLocation
    <+37.33243033,-122.03088128> +/- 386.93m (speed -1.00 mps / course -1.00) @ 5/19/14, 6:22:28 PM Moscow Standard Time
    

提交回复
热议问题