How to get animated polyline route in GMSMapView, so that it move along with map when map is moved?

SWIFT Declartion var polyline = GMSPolyline() var animationPolyline = GMSPolyline() var path = GMSPath() var animationPath = GMSMutablePath() var i: UInt = 0 var timer: Timer! To Darw Route func drawRoute(routeDict: Dictionary<String, Any>) { let routesArray = routeDict [“routes”] as! NSArray if (routesArray.count > 0) { let routeDict = routesArray[0] as! Dictionary<String, Any> let routeOverviewPolyline … Read more

Drawing Route Between Two Places on GMSMapView in iOS

`first get all points coordinates which are coming in route then add these points latitude and longitude in path in will draw path according to that` GMSCameraPosition *cameraPosition=[GMSCameraPosition cameraWithLatitude:18.5203 longitude:73.8567 zoom:12]; _mapView =[GMSMapView mapWithFrame:CGRectZero camera:cameraPosition]; _mapView.myLocationEnabled=YES; GMSMarker *marker=[[GMSMarker alloc]init]; marker.position=CLLocationCoordinate2DMake(18.5203, 73.8567); marker.icon=[UIImage imageNamed:@”aaa.png”] ; marker.groundAnchor=CGPointMake(0.5,0.5); marker.map=_mapView; GMSMutablePath *path = [GMSMutablePath path]; [path addCoordinate:CLLocationCoordinate2DMake(@(18.520).doubleValue,@(73.856).doubleValue)]; [path addCoordinate:CLLocationCoordinate2DMake(@(16.7).doubleValue,@(73.8567).doubleValue)]; … Read more