latitude and longitude points from MKPolyline

前端 未结 2 1460
北荒
北荒 2020-12-09 08:00

I am trying to figure out a way to get all the latitude and longitude points from a MKPolyline drawn on a MKMapView on an iOS app.

I know the MKPolyline does not sto

2条回答
  •  情深已故
    2020-12-09 08:57

    Swift 3 version:

    I'm aware this is a very old question, but its still one of the top hits on Google when searching for this issue, with no good Swift solutions, So wanted to share my tiny extension to make life a bit easier by adding a coordinates property to MKPolyline:

    https://gist.github.com/freak4pc/98c813d8adb8feb8aee3a11d2da1373f

提交回复
热议问题