Google のルート案内を使用してルート案内を取得しようとしていますが、次のエラーが発生します。
エラー ドメイン=org.brautaset.JSON.ErrorDomain コード=3 \"認識できない先頭文字 (41)\
ここにJsonがあります
loadDirections('Avenida Paulista', 'Rua Augusta', { 'locale': 'en', travelMode: G_TRAVEL_MODE_WALKING, avoidHighways: false, getPolyline: true, getSteps: true, preserveViewport: false})
何が間違っていますか?認識されない主人公 (41)とはどういう意味ですか?
- (void)loadWithStartPoint:(NSString *)startPoint endPoint:(NSMutableArray *)endPoints options:(UICGDirectionsOptions *)options {
for (int idx = 0; idx < [endPoints count];idx ++)
{
NSString* msg = [NSString stringWithFormat:@"loadDirections('%@', '%@', %@)", startPoint, [endPoints objectAtIndex:idx], [options JSONRepresentation]];
NSLog(@"msg %@",msg);
mstr = [msg retain];
[self performSelector:@selector(loadDirections:) withObject:nil afterDelay:0.5];
}
}
-(void)loadDirections:(NSString *)message
{
[googleMapsAPI stringByEvaluatingJavaScriptFromString:mstr];
}