开发者

Add address annotation when finding route via google maps api

I'm using google maps to get directions from one place to another. Here is the code

NSString *mapAPIString = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f",
    sourceAddress.coordiate.latitude,
    sourceAddress.coordiate.longitude,
    destAd开发者_如何转开发dress.coordiate.latitude,
    destAddress.coordiate.longitude,
    ];
NSURL *url = [[NSURL alloc] initWithString:mapAPIString];
[[UIApplication sharedApplication] openURL:url];

The code works perfect. But both addresses are marked as 'Unknown address' in iOS Map App. Is it possible to add custom title for each address ?


iOS 6 is still under NDA, but if you have access to the docs have a look at them and you will probably find useful information for this problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜