mardi 14 juin 2016

How to draw a proper polylines on google maps


I have successfully drawn a polyline from point a to point b, but for some reason , it shows linear line not the correct waypoints

Here's the code

let path = GMSMutablePath()
        path.addLatitude(3.1970044, longitude:101.7389365)
        path.addLatitude(3.2058354, longitude:101.729536)
        let polyline = GMSPolyline(path: path)
        polyline.strokeWidth = 5.0
        polyline.geodesic = true
        polyline.map = mapView

I was expecting that it would be doing some waypoints, but it just shows straight polylines

enter image description here


Aucun commentaire:

Enregistrer un commentaire