Google Maps iOS SDK, Getting Directions between 2 locations

前端 未结 11 1302
栀梦
栀梦 2020-12-02 07:52

While I am using Google Maps SDK, I am trying to get driving direction between two locations on iOS. I know we can do this using two methods:-

1.) Using URL Scheme,

11条回答
  •  Happy的楠姐
    2020-12-02 08:35

    It sounds like you are looking for UI Chrome like the Google Maps app has for showing directions. Google Maps SDK for iOS will paint you a map, but you are responsible for the additional navigation chrome.

    You can use the Google Directions API to request directions, and then use the encoded path returned from the service to draw a GMSPolyline using GMSPath's pathFromEncodedPath: method.

提交回复
热议问题