检查代码和图像行为。
- (void)mainQueue:(BOOL)update
{
NSLog(@"main queue");
GMSPolyline *singleLine;
GMSPath *path1 =[GMSPath pathFromEncodedPath:self.dataReceive[@"routes"][0][@"overview_polyline"][@"points"]];
singleLine = [GMSPolyline polylineWithPath:path1];
self.singleLine.map = nil;
if(update)
{
singleLine.strokeWidth = 7;
singleLine.strokeColor = [UIColor greenColor];
singleLine.map = self.mapView;
self.singleLine = singleLine;
int j = 0;
NSArray *steps = [[[self.dataReceive objectForKey:@"routes"][0]objectForKey:@"legs"][0]objectForKey:@"steps"];
for(j=0; j<steps.count;j++){
GMSPath *path2 =[GMSPath pathFromEncodedPath:self.dataReceive[@"routes"][0][@"legs"][0][@"steps"][j][@"polyline"][@"points"]];
for (signed long i = 0; i< path2.count; i++) {
[CATransaction begin];
[CATransaction setAnimationDuration:10];
CLLocationCoordinate2D position = [path2 coordinateAtIndex:i];
self.marker.position = position;
[CATransaction commit];
//self.marker.map = self.mapView;
}
self.marker.map = self.mapView;
}
circ.map = self.mapView;
}
}
检查输出:
] 1